I'm trying to use the Java EE Hello World example: 
http://wiki.restlet.org/docs_2.0/13-restlet/275-restlet/312-restlet.html
http://wiki.restlet.org/docs_2.0/13-restlet/275-restlet/312-restlet.html 
It worked the first time but when I rename the entry class I get the error
below.
I have a Java EE application. I debug it using the Eclipse plug-in Jetty
Server. I use Maven and I run it from the command line using a Maven
command. My problem is that when I move the working class files to another
folder in my project, it still looks for the original class-files. (In this
case com.adxsearch.core.server.service.rule.FirstStepsApplication) The error
message is the one below. (In this case I have renamed the entrypoint-class
com.adxsearch.core.server.service.rule.FirstStepsApplication2)

2010-11-26 17:06:30.430::INFO:  Started selectchannelconnec...@0.0.0.0:8080
[INFO] Started Jetty Server
2010-11-26 17:06:38.095:/:WARN:  RestletServlet: [Restlet] ServerServlet
couldn't find the target class. Please check that your classpath includes
com.adxsearch.core.server.service.rule.FirstStepsApplication
java.lang.ClassNotFoundException:
com.adxsearch.core.server.service.rule.FirstStepsApplication
        at
org.restlet.engine.util.EngineClassLoader.findClass(EngineClassLoader.java:97)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at org.restlet.engine.Engine.loadClass(Engine.java:153)
        at
org.restlet.ext.servlet.ServerServlet.loadClass(ServerServlet.java:950)
        at
org.restlet.ext.servlet.ServerServlet.createApplication(ServerServlet.java:384)
        at
org.restlet.ext.servlet.ServerServlet.getApplication(ServerServlet.java:751)
        at
org.restlet.ext.servlet.ServerServlet.init(ServerServlet.java:904)
        at javax.servlet.GenericServlet.init(GenericServlet.java:241)
        at
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
        at
org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
        at
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:112)
        at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
        at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
        at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
        at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:915)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
        at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
        at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
2010-nov-26 17:06:38 org.restlet.engine.log.LogFilter afterHandle
INFO: 2010-11-26        17:06:38        127.0.0.1       -       127.0.0.1      
8080    GET     /hello
-       404     0       -       6       http://localhost:8080   Jakarta
Commons-HttpClient/3.1  -
2010-nov-26 17:06:39 org.restlet.engine.log.LogFilter afterHandle
INFO: 2010-11-26        17:06:39        127.0.0.1       -       127.0.0.1      
8080    GET     /hello
-       404     0       -       0       http://localhost:8080   Mozilla/5.0
(Windows; U; Windows NT 6.1; en-US; rv:1.9.2) Gecko -

How do I get it to find my new class? Where is the Jetty cache in case it
has been cached by Jetty on my local machine.
-- 
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/RestletServlet-Restlet-ServerServlet-couldn-t-find-the-target-class-tp5777825p5777825.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2685911

Reply via email to