GWT Servlet - ClassNotFoundException - java

I am learning GWT by following their StockWatcher tutorial. After trying a few things on my own, I got this exception on a servlet:
Feb 28, 2013 7:55:00 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
Feb 28, 2013 7:55:00 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: EXCEPTION
java.lang.ClassNotFoundException: com.google.gwt.sc2.server.GreetingServiceImpl
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:213)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
This is the web.xml file where I am configuring the servlet:
<servlet>
<servlet-name>greetServlet</servlet-name>
<servlet-class>com.google.gwt.sc2.server.GreetingServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>greetServlet</servlet-name>
<url-pattern>/bikeapp/greet</url-pattern>
</servlet-mapping>
I think I'm missing something really basic, but I don't know what. Can anyone help please?

I assume you are using eclipse so please check the setting of Default output folder. it should be inside WEB-INF/classes while compile project.

I encountered the same problem. The reason was that i created project using GPE (Google Plugin for Eclipse) and tried to follow GWT in action book. But my version of GPE creating a lot of staff insted of just basic project infrastructure. So, if you change your web.xml to
<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
</web-app>
everything should work fine.

Related

The prefix "xsi" for attribute "xsi:schemaLocation" associated with an element type "web-app" is not bound

Error Seen while starting tomcat:
javax.servlet.UnavailableException: org.xml.sax.SAXParseException: The prefix "xsi" for attribute "xsi:schemaLocation" associated with an element type "web-app" is not bound.
I am trying to deploy my Java (Maven Based) projects onto my Tomcat 8 server and start it. After cleaning all the project and building the workspace; After removing all build path errors on each project. When I try to deploy the projects in tomcat and start it, i get below error:
Apr 02, 2018 1:29:22 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet [action] in web application [/bss] threw load() exception
javax.servlet.UnavailableException: org.xml.sax.SAXParseException: The prefix "xsi" for attribute "xsi:schemaLocation" associated with an element type "web-app" is not bound.
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:402)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1227)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1140)
I am not sure what is causing the issue and which jar is exactly missing which will resolve this issue.
You are most probably missing the declaration of the xsi namespace in your web.xml file. Add xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" to the web-app element. Example:
<web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<!-- ... -->
</web-app>

Faces Servlet - ClassNotFound Exception [duplicate]

This question already has an answer here:
How to properly install and configure JSF libraries via Maven?
(1 answer)
Closed 3 years ago.
I am developing a sample application using JSF 1.2 and PrimeFaces 3.5. I have RAD in my desktop and created a new dynamic web project. I have written xhtml file with primeface editor tag. But, when I ran the project.. it is throwing "java.lang.ClassNotFoundException" for FacesServlet though the servlet exists in the classpath.
My web.xml looks like this
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>
PrimeFacesNew</display-name>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<!-- JSF mapping -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Map these files with JSF -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>HelloWorld.xhtml</welcome-file>
</welcome-file-list>
</web-app>
and my HelloWorld.xhtml looks like this
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<h:body>
<h1>Hello World PrimeFaces</h1>
<h:form>
<p:editor value="This is PrimeFace editor" />
</h:form>
</h:body>
</html>
I have added below jars in to my classpath..
myfaces-api-2.1.12.jar
myfaces-impl-2.1.12.jar
myfaces-bundle-2.1.12.jar
slf4j-api-1.7.5.jar
slf4j-simple-1.7.5.jar
primefaces-3.5.jar
and when I ran using tomcat 6.0 in RAD, it is throwing below exception..
SEVERE: Error loading WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader#78a978a9
javax.faces.webapp.FacesServlet
Throwable occurred: java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1083)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4045)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4351)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Jun 18, 2013 1:15:10 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /primefaces threw load() exception
Throwable occurred: java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1083)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4045)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4351)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
The prime face components are also displayed as question mark in the RAD. I tried all the possible solutions in Google, but it hasn't worked for me. Please correct me where I am doing wrong..
Thanks.
This issue occured to me because i didn't provide path in Deployement option in properties of project:
Right click on project ---> select "properties" --> Deployement assembly --> "ADD" option --> select "java build path entries" --> select path
Faces Servlet class is not recognized from what you added jars
myfaces-api-2.1.12.jar, myfaces-impl-2.1.12.jar
Add below jars to WEB-INF/lib
Download jsf-impl-2.2.5, jsf-api-2.2.5 or from maven dependency jsf-api, jsf-impl
You need to use jsf-impl.jar and jsf-api.jar since you are using JSF 1.2. Other people are also having this problem read this which talks about incompatibility and you specifies the same error which have described here. Hope this helps you resolve this classNotFound error.
if you get classnotfoundExecption error for servlets always check have you added the required
libraries in the WEB-INF/lib folder...
jars added to build path are not available to server components....
you must explicitly add the jars to WEB-INF/lib folder only...
Adding the following dependencies should solve the problem. I was creating a webapp with the JSF dependencies in the web.xml. So, had to add these in pom.xml to get the problem resolved.
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.7</version>
</dependency>
Use whichever version you require.

JSF 1.2 , Richfaces 3.X and Jboss Server 5.0 : After Adding Richfaces JAR it's giving Error

Simple JSF1.2 and Jboss Server 5.0 is working fine, but after adding a Richfaces 3.X JAR it's giving error. my application is not working.
Richfaces Jar
richfaces-api-3.3.2.SR1.jar
richfaces-impl-3.3.2.SR1.jar
richfaces-ui-3.3.2.SR1.jar
Please check below error log and please help in to this.
java.lang.ClassNotFoundException: org.ajax4jsf.Filter
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:240)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:220)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:332)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:90)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3783)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4413)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:367)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:460)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy36.start(Unknown Source)
Screenshot with package structure and web.xml
Please help me into this..
By default JBoss 5.0 contains JSF library at location - jboss-5.0.0.GA\server\default\deploy\jbossweb.sar\jsf-libs.
You have to provide explicitly for JSF 2.0 at this location, if implementation requires it.
jboss-faces.jar
jsf-api.jar
jsf-impl.jar
Also, you have to provide required JSF implementation specific jars during project deployment. Below is the \WEB-INF\lib content.
cssparser-0.9.5.jar
guava-13.0.1.jar
richfaces-components-api-4.3.2.Final.jar
richfaces-components-ui-4.3.2.CR1.jar
richfaces-core-api-4.3.2.Final.jar
richfaces-core-impl-4.3.2.Final.jar
sac-1.3.jar
Altering namespace declaration and schema location in web.xml content
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
Also, remove filter/filter-mapping & add the below content.
<context-param>
<description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>resources.application</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
[Note: I have verified with RichFaces 4.3.2, JBoss 5.0 & JSF 2.0. I presume it should work with the lower configuration]
Include ajax4jsf-1.0.6.jar in your classpath

The requested resource is not available while publishing on tomcat

I'm trying to publish a simple java web service using tomcat. Referring to below screenshot, I have HelloWorld.java which is service interface and its HelloWorldImpl.java implementation class.
Also I've created web.xml and sun-jaxws.xml.
When I right click the project, select Run As and then Run on Server, I get 404 error message as shown in bottom of screenshot.
The URL which internal browser tries to reach is http://localhost:8081/MySqlConnect/ where MySqlConnect is project name. Note that I'm using 8081 as port number.
I also tried http://localhost:8081/HelloWorld/hello, but it didn't worked.
I have also provided the code for all files below.
I'm not able to understand where am I going wrong? Any help appreciated.
HelloWorldImpl.java
package com.mycompany.service;
import javax.jws.WebService;
#WebService(endpointInterface = "com.mycompany.service.HelloWorld", serviceName = "HelloWorld")
public class HelloWorldImpl implements HelloWorld {
#Override
public String sayGreeting(String name) {
return "Greeting " + name + "!";
}
}
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
<web-app>
<listener>
<listener-class>
com.sun.xml.ws.transport.http.servlet.WSServletContextListener
</listener-class>
</listener>
<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>
com.sun.xml.ws.transport.http.servlet.WSServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>hello</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>120</session-timeout>
</session-config>
</web-app>
sun-jaxws.xml
<?xml version="1.0" encoding="UTF-8"?>
<endpoints xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime"
version="2.0">
<endpoint name="HelloWorld" implementation="com.mycompany.service.HelloWorldImpl"
url-pattern="/hello" />
</endpoints>
Edit 1
Log-cat
INFO: Starting Servlet Engine: Apache Tomcat/7.0.33
com.sun.xml.ws.transport.http.servlet.WSServletContextListener parseAdaptersAndCreateDelegate
SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.NoClassDefFoundError: javax/xml/ws/soap/AddressingFeature$Responses
java.lang.NoClassDefFoundError: javax/xml/ws/soap/AddressingFeature$Responses
Caused by: java.lang.ClassNotFoundException: javax.xml.ws.soap.AddressingFeature$Responses
Edit 2
As suggested here, I downloaded all libraries and place in tomcat lib folder but now I get this error in log:
com.sun.xml.ws.transport.http.servlet.WSServletContextListener parseAdaptersAndCreateDelegate
SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.NoSuchMethodError: com.sun.xml.ws.assembler.TubelineAssemblyController: method <init>()V not found
java.lang.NoSuchMethodError: com.sun.xml.ws.assembler.TubelineAssemblyController: method <init>()V not found
If I add all libraries to project and then try to run it, I get following error:
com.sun.xml.ws.transport.http.servlet.WSServletContextListener parseAdaptersAndCreateDelegate
SEVERE: WSSERVLET11: failed to parse runtime descriptor: com.sun.xml.ws.util.ServiceConfigurationError: com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureConfigurator: Provider com.sun.xml.ws.transport.tcp.policy.TCPTransportFeatureConfigurator is specified in jar:file:/C:/Apache-Tomcat-7/lib/webservices-rt-2.1-b16.jar!/META-INF/services/com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureConfiguratorbut could not be instantiated: java.lang.ClassCastException
com.sun.xml.ws.util.ServiceConfigurationError: com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureConfigurator: Provider com.sun.xml.ws.transport.tcp.policy.TCPTransportFeatureConfigurator is specified in jar:file:/C:/Apache-Tomcat-7/lib/webservices-rt-2.1-b16.jar!/META-INF/services/com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureConfiguratorbut could not be instantiated: java.lang.ClassCastException
Note this: com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureConfiguratorbut could not be instantiated: java.lang.ClassCastException
The correct url is http://localhost:8081/MySqlConnect/hello as MySqlConnect is the name of your context and hello the web service url.
Also its a webservice so to access it properly you can make a SOAP call.
But the root cause is your web application is not starting due to unable to find class javax.xml.ws.soap.AddressingFeature$Responses.
Have you added right dependencies? Search in those dependencies if this class exists. Response is a inner class of AddressingFeature.

Jersey + App Engine project launch error

Did a lot of search, but no luck.
I'm trying to make a 'hello world' app which integrates Jersey and Google App Engine.
In Eclipse, I created a 'Web Application Project' and added Jersey JAR to the build path.
Then I modified web.xml and it looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<servlet-name>Jersey Web Application</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>com.example.myJersey</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Jersey Web Application</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
In the package 'com.example.myJersey' I have HelloWorldResource.java, here is an excerpt:
// The Java class will be hosted at the URI path "/helloworld"
#Path("/helloworld")
public class HelloWorldResource {
// The Java method will process HTTP GET requests
#GET
// The Java method will produce content identified by the MIME Media
// type "text/plain"
#Produces("text/plain")
public String getClichedMessage() {
// Return some cliched textual content
return "Hello World";
}
}
When I click run, I get this error:
INFO: Successfully processed C:\Users\upelsin\wtf-rest\war\WEB-INF/web.xml
фев 02, 2012 5:05:16 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed Jersey Web Application: java.lang.IncompatibleClassChangeError: Implementing class
фев 02, 2012 5:05:16 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed com.google.appengine.tools.development.DevAppEngineWebAppContext#1aa58969{/,C:\Users\upelsin\wtf-rest\war}: java.lang.IncompatibleClassChangeError: Implementing class
фев 02, 2012 5:05:16 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed JettyContainerService$ApiProxyHandler#6d26b88a: java.lang.IncompatibleClassChangeError: Implementing class
фев 02, 2012 5:05:16 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Error starting handlers
java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:176)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:79)
at com.sun.jersey.api.core.servlet.WebAppResourceConfig.init(WebAppResourceConfig.java:102)
at com.sun.jersey.api.core.servlet.WebAppResourceConfig.<init>(WebAppResourceConfig.java:89)
at com.sun.jersey.api.core.servlet.WebAppResourceConfig.<init>(WebAppResourceConfig.java:74)
at com.sun.jersey.spi.container.servlet.WebComponent.getWebAppResourceConfig(WebComponent.java:672)
at com.sun.jersey.spi.container.servlet.ServletContainer.getDefaultResourceConfig(ServletContainer.java:414)
at com.sun.jersey.spi.container.servlet.ServletContainer.getDefaultResourceConfig(ServletContainer.java:581)
at com.sun.jersey.spi.container.servlet.WebServletConfig.getDefaultResourceConfig(WebServletConfig.java:87)
at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:703)
at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:678)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:203)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
EDIT:
Maybe there is a misconfiguration in web.xml. Looks like Jetty doesn't like Jersey's servlet class.
I would appreciate any kind of help.
I recently put together a project template on GitHub combining Jersey and Guice for AppEngine. It may help to compare with a running app.
Jersey requires Java 1.6. Is this what the Google App Engine runs on? Maybe your Google App instance is configured to run on an earlier Java version.
Look at this:
http://code.google.com/p/googleappengine/wiki/WillItPlayInJava
Make sure that you run Jersey 1.5 and configure as required in the doc. Also, are you using other libraries? Those may create a classloading conflict?

Categories

Resources