[Tomcat, HTTPD, Servlets & JSP] - JSF1.2 can not work in jboss4.0 or jboss4.2 service
by jackyluck
I don't know why it have exception when I deploy jsf1.2 web application to jboss4.0 or jboss4.2
1.when i deploy jsf web application to jboss4.2 service the exception is:
2008-03-07 13:17:03,937 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/kk]] Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
java.lang.ClassCastException: com.sun.faces.application.ApplicationAssociate cannot be cast to com.sun.faces.application.ApplicationAssociate
2.when i deploy jsf web application to jboss4.0 service the exception is:
2008-03-07 13:14:10,531 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/testjsf].[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)
3.below is my /lib/ jar file:
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
jsf-api.jar
jsf-impl.jar
jstl-1.2.jar
servlet-api.jar
4.below is my web.xml:
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>/faces/index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>/faces/default.jsp</welcome-file>
</welcome-file-list>
who help me solve the question ,Thank you very mach
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134813#4134813
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134813
18 years, 1 month
[Tomcat, HTTPD, Servlets & JSP] - Re: webmethod within a jsp-file
by Fugee47
now i got a standalone java-client working:
package simpleclient;
import javax.xml.ws.WebServiceRef;
import helloservice.endpoint.HelloService;
import helloservice.endpoint.Hello;
public class HelloClient {
@WebServiceRef(wsdlLocation="http://localhost:8080/helloservice/Hello?wsdl")
static HelloService service = new HelloService();
public static void main(String[] args) {
System.out.println("Retrieving the port from the following service: " + service);
Hello port = service.getHelloPort();
System.out.println("Invoking the sayHello operation on the port.");
String name;
if (args.length > 0) {
name = args[0];
} else {
name = "No Name";
}
String response = port.sayHello(name);
System.out.println(response);
}
}
but when i copy the code into a new function and access it from within a jsp-file, i get errors.
package simpleclient;
import javax.xml.ws.WebServiceRef;
import helloservice.endpoint.HelloService;
import helloservice.endpoint.Hello;
public class HelloClient {
@WebServiceRef(wsdlLocation="http://localhost:8080/helloservice/Hello?wsdl")
static HelloService service = new HelloService();
public static String say(String args) {
Hello port = service.getHelloPort();
String name;
if (args != null) {
name = args;
} else {
name = "No Name";
}
String response = port.sayHello(name);
return response;
}
}
ERROR [ServiceDelegateImpl] Cannot create proxy for SEI helloservice.endpoint.Hello from: vfsfile:/opt/jboss-5.0.0.Beta4/server/default/deploy/
11:51:14,647 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.IllegalArgumentException: helloservice.endpoint.Hello is not an interface
i dont understand this error, since the standalone client does not complain about helloservice.endpoint.Hello being not an interface (and it is one !!)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134809#4134809
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134809
18 years, 1 month