weblogic 10.3上的ClassCastException jboss-seam

时间:2010-06-30 10:31:12

标签: java java-ee jboss seam weblogic-10.x

我在weblogic 10.3上安装了jboss-seam 2.2.0有很多问题。我想通过jboss部署示例配件,但是我收到以下错误:

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)

我使用here给出的文件,所以我有一个包含jsf的战争,我有一个包含应用程序的耳朵。

这是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>

我认为weblogic想在jsf战争中使用一个监听器,但我不确定。

有人可以帮助我吗?

由于

编辑:

以下是我耳边的罐子:

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

我试过没有jsf-impl但我收到了这个错误:

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

2 个答案:

答案 0 :(得分:1)

我发现了问题,我在/ lib目录的weblogic域中有jsf-api.jar。

答案 1 :(得分:0)