Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty OSGI with JSP support - Missing Constraint

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: janb@xxxxxxxxxxx
To: jetty-users@xxxxxxxxxxx
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 <jneatherway@xxxxxxxxxxx> 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.util
jetty-httporg.eclipse.jetty.http
jetty-ioorg.eclipse.jetty.io
jetty-securityorg.eclipse.jetty.security
jetty-serverorg.eclipse.jetty.server
jetty-servletorg.eclipse.jetty.servlet
jetty-webapp org.eclipse.jetty.webapp
jetty-deployorg.eclipse.jetty.deploy
jetty-xmlorg.eclipse.jetty.xml
Plus - 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
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users




--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
'Expert Jetty/CometD developer,production,operations advice'

_______________________________________________ jetty-users mailing list jetty-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/jetty-users

Back to the top