[Tomcat, HTTPD, Servlets & JSP] - MyFaces and JBoss is not playing nice!
by russray
Good Morning All:
I am hoping someone can clarify what is the correct steps for getting a MyFaces Web Project up and running using JBoss 4.0.5 within MyEclipse 5.1.1. I have tried to follow the steps outlined in JBoss http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossWithIntegratedMyFaces, but I am not very successful.
When I follow JBoss instructions by removing the jsf-lib and using the MyEclipse jar files from the web/lib for MyFaces 1.1.1, I get the following error:
| 07:58:38,609 DEBUG [TagLibCache] Scanning for tlds in: file:/C:/jboss-4.0.5.GA/server/default/deploy/jbossweb-tomcat55.sar/jsf-libs/myfaces-impl.jar
| 07:58:38,609 DEBUG [TagLibCache] Failed to scan: jsf-libs/myfaces-impl.jar
| java.io.FileNotFoundException: C:\jboss-4.0.5.GA\server\default\deploy\jbossweb-tomcat55.sar\jsf-libs\myfaces-impl.jar
|
When I leave the libraries for JBoss in place and use the MyEclipse libraries within the web/lib for the project, I get the following error:
| 08:05:24,828 ERROR [UIComponentTag] Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml.
| 08:05:24,859 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
| java.lang.NullPointerException
| at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
| at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
| at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
| at org.apache.jsp.main_jsp._jspx_meth_f_view_0(main_jsp.java:88)
| at org.apache.jsp.main_jsp._jspService(main_jsp.java:64)
|
What I have done is create a simple Java Server Faces project using MyEclipse whereby I created a web project and added JSF capability MyFaces1.1.1). Next I created some JSPs and markups for the frontend portion of this example. What I am trying to accompllish is move around the different JSPs to ensure everything is working properly before I get complicated.
When I type in the URL to the Parent (index.html), I get the markup to display. When I click on the link, what is suppose to happen is the screen moves to the index.jsp. The index.jsp has nothing more than a forward to the main.jsp. In the main.jsp is where all the Java Server Faces markup is located. However, I am getting a 500 HTTP status. What appears to me is the server is not able to find the tag libaries for the project as the error stops on the <f:view> line within the main.jsp. This is the error:
| org.apache.jasper.JasperException: Exception in JSP: /index.jsp:7
|
| 4: <title>A Simple JavaServer Faces Registration Application</title>
| 5: </head>
| 6: <body>
| 7: <jsp:forward page="/main.jsp" />
| 8: </body>
| 9: </html>
|
|
| Stacktrace:
| org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)
| org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
| org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
| org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
|
| root cause
|
| org.apache.jasper.JasperException: Exception in JSP: /main.jsp:5
|
| 2: <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
| 3: <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
| 4:
| 5: <f:view>
| 6: <html>
| 7: <head>
| 8: <title>A Simple JavaServer Faces Registration Application</title>
|
As this is a learning situation for me, I was hoping others could provided some clarification. Is there something special I need to accomplish for JBoss that has not been documented?
Any suggestions would be greatly appreciated as I've been working through this error going on 24 hrs. This error needs to die quickly.... :-)
Russ
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035010#4035010
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035010
19 years
[JBoss Seam] - @DataModel modifications
by georgesberscheid
Hi,
I have a @DataModel (HashSet myEntries) in a SESSION-scoped JAVABEAN Seam component with a @Factory method that retrieves initial data from the database and I display it in myList.xhtml.
I also have an action method addEntry() that does em.persist(newEntry) and myEntries.add(newEntry) and returns to myList.xhtml.
The entry has been added to the database table and to the myEntries Set, but when I return to myList.xhtml I can't see it. Is the initial myEntries Set (as returned from the @Factory method) cached somewhere?
If I touch WEB-INF/web.xml of my .war directory (which causes re-deployment) the new entry shows up in myList.xhtml.
This is Seam 1.2.0patch1 on AS 4.2.0CR1.
Any ideas what I'm doing wrong here?
Thanks,
Georges
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035004#4035004
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035004
19 years
[JBossWS] - Salesforce client stub generation fails
by artd
I'm trying to move away from Axis due to what appear to be classloading issues when Axis is included in a deployed webapp, and exposing portions of the webapp are exposed using JBOSSWS. So I figured I would just convert the Axis stubs to JBOSSWS stubs using wsconsume.
I've tried JBOSS AS 4.0.5, 4.2.0 with the native JBOSSWS and upgrades to 1.2.0SP1 to no avail.
With the latest, 1.2.0SP1 I get the following exception
| [wsconsume] Command invoked: org.jboss.ws.tools.jaxws.command.wsconsume -k -o "C:\Documents and Settings\adalessandro\Workspace\AxaptaSOAPClient" -s "C:\Documents and Settings\adalessandro\Workspace\AxaptaSOAPClient\src" -t enterprise.wsdl
| [wsconsume] warning: src-resolve: Cannot resolve the name 'ens:sObject' to a(n) 'type definition' component.
| [wsconsume] line ? of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema2
| [wsconsume] error: A class/interface with the same name "com.sforce.soap.enterprise.DescribeLayout" is already in use. Use a class customization to resolve this conflict.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema2
| [wsconsume] error: (Relevant to above error) another "DescribeLayout" is generated from here.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema2
| [wsconsume] error: Two declarations cause a collision in the ObjectFactory class.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema2
| [wsconsume] error: (Related to above error) This is the other declaration.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema2
| [wsconsume] error: Two declarations cause a collision in the ObjectFactory class.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
| [wsconsume] error: (Related to above error) This is the other declaration.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
| [wsconsume] error: Two declarations cause a collision in the ObjectFactory class.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
| [wsconsume] error: (Related to above error) This is the other declaration.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
| [wsconsume] error: Two declarations cause a collision in the ObjectFactory class.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
| [wsconsume] error: (Related to above error) This is the other declaration.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
| [wsconsume] error: Two declarations cause a collision in the ObjectFactory class.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
| [wsconsume] error: (Related to above error) This is the other declaration.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
| [wsconsume] error: Two declarations cause a collision in the ObjectFactory class.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
| [wsconsume] error: (Related to above error) This is the other declaration.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
| [wsconsume] error: Two declarations cause a collision in the ObjectFactory class.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
| [wsconsume] error: (Related to above error) This is the other declaration.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
| [wsconsume] error: Two declarations cause a collision in the ObjectFactory class.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
| [wsconsume] error: (Related to above error) This is the other declaration.
| [wsconsume] line 0 of file:/C:/Documents%20and%20Settings/adalessandro/Workspace/AxaptaSOAPClient/enterprise.wsdl#types?schema1
| [wsconsume] com.sun.istack.SAXParseException2: (Related to above error) This is the other declaration.
| [wsconsume] at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:213)
| [wsconsume] at org.jboss.com.sun.tools.ws.processor.config.ModelInfo.buildModel(ModelInfo.java:88)
| [wsconsume] at org.jboss.com.sun.tools.ws.processor.Processor.runModeler(Processor.java:82)
| [wsconsume] at org.jboss.com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:543)
| [wsconsume] at org.jboss.com.sun.tools.ws.util.ToolBase.run(ToolBase.java:57)
| [wsconsume] at org.jboss.ws.tools.jaxws.impl.WSContractConsumerImpl$1.run(WSContractConsumerImpl.java:163)
| [wsconsume] at org.jboss.ws.tools.jaxws.impl.WSContractConsumerImpl.consume(WSContractConsumerImpl.java:166)
| [wsconsume] at org.jboss.ws.tools.jaxws.command.wsconsume.importServices(wsconsume.java:194)
| [wsconsume] at org.jboss.ws.tools.jaxws.command.wsconsume.main(wsconsume.java:77)
| [wsconsume] Caused by: com.sun.istack.SAXParseException2: (Related to above error) This is the other declaration.
| [wsconsume] at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:128)
| [wsconsume] at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2207)
| [wsconsume] at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:224)
| [wsconsume] at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:181)
| [wsconsume] ... 8 more
| [wsconsume] Caused by: com.sun.istack.SAXParseException2: (Related to above error) This is the other declaration.
| [wsconsume] at com.sun.tools.xjc.ErrorReceiver.error(ErrorReceiver.java:66)
| [wsconsume] at com.sun.tools.xjc.generator.bean.ObjectFactoryGeneratorImpl.populate(ObjectFactoryGeneratorImpl.java:152)
| [wsconsume] at com.sun.tools.xjc.generator.bean.PublicObjectFactoryGenerator.populate(PublicObjectFactoryGenerator.java:19)
| [wsconsume] at com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:210)
| [wsconsume] at com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:151)
| [wsconsume] at com.sun.tools.xjc.model.Model.generateCode(Model.java:230)
| [wsconsume] at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:217)
| [wsconsume] at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:67)
| [wsconsume] at org.jboss.com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:126)
| [wsconsume] ... 11 more
| [wsconsume] error: com.sun.istack.SAXParseException2: (Related to above error) This is the other declaration.
|
Any suggestions on how to resolve? I couldn't find any exact JIRA issues on this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035002#4035002
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035002
19 years