Hot questions for Using GlassFish in jsf

Question:

I had a web filter to redirect from the login and index page if the user was already authenticated. Originally I had an invalid URL pattern. I fixed the invalid pattern and attempted to redeploy only to receive this:

java.lang.IllegalArgumentException: Invalid URL Pattern: [{0}]
at org.glassfish.web.deployment.node.WebResourceCollectionNode.setElementValue(WebResourceCollectionNode.java:136)

I checked around in my application to see if I was missing something or had typed something else wrong. Eventually I removed the WebFilter class, removed it's mappings from the web.xml and attempted to redeploy and the same error continues to come up. Currently I am unable to redeploy the application at all.

I checked around with some Googling and came across this which seems to be a similar issue, but no resolution.

The full stacktrace:

Severe:   Exception while deploying the app [NCW-war]
Severe:   Exception during lifecycle processing
java.lang.IllegalArgumentException: Invalid URL Pattern: [{0}]
at org.glassfish.web.deployment.node.WebResourceCollectionNode.setElementValue(WebResourceCollectionNode.java:136)
at com.sun.enterprise.deployment.node.SaxParserHandler.endElement(SaxParserHandler.java:583)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(XMLSchemaValidator.java:863)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2973)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333)
at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:318)
at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:245)
at com.sun.enterprise.deployment.archivist.Archivist.readStandardDeploymentDescriptor(Archivist.java:665)
at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:391)
at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:203)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:227)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96)
at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:881)
at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:821)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:377)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)

Any help would be appreciated.

Thank You, -Jarrod

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
<context-param>
    <param-name>javax.faces.PROJECT_STAGE</param-name>
    <param-value>Development</param-value>
</context-param>
<context-param>
    <param-name>primefaces.THEME</param-name>
    <param-value>trontastic</param-value>
</context-param>
<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<error-page>
    <exception-type>java.lang.SecurityException</exception-type>
    <location>/login-error.xhtml</location>
</error-page>
<session-config>
    <session-timeout>
        30
    </session-timeout>
</session-config>
<welcome-file-list>
    <welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
<error-page>
    <error-code>401</error-code>
    <location>/unauthorized-access.xhtml</location>
</error-page>
<error-page>
    <error-code>403</error-code>
    <location>/unauthorized-access.xhtml</location>
</error-page>
<error-page>
    <error-code>404</error-code>
    <location>/page-not-found.xhtml</location>
</error-page>
<security-constraint>
    <display-name>Installations</display-name>
    <web-resource-collection>
        <web-resource-name>Installations</web-resource-name>
        <url-pattern>/installations/*</url-pattern>
    </web-resource-collection>
    <web-resource-collection>
        <web-resource-name>Resources</web-resource-name>
        <url-pattern>/resources/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
        <description/>
        <role-name>Installations</role-name>
    </auth-constraint>
</security-constraint>
<security-constraint>
    <display-name>Administrator</display-name>
    <web-resource-collection>
        <web-resource-name>Administrator</web-resource-name>
        <url-pattern>/NCW-war/*</url-pattern>
    </web-resource-collection>
    <web-resource-collection>
        <web-resource-name>Resources</web-resource-name>
        <url-pattern>/resources/*</url-pattern>
    </web-resource-collection>
    <web-resource-collection>
        <web-resource-name>Project Management</web-resource-name>
        <url-pattern>project-management/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
        <description/>
        <role-name>Administrator</role-name>
    </auth-constraint>
</security-constraint>
<security-constraint>
    <display-name>Analyst</display-name>
    <web-resource-collection>
        <web-resource-name>Analyst Pages</web-resource-name>
        <url-pattern>/analyst/*</url-pattern>
        <http-method>GET</http-method>
        <http-method>PUT</http-method>
        <http-method>HEAD</http-method>
        <http-method>POST</http-method>
        <http-method>DELETE</http-method>
    </web-resource-collection>
    <web-resource-collection>
        <web-resource-name>Resources</web-resource-name>
        <url-pattern>/resources/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
        <role-name>Analyst</role-name>
    </auth-constraint>
</security-constraint>
<security-constraint>
    <display-name>WAN Analyst</display-name>
    <web-resource-collection>
        <web-resource-name>WAN Analyst Pages</web-resource-name>
        <url-pattern>/analyst/wan/*</url-pattern>
        <http-method>GET</http-method>
        <http-method>PUT</http-method>
        <http-method>HEAD</http-method>
        <http-method>POST</http-method>
        <http-method>DELETE</http-method>
    </web-resource-collection>
    <web-resource-collection>
        <web-resource-name>Resources</web-resource-name>
        <url-pattern>/resources/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
        <role-name>WAN Analyst</role-name>
    </auth-constraint>
</security-constraint>
<security-constraint>
    <display-name>Voice Analyst</display-name>
    <web-resource-collection>
        <web-resource-name>Voice Analyst Pages</web-resource-name>
        <url-pattern>/analyst/voice/*</url-pattern>
        <http-method>GET</http-method>
        <http-method>PUT</http-method>
        <http-method>HEAD</http-method>
        <http-method>POST</http-method>
        <http-method>DELETE</http-method>
    </web-resource-collection>
    <web-resource-collection>
        <web-resource-name>Resources</web-resource-name>
        <url-pattern>/resources/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
        <role-name>Voice Analyst</role-name>
    </auth-constraint>
</security-constraint>
<security-constraint>
    <display-name>Project Manager Pages</display-name>
    <web-resource-collection>
        <web-resource-name>Project Manager Pages</web-resource-name>
        <url-pattern>/project-management/*</url-pattern>
        <http-method>GET</http-method>
        <http-method>PUT</http-method>
        <http-method>HEAD</http-method>
        <http-method>POST</http-method>
    </web-resource-collection>
    <web-resource-collection>
        <web-resource-name>Resources</web-resource-name>
        <url-pattern>/resources/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
        <description/>
        <role-name>Project Manager</role-name>
    </auth-constraint>
</security-constraint>
<login-config>
    <auth-method>FORM</auth-method>
    <realm-name>LDAP</realm-name>
    <form-login-config>
        <form-login-page>/index.xhtml</form-login-page>
        <form-error-page>/login-error.xhtml</form-error-page>
    </form-login-config>
</login-config>
<security-role>
    <role-name>Administrator</role-name>
</security-role>
<security-role>
    <role-name>Installations</role-name>
</security-role>
<security-role>
    <role-name>Analyst</role-name>
</security-role>
<security-role>
    <role-name>WAN Analyst</role-name>
</security-role>
<security-role>
    <role-name>Voice Analyst</role-name>
</security-role>
<security-role>
    <role-name>Project Manager</role-name>
</security-role>

There should be no filter in there at this time.


Answer:

The web resource collection named Administrator has a <url-pattern> tag that its content has no leading slash. That means instead of /project-management/* it's just project-management/*. It seems that a url pattern has start with a leading slash. All other url-patterns in your web.xml are started with / except the Administrator one. Maybe this is the root cause of your problem. However I'm not sure it's a Glassfish problem or is part of Java EE spec.

Question:

I have simple project with no servlet but with a JavaBean class used in JavaServer Faces xhtml files.

How do i configure web.xml, glassfish-web.xml files? The whole project is managed by maven.

Here is the content of web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
    version="4.0">

    <display-name>LoginJSFApp</display-name>

    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>index.xhtml</welcome-file>
    </welcome-file-list>
</web-app>

and glassfish-web.xml:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app>
    <context-root>/LoginJSFApp</context-root>
</glassfish-web-app>

Answer:

Your question is too broad. There are a lot of things you can add to web.xml : filters, servlet declarations, security stuff and many more. It depends on you each concrete case.

This is a very basic stuff that any web.xml should contain:

<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
         http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
         version="3.1">

    // stuff here

</web-app>

Here is an example of web.xml with some stuff inside:

<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
         http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
         version="3.1">

    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>

    <display-name>HelloWorld Application</display-name>
    <description>
        This is a simple web application.
    </description>

    <!-- This is how you can add servlet -->
    <servlet>
        <servlet-name>HelloServlet</servlet-name>
        <servlet-class>examples.Hello</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>HelloServlet</servlet-name>
        <url-pattern>/hello</url-pattern>
    </servlet-mapping>

</web-app>

This documentation contains a lot of information about what you can have inside web.xml and what for. I would suggest you check it.

Happy Coding :)

Question:


Answer:

You should annotate your bean with @ManagedBean(name = "mealBean") instead of @Named(value = "mealBean").

It is not a good practice to mix CDI annotations like javax.inject.Named with the JSF annotations, like javax.faces.bean.SessionScoped or javax.faces.bean.ManagedBean.

And this way you can delete the useless @Dependent.

Question:

I have an application developed to GlassFish container. In my searches I saw how create a connection pool in WildFly, but, how about data base configurations in the glassfish-resources.xml? How can I adapt this file to use with WildFly? And about glassFish-web.xml, with the realm configuration? How can I convert this to use in WildFly? Below is the code of glassFish-resources.xhtml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd">
<resources>
    <jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="org.postgresql.ds.PGSimpleDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="post-gre-sql_netclin_postgresPool" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.DataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
        <property name="serverName" value="localhost"/>
        <property name="portNumber" value="xxxx"/>
        <property name="databaseName" value="netclin"/>
        <property name="User" value="postgres"/>
        <property name="Password" value="xxxx"/>
        <property name="URL" value="jdbc:postgresql://localhost:5432/xxx"/>
        <property name="driverClass" value="org.postgresql.Driver"/>
    </jdbc-connection-pool>

    <jdbc-resource enabled="true" jndi-name="netclin2" object-type="user" pool-name="post-gre-sql_netclin_postgresPool"/>
</resources>

And below is the glassfish-web.xml code:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
  <glassfish-web-app error-url="">
   <context-root>/umamaoNovo</context-root>
    <security-role-mapping>
       <role-name>papelAdministradores</role-name>
        <group-name>administradores</group-name>
     </security-role-mapping>
   <security-role-mapping>
    <role-name>papelUsuarios</role-name>
    <group-name>administradores</group-name>
    <group-name>usuarios</group-name>
    <group-name>trabalhadores</group-name>
</security-role-mapping>
<security-role-mapping>
    <role-name>papelTrabalhadores</role-name>
    <group-name>administradores</group-name>
    <group-name>usuarios</group-name>
    <group-name>trabalhadores</group-name>
</security-role-mapping>
<class-loader delegate="true"/>
<jsp-config>
    <property name="keepgenerated" value="true">
        <description>Keep a copy of the generated servlet class' java code.</description>
    </property>
</jsp-config>


Answer:

Follow the guide from the Wildfly makers themselves. Below is the link: Glassfish to Wildfly Migration

Also a very similar guide over here.Another Glassfish to Wildfly Migration

Question:

I've developed a Java7 EE Web-Project on my local machine, using GlassFish 4.0 and PrimeFaces 4.0. I've successfully deployed it via .war-file on my WebServer, running Apache Tomcat 7.0.27. Everything works identical, except this little code-snippet:

...

<h:form id="autoComplete">
    <p:autoComplete id="auto" size="55" converter="autoConverter" value="#{autoComplete.indexObj}" var="per" itemLabel="#{per.name}"  itemValue="#{per.id}" completeMethod="#{autoComplete.complete}" onkeydown="styleOnKey();">
                <p:ajax event="itemSelect" listener="#{autoComplete.handleComplete}" update=":content" oncomplete="styleOnKey();"/>
    </p:autoComplete>
</h:form>

...

<h:form id="selectMenu">
    <p:selectOneMenu value="#{autoComplete.strSelectedSearch}">
        <c:forEach items="#{autoComplete.lstSearches}" var="search">
            <f:selectItem itemLabel="#{search}" itemValue="#{search}" />
        </c:forEach>
        <p:ajax event="change" update=":autoComplete:auto :content" listener="#{autoComplete.handleSelect(event)}"/>
    </p:selectOneMenu>
</h:form>

...

And some Snippets of my backing bean:

@ManagedBean(name = "autoComplete")
@ViewScoped
public class AutoCompleteBean implements Serializable {

    ...
        public void handleComplete(SelectEvent event) {
            Logger.Log("complete fired");
        }

    ...

         public void handleSelect(SelectEvent event) {
            Logger.Log("select fired");
        }

    ...
}

Funny thing about this snippet, while using the .war-file with GlassFish 4.0 on Windows 7 SP1, the ajax-event on p:selectOneMenu (handleSelect) is firing. If you're deploying this code on a Windows 2008 R2 Server using Apache Tomcat 7.0.27, it doesn't. Anyone got an idea why this is the case? Is somebody able to reproduce this? The Rest of the Code works just the same. Any help would be greatly appreciated...^^

edit: I managed to find the following StackTrace in the Tomcat-Logs:

SEVERE: java.lang.NullPointerException
    at java.lang.Class.isAssignableFrom(Native Method)
    at org.apache.el.util.ReflectionUtil.isAssignableFrom(ReflectionUtil.java:319)
    at org.apache.el.util.ReflectionUtil.getMethod(ReflectionUtil.java:185)
    at org.apache.el.parser.AstValue.invoke(AstValue.java:257)
    at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
    at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
    at org.primefaces.component.behavior.ajax.AjaxBehaviorListenerImpl.processAjaxBehavior(AjaxBehaviorListenerImpl.java:53)
    at javax.faces.event.AjaxBehaviorEvent.processListener(AjaxBehaviorEvent.java:113)
    at javax.faces.component.behavior.BehaviorBase.broadcast(BehaviorBase.java:106)
    at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:804)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1812)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

Answer:

I solved this issue by using the following code-snippet inside of the :

...

<p:ajax event="change" update=":autoComplete:auto :content" onsuccess="#{autoComplete.handleSimulatedSelect(event)}"/>

...

Using the onSuccess-Attribute works with both Servers, but has anyone a reasanobly explanation for this?