optimus.listener.ContextListener gives NullPointerException

UI Components for JSF
Post Reply
arthurzanona
Posts: 5
Joined: 28 Jan 2010, 09:29

28 Jan 2010, 20:20

i have a problem but dont solve this.

05:25:58,654 INFO [TomcatDeployer] deploy, ctxPath=/blank-project, warUrl=.../tmp/deploy/tmp7531040769058227920blank-project-exp.war/
05:25:58,810 ERROR [STDERR] 15 [main] INFO org.primefaces.optimus.listener.ContextListener - Initializing Optimus Context
05:25:59,091 ERROR [[/blank-project]] Exception sending context initialized event to listener instance of class org.primefaces.optimus.listener.ContextListener
java.lang.NullPointerException
at org.primefaces.optimus.config.DefaultAnnotationScanner.scanWebInfClasses(DefaultAnnotationScanner.java:106)
at org.primefaces.optimus.config.DefaultAnnotationScanner.scan(DefaultAnnotationScanner.java:41)
at org.primefaces.optimus.config.OptimusBeanContext.initialize(OptimusBeanContext.java:42)

libs used by this project:
jsf 1.2
guice-1.0.jar
optimus-0.9.0-20090909.005018-1.jar
primefaces-1.0.0.RC.jar
richfaces-api-3.2.2.GA.jar
richfaces-impl-3.2.2.GA.jar
richfaces-ui-3.2.2.GA.jar
Jboss 4.2.2 GA

tools used:
eclipse 3.5 + jboss tools

web xml

Code: Select all


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

       <context-param>
          <param-name>org.richfaces.SKIN</param-name>
          <param-value>blueSky</param-value>
       </context-param>
       <context-param>
          <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
          <param-value>server</param-value>
       </context-param>
       <context-param>
          <param-name>org.richfaces.CONTROL_SKINNING</param-name>
          <param-value>enable</param-value>
       </context-param>
       <context-param>
          <param-name>com.prime.facestrace.DISABLE_TRACE</param-name>
          <param-value>true</param-value>
       </context-param>


       <listener>
          <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
       </listener>
       <!-- Faces Servlet -->
       <servlet>
          <servlet-name>Faces Servlet</servlet-name>
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
          <load-on-startup>1</load-on-startup>
       </servlet>
       <servlet>
          <servlet-name>Resource Servlet</servlet-name>
          <servlet-class>org.primefaces.resource.ResourceServlet</servlet-class>
          <load-on-startup>1</load-on-startup>
       </servlet>


       <!-- Faces Servlet Mapping -->
       <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>*.jsf</url-pattern>
       </servlet-mapping>
       <login-config>
          <auth-method>BASIC</auth-method>
       </login-config>


       <filter>
          <display-name>RichFaces Filter</display-name>
          <filter-name>richfaces</filter-name>
          <filter-class>org.ajax4jsf.Filter</filter-class>
       </filter>
       <filter>
          <display-name>Ajax4jsf Filter</display-name>
          <filter-name>ajax4jsf</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>
       </filter-mapping>
       <filter-mapping>
          <filter-name>ajax4jsf</filter-name>
          <servlet-name>Faces Servlet</servlet-name>
          <dispatcher>FORWARD</dispatcher>
          <dispatcher>REQUEST</dispatcher>
          <dispatcher>INCLUDE</dispatcher>
       </filter-mapping>
    </web-app>

i lost more than 8 hours and not found the solution.
anybody knows how to solve this problem?

** sorry for my bad english. i can read, but write is terrible. =)

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

28 Jan 2010, 21:10

Try adding;

Code: Select all

<context-param>
   <param-name>optimus.CONTEXT_SCAN_PATH</param-name>
   <param-value>com.company.project.view</param-value>
</context-param>

arthurzanona
Posts: 5
Joined: 28 Jan 2010, 09:29

28 Jan 2010, 21:16

tnks for reply but error persist.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

28 Jan 2010, 21:44

Can't figure out what is wrong, by the way optimus is not very active at the moment and we're planning to halt the development alltogether as we're fully focused on PrimeFaces UI.

arthurzanona
Posts: 5
Joined: 28 Jan 2010, 09:29

28 Jan 2010, 21:58

well..
many people are using this setup.
i tried to use the glassfish and tomcat but all have the same error.
i appreciate your help right now.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 34 guests