views:

57

answers:

2

Hi guys,

I have many problem to installed jboss-seam 2.2.0 on weblogic 10.3. I want to deploy the exemple furnish by jboss but I get the following error:

java.lang.ClassCastException: com.sun.faces.application.WebappLifecycleListener cannot be cast to java.util.EventListener
 at weblogic.servlet.internal.WebComponentContributor.createListenerInstance(WebComponentContributor.java:263)
 at weblogic.servlet.internal.EventsManager.registerEventListener(EventsManager.java:361)
 at weblogic.servlet.internal.EventsManager.registerEventListeners(EventsManager.java:104)
 at weblogic.servlet.internal.EventsManager.registerEventListeners(EventsManager.java:69)
 at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1783)
 at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3005)
 at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1371)
 at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:468)
 at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
 at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
 at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
 at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
 at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
 at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
 at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
 at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
 at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:16)
 at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:162)
 at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
 at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
 at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140)
 at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106)
 at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:143)
 at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
 at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:820)
 at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1227)
 at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:436)
 at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
 at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
 at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
 at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
 at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
 at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
 at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

I use the documention given here so I have a war which containt jsf and I have an ear which containt the application.

Here is the web.xml:

   <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">

 <listener>
   <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
 </listener>
  <listener>
    <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
  </listener>


   <!-- RichFaces -->

   <context-param>
      <param-name>org.richfaces.SKIN</param-name>
      <param-value>glassX</param-value>
   </context-param>

   <!-- Suppress spurious stylesheets -->

   <context-param>
      <param-name>org.richfaces.CONTROL_SKINNING</param-name>
      <param-value>disable</param-value>
   </context-param>

   <context-param>
      <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
      <param-value>disable</param-value>
   </context-param>

   <!-- Change load strategy to DEFAULT to disable sending scripts/styles as packs -->

   <context-param>
      <param-name>org.richfaces.LoadStyleStrategy</param-name>
      <param-value>ALL</param-value>
   </context-param>

   <context-param>
      <param-name>org.richfaces.LoadScriptStrategy</param-name>
      <param-value>ALL</param-value>
   </context-param>


  <filter>
    <filter-name>Seam Filter</filter-name>
    <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
  </filter>

  <filter-mapping>
    <filter-name>Seam Filter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

  <servlet>
    <servlet-name>Seam Resource Servlet</servlet-name>
    <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
  </servlet>


   <!-- Facelets development mode (disable in production) -->

   <context-param>
      <param-name>facelets.DEVELOPMENT</param-name>
      <param-value>@debug@</param-value>
   </context-param>

   <!-- JSF -->

   <context-param>
      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
      <param-value>.xhtml</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>*.seam</url-pattern>
   </servlet-mapping>

  <servlet-mapping>
    <servlet-name>Seam Resource Servlet</servlet-name>
    <url-pattern>/seam/resource/*</url-pattern>
  </servlet-mapping>
  <ejb-local-ref>
    <ejb-ref-name>jboss-seam-jee5/AuthenticatorAction/local</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>org.jboss.seam.example.booking.Authenticator</local>
  </ejb-local-ref>
  <ejb-local-ref>
    <ejb-ref-name>jboss-seam-jee5/BookingListAction/local</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>org.jboss.seam.example.booking.BookingList</local>
  </ejb-local-ref>
  <ejb-local-ref>
    <ejb-ref-name>jboss-seam-jee5/RegisterAction/local</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>org.jboss.seam.example.booking.Register</local>
  </ejb-local-ref>
  <ejb-local-ref>
    <ejb-ref-name>jboss-seam-jee5/ChangePasswordAction/local</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>org.jboss.seam.example.booking.ChangePassword</local>
  </ejb-local-ref>
  <ejb-local-ref>
    <ejb-ref-name>jboss-seam-jee5/HotelBookingAction/local</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>org.jboss.seam.example.booking.HotelBooking</local>
  </ejb-local-ref>
  <ejb-local-ref>
    <ejb-ref-name>jboss-seam-jee5/HotelSearchingAction/local</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>org.jboss.seam.example.booking.HotelSearching</local>
  </ejb-local-ref>
  <ejb-local-ref>
    <ejb-ref-name>jboss-seam-jee5/EjbSynchronizations/local</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>org.jboss.seam.transaction.LocalEjbSynchronizations</local>
  </ejb-local-ref>
  <session-config>
    <session-timeout>10</session-timeout>
  </session-config>
  <context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
    <param-value>resources.application</param-value>
  </context-param>
</web-app>

I think weblogic want to use a listener in the jsf war but I don't sure.

Someone can help me ?

Thanks

EDIT:

Here are jars present in my ear:

antlr.jar
cglib-nodep.jar
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
concurrent.jar
dom4j.jar
hibernate-annotations.jar
hibernate-commons-annotations.jar
hibernate-core.jar
hibernate-entitymanager.jar
hibernate-validator.jar
javassist.jar
jaxrs-api.jar
jboss-common-core.jar
jboss-el.jar
jboss-seam-resteasy.jar
jsf-api.jar
jsf-impl.jar
log4j.jar
resteasy-jaxrs.jar
richfaces-api.jar
slf4j-api.jar
slf4j-log4j12.jar

I tried without jsf-impl but I got this error:

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

Try again with both of jsp-impl and jsp-api removed.

Check this as well: http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webapp/configurejsfandjtsl.html

Bytecode Ninja
I tried and got this error:java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
Kiva
For your doc, I used it to configure the application. I don't understand my error :(
Kiva
Have you added the library-ref too? <library-ref> <library-name>jsf</library-name> <specification-version>1.2</specification-version> <implementation-version>1.2</implementation-version> <exact-match>false</exact-match> </library-ref>
Bytecode Ninja
Yes in the weblogic.xml file in the WEB-INF.
Kiva
A: 

I found the problem, I had jsf-api.jar in the weblogic domain in /lib directory.

Kiva