如何解决用户定义的监听器com.sun.faces.config.ConfigureListener失败:java.la



我们有jsf1.2应用程序,ejb3.0和weblogic10.0。我试图在本地weblogic服务器部署应用程序,但得到以下异常


& lt;

User defined listener com.sun.faces.application.WebappLifecycleListener failed:    c   java.lang.NullPointerException. java.lang.NullPointerException
    at com.sun.faces.application.WebappLifecycleListener.contextDestroyed(WebappLifecycleListener.java:270)
    at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:459)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.EventsManager.notifyContextDestroyedEvent(EventsManager.java:187)
    Truncated. see log file for complete stacktrace
> 
<Mar 21, 2014 2:19:09 PM IST> <Warning> <HTTP> <BEA-101162> <User defined listener com.sun.faces.config.ConfigureListener failed: java.lang.NullPointerException.
java.lang.NullPointerException
    at com.sun.faces.application.ApplicationAssociate.getInstance(ApplicationAssociate.java:171)
    at com.sun.faces.application.WebappLifecycleListener.handleAttributeEvent(WebappLifecycleListener.java:221)
    at com.sun.faces.application.WebappLifecycleListener.attributeRemoved(WebappLifecycleListener.java:194)
    at weblogic.servlet.internal.EventsManager.notifyContextAttributeChange(EventsManager.java:222)
    at weblogic.servlet.internal.WebAppServletContext.removeAttribute(WebAppServletContext.java:523)
    Truncated. see log file for complete stacktrace
> 
<Mar 21, 2014 2:19:09 PM IST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application 'standardReportingEar'.
weblogic.application.ModuleException: 
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:975)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:361)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
    Truncated. see log file for complete stacktrace
java.lang.AssertionError
    at com.sun.faces.application.ConverterPropertyEditorFactory$ClassTemplateInfo.loadTemplateBytes(ConverterPropertyEditorFactory.java:281)
    at com.sun.faces.application.ConverterPropertyEditorFactory$ClassTemplateInfo.<init>(ConverterPropertyEditorFactory.java:172)
    at com.sun.faces.application.ConverterPropertyEditorFactory$ClassTemplateInfo.<init>(ConverterPropertyEditorFactory.java:154)
    at com.sun.faces.application.ConverterPropertyEditorFactory.<init>(ConverterPropertyEditorFactory.java:524)
    at com.sun.faces.application.ConverterPropertyEditorFactory.getDefaultInstance(ConverterPropertyEditorFactory.java:544)
    Truncated. see log file for complete stacktrace

weblogic.10.0的config.xml是:部分:

<app-deployment>
    <name>standardReportingEar-1</name>
    <target>AdminServer</target>
    <module-type>ear</module-type>
    <source-path>L:auWorkspace_AUstandardReportingEartargetstandardReportingEar.ear</source-path>
    <security-dd-model>DDOnly</security-dd-model>
  </app-deployment>
  <library>
    <name>jsf#1.2@1.2.3.1</name>
    <target>AdminServer</target>
    <module-type>war</module-type>
    <source-path>L:weblogic10wlserver_10.0commondeployable-librariesjsf-1.2.war</source-path>
    <security-dd-model>DDOnly</security-dd-model>
  </library>
So in weblogic, the jsf war deployed as lib successfully.
Now 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">
  <display-name>richfacesejb-war</display-name>
  <description>development/test version WITHOUT grops authentication</description>

    <context-param> 
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>         
        <param-value>server</param-value>
    </context-param>              
   <context-param>
     <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
     <param-value>com.sun.facelets.FaceletViewHandler</param-value>
  </context-param>
    <context-param>
      <param-name>com.sun.faces.disableVersionTracking</param-name>
      <param-value>true</param-value>
    </context-param>      
  <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
  </context-param>
  <context-param>
    <param-name>facelets.DEVELOPMENT</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <!-- glassfish does not like value 1 when using custim tags -->
    <param-name>facelets.REFRESH_PERIOD</param-name>
    <param-value>-1</param-value>
  </context-param>
  <context-param>
    <param-name>org.richfaces.SKIN</param-name>
    <param-value>blueSky</param-value>
  </context-param>
  <context-param>
    <param-name>org.richfaces.CONTROL_SKINNING</param-name>
    <param-value>enable</param-value>
  </context-param>
  <error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/ErrorHandlingServlet</location>
  </error-page>
  <filter>
    <display-name>RichFaces Filter</display-name>
    <filter-name>richfaces</filter-name>
    <filter-class>org.ajax4jsf.Filter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>richfaces</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>ERROR</dispatcher>
  </filter-mapping>
  <listener>
    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
  </listener>
  <session-config>
    <session-timeout>240</session-timeout>
  </session-config>
  <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>/faces/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.xhtml</url-pattern>
  </servlet-mapping>
  <welcome-file-list>
    <welcome-file>index.xhtml</welcome-file>
  </welcome-file-list>
  <servlet>
    <description></description>
    <display-name>ErrorHandlingServlet</display-name>
    <servlet-name>ErrorHandlingServlet</servlet-name>
    <servlet-class>com.bmw.au.jsf.ErrorHandlingServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>ErrorHandlingServlet</servlet-name>
    <url-pattern>/ErrorHandlingServlet</url-pattern>
  </servlet-mapping>
  <listener>
        <listener-class>com.bmw.au.jsf.util.SessionMonitoringListener</listener-class>
</listener> 
</web-app>

maven dependencies:

     <dependency>
            <groupId>com.sun.facelets</groupId>
            <artifactId>jsf-facelets</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-impl</artifactId>   
<dependency>
            <groupId>com.bea.wls</groupId>
            <artifactId>wlfullclient</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui</groupId>
            <artifactId>richfaces-ui</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.framework</groupId>
            <artifactId>richfaces-impl</artifactId>

尝试清洁和构建您的项目,在Netbeans中:右键单击您的项目>清洁和构建,在Eclipse中:选择您的项目,然后在选项项目>自动检查构建并单击清洁,最后再次部署您的项目,它适用于我,让我知道它是否适用于您。

相关内容

  • 没有找到相关文章

最新更新