wood burning stoves
The moose likes JForum and the fly likes Running under Jetty 6.1.3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Running under Jetty 6.1.3" Watch "Running under Jetty 6.1.3" New topic

Running under Jetty 6.1.3

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi. I'm testing JForum using Jetty 6.1.3 as my container. It starts up fine. I seem to be getting the following error I believe during the posting process. Has anyone seen this before? I wonder if it is a library conflict, as a previous post hinted at this with a version 5 of Jetty. Thanks for any assistance with this.

117031 [btpool0-1] INFO uk.ltd.getahead.dwr.util.Logger - Logging using commons-logging.
117109 [btpool0-1] INFO uk.ltd.getahead.dwr.DWRServlet - retrieved system configuration file: sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream@34cdfc
117156 [btpool0-1] INFO uk.ltd.getahead.dwr.impl.DefaultConfiguration - Missing class for creator 'pageflow'. Failed to load uk.ltd.getahead.dwr.create.PageFlowCreator. Cause: Beehive/Weblogic Creator not available.
117156 [btpool0-1] INFO uk.ltd.getahead.dwr.impl.DefaultConfiguration - Missing classdef for creator 'spring'. Failed to load uk.ltd.getahead.dwr.create.SpringCreator. Cause: org/springframework/beans/factory/BeanFactory
117172 [btpool0-1] INFO uk.ltd.getahead.dwr.impl.DefaultConfiguration - Missing classdef for creator 'script'. Failed to load uk.ltd.getahead.dwr.create.ScriptedCreator. Cause: org/apache/bsf/BSFException
117266 [btpool0-1] INFO uk.ltd.getahead.dwr.impl.DefaultConfiguration - Missing class for converter 'hibernate'. Failed to load uk.ltd.getahead.dwr.convert.HibernateBeanConverter. Cause: Failed to find either org.hibernate.Hibernate or net.sf.hibernate.Hibernate.
117281 [btpool0-1] ERROR uk.ltd.getahead.dwr.DWRServlet - Missing config file: WEB-INF/dwr-jforum.xml
117281 [btpool0-1] WARN uk.ltd.getahead.dwr.impl.DefaultCreatorManager - Names of known classes are:
117281 [btpool0-1] ERROR org.mortbay.log - /dwr/interface/AjaxUtils.js
java.lang.SecurityException: No class by name: AjaxUtils
at uk.ltd.getahead.dwr.impl.DefaultCreatorManager.getCreator(DefaultCreatorManager.java:196)
at uk.ltd.getahead.dwr.impl.DefaultInterfaceProcessor.handle(DefaultInterfaceProcessor.java:54)
at uk.ltd.getahead.dwr.impl.DefaultProcessor.handle(DefaultProcessor.java:79)
at uk.ltd.getahead.dwr.AbstractDWRServlet.doPost(AbstractDWRServlet.java:162)
at uk.ltd.getahead.dwr.AbstractDWRServlet.doGet(AbstractDWRServlet.java:149)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:368)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
[originally posted on jforum.net by cszamudio]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Don't know Jetty, but this looks like a class loader security issue due to having two jar's of different versions. One (or more) are probably in the WEB-INF/lib directory and the other is in a "container" level lib (e.g., Tomcat uses Shared/lib, Common/lib, and System/lib).

The security rules on most webapp containers don't let classes loaded by a "shared" loader load classes from an application level jar. This would allow a web app (like jForum) a way to access system stuff they shouldn't have access to / or accidentally crash all webapps.

So, what may be happening is that the Jetty container is loading DWR as a shared level class, then jForum is using this already loaded class when it is being initialized and it's application level classes are not being found by the class loader.

Most likely the fix is to remove the jar's that exist at the "shared" level from the WEB-INF/lib directory.
[originally posted on jforum.net by monroe]
subject: Running under Jetty 6.1.3