Config:

Tomcat 6.0.0
JSF RI 1.2
Facelets 1.1.11
Hibernate 3.2.1
Seam 1.1.0 CR2

I have just downloaded CR2 and been trying to get a hibernate session 
auto-managed by Seam.

I've got everything starting up ok in the Tomcat server but when I hit my test 
page I get the following.


  | java.lang.NullPointerException
  |     at 
org.jboss.seam.jsf.SeamViewHandler.calculateLocale(SeamViewHandler.java:32)
  |     at 
com.sun.facelets.FaceletViewHandler.calculateLocale(FaceletViewHandler.java:771)
  |     at 
com.sun.faces.application.ViewHandlerImpl.createView(ViewHandlerImpl.java:356)
  |     at 
org.jboss.seam.jsf.SeamViewHandler.createView(SeamViewHandler.java:43)
  |     at 
com.sun.facelets.FaceletViewHandler.createView(FaceletViewHandler.java:782)
  |     at 
com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:218)
  |     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
  |     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:113)
  |     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
  |     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:270)
  |     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
  |     at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:227)
  |     at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
  |     at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  |     at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  |     at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
  |     at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:211)
  |     at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:817)
  |     at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:623)
  |     at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:444)
  |     at java.lang.Thread.run(Thread.java:595)
  | 

Which boils down to this call returning null


  | Component.getInstance(LocaleSelector.class, ScopeType.SESSION)
  | 

I've done some investigation and the problem looks to me to be in the 
component.xml in the META-INF/ of the jboss-seam.jar.

The factory entries in there are of the form...


  |   <factory scope="stateless" auto-create="true" name="localeSelector" 
value="#{org.jboss.seam.core.localeSelector}"/>
  | 

But if I take a look at the LocaleSelector class the @Name annonation is this..


  | @Name("org.jboss.seam.core.localeSelector")
  | 

The code in Init, where the factory maps are, is trying to match the name 
annotation value to the value in the xml which don't match.  One has the 
package and the other does not.

Am I doing something wrong here?  I've stepped through the code and nothing 
funny is going on that I can see, just looks like the factoryValueBindings Map 
in Init uses different keys to the annotations specified in the classes.

Any help/suggestions appreciated.

Cheers.

Mike.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991364#3991364

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991364
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to