java - Tomcat: SEVERE: Error loading WebappClassLoader -


please not mark duplicate, other solutions did not yet!

i'm getting 404 in browser trying run tutorial: http://www.vogella.com/articles/rest/article.html

i not see webcontent/web-inf/classes folder. why isn't generated?

i saw solutions here on telling clean project, restart eclipse, , on... non helped in situation. i'm using tomcat 6, dynamic web module version 2.5.

may 13, 2013 8:17:01 pm org.apache.catalina.core.aprlifecyclelistener init info: apr based apache tomcat native library allows optimal performance in production environments not found on java.library.path: .:/library/java/extensions:/system/library/java/extensions:/usr/lib/java may 13, 2013 8:17:01 pm org.apache.tomcat.util.digester.setpropertiesrule begin warning: [setpropertiesrule]{server/service/engine/host/context} setting property 'source' 'org.eclipse.jst.jee.server:de.vogella.jersey.first' did not find matching property. may 13, 2013 8:17:02 pm org.apache.coyote.http11.http11protocol init info: initializing coyote http/1.1 on http-8080 may 13, 2013 8:17:02 pm org.apache.catalina.startup.catalina load info: initialization processed in 524 ms may 13, 2013 8:17:02 pm org.apache.catalina.core.standardservice start info: starting service catalina may 13, 2013 8:17:02 pm org.apache.catalina.core.standardengine start info: starting servlet engine: apache tomcat/6.0.37 may 13, 2013 8:17:02 pm com.sun.jersey.api.core.packagesresourceconfig init info: scanning root resource , provider classes in packages:   de.vogella.jersey.first may 13, 2013 8:17:02 pm com.sun.jersey.api.core.scanningresourceconfig logclasses info: root resource classes found:   class de.vogella.jersey.first.hello may 13, 2013 8:17:02 pm com.sun.jersey.api.core.scanningresourceconfig init info: no provider classes found. may 13, 2013 8:17:02 pm com.sun.jersey.server.impl.application.webapplicationimpl _initiate info: initiating jersey application, version 'jersey: 1.17 01/17/2013 03:31 pm' may 13, 2013 8:17:03 pm org.apache.coyote.http11.http11protocol start info: starting coyote http/1.1 on http-8080 may 13, 2013 8:17:03 pm org.apache.jk.common.channelsocket init info: jk: ajp13 listening on /0.0.0.0:8009 may 13, 2013 8:17:03 pm org.apache.jk.server.jkmain start info: jk running id=0 time=0/15  config=null may 13, 2013 8:17:03 pm org.apache.catalina.startup.catalina start info: server startup in 1145 ms 

and there still no classes folder!!!

vogel's example using jersey 1.5. if using jersey 2.0 & servlet 2.x, properties in web.xml file need changed. web-app properties should reflect servlet version using. also, servletcontainer in org.glassfish.jersey.servlet package. servlet-class property should specified follows:

<servlet-class>org.glassfish.jersey.servlet.servletcontainer</servlet-class>  

for example, servlet 2.5, web.xml file should this:

<?xml version="1.0" encoding="utf-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"   xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"     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">   <display-name>de.vogella.jersey.first</display-name>   <servlet>     <servlet-name>jersey rest service</servlet-name>     <servlet-class>org.glassfish.jersey.servlet.servletcontainer</servlet-class>     <init-param>       <param-name>jersey.config.server.provider.packages</param-name>       <param-value>de.vogella.jersey.first</param-value>     </init-param>     <load-on-startup>1</load-on-startup>   </servlet>   <servlet-mapping>     <servlet-name>jersey rest service</servlet-name>     <url-pattern>/rest/hello</url-pattern>   </servlet-mapping> </web-app> 

this information can found in jersey 2.0 user guide, chapter 4, deploying restful web service.

also, found needed set url-pattern to:

    <url-pattern>/rest/hello</url-pattern> 

to work, still need investigate issue.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -