Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] How to fix "error.no.jdk"?

Hi Jan, Hendrik and Dmitryi,

We faced the same situation in OSGi where we needed to tell jsp-impl
to not use the in-jvm compiler.
The glassfish committers added a system property for us to do that [1].

Here is what needs to happen before the jasper compiler is loaded by
your webapp:
   System.setProperty("org.apache.jasper.compiler.disablejsr199", "false");

For example if you use a jetty.xml config file, you can add this:

    <Call class="java.lang.System" name="setProperty">
      <Arg>org.apache.jasper.compiler.disablejsr199</Arg>
      <Arg>false</Arg>
    </Call>

If I am not mistaken, you could also set it up early when your webapp
is initialized.
This will work for jetty-8 too [2].

I hope it helps,
Sorry I missed the first thread talking about the issue last week.

Cheers,
Hugues

[1] http://java.net/jira/browse/JSP-21
[2] http://java.net/jira/browse/JSP-22

On Fri, Oct 28, 2011 at 6:38 AM, Jan Bartel <janb@xxxxxxxxxxx> wrote:
> There was discussion of this on this list last week I believe.
>
> The issue is that we updated the version of jasper (jsp engine from
> Glassfish) that we use in 7.5.0  and it insists on using the in-jvm compiler
> if you're using jdk1.6 or above. Therefore, you need to have a full jdk
> installed (until we can get a patch into a release, stay tuned for that).
>
> I documented this here:
> http://wiki.eclipse.org/Jetty/Howto/Configure_JSP
>
>
> Jan
>
> On 28 October 2011 00:11, Dmitriy Avtonomov <dmitriy.avtonomov@xxxxxxxxx>
> wrote:
>>
>> there were some mentions of such an issue with 7.5.x. versions on this
>> mailing list, plus I have encountered this myself.
>>
>> dmitriy
>>
>> On Thu, Oct 27, 2011 at 14:06, Hendrik Schenk <hschenk@xxxxxxx> wrote:
>>>
>>> I tried the jetty version 7.4.5. and it works fine. thank you for your
>>> help.
>>>
>>> it is a known bug of 7.5?
>>>
>>> Whatever..it works for me :)
>>>
>>> best regards
>>> hsch
>>>
>>>
>>>
>>> ----- Original Message -----
>>>
>>> From: Hendrik Schenk
>>>
>>> Sent: 10/27/11 11:55 AM
>>>
>>> To: JETTY user mailing list
>>>
>>> Subject: Re: [jetty-users] How to fix "error.no.jdk"?
>>>
>>> i tried the JSP example provided from jetty and deployed a test
>>> .war-file, which consist an easy JSP and work in other container/server like
>>> tomcat, jboss and glassfish (all with the same env-variable JAVA_HOME) .
>>> Still the same error.
>>> I also tried to change the jdk. I tried jdk 6 and the new one - jdk 7.
>>> And again: error.no.jdk
>>>
>>> now i will give the 7.4.x version a try and report back.
>>>
>>>
>>>
>>> ----- Original Message -----
>>>
>>> From: Dmitriy Avtonomov
>>>
>>> Sent: 10/27/11 11:39 AM
>>>
>>> To: JETTY user mailing list
>>>
>>> Subject: Re: [jetty-users] How to fix "error.no.jdk"?
>>>
>>> do you happen to use JSPs in your project?
>>> if so, then either try jetty 7.4.x
>>> or use an older jdk (you're probably using jdk 1.7?)
>>>
>>> On Thu, Oct 27, 2011 at 13:26, Hendrik Schenk <hschenk@xxxxxxx> wrote:
>>>>
>>>> Hi all,
>>>>
>>>> i want to use jetty instead of tomcat. I downloaded the newest stable 7
>>>> release from here: http://download.eclipse.org/jetty/stable-7/dist/
>>>>
>>>> I unzipped the package jetty-distribution-7.5.4.v20111024.zip on my
>>>> windows machine and start the server in the command prompt "java -jar
>>>> start-jar".
>>>>
>>>> I can reach the welcome page and also the servlet example work. But if i
>>>> try one of the JSP examples, i will get the always same error:
>>>>
>>>> HTTP ERROR 500
>>>>
>>>> Problem accessing /jsp/tag2.jsp. Reason:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>     java.err.nojdk
>>>>
>>>> Caused by:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> org.apache.jasper.JasperException: java.err.nojdk
>>>> 	at
>>>> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:89)
>>>> 	at
>>>> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:375)
>>>> 	at
>>>> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
>>>> 	at
>>>> org.apache.jasper.compiler.Jsr199JavaCompiler.compile(Jsr199JavaCompiler.java:198)
>>>> 	at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:364)
>>>> 	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:433)
>>>> 	at
>>>> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:608)
>>>> 	at
>>>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
>>>> 	at
>>>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:476)
>>>> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:366)
>>>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>>> 	at
>>>> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547)
>>>> 	at
>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1359)
>>>> 	at org.eclipse.jetty.servlets.QoSFilter.doFilter(QoSFilter.java:205)
>>>> 	at
>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1330)
>>>> 	at com.acme.TestFilter.doFilter(TestFilter.java:107)
>>>> 	at
>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1330)
>>>> 	at
>>>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478)
>>>> 	at
>>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
>>>> 	at
>>>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:483)
>>>> 	at
>>>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
>>>> 	at
>>>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:941)
>>>> 	at
>>>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)
>>>> 	at
>>>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
>>>> 	at
>>>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875)
>>>> 	at
>>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
>>>> 	at
>>>> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
>>>> 	at
>>>> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
>>>> 	at
>>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
>>>> 	at org.eclipse.jetty.server.Server.handle(Server.java:345)
>>>> 	at
>>>> org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
>>>> 	at
>>>> org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:919)
>>>> 	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:582)
>>>> 	at
>>>> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
>>>> 	at
>>>> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)
>>>> 	at
>>>> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
>>>> 	at
>>>> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)
>>>> 	at
>>>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
>>>> 	at
>>>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
>>>> 	at java.lang.Thread.run(Unknown Source)
>>>>
>>>> ________________________________
>>>> Powered by Jetty://
>>>>
>>>>
>>>> I "googled" a lot and cannot find a solution to solve my problem. I
>>>> already set the evironment variable and it points to my jdk (Name:
>>>> "JAVA_HOME" Value: "C:\Program Files (x86)\Java\jdk1.6.0_16"  - without the
>>>> ' " ')
>>>>
>>>> I run jetty on my windows machine with windows 7 enterprise (64bit). I
>>>> spent a lot of time to fix this problem, but i cannot find any solution.
>>>>
>>>> Thank you for your help in advance!
>>>>
>>>> best regards
>>>> hsch
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> jetty-users mailing list
>>>> jetty-users@xxxxxxxxxxx
>>>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> jetty-users mailing list
>>> jetty-users@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>>
>>
>>
>> _______________________________________________
>> jetty-users mailing list
>> jetty-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>
>
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>


Back to the top