Error installing a War in jboss eap 6.2 with myfaces jsf 1.1

Asked

Viewed 441 times

1

The error below occurs when installing the application to jboss. I know it is due to jboss having a javaserver faces implementation.

11:15:04,601 INFO  [org.apache.catalina.core] (ServerService Thread Pool -- 182) JBWEB001093: The listener org.apache.myfaces.webapp.StartupServletContextListener is already configured for this context, the duplicate definition has been ignored
11:15:04,625 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/myapp]] (ServerService Thread Pool -- 182) JBWEB000285: Error configuring application listener of class com.sun.faces.config.ConfigureListener: java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener from [Module "deployment.MyApp.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
    at org.jboss.as.web.deployment.WebInjectionContainer.newInstance(WebInjectionContainer.java:74) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3294) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
    at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_67]
    at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_67]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_67]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_67]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
    at org.jboss.threads.JBossThread.run(JBossThread.java:122)
  • 1

    Welcome to SO-pt, I suggest you read How to ask a good question. I believe you should explain better what you are trying to do, where you are making the mistake and how the community can help you.

2 answers

2

I was able to install the application in jboss but I had to do the following:

Add file WEB_INF jboss-Deployment-Structure.xml

<jboss-deployment-structure>
   <deployment>
      <exclusions>
        <module name="javax.faces.api"/>
        <module name="com.sun.jsf-impl"/>
      </exclusions>
   </deployment>
</jboss-deployment-structure>

Include the context parameter in web.xml

...
<context-param>
      <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
      <param-value>true</param-value>
</context-param>
...

This link helped a lot http://docs.jboss.org/jbossas/6/JSF_Guide/en-US/html/jsf.deployer.config.html

0

Modern versions of application servers already have great classpath isolation per project, so it is very unlikely that the problem is related to conflicts between libraries loaded by your project and those already existing on the server.

The problem is probably related to this exception:

java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener

as answered in this stackoverflow question in English: https://stackoverflow.com/questions/11777844/java-lang-classnotfoundexception-com-sun-faces-config-configurelistener-when-us

This class is part of Mojarra, which is a concurrent implementation to Myfaces.

It should not be necessary when using Myfaces. The exception may be happening for the following reasons:

-There is a <listener> manually set on the application’s web.xml or on the web-fragmet.xml of some jar within the application, which is referencing this Mojarra class.

-There is somewhere in the classpath a Mojarra . tld file, which may be being loaded and contain a <listener> also pointing to the Mojarra class.

This exception can be corrected by simply removing these listeners.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.