And I see why you got an old version of the jetty-schemas.jar file - the
jetty-distribution build is still pointing at version 3.1.RC0 of that jar,
which doesn't contain the proper manifest added in 3.1.M0. As the
jetty-distro doesn't need the manifest in any way, that wasn't noticed.
I've corrected the build now to make sure its using 3.1.M0 of
jetty-schemas.jar

Jan


On 12 December 2013 15:44, Jan Bartel <[email protected]> wrote:

> Hi Jason et al,
>
> Sorry, my bad again for not updating the jetty documentation.
>
> The jar you need is downloadable here:
> http://central.maven.org/maven2/org/eclipse/jetty/toolchain/jetty-jsp-fragment/2.3.3/
>
> This jar has all of the necessary glassfish jsp classes, including
> ResourceInjector and the JDTJavaCompiler class, along with an osgi manifest
> that attaches it as a fragment to the  org.eclipse.jetty.osgi.boot bundle.
>
> So you should have these jsp-related bundles installed, in addition to the
> org.eclipse.jetty.osgi/jetty-osgi-boot/9.1.0.v2013111 bundle (and the jetty
> bundles listed under "General Setup" on
> http://www.eclipse.org/jetty/documentation/current/framework-jetty-osgi.html
> ):
>
>  javax.servlet.jsp/javax.servlet.jsp-api/2.3.1
>  org.eclipse.jetty.orbit/javax.servlet.jsp.jstl/1.2.0.v201105211821
>
>  
> org.eclipse.jetty.orbit/org.apache.taglibs.standard.glassfish/1.2.0.v201112081803
>  org.glassfish/javax.el/3.0.0
>  org.eclipse.jetty.orbit/org.eclipse.jdt.core/3.8.2.v20130121
>  org.eclipse.jetty.toolchain/jetty-jsp-fragment/2.3.3
>  org.eclipse.jetty.osgi/jetty-osgi-boot-jsp/9.1.0.v2013111
>
> I'll update the documentation.
>
> Also, please double-check that you have version 3.1 of the servlet-api
> deployed NOT version 3.0, and the jetty-toolchain jetty-schemas 3.1.M0 jar.
> So should be:
>
> javax.servlet/javax.servlet-api/jar/3.1.0
> org.eclipse.jetty.toolchain/jetty-schemas/3.1.M0
>
> That version of the jetty-schemas jar has the correct export statements in
> its manifest.
>
> So, in short, I think I've wasted a bunch of your time by simply
> forgetting to update the jetty-osgi doco for jsp - sorry about that!
>
> Jan
>
>
>
> On 12 December 2013 03:31, Jason <[email protected]> wrote:
>
>> Thanks Joakim, that set me on the right trail.
>>
>> I found that org.eclipse.jetty.osgi.boot.jsp fragment activator set
>> org.apache.jasper.compiler.disablejsr199=true
>>
>> //jsr199 compilation does not work in osgi
>> System.setProperty("org.apache.jasper.compiler.disablejsr199", 
>> Boolean.TRUE.toString());
>>
>> So I followed through expecting it would need to find both,
>> org.eclipse.jdt.internal.compiler.Compiler and
>> org.apache.jasper.compiler.JDTJavaCompiler
>> I found that the .jasper.compiler.JDTJavaCompiler was not in the
>> org.glassfish.web.javax.servlet.jsp bundle, but in a separate JAR in Jetty
>> lib/jetty-jsp-jdt-2.3.3.jar
>> I also found that the jdt packages were not imported by 
>> org.glassfish.web.javax.servlet.jsp
>> (they are exported by org.eclipse.jdt.core.compiler.batch).
>> Adding jetty-jsp-jdt-2.3.3.jar to OSGI, and fixing the jdt imports on 
>> org.glassfish.web.javax.servlet.jsp
>> left me with another problem ...
>> I got a class not found for org.glassfish.jsp.api.ResourceInjector.  To
>> fix this I added org.glassfish.jsp.api to the imports of 
>> org.eclipse.jetty.webapp
>>
>>
>> Then success !!
>>
>> There was a fair bit of messing around so I'll check over the next few
>> days to see if I captured everything as a reference.
>>
>> Thanks all for the input
>> J
>>
>> ------------------------------
>> Date: Tue, 10 Dec 2013 05:48:37 -0700
>> From: [email protected]
>>
>> To: [email protected]
>> Subject: Re: [jetty-users] Jetty OSGI with JSP support - Missing
>> Constraint
>>
>> PWC63449: Cannot find a java compiler for compilation
>>
>> Here's the Jasper logic is to find a compiler it can use.
>>
>> If you do nothing, and rely on defaults, then
>> org.eclipse.jdt.internal.compiler.Compiler is used (if found)
>> But if you specify
>> System.setProperty("org.apache.jasper.compiler.disablejsr199","false"),
>> then the JDK built-in compiler is used (Jasper looks for "javax.tools.Tool"
>> class),
>> Next, if neither of those are found, the
>> "org.apache.tools.ant.taskdefs.Javac" is looked for.
>> Finally, if none are found, it throws that error.
>>
>> I don't use OSGi myself, so I don't know what you need to do, but maybe
>> this little insight into the process will help you address it directly.
>>
>>
>> --
>> Joakim Erdfelt <[email protected]>
>> webtide.com <http://www.webtide.com/> - intalio.com/jetty
>> Expert advice, services and support from from the Jetty & CometD experts
>> eclipse.org/jetty - cometd.org
>>
>>
>> On Tue, Dec 10, 2013 at 12:01 AM, Jason Neatherway <
>> [email protected]> wrote:
>>
>> Thanks Jan - that cleared up the dependencies.  (note. the jetty-schemas
>> didn't include a bundle manifest so I needed to create a new bundle from
>> the JAR)
>>
>> I'm now stuck on the error - org.apache.jasper.JasperException: PWC6349:
>> Cannot find a java compiler for compilation.
>>
>>
>> ------------------------------
>> Date: Tue, 10 Dec 2013 16:21:23 +1100
>> From: [email protected]
>> To: [email protected]
>> Subject: Re: [jetty-users] Jetty OSGI with JSP support - Missing
>> Constraint
>>
>>
>> Hi Jason,
>>
>> Ooops, doco is a little out-of-date. You will also need the
>> jetty-schemas-3.1.jar from the jetty distro lib directory.
>>
>> I'll put updating that page onto my to-do list.
>>
>> cheers
>> Jan
>>
>>
>> On 10 December 2013 12:27, Jason Neatherway <[email protected]>wrote:
>>
>> I'm trying to use Jetty as a OSGI bundle in Eclipse (Kepler for RCP and
>> RAP), I'm following the guidance at
>> http://www.eclipse.org/jetty/documentation/current/framework-jetty-osgi.html
>> I have installed the JARs as bundles, and have been able to launch the
>> jetty-osgi-boot jar and add a web app via another bundle with just a static
>> html page to test.  This all went pretty smoothly and worked.
>> I used JARs from LIB folder in jetty-distribution-9.1.0.v20131115
>> jetty-utilorg.eclipse.jetty.utiljetty-httporg.eclipse.jetty.httpjetty-io
>> org.eclipse.jetty.io jetty-securityorg.eclipse.jetty.securityjetty-server
>> org.eclipse.jetty.serverjetty-servletorg.eclipse.jetty.servlet
>> jetty-webapp org.eclipse.jetty.webappjetty-deployorg.eclipse.jetty.deploy
>> jetty-xmlorg.eclipse.jetty.xmlPlus - servlet-api-3.1.jar and
>> jetty-osgi-boot-9.1.0.v20131115.jar
>>
>> I then tried to add JSP support, and had trouble with the
>> jetty-osgi-boot-jsp fragment.  It failed dependencies.
>> I imported JSP JARs from lib/jsp folder in the distribution,
>> javax.el-3.0.0.jar
>> javax.servlet.jsp-2.3.2.jar
>> javax.servlet.jsp-api-2.3.1.jar
>> javax.servlet.jsp.jstl-1.2.0.v201105211821.jar
>> jetty-jsp-jdt-2.3.3.jar
>> org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar
>> org.eclipse.jdt.core-3.8.2.v20130121.jar
>> Plus
>> - javax.servlet (3.0.0.v201112011016)
>> - javax.servlet.jsp (3.0.0.v201112011158)
>>  - *jetty-osgi-boot-jsp-9.1.0.v20131115.jar*
>>
>> Bundle validation failed for jetty-osgi-boot with Missing Constraint for
>> - javax.servlet.jsp.resources_[3.1.0,3.2.0)
>> - javax.servlet.resources_[3.1.0,3.2.0)
>> The javax.servlet andjavax.servlet.jsp bundles provide earlier versions
>> of these packages.
>>
>> Do have have some conflicting versions here ?  I couldn't find any newer
>> packages that would meet these constraints, so wondering if its a error
>> with the jetty-osgi-boot-jsp manifest.  Appreciate any advice.
>>
>> I did also try modifying the manifest jetty-osgi-boot-jsp to reduce the
>> minimum version for these so that the dependency would be met
>>  - javax.servlet.resources min 2.1
>>  - javax.servlet.jsp.resources min 2.1
>> This allowed the fragment to start, but I then it fails to compile the
>> JSP with
>> org.apache.jasper.JasperException: PWC6349: Cannot find a java compiler
>> for compilation.
>>
>>
>> I'm a bit of a novice (hobby programmer) but I'm trying to learn about
>> Jetty and OSGI so would appreciate any guidance
>> Thanks
>> J
>>
>> ---------------- Console output ---------------------
>> ** Jasper error occurs after making a request for a JSP page
>> ICommand is registered
>> SLF4J: Class path contains multiple SLF4J bindings.
>> SLF4J: Found binding in
>> [bundleresource://17.fwk95630655/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: Found binding in
>> [bundleresource://17.fwk95630655:3/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>> explanation.
>> SLF4J: Actual binding is of type
>> [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
>> 12:03:24.413 [Start Level Event Dispatcher] DEBUG
>> c.neatherweb.automate.configmgr.impl - ConfigManager service is registered
>> 12:03:24.420 [Start Level Event Dispatcher] INFO  com.neatherweb.jcbus -
>> Logging service started.
>> 2013-12-10 12:03:24.503:INFO:oejobis.DefaultJettyAtJettyHomeHelper:Start
>> Level Event Dispatcher: Configuring jetty from bundle:
>> org.eclipse.jetty.osgi.boot with /jettyhome/etc/jetty.xml
>> 2013-12-10 12:03:24.514:INFO:oejobis.DefaultJettyAtJettyHomeHelper:Start
>> Level Event Dispatcher: Configuring jetty from bundle:
>> org.eclipse.jetty.osgi.boot with /jettyhome/etc/jetty-selector.xml
>> 2013-12-10 12:03:24.517:INFO:oejobis.DefaultJettyAtJettyHomeHelper:Start
>> Level Event Dispatcher: Configuring jetty from bundle:
>> org.eclipse.jetty.osgi.boot with /jettyhome/etc/jetty-deployer.xml
>> 2013-12-10 12:03:24.518:INFO:oejobis.DefaultJettyAtJettyHomeHelper:Start
>> Level Event Dispatcher: Configuring the default jetty server with
>> [file:/C:/Users/ADMIN/Workspace/org.eclipse.jetty.osgi.boot/jettyhome/etc/jetty.xml,
>> file:/C:/Users/ADMIN/Workspace/org.eclipse.jetty.osgi.boot/jettyhome/etc/jetty-selector.xml,
>> file:/C:/Users/ADMIN/Workspace/org.eclipse.jetty.osgi.boot/jettyhome/etc/jetty-deployer.xml]
>> 2013-12-10 12:03:24.518:INFO:oejobis.DefaultJettyAtJettyHomeHelper:Start
>> Level Event Dispatcher:
>> JETTY.HOME=file:/C:/Users/ADMIN/Workspace/org.eclipse.jetty.osgi.boot/jettyhome/
>> osgi> 2013-12-10 12:03:24.724:INFO:oejs.Server:Start Level Event
>> Dispatcher: jetty-9.1.0.v20131115
>> 2013-12-10 12:03:24.735:WARN:oejsh.RequestLogHandler:Start Level Event
>> Dispatcher: !RequestLog
>> 2013-12-10 12:03:24.775:INFO:oejs.ServerConnector:Start Level Event
>> Dispatcher: Started ServerConnector@14f2245d{HTTP/1.1}{0.0.0.0:8080}
>> 2013-12-10 12:03:24.775:INFO:oejobis.DefaultJettyAtJettyHomeHelper:Start
>> Level Event Dispatcher: Default jetty server configured
>> 2013-12-10 12:03:24.930:INFO:oejsh.ContextHandler:Start Level Event
>> Dispatcher: Started o.e.j.w.WebAppContext@370ff791
>> {/sample,file:/C:/Users/ADMIN/Workspace/com.neatherweb.automate.webtest/WebContent/,AVAILABLE}{file:/C:/Users/ADMIN/Workspace/com.neatherweb.automate.webtest/WebContent/}
>> 2013-12-10 12:03:54.043:WARN:oejs.ServletHandler:qtp1513392935-42:
>> org.apache.jasper.JasperException: PWC6349: Cannot find a java compiler
>> for compilation.  If running with JDK 5 or before, Ant or JDT compiler can
>> be used, if the corresponding jars and bridge classes
>> (org.apache.jasper.compiler.AntJavaCompiler or
>> org.apache.jasper.compiler.JDTJavaCompiler) are included
>>     at
>> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:92)
>>     at
>> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:378)
>>     at
>> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:119)
>>     at
>> org.apache.jasper.compiler.Compiler.initJavaCompiler(Compiler.java:773)
>>     at org.apache.jasper.compiler.Compiler.<init>(Compiler.java:140)
>>     at
>> org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:288)
>>     at
>> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:622)
>>     at
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
>>     at
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
>>     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>>     at
>> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:696)
>>     at
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:526)
>>     at
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>>     at
>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568)
>>     at
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
>>     at
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1110)
>>     at
>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453)
>>     at
>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
>>     at
>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1044)
>>     at
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>>     at
>> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199)
>>     at
>> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
>>     at
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
>>     at org.eclipse.jetty.server.Server.handle(Server.java:459)
>>     at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:280)
>>     at
>> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:229)
>>     at
>> org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505)
>>     at
>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
>>     at
>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)
>>     at java.lang.Thread.run(Thread.java:744)
>>
>> osgi> ss
>> "Framework is launched."
>>
>>
>> id    State       Bundle
>> 0    ACTIVE      org.eclipse.osgi_3.9.1.v20130814-1242
>> 17    ACTIVE      com.neatherweb.logging_1.0.0
>> 19    ACTIVE      com.neatherweb.automate.jcbus.cgate.impl_1.0.0.qualifier
>> 20    ACTIVE      com.neatherweb.automate.configmgr.impl_1.0.0.qualifier
>> 22    ACTIVE      com.neatherweb.automate.configmgr_1.0.0.qualifier
>> 23    ACTIVE      com.neatherweb.automate.jcbus.cgate_1.0.0.qualifier
>> 24    ACTIVE      org.apache.felix.gogo.shell_0.10.0.v201212101605
>> 25    ACTIVE      com.neatherweb.automate.core_1.0.0.qualifier
>> 26    ACTIVE      org.apache.felix.gogo.runtime_0.10.0.v201209301036
>> 28    ACTIVE      com.neatherweb.automate.A4623_1.0.0.qualifier
>> 30    ACTIVE      com.neatherweb.automate.A4623.impl_1.0.0.qualifier
>> 34    ACTIVE      org.apache.felix.gogo.command_0.10.0.v201209301215
>> 160    ACTIVE      org.eclipse.osgi.services_3.3.100.v20130513-1956
>> 161    ACTIVE      org.eclipse.osgi.util_3.2.300.v20130513-1956
>> 162    ACTIVE      org.eclipse.equinox.console_1.0.100.v20130429-0953
>> 184    ACTIVE      com.neatherweb.automate.webtest_1.0.0.qualifier
>> 262    ACTIVE      javax.servlet.jsp-api_2.3.1
>> 263    ACTIVE      org.eclipse.jetty.servlet_9.1.0.v20131115
>> 264    ACTIVE      org.eclipse.jetty.webapp_9.1.0.v20131115
>> 265    ACTIVE      javax.servlet-api_3.1.0
>> 266    ACTIVE
>> org.apache.taglibs.standard.glassfish_1.2.0.v201112081803
>> 267    ACTIVE      org.eclipse.jetty.http_9.1.0.v20131115
>> 268    ACTIVE      org.glassfish.web.javax.servlet.jsp_2.3.2
>> 269    ACTIVE
>> org.eclipse.jdt.core.compiler.batch_3.8.2.v20130121-145325
>> 270    ACTIVE      org.eclipse.jetty.deploy_9.1.0.v20131115
>> 272    ACTIVE      org.eclipse.jetty.io_9.1.0.v20131115
>> 273    ACTIVE      org.eclipse.jetty.security_9.1.0.v20131115
>> 274    ACTIVE      com.sun.el.javax.el_3.0.0
>> 275    ACTIVE      org.eclipse.jetty.util_9.1.0.v20131115
>> 276    ACTIVE      org.eclipse.jetty.xml_9.1.0.v20131115
>> 278    ACTIVE      javax.servlet.jsp.jstl_1.2.0.v201105211821
>> 279    ACTIVE      org.eclipse.jetty.server_9.1.0.v20131115
>> 280    ACTIVE      javax.servlet_3.0.0.v201112011016
>> 281    ACTIVE      javax.servlet.jsp_2.2.0.v201112011158
>> 284    ACTIVE      org.eclipse.jetty.osgi.boot_9.1.0.v20131115
>>                 Fragments=285
>> 285    RESOLVED    org.eclipse.jetty.osgi.boot.jsp_9.1.0.v20131115
>>                 Master=284
>> osgi>
>>
>>
>>
>> _______________________________________________
>> jetty-users mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>
>>
>>
>>
>> --
>> Jan Bartel <[email protected]>
>> www.webtide.com
>> 'Expert Jetty/CometD developer,production,operations advice'
>>
>> _______________________________________________ jetty-users mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>
>> _______________________________________________
>> jetty-users mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>
>>
>>
>> _______________________________________________ jetty-users mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>
>> _______________________________________________
>> jetty-users mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>
>>
>
>
> --
> Jan Bartel <[email protected]>
> www.webtide.com
> 'Expert Jetty/CometD developer,production,operations advice'
>



-- 
Jan Bartel <[email protected]>
www.webtide.com
'Expert Jetty/CometD developer,production,operations advice'
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to