Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » JSP compiler in Equinox and Tomcat 5
JSP compiler in Equinox and Tomcat 5 [message #106542] Wed, 19 March 2008 10:00 Go to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi all,

I'm using one of AjaxTags's tag in my jsp page. When deployed in Tomcat 5
it runs fine, but under Equinox environment it throws the following
exception:

java.lang.ClassCastException: org.ajaxtags.tags.AjaxHtmlContentTag cannot
be cast to javax.servlet.jsp.tagext.Tag
at org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool. java:116)
at org.apache.jsp.main_jsp._jspService(main_jsp.java:97)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.ja va:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServl etWrapper.java:332)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServl et.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java :264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at org.eclipse.equinox.jsp.jasper.JspServlet.service(JspServlet .java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.java:90)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:111)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.eclipse.equinox.http.jetty.internal.HttpServerManager$In ternalHttpServiceServlet.service(HttpServerManager.java:270)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:428)
at
org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHan dler.java:677)
at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.jav a:289)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java :171)
at
org.eclipse.equinox.http.servlet.internal.RequestDispatcherA daptor.forward(RequestDispatcherAdaptor.java:30)
at com.farbeyond.core.servlets.MainServlet.doGet(MainServlet.ja va:20)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.service(ServletManager.java:180)
at
org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.java:90)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:111)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.eclipse.equinox.http.jetty.internal.HttpServerManager$In ternalHttpServiceServlet.service(HttpServerManager.java:270)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:428)
at
org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHan dler.java:677)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl er.java:568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java: 820)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.ja va:986)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:8 37)
at
org.mortbay.http.SocketListener.handleConnection(SocketListe ner.java:245)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:3 57)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:5 34)

I was wondering if there is any difference between JSP compiler used in
Equinox and Tomcat 5.

Any help would be greatly appreciated.

Best Regards,

Setya
Re: JSP compiler in Equinox and Tomcat 5 [message #106585 is a reply to message #106542] Wed, 19 March 2008 15:29 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 381
Registered: July 2009
Senior Member
Hi Seya,

There should be no differences as we're using the Jasper engine internally.
The difference/problem you're seeing is classloader related.

If I had to guess it looks like your ajaxtags bundle is bound to a different
set of JSP imports.
Do you have more than one bundle exporting javax.servlet.jsp.tagext or does
your ajaxtags bundle contain a copy?

I'd use the console and in particular the bundle (or b) command to figure
out which packages your bundle is wired to vs. the jasper bundle

HTH
-Simon

"Setya" <jsetya@gmail.com> wrote in message
news:d5d3abec879d89fa95c0530b2b09ea1d$1@www.eclipse.org...
> Hi all,
>
> I'm using one of AjaxTags's tag in my jsp page. When deployed in Tomcat 5
> it runs fine, but under Equinox environment it throws the following
> exception:
>
> java.lang.ClassCastException: org.ajaxtags.tags.AjaxHtmlContentTag cannot
> be cast to javax.servlet.jsp.tagext.Tag at
> org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool. java:116) at
> org.apache.jsp.main_jsp._jspService(main_jsp.java:97) at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.ja va:97) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServl etWrapper.java:332)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServl et.java:314)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java :264) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at
> org.eclipse.equinox.jsp.jasper.JspServlet.service(JspServlet .java:107) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at
> org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.java:90)
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:111)
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.java:75)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at
> org.eclipse.equinox.http.jetty.internal.HttpServerManager$In ternalHttpServiceServlet.service(HttpServerManager.java:270)
> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:428)
> at
> org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHan dler.java:677)
> at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.jav a:289) at
> org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java :171) at
> org.eclipse.equinox.http.servlet.internal.RequestDispatcherA daptor.forward(RequestDispatcherAdaptor.java:30)
> at com.farbeyond.core.servlets.MainServlet.doGet(MainServlet.ja va:20) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:596) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at
> org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.service(ServletManager.java:180)
> at
> org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.java:90)
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:111)
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.java:59)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at
> org.eclipse.equinox.http.jetty.internal.HttpServerManager$In ternalHttpServiceServlet.service(HttpServerManager.java:270)
> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:428)
> at
> org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHan dler.java:677)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl er.java:568)
> at org.mortbay.http.HttpContext.handle(HttpContext.java:1530) at
> org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at
> org.mortbay.http.HttpServer.service(HttpServer.java:909) at
> org.mortbay.http.HttpConnection.service(HttpConnection.java: 820) at
> org.mortbay.http.HttpConnection.handleNext(HttpConnection.ja va:986) at
> org.mortbay.http.HttpConnection.handle(HttpConnection.java:8 37) at
> org.mortbay.http.SocketListener.handleConnection(SocketListe ner.java:245)
> at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:3 57) at
> org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:5 34)
>
> I was wondering if there is any difference between JSP compiler used in
> Equinox and Tomcat 5.
>
> Any help would be greatly appreciated.
>
> Best Regards,
>
> Setya
>
>
Re: JSP compiler in Equinox and Tomcat 5 [message #106613 is a reply to message #106585] Wed, 19 March 2008 16:32 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Simon,

> If I had to guess it looks like your ajaxtags bundle is bound to a different
> set of JSP imports.

I only have one jsp that imports this ajaxtags.

> Do you have more than one bundle exporting javax.servlet.jsp.tagext or does
> your ajaxtags bundle contain a copy?

Actually the ajaxtags is not packaged as an OSGI bundle, I include it only
for internal use of one bundle certain and not to be exported.

Does packaging the ajaxtags as bundle will make a difference instead ?

> I'd use the console and in particular the bundle (or b) command to figure
> out which packages your bundle is wired to vs. the jasper bundle

Could you elaborate more on this ?

Best Regards,

Setya
Re: JSP compiler in Equinox and Tomcat 5 [message #106670 is a reply to message #106613] Thu, 20 March 2008 05:43 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi,

To clarifiy a few things a bit:

1. When deployed in Tomcat 5, the app wasn't deployed as OSGI app, just
plain web app.
2. The AjaxTags framework only used internally by a bundle, I put its jars
and dependencies in folder /web/WEB-INF/lib and put the reference to these
jars in my MANIFEST.MF under Bundle-ClassPath segment. So I don't package
this AjaxTags as separate bundle.

Best Regards,

Setya
Re: JSP compiler in Equinox and Tomcat 5 [message #106780 is a reply to message #106670] Mon, 24 March 2008 12:21 Go to previous message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi,

I've fixed the problem. It turns out that the AjaxTags comes with
jsp-api.jar which is in clash with the one from equinox.

Regards,

Setya
Previous Topic:Servlet delegate not registered with last servletBridge version
Next Topic:Calling third party jar method from OSGi Bundle
Goto Forum:
  


Current Time: Fri Oct 22 12:01:27 GMT 2021

Powered by FUDForum. Page generated in 0.01830 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top