Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RWT.getRequest() fails with RAP 3.0M4
RWT.getRequest() fails with RAP 3.0M4 [message #1567196] Fri, 16 January 2015 07:57 Go to next message
Bernard Sarter is currently offline Bernard SarterFriend
Messages: 88
Registered: August 2011
Location: Paris, France
Member
Hello,

We have a RAP application that works fine with Target Platform = RAP 2.3.1.

When switching the Target Platform to RAP 3.0M4, we can still start the application from within Eclipse IDE, but if we build a war file and deploy it on tomcat, the start of the application fails, with following error:

type Exception report

message Servlet execution threw an exception

description The server encountered an internal error that prevented it from fulfilling this request.

exception
javax.servlet.ServletException: Servlet execution threw an exception
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause
java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) previously initiated loading for a different type with name "javax/servlet/http/HttpServletRequest"


The next line in the stack trace corresponds to a call to
final HttpServletRequest request = RWT.getRequest();


BTW, we saw that it is not recommended to call this method, but we need to read the arguments passed through the URL ...

Configuration:
Java 8u25, Windows 7x64, tomcat 8.0.15

Any suggestion welcome Wink
Re: RWT.getRequest() fails with RAP 3.0M4 [message #1567277 is a reply to message #1567196] Fri, 16 January 2015 08:59 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2427
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
Please check your target platform about javax.servlet bundle. Which
javax.servlet bundle are you using?
Regards,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RWT.getRequest() fails with RAP 3.0M4 [message #1567303 is a reply to message #1567277] Fri, 16 January 2015 09:19 Go to previous messageGo to next message
Bernard Sarter is currently offline Bernard SarterFriend
Messages: 88
Registered: August 2011
Location: Paris, France
Member
Hello,

Thanks for this quick reply.

Our TP contains javax.servlet_3.0.0.v201112011016.jar (and only this version).

This bundle has not changed with the upgrade to RAP 3.0M4, ie. we already used the same file with RAP 2.3.1.

Regards,
Bernard.
Re: RWT.getRequest() fails with RAP 3.0M4 [message #1567510 is a reply to message #1567303] Fri, 16 January 2015 11:58 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2427
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
RAP 3.0 M4 Runtime contains javax.servlet_3.1.0.v201410161800. Please
check that you don't have both javax.servlet_3.0.0.v201112011016 and
javax.servlet_3.1.0.v201410161800 in your target.
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RWT.getRequest() fails with RAP 3.0M4 [message #1567563 is a reply to message #1567510] Fri, 16 January 2015 12:38 Go to previous messageGo to next message
Bernard Sarter is currently offline Bernard SarterFriend
Messages: 88
Registered: August 2011
Location: Paris, France
Member
Hi,

Previously, I had only "javax.servlet_3.0.0.v201112011016.jar" (which is in the RAP 3.0M4 Target platform zip - "latest stable build").

Now, I switched to "javax.servlet_3.1.0.v201410161800.jar" (which is in the latest "nightly build" zip).

I'm sure that this is the only version of javax.servlet that is in my TP (and I also checked the content of the war file deployed on tomcat, I don't have, and I never had, two versions of this bundle).

My problem is still there (exactly same error / stack trace).

Regards,
Bernard.
Re: RWT.getRequest() fails with RAP 3.0M4 [message #1567691 is a reply to message #1567563] Fri, 16 January 2015 14:11 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2427
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
could you check if javax.servlet bundle is not included into the WAR?
Regards,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
[Resolved] RWT.getRequest() fails with RAP 3.0M4 [message #1574428 is a reply to message #1567691] Tue, 20 January 2015 08:01 Go to previous messageGo to next message
Bernard Sarter is currently offline Bernard SarterFriend
Messages: 88
Registered: August 2011
Location: Paris, France
Member
Okay ... Finally we could isolate and fix the problem. Actually, it wasn't linked to the switch to RAP 3.0M4, but to an other change.

If in the MANIFEST.MF of our main application bundle, we have:
 ...
Require-Bundle: org.eclipse.rap.ui,
 javax.servlet,
 ...

then it works,

but if we change the order and put javax.servlet on top of the list, it fails !!!!!
Require-Bundle: javax.servlet,
 ...
 org.eclipse.rap.rwt,
 org.eclipse.rap.ui


It's the first time I observe that the order of the dependencies in the Manifest is so important ...

Regards,
Bernard.
Re: [Resolved] RWT.getRequest() fails with RAP 3.0M4 [message #1574489 is a reply to message #1574428] Tue, 20 January 2015 08:49 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2427
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
use package imports for javax.servlet.xxx instead of required bundle.
HTH,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:Session timeout after opening other application/page
Next Topic:Double-click instead of single-click is necessary to switch between views or editors in workbench
Goto Forum:
  


Current Time: Tue Sep 24 03:05:22 GMT 2024

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

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

Back to the top