Re: [jetty-user] Jetty, Hibernate and java.lang.NoSuchFieldError: NONE

Jakub Skoczen <[email protected]>
Newsgroups gmane.comp.java.jetty.support
Message-ID <[email protected]>
Thanks, I run it with '-X' and the dependencies were indeed ordered
differently on the classpath when running a war and plain jetty:run.
In the latter case a transitive dependency from one of the libraries
were 'persistence-api-1.0.jar' and that was put BEFORE hibernate jars
which broke HIbernate! Excluding that dependency did the trick. How
weird is that?

On Wed, Aug 18, 2010 at 3:30 PM, Jesse McConnell
<[email protected]> wrote:
> you can use the -X option with maven and it with dump out the contents
> of the classloader being using for that plugin execution...comparing
> the two ought to get you closer to figuring out what might be missing
>
> jesse
>
> --
> jesse mcconnell
> [email protected]
>
>
>
> On Wed, Aug 18, 2010 at 08:13, Jakub Skoczen <[email protected]> wrote:
>> Ok, so I have an app that uses Hibernate (3.5.1) and everything runs
>> smoothly in Tomcat 5.5/6. It also runs flawlessly in Jetty (6.1.25)
>> when I use the maven-jetty-plugin with 'jetty:run-war' and
>> 'jetty:run-exploded' BUT NOT with 'jetty:run', in which case a request
>> to list few items in teh DB goes down with:
>>
>> java.lang.NoSuchFieldError: NONE
>>        at org.hibernate.ejb.QueryImpl.<init>(QueryImpl.java:604)
>>        at org.hibernate.ejb.QueryImpl.<init>(QueryImpl.java:79)
>>        at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:268)
>>        ...
>>        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:511)
>>        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
>>        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:440)
>>        at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
>>        at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
>>        at org.mortbay.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:503)
>>        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:511)
>>        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
>>        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:440)
>>        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:542)
>>        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
>>        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
>>        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>>        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>>        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
>>        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>>
>>
>> I expect some weird way the dependencies are aligned on the classpath
>> and Hibernate does not like it. Anyone seen such a thing?
>>
>> --
>>
>> Cheers,
>> Jakub
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



-- 

Cheers,
Jakub

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.