RE: [Geoserver-users] java.lang.NoClassDefFoundError

Dear Chris

Still bad Solaris news! I did adapt CLASSPATH in .cshrc and .profile according to the location where I found the servlet 'AbstractService' (and others) mentioned within the error message (see attached nohup.out): /export/disk024/geoserver/server/geoserver/WEB-INF/classes/org/vfny/geoserver/servlets (see attached .profile).

http://syringa.ethz.ch:8080/geoserver/ still shows the same behavior (wouldn't display maps) and comes up with the same error messages (see attached nohup.out).

regards,
Bernd

-----Ursprüngliche Nachricht-----
Von: Chris Holmes [mailto:cholmes@anonymised.com]
Gesendet: Donnerstag, 9. März 2006 19:46
An: Hebel Bernd
Cc: geoserver-users@lists.sourceforge.net
Betreff: Re: AW: AW: [Geoserver-users] java.lang.NoClassDefFoundError

Ah, Justin just helped me figure this out. We put the servlet classes in server/geoserver/WEB-INF/classes. I think servlet containers like them better there. So you'll have to include all the .class files in server/geoserver/WEB-INF/classes on your classpath. On most platforms if you put a war up it all gets included by default, most people don't modify their classpath, but I guess you have to on solaris?

Let me know if that works, I think it should. And if it does it'd be cool if you could write a little wiki page in our docs on how to get up geoserver on solaris.

best regards,

Chris

Hebel Bernd wrote:

Dear Chris,

there is no such /servlets directory within org/vfny/geoserver/ at all (see screenshot attached to my last mail)! I obtained the entire geoserver-1.3.0-bin.tar.gz (stable version 1.3.0) by downloading it from sourceforge as suggested on http://docs.codehaus.org/display/GEOS/Download. Maybe you can also check the distribution for the existance of these needed subdirectories? I'd appreciate getting a complete geoserver.jar from you!

Strange to me is however, that - regarding the error message (see below) - a native method had been called effecting the error! So does our problem at all have anything to do with the geoserver.jar? Would be good to know, which native method that would be, but I have no possibility to start a debugger and find out.

14:42:52.792 WARN!! Error for
/geoserver/wms?LAYERS=tiger:giant_polygon,tiger:poly_landmarks,tiger:t
iger_roads,tiger:poi&FORMAT=image/png&TRANSPARENT=TRUE&HEIGHT=406&REQU
EST=GetMap&WIDTH=810&STYLES=,&SRS=EPSG:4326&VERSION=1.1.1&BBOX=-74.0
2924949245278,40.70060354838641,-73.9883552568504,40.72110115289822
java.lang.NoClassDefFoundError: org/vfny/geoserver/servlets/AbstractService$ServiceStrategy
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    ...

Many thanks for your big effort!

bernd

-----Ursprüngliche Nachricht-----
Von: Chris Holmes [mailto:cholmes@anonymised.com]
Gesendet: Mittwoch, 8. März 2006 17:58
An: Hebel Bernd
Cc: geoserver-users@lists.sourceforge.net
Betreff: Re: AW: [Geoserver-users] java.lang.NoClassDefFoundError

The AbstractService file should be in org/vfny/geoserver/servlets/ Is it in that directory?

This error is really quite odd, I've never seen anything like it. I can try to just build a new geoserver.jar and send it to you... Maybe yours got corrupted somehow.

Hebel Bernd wrote:

Dear Chris,

- I've tried reinstallation before, did not change the behavior.

- geoserver.jar in WEB-INF/lib is existing (see attach)

- runing "jar xf geoserver.jar" (your advice) did create a new directory-tree "WEB-INF/lib/org/vfny/geoserver" containing various subdirectories with class files (see attach 2), but no AbstractService.class file is contained within that new structure (subdirs).

So do I have to substitute the existing geoserver.jar by a new, complete one, and how do I get the later one? Are there other jars/classes/files I'd better substitute?

Regards, bd

-----Ursprüngliche Nachricht-----
Von: Chris Holmes [mailto:cholmes@anonymised.com
<mailto:cholmes@anonymised.com> ]
Gesendet: Dienstag, 7. März 2006 17:35
An: Hebel Bernd
Cc: geoserver-users@lists.sourceforge.net
Betreff: Re: [Geoserver-users] java.lang.NoClassDefFoundError

Hmmm... It seems like you are just missing some important files. Have you tried reinstalling GeoServer? Also you could try running the GeoServer war download in tomcat or something, then you shouldn't need to do any exports, at least not initially.

And is there a geoserver.jar in WEB-INF/lib ? You could also do a 'jar xf' on the geoserver.jar, and see if the AbstractService class file is there. If it is then something is just not picking it up right....

best regards,

Chris

Hebel Bernd wrote:

Dear subscribers and supporters

Sorry for bothering you all, but I am still facing the same problem,
I am desperate:

At http://syringa.ethz.ch:8080/geoserver/
<http://syringa.ethz.ch:8080/geoserver/&gt; using Geoserver 1.3.0 on
Sun Solaris 8 using Java2SE SDK 1.5.0_06 as well as 1.4.2_11 (changing versions doesn't help) and having environment variables set as follows:

JAVA_HOME=/usr/java
export JAVA_HOME

GEOSERVER_HOME=/export/disk024/geoserver
export GEOSERVER_HOME

GEOSERVER_DATA_DIR=/export/disk024/geoserver/conf
export GEOSERVER_DATA_DIR

CLASSPATH=/export/disk024/geoserver/server/geoserver/WEB-INF/lib
export CLASSPATH

... I keep obtaining error messages alike in the attached textfile
(log from a short session calling the demo WMS page
http://syringa.ethz.ch:8080/geoserver/data/demo/popup_map/index.html ).

Is there anyone who is able to help?

Many thanks, I appreciate your effort very much!

Regards, bd

---------------------------------------------------------------------
-
--

GEOSERVER DATA DIR is /export/disk024/geoserver/conf
14:36:01.807 EVENT Checking Resource aliases 14:36:04.790 EVENT
Starting Jetty/4.2.21 14:36:04.860 EVENT Started
ServletHttpContext[/]
14:36:04.874 EVENT Started SocketListener on 127.0.0.1:8081
14:36:04.875 EVENT Started org.mortbay.jetty.Server@anonymised.com
14:36:05.094 EVENT Starting Jetty/4.2.21
14:36:05.674 EVENT Started
WebApplicationContext[/geoserver,GeoServer]
14:36:23.697 EVENT Started SocketListener on 0.0.0.0:8080
14:36:23.698 EVENT Started org.mortbay.jetty.Server@anonymised.com
14:39:56.916 EVENT Started HttpContext[/]
14:42:52.792 WARN!! Error for
/geoserver/wms?LAYERS=tiger:giant_polygon,tiger:poly_landmarks,tiger:
t
iger_roads,tiger:poi&FORMAT=image/png&TRANSPARENT=TRUE&HEIGHT=406&REQ
U
EST=GetMap&WIDTH=810&STYLES=,&SRS=EPSG:4326&VERSION=1.1.1&BBOX=-74.
0
2924949245278,40.70060354838641,-73.9883552568504,40.72110115289822
java.lang.NoClassDefFoundError: org/vfny/geoserver/servlets/AbstractService$ServiceStrategy
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:197)
    at org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:170)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:141)
    at org.vfny.geoserver.servlets.AbstractService.class$(AbstractService.java:131)
    at org.vfny.geoserver.servlets.AbstractService.<clinit>(AbstractService.java:131)
    at org.vfny.geoserver.wms.servlets.WmsDispatcher.doResponse(WmsDispatcher.java:131)
    at org.vfny.geoserver.wms.servlets.WmsDispatcher.doGet(WmsDispatcher.java:115)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
    at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342)
    at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)
    at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
    at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
    at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
    at org.mortbay.http.HttpServer.service(HttpServer.java:879)
    at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
    at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961)
    at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
    at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197)
    at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:276)
    at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)

14:44:24.978 WARN!! Error for /geoserver/wfs/GetFeature
java.lang.NoClassDefFoundError: org.vfny.geoserver.servlets.AbstractService
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:1618)
    at java.lang.Class.getConstructor0(Class.java:1930)
    at java.lang.Class.newInstance0(Class.java:278)
    at java.lang.Class.newInstance(Class.java:261)
    at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:176)
    at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:293)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:333)
    at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342)
    at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)
    at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
    at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
    at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
    at org.mortbay.http.HttpServer.service(HttpServer.java:879)
    at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
    at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961)
    at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
    at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197)
    at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:276)
    at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)

14:44:24.989 WARN!! Error for /geoserver/wfs/GetFeature
java.lang.NoClassDefFoundError: org.vfny.geoserver.servlets.AbstractService
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:1618)
    at java.lang.Class.getConstructor0(Class.java:1930)
    at java.lang.Class.newInstance0(Class.java:278)
    at java.lang.Class.newInstance(Class.java:261)
    at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:176)
    at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:293)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:333)
    at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342)
    at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)
    at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
    at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
    at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
    at org.mortbay.http.HttpServer.service(HttpServer.java:879)
    at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
    at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961)
    at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
    at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197)
    at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:276)
    at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)

14:45:06.479 EVENT Shutdown hook executing
14:45:06.481 EVENT Stopping Acceptor
ServerSocket[addr=localhost/127.0.0.1,port=0,localport=8081]
14:45:06.492 EVENT Stopped SocketListener on 127.0.0.1:8081
14:45:06.496 EVENT Stopped ServletHttpContext[/]
14:45:06.497 EVENT Stopped org.mortbay.jetty.Server@anonymised.com
14:45:06.500 EVENT Stopping Acceptor
ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080]
14:45:06.503 EVENT Stopped SocketListener on 0.0.0.0:8080
java.lang.IllegalAccessException: Class org.vfny.geoserver.servlets.FreefsLog can not access a member of class org.geotools.data.arcsde.ConnectionPoolFactory with modifiers "public static synchronized"
    at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:57)
    at java.lang.reflect.Method.invoke(Method.java:317)
    at org.vfny.geoserver.servlets.FreefsLog.destroy(FreefsLog.java:109)
    at org.mortbay.jetty.servlet.ServletHolder.stop(ServletHolder.java:244)
    at org.mortbay.jetty.servlet.ServletHandler.stop(ServletHandler.java:470)
    at org.mortbay.jetty.servlet.WebApplicationHandler.stop(WebApplicationHandler.java:163)
    at org.mortbay.http.HttpContext.stop(HttpContext.java:1978)
    at org.mortbay.jetty.servlet.ServletHttpContext.stop(ServletHttpContext.java:145)
    at org.mortbay.jetty.servlet.WebApplicationContext.stop(WebApplicationContext.java:504)
    at org.mortbay.http.HttpContext.stop(HttpContext.java:1949)
    at org.mortbay.http.HttpServer.stop(HttpServer.java:732)
    at org.mortbay.http.HttpServer.stop(HttpServer.java:700)
    at org.mortbay.jetty.Server$1.run(Server.java:455)
14:45:06.555 EVENT Stopped
WebApplicationContext[/geoserver,GeoServer]
14:45:06.556 EVENT Stopped HttpContext[/]
14:45:06.557 EVENT Stopped org.mortbay.jetty.Server@anonymised.com

--
Chris Holmes
The Open Planning Project
thoughts at: http://cholmes.wordpress.com
<http://cholmes.wordpress.com>

--
Chris Holmes
The Open Planning Project
thoughts at: http://cholmes.wordpress.com

--
Chris Holmes
The Open Planning Project
thoughts at: http://cholmes.wordpress.com

.profile (3.24 KB)

nohup.out (24.6 KB)