[jboss-user] [JBoss Seam] - Re: specific @SelectItem Question -
mrohad
do-not-reply at jboss.com
Tue Aug 15 01:16:15 EDT 2006
thanks for helping us!
well I am sure it doesn't call the factory I put a breakpoint there..
beforeI added @Scope(ScopeType.APPLICATION)
it did called the factory method but then I got NullPointerException
you can see that in my first Post
here is the Codes code:
|
| @Entity
| @Scope(ScopeType.SESSION)
| @Name("codes")
| @Table(name="codes")
|
| public class Codes implements java.io.Serializable {
|
|
| // Fields
|
| private int id;
| private String label;
| private String table;
| private String code;
| private String description;
| private Boolean disabled;
|
|
| // Constructors
|
| /** default constructor */
| public Codes() {
| }
|
| /** minimal constructor */
| public Codes(int id, String table, String code) {
| this.id = id;
| this.table = table;
| this.code = code;
| }
|
| /** full constructor */
| public Codes(int id, String label, String table, String code, String description, Boolean disabled) {
| this.id = id;
| this.label = label;
| this.table = table;
| this.code = code;
| this.description = description;
| this.disabled = disabled;
| }
|
|
|
| // Property accessors
| @Id
| @Column(name="ID", unique=true, nullable=false, insertable=true, updatable=true)
|
| public int getId() {
| return this.id;
| }
|
| public void setId(int id) {
| this.id = id;
| }
| @Column(name="LABEL", unique=false, nullable=true, insertable=true, updatable=true, length=2000)
|
| public String getLabel() {
| return this.label;
| }
|
| public void setLabel(String label) {
| this.label = label;
| }
| @Column(name="TABLE", unique=false, nullable=false, insertable=true, updatable=true, length=200)
|
| public String getTable() {
| return this.table;
| }
|
| public void setTable(String table) {
| this.table = table;
| }
| @Column(name="CODE", unique=false, nullable=false, insertable=true, updatable=true, length=100)
|
| public String getCode() {
| return this.code;
| }
|
| public void setCode(String code) {
| this.code = code;
| }
| @Column(name="DESCRIPTION", unique=false, nullable=true, insertable=true, updatable=true, length=2000)
|
| public String getDescription() {
| return this.description;
| }
|
| public void setDescription(String description) {
| this.description = description;
| }
| @Column(name="disabled", unique=false, nullable=true, insertable=true, updatable=true)
| public Boolean getDisabled() {
| return this.disabled;
| }
|
| public void setDisabled(Boolean disabled) {
| this.disabled = disabled;
| }
| }
|
here is the exception:
anonymous wrote :
| 09:08:48,767 INFO [Server] JBoss (MX MicroKernel) [4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)] Started in 1m:167ms
| 09:09:22,375 INFO [Pages] reading pages.xml
| 09:09:32,740 ERROR [STDERR] 15/08/2006 09:09:32 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/C:/wb/JBoss/J404/server/default/tmp/deploy/tmp5228wb.ear-contents/wb-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
| 09:09:32,850 ERROR [STDERR] 15/08/2006 09:09:32 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/C:/wb/JBoss/J404/server/default/tmp/deploy/tmp5228wb.ear-contents/wb-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
| 09:09:32,880 ERROR [STDERR] 15/08/2006 09:09:32 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/C:/wb/JBoss/J404/server/default/tmp/deploy/tmp5228wb.ear-contents/wb-exp.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/seam.taglib.xml
| 09:09:32,940 ERROR [STDERR] 15/08/2006 09:09:32 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/C:/wb/JBoss/J404/server/default/tmp/deploy/tmp5228wb.ear-contents/wb-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
| 09:09:33,050 ERROR [STDERR] 15/08/2006 09:09:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/C:/wb/JBoss/J404/server/default/tmp/deploy/tmp5228wb.ear-contents/wb-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
| 09:09:33,110 ERROR [STDERR] 15/08/2006 09:09:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/C:/wb/JBoss/J404/server/default/tmp/deploy/tmp5228wb.ear-contents/wb-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
| 09:09:34,442 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true
| 09:09:34,442 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
| 09:09:34,442 INFO [MyfacesConfig] Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.
| 09:09:35,564 INFO [STDOUT] Hibernate: select codes0_.ID as ID1_, codes0_.TABLE as TABLE1_, codes0_.DESCRIPTION as DESCRIPT3_1_, codes0_.CODE as CODE1_, codes0_.LABEL as LABEL1_, codes0_.disabled as disabled1_ from wb.codes codes0_ where codes0_.TABLE=?
| 09:09:35,774 INFO [STDOUT] Hibernate: select codes0_.ID as ID1_, codes0_.TABLE as TABLE1_, codes0_.DESCRIPTION as DESCRIPT3_1_, codes0_.CODE as CODE1_, codes0_.LABEL as LABEL1_, codes0_.disabled as disabled1_ from wb.codes codes0_ where codes0_.TABLE=?
| 09:09:35,774 ERROR [STDERR] 15/08/2006 09:09:35 com.sun.facelets.FaceletViewHandler handleRenderException
| SEVERE: Error Rendering View[/login/register.xhtml]
| java.lang.IllegalArgumentException: Value binding '#{cLang}'of UISelectItems with component-path {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /login/register.xhtml][Class: javax.faces.component.html.HtmlForm,Id: _id38][Class: javax.faces.component.html.HtmlPanelGrid,Id: _id40][Class: javax.faces.component.html.HtmlSelectOneMenu,Id: _id51][Class: javax.faces.component.UISelectItems,Id: _id52]} does not reference an Object of type SelectItem, SelectItem[], Collection or Map but of type : null
| at org.apache.myfaces.shared_impl.util.SelectItemsIterator.hasNext(SelectItemsIterator.java:141)
| at org.apache.myfaces.shared_impl.renderkit.RendererUtils.internalGetSelectItemList(RendererUtils.java:477)
| at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getSelectItemList(RendererUtils.java:453)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.internalRenderSelect(HtmlRendererUtils.java:277)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.renderMenu(HtmlRendererUtils.java:251)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlMenuRendererBase.encodeEnd(HtmlMenuRendererBase.java:54)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
| at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:442)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:216)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:98)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| 09:09:35,834 INFO [STDOUT] Hibernate: select codes0_.ID as ID1_, codes0_.TABLE as TABLE1_, codes0_.DESCRIPTION as DESCRIPT3_1_, codes0_.CODE as CODE1_, codes0_.LABEL as LABEL1_, codes0_.disabled as disabled1_ from wb.codes codes0_ where codes0_.TABLE=?
|
in the last line it looks like it does called the factory method but there is 2 bp there...
and bk on other places in the code do work for me
any idea?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965176#3965176
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965176
More information about the jboss-user
mailing list