[JBoss Seam] - Re: Binding Dropdown To Database Table Using Seam..
by johnurban
I was able to get past the null error by putting @Out above my list declaration in the EJB backer bean:
| @Out
| @SelectItems(valueStrategy=SelectItems.Strategy.OBJECT, labelMethod="getname")
| private List<Room> roomListByOrganization;
|
|
Now I'm getting "does not contain Objects of type SelectItem":
08:13:36,906 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.IllegalArgumentException: Collection referenced by UISelectItems with binding '#{roomListByOrganization}' and Component-Path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /uQuickPersonAdd.jsp][Class: javax.faces.component.html.HtmlForm,Id: _id2][Class: javax.faces.component.html.HtmlSelectOneMenu,Id: _id7][Class: javax.faces.component.UISelectItems,Id: _id8]} does not contain Objects of type SelectItem
at org.apache.myfaces.util.SelectItemsIterator.next(SelectItemsIterator.java:182)
at org.apache.myfaces.renderkit.RendererUtils.internalGetSelectItemList(RendererUtils.java:487)
at org.apache.myfaces.renderkit.RendererUtils.getSelectItemList(RendererUtils.java:461)
at org.apache.myfaces.renderkit.html.HtmlRendererUtils.internalRenderSelect(HtmlRendererUtils.java:272)
at org.apache.myfaces.renderkit.html.HtmlRendererUtils.renderMenu(HtmlRendererUtils.java:246)
at org.apache.myfaces.renderkit.html.HtmlMenuRendererBase.encodeEnd(HtmlMenuRendererBase.java:54)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:349)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:253)
at org.apache.jsp.uQuickPersonAdd_jsp._jspx_meth_h_selectOneMenu_0(uQuickPersonAdd_jsp.java:462)
at org.apache.jsp.uQuickPersonAdd_jsp._jspx_meth_h_form_0(uQuickPersonAdd_jsp.java:302)
at org.apache.jsp.uQuickPersonAdd_jsp._jspx_meth_f_view_0(uQuickPersonAdd_jsp.java:193)
at org.apache.jsp.uQuickPersonAdd_jsp._jspService(uQuickPersonAdd_jsp.java:101)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
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.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:613)
08:13:36,908 ERROR [SeamExceptionFilter] uncaught exception handled by Seam
javax.servlet.ServletException: Collection referenced by UISelectItems with binding '#{roomListByOrganization}' and Component-Path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /uQuickPersonAdd.jsp][Class: javax.faces.component.html.HtmlForm,Id: _id2][Class: javax.faces.component.html.HtmlSelectOneMenu,Id: _id7][Class: javax.faces.component.UISelectItems,Id: _id8]} does not contain Objects of type SelectItem
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
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.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:613)
08:13:36,909 INFO [SeamExceptionFilter] killing transaction
08:13:36,914 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
javax.faces.FacesException: Collection referenced by UISelectItems with binding '#{roomListByOrganization}' and Component-Path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /uQuickPersonAdd.jsp][Class: javax.faces.component.html.HtmlForm,Id: _id2][Class: javax.faces.component.html.HtmlSelectOneMenu,Id: _id7][Class: javax.faces.component.UISelectItems,Id: _id8]} does not contain Objects of type SelectItem
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
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.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:613)
Caused by: org.apache.jasper.JasperException: Collection referenced by UISelectItems with binding '#{roomListByOrganization}' and Component-Path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /uQuickPersonAdd.jsp][Class: javax.faces.component.html.HtmlForm,Id: _id2][Class: javax.faces.component.html.HtmlSelectOneMenu,Id: _id7][Class: javax.faces.component.UISelectItems,Id: _id8]} does not contain Objects of type SelectItem
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
... 25 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979064#3979064
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979064
19 years, 8 months
[JBossWS] - Bad mapping from wsdl using wstools
by richard_fagot
Hello,
I used wstools to generate the client side given a WSDL that contains the user types schema. Unfortunately the classes generated do not correspond to what is expected (or what I expect). The FakeType class contains a list of param (as expected) and a list of Item instead of a list of ListType. What's wrong ?
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://www.siautomation.com/Maestria/schemas/Supervision">
<s:element name="MainType">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="FakeType" type="s0:FakeType"/>
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="FakeType">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="Param" type="s0:Param"/>
<s:element minOccurs="0" maxOccurs="unbounded" name="ItemList" nillable="true" type="s0:ListType"/>
</s:sequence>
</s:complexType>
<s:complexType name="Param">
<s:simpleContent>
<s:extension base="s:string">
<s:attribute name="Name" type="s:string"/>
</s:extension>
</s:simpleContent>
</s:complexType>
<s:complexType name="ListType">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="Item" type="s0:Item"/>
</s:sequence>
<s:attribute name="Name" type="s:string"/>
</s:complexType>
<s:complexType name="Item">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="Param" type="s0:Param"/>
</s:sequence>
<s:attribute name="Name" type="s:string"/>
</s:complexType>
</s:schema>
</wsdl:types>
<wsdl:message name="MainTypeSoapIn">
<wsdl:part name="parameters" element="s0:MainType"/>
</wsdl:message>
<wsdl:portType name="MyPort">
<wsdl:operation name="MainType">
<wsdl:input message="tns:MainTypeSoapIn"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MyPort" type="tns:MyPort">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="MainType">
<soap:operation soapAction="myUrl/MainType" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MyService">
<wsdl:port name="MyPort" binding="tns:MyPort">
<soap:address location="URL"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979062#3979062
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979062
19 years, 8 months
[JBoss Seam] - PropertyNotFoundException exception with JSF binding
by trouby
Hey,
I have a list of objects that each object has a method named: 'getJsfPanelGridComponent' that returns an 'HtmlPanelGrid' initialized object.
This list is outjected by seam to the facelets view,
I iterate over this list with a normal 'datatable' tag, and I can see that the list gets iterated just fine.
Then when I try to bind into a 'panelGrid' jsf tag a property per iteration, I get the following error:
| javax.faces.FacesException: javax.el.PropertyNotFoundException: /sample.xhtml @77,83 binding="#{myIteratedObj.jsfPanelGridComponent}": Target Unreachable, identifier 'myIteratedObj' resolved to null
|
This is the code of the panelGrid tag I'm trying to bind per iteration:
| <h:panelGrid column="2" binding="#{myIteratedObj.jsfValuesFormElements}"/>
|
If I do something like
| <h:outputText value="#{myIteratedObj.jsfValuesFormElements}">
|
I can see that the it returns the 'HtmlPanelGrid' object just fine, like:
| javax.faces.component.html.HtmlPanelGrid@152942b
| javax.faces.component.html.HtmlPanelGrid@54cc39
| ...
|
What could be the problem? if the object is accessible to facelets why when I try to use 'bind' property I get a null exception on the object cannot be found?
Thanks guys,
Asaf.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979060#3979060
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979060
19 years, 8 months
[Security & JAAS/JBoss] - Re: from login.jsp -->HTTP Status 400 - Invalid direct refer
by shankaran
jaikiran thanks for quick reply...
yeah thats correct.i am doing exactly you said.
my app work fine when i execute "http://localhost:8080/Myapp".
when i login using the url "http://localhost:8080/Myapp/login.jsp"
only i got the error.
HTTP Status 400 - Invalid direct reference to form login page
"http://localhost:8080/Myapp/login.jsp"-- after hitting this url, i see login page then i give valid username and password then click submit then only i got above error.
but when i given wrong username and pwd i got error msg "user name pwd wrong".
so only when i give valid username and pwd then only i got error,
from this "j_security_check" working properly so i had done the mistake in
configuring jsp page(security constrint) in web.xml.
1)i have welcom.jsp as welcomefile and restricted.
<welcome-file-list>
<welcome-file>welcome.jsp</welcome-file>
</welcome-file-list>
<security-constraint>
<display-name>global access</display-name>
<web-resource-collection>
<web-resource-name>everyone</web-resource-name>
<url-pattern>/welcome.jsp</url-pattern>
<url-pattern>/login.jsp</url-pattern>
<url-pattern>/loginErr.jsp</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>sample1</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
2) then i have the login.jsp for login.(i mentioned this login.jsp in above security constraint.is it correct?
<login-config>
<auth-method>FORM</auth-method>
<realm-name>MoviesRealm</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/loginErr.jsp</form-error-page>
</form-login-config>
</login-config>
i put my full web.xml file IN FIRST forum. what wrong with this? could you plz help. is "j_uri" fix this problem? .
Thanks,
shankaran.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979056#3979056
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979056
19 years, 8 months