Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » loader constraint violation on Tomcat
loader constraint violation on Tomcat [message #75372] Mon, 25 February 2008 08:38 Go to next message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------040305060208020609040600
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

i use my app lauching it from Eclipse+jetty and all works fine. If i
export my app under tomcat i have loader constraint violation exactly
when i execute the following code in the class that extends
WorkbenchAdvisor:

public void postStartup() {

HttpServletRequest request = RWT.getRequest();
String idmedia = request.getParameter( "idmedia" );
if(idmedia!=null) {
....
do something
}
}


I suppose that a class instance of tomcat goes in conflict with one that
my app bundles try to instance...
Attached you can find the server response. how can i workaround this
problem?
Thanks

Christian

--------------040305060208020609040600
Content-Type: text/html;
name="player.htm"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="player.htm"

PGh0bWw+PGhlYWQ+PHRpdGxlPkFwYWNoZSBUb21jYXQvNi4wLjE0IC0gRXJy b3IgcmVwb3J0
PC90aXRsZT48c3R5bGU+PCEtLUgxIHtmb250LWZhbWlseTpUYWhvbWEsQXJp YWwsc2Fucy1z
ZXJpZjtjb2xvcjp3aGl0ZTtiYWNrZ3JvdW5kLWNvbG9yOiM1MjVENzY7Zm9u dC1zaXplOjIy
cHg7fSBIMiB7Zm9udC1mYW1pbHk6VGFob21hLEFyaWFsLHNhbnMtc2VyaWY7 Y29sb3I6d2hp
dGU7YmFja2dyb3VuZC1jb2xvcjojNTI1RDc2O2ZvbnQtc2l6ZToxNnB4O30g SDMge2ZvbnQt
ZmFtaWx5OlRhaG9tYSxBcmlhbCxzYW5zLXNlcmlmO2NvbG9yOndoaXRlO2Jh Y2tncm91bmQt
Y29sb3I6IzUyNUQ3Njtmb250LXNpemU6MTRweDt9IEJPRFkge2ZvbnQtZmFt aWx5OlRhaG9t
YSxBcmlhbCxzYW5zLXNlcmlmO2NvbG9yOmJsYWNrO2JhY2tncm91bmQtY29s b3I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mNyZWF0ZUFuZFJ1bldvcmtiZW5jaChQbGF0Zm9ybVVJLmph dmE6MTUzKQ0K
CWl0Lm13LmZyb250ZW5kLkFwcGxpY2F0aW9uLmNyZWF0ZVVJKEFwcGxpY2F0 aW9uLmphdmE6
MTUpDQoJb3JnLmVjbGlwc2Uucnd0LmludGVybmFsLmxpZmVjeWNsZS5FbnRy eVBvaW50TWFu
YWdlci5jcmVhdGVVSShFbnRyeVBvaW50TWFuYWdlci5qYXZhOjkyKQ0KCW9y Zy5lY2xpcHNl
LnJ3dC5pbnRlcm5hbC5saWZlY3ljbGUuUldUTGlmZUN5Y2xlLmNyZWF0ZVVJ KFJXVExpZmVD
eWNsZS5qYXZhOjIxMikNCglvcmcuZWNsaXBzZS5yd3QuaW50ZXJuYWwubGlm ZWN5Y2xlLlJX
VExpZmVDeWNsZSRVSVRocmVhZENvbnRyb2xsZXIucnVuKFJXVExpZmVDeWNs ZS5qYXZhOjEw
OSkNCglqYXZhLmxhbmcuVGhyZWFkLnJ1bihVbmtub3duIFNvdXJjZSkNCjwv cHJlPjxwPjwv
cD48cD48Yj5ub3RlPC9iPiA8dT5UaGUgZnVsbCBzdGFjayB0cmFjZSBvZiB0 aGUgcm9vdCBj
YXVzZSBpcyBhdmFpbGFibGUgaW4gdGhlIEFwYWNoZSBUb21jYXQvNi4wLjE0 IGxvZ3MuPC91
PjwvcD48aHIgbm9zaGFkZT0ibm9zaGFkZSIgc2l6ZT0iMSI+PGgzPkFwYWNo ZSBUb21jYXQv
Ni4wLjE0PC9oMz48L2JvZHk+PC9odG1sPg==
--------------040305060208020609040600--
Re: loader constraint violation on Tomcat [message #75394 is a reply to message #75372] Mon, 25 February 2008 10:08 Go to previous messageGo to next message
Eclipse UserFriend
This is a multi-part message in MIME format.

------=_NextPart_000_01D9_01C87796.5D62E0A0
Content-Type: text/plain;
charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable

Apache Tomcat/6.0.14 - Error reportHi Christian,
It looks like you have two copies of the servlet api visible.
When running under the servletbridge you don't need to provide the =
javax.servlet bundle since those classes are provided by the app server =
-- Tomcat in this case.
Try removing the javax.servlet bundle from your webapp.

HTH
-Simon
"Christian Alfarano" <zerostress@libero.it> wrote in message =
news:fpugci$kdi$1@build.eclipse.org...
Hi,

i use my app lauching it from Eclipse+jetty and all works fine. If i=20
export my app under tomcat i have loader constraint violation exactly=20
when i execute the following code in the class that extends=20
WorkbenchAdvisor:

public void postStartup() {

HttpServletRequest request =3D RWT.getRequest();
String idmedia =3D request.getParameter( "idmedia" );
if(idmedia!=3Dnull) {
....
do something
}
}


I suppose that a class instance of tomcat goes in conflict with one =
that=20
my app bundles try to instance...
Attached you can find the server response. how can i workaround this=20
problem?
Thanks

Christian



------------------------------------------------------------ -------------=
-----


HTTP Status 500 -=20

------------------------------------------------------------ -------------=
-----

type Exception report

message=20

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

exception=20

java.lang.RuntimeException: java.lang.LinkageError: loader constraint =
violation: loader (instance of =
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously =
initiated loading for a different type with name =
"javax/servlet/http/HttpServletRequest"
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.executeUIThr ead(RWTLifeCy=
cle.java:263)
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.execute(RWTL ifeCycle.java=
:149)
=
org.eclipse.rwt.internal.service.LifeCycleServiceHandler$1.r un(LifeCycleS=
erviceHandler.java:60)
=
org.eclipse.rwt.internal.service.LifeCycleServiceHandler.int ernalService(=
LifeCycleServiceHandler.java:176)
=
org.eclipse.rwt.internal.service.LifeCycleServiceHandler.acc ess$1(LifeCyc=
leServiceHandler.java:168)
=
org.eclipse.rwt.internal.service.LifeCycleServiceHandler$Lif eCycleService=
HandlerSync.doService(LifeCycleServiceHandler.java:133)
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.service=
Internal(RWTLifeCycleServiceHandlerSync.java:45)
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.service=
(RWTLifeCycleServiceHandlerSync.java:34)
=
org.eclipse.rwt.internal.service.LifeCycleServiceHandler.ser vice(LifeCycl=
eServiceHandler.java:140)
=
org.eclipse.rwt.internal.service.ServiceManager$HandlerDispa tcher.service=
(ServiceManager.java:100)
org.eclipse.rwt.internal.engine.RWTDelegate.doPost(RWTDelega te.java:61)
=
org.eclipse.ui.internal.servlet.RequestHandler.service(Reque stHandler.jav=
a:52)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
=
org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleReque=
st(ServletRegistration.java:90)
=
org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(Proxy=
Servlet.java:111)
=
org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServl=
et.java:59)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
=
org.eclipse.equinox.servletbridge.BridgeServlet.service(Brid geServlet.jav=
a:115)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause=20

java.lang.LinkageError: loader constraint violation: loader (instance of =
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously =
initiated loading for a different type with name =
"javax/servlet/http/HttpServletRequest"
=
it.mw.frontend.ApplicationWorkbenchAdvisor.postStartup(Appli cationWorkben=
chAdvisor.java:102)
org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2244)
=
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:37=
2)
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:153)
it.mw.frontend.Application.createUI(Application.java:15)
=
org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPointM=
anager.java:92)
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.jav=
a:212)
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(RW=
TLifeCycle.java:109)
java.lang.Thread.run(Unknown Source)

note The full stack trace of the root cause is available in the Apache =
Tomcat/6.0.14 logs.


------------------------------------------------------------ -------------=
-----

Apache Tomcat/6.0.14
------=_NextPart_000_01D9_01C87796.5D62E0A0
Content-Type: text/html;
charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Apache Tomcat/6.0.14 - Error report</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-15">
<META content=3D"MSHTML 6.00.6000.16608" name=3DGENERATOR></HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Christian,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>It looks like you have two copies of =
the servlet=20
api visible.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>When running under the servletbridge =
you don't need=20
to provide the javax.servlet bundle since those classes are provided by =
the app=20
server -- Tomcat in this case.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Try removing the javax.servlet bundle =
from your=20
webapp.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>HTH</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-Simon</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Christian Alfarano" &lt;<A=20
href=3D"mailto:zerostress@libero.it">zerostress@libero.it</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:fpugci$kdi$1@build.eclipse.org">news:fpugci$kdi$1@build.ecli=
pse.org</A>...</DIV>Hi,<BR><BR>i=20
use my app lauching it from Eclipse+jetty and all works fine. If i =
<BR>export=20
my app under tomcat i have loader constraint violation exactly =
<BR>when i=20
execute the following code in the class that extends=20
<BR>WorkbenchAdvisor:<BR><BR>public void postStartup()=20
{<BR><BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; =
HttpServletRequest=20
request =3D=20
RWT.getRequest();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; =
String=20
idmedia =3D request.getParameter( "idmedia"=20
);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; =
if(idmedia!=3Dnull)=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; ....<BR>do=20
something<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;=20
}<BR>}<BR><BR><BR>I suppose that a class instance of tomcat goes in =
conflict=20
with one that <BR>my app bundles try to instance...<BR>Attached you =
can find=20
the server response. how can i workaround this=20
<BR>problem?<BR>Thanks<BR><BR>Christian<BR>
<P>
<HR>

<P></P>
<STYLE>H1 {
FONT-SIZE: 22px; COLOR: white; FONT-FAMILY: Tahoma,Arial,sans-serif; =
BACKGROUND-COLOR: #525d76
}
H2 {
FONT-SIZE: 16px; COLOR: white; FONT-FAMILY: Tahoma,Arial,sans-serif; =
BACKGROUND-COLOR: #525d76
}
H3 {
FONT-SIZE: 14px; COLOR: white; FONT-FAMILY: Tahoma,Arial,sans-serif; =
BACKGROUND-COLOR: #525d76
}
BODY {
COLOR: black; FONT-FAMILY: Tahoma,Arial,sans-serif; BACKGROUND-COLOR: =
white
}
B {
COLOR: white; FONT-FAMILY: Tahoma,Arial,sans-serif; BACKGROUND-COLOR: =
#525d76
}
P {
FONT-SIZE: 12px; BACKGROUND: white; COLOR: black; FONT-FAMILY: =
Tahoma,Arial,sans-serif
}
A {
COLOR: black
}
A.name {
COLOR: black
}
HR {
COLOR: #525d76
}
</STYLE>

<H1>HTTP Status 500 - </H1>
<HR noShade SIZE=3D1>

<P><B>type</B> Exception report</P>
<P><B>message</B> <U></U></P>
<P><B>description</B> <U>The server encountered an internal error () =
that=20
prevented it from fulfilling this request.</U></P>
<P><B>exception</B> </P><PRE>java.lang.RuntimeException: =
java.lang.LinkageError: loader constraint violation: loader (instance of =
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously =
initiated loading for a different type with name =
"javax/servlet/http/HttpServletRequest"
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.executeUIThr ead(RWTLifeCy=
cle.java:263)
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.execute(RWTL ifeCycle.java=
:149)
=
org.eclipse.rwt.internal.service.LifeCycleServiceHandler$1.r un(LifeCycleS=
erviceHandler.java:60)
=
org.eclipse.rwt.internal.service.LifeCycleServiceHandler.int ernalService(=
LifeCycleServiceHandler.java:176)
=
org.eclipse.rwt.internal.service.LifeCycleServiceHandler.acc ess$1(LifeCyc=
leServiceHandler.java:168)
=
org.eclipse.rwt.internal.service.LifeCycleServiceHandler$Lif eCycleService=
HandlerSync.doService(LifeCycleServiceHandler.java:133)
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.service=
Internal(RWTLifeCycleServiceHandlerSync.java:45)
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.service=
(RWTLifeCycleServiceHandlerSync.java:34)
=
org.eclipse.rwt.internal.service.LifeCycleServiceHandler.ser vice(LifeCycl=
eServiceHandler.java:140)
=
org.eclipse.rwt.internal.service.ServiceManager$HandlerDispa tcher.service=
(ServiceManager.java:100)
org.eclipse.rwt.internal.engine.RWTDelegate.doPost(RWTDelega te.java:61)
=
org.eclipse.ui.internal.servlet.RequestHandler.service(Reque stHandler.jav=
a:52)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
=
org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleReque=
st(ServletRegistration.java:90)
=
org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(Proxy=
Servlet.java:111)
=
org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServl=
et.java:59)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
=
org.eclipse.equinox.servletbridge.BridgeServlet.service(Brid geServlet.jav=
a:115)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
</PRE>
<P></P>
<P><B>root cause</B> </P><PRE>java.lang.LinkageError: loader =
constraint violation: loader (instance of =
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously =
initiated loading for a different type with name =
"javax/servlet/http/HttpServletRequest"
=
it.mw.frontend.ApplicationWorkbenchAdvisor.postStartup(Appli cationWorkben=
chAdvisor.java:102)
org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2244)
=
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:37=
2)
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:153)
it.mw.frontend.Application.createUI(Application.java:15)
=
org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPointM=
anager.java:92)
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.jav=
a:212)
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(RW=
TLifeCycle.java:109)
java.lang.Thread.run(Unknown Source)
</PRE>
<P></P>
<P><B>note</B> <U>The full stack trace of the root cause is available =
in the=20
Apache Tomcat/6.0.14 logs.</U></P>
<HR noShade SIZE=3D1>

<H3>Apache Tomcat/6.0.14</H3></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_01D9_01C87796.5D62E0A0--
Re: loader constraint violation on Tomcat [message #75444 is a reply to message #75394] Mon, 25 February 2008 13:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

This is a multi-part message in MIME format.

------=_NextPart_000_0043_01C877E7.3B53D680
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi,

additionally to Simon's comment: as you need servlet packages in the
postStartup-method ensure that they are imported using the Import
Packages Section in the Plug-in Manifest Editor, not the
Required-Plug-in section. Otherwise removing the javax.servlet bundle
will leave you with another problem... See the RAP demo bundle as
example.

Ciao
Frank

_____

Von: Simon Kaegi [mailto:simon_kaegi@ca.ibm.com]
Bereitgestellt: Montag, 25. Februar 2008 16:08
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: loader constraint violation on Tomcat
Betreff: Re: loader constraint violation on Tomcat


Hi Christian,
It looks like you have two copies of the servlet api visible.
When running under the servletbridge you don't need to provide the
javax.servlet bundle since those classes are provided by the app server
-- Tomcat in this case.
Try removing the javax.servlet bundle from your webapp.

HTH
-Simon

"Christian Alfarano" <zerostress@libero.it> wrote in message
news:fpugci$kdi$1@build.eclipse.org...
Hi,

i use my app lauching it from Eclipse+jetty and all works fine. If i
export my app under tomcat i have loader constraint violation exactly
when i execute the following code in the class that extends
WorkbenchAdvisor:

public void postStartup() {

HttpServletRequest request = RWT.getRequest();
String idmedia = request.getParameter( "idmedia" );
if(idmedia!=null) {
....
do something
}
}


I suppose that a class instance of tomcat goes in conflict with one that

my app bundles try to instance...
Attached you can find the server response. how can i workaround this
problem?
Thanks

Christian




_____





HTTP Status 500 -

_____


type Exception report

message

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

exception

java.lang.RuntimeException: java.lang.LinkageError: loader constraint
violation: loader (instance of
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously
initiated loading for a different type with name
"javax/servlet/http/HttpServletRequest"


org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.executeUIThr ead(RWTLifeC
ycle.java:263)


org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.execute(RWTL ifeCycle.jav
a:149)


org.eclipse.rwt.internal.service.LifeCycleServiceHandler$1.r un(LifeCycle
ServiceHandler.java:60)


org.eclipse.rwt.internal.service.LifeCycleServiceHandler.int ernalService
(LifeCycleServiceHandler.java:176)


org.eclipse.rwt.internal.service.LifeCycleServiceHandler.acc ess$1(LifeCy
cleServiceHandler.java:168)


org.eclipse.rwt.internal.service.LifeCycleServiceHandler$Lif eCycleServic
eHandlerSync.doService(LifeCycleServiceHandler.java:133)


org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.servic
eInternal(RWTLifeCycleServiceHandlerSync.java:45)


org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.servic
e(RWTLifeCycleServiceHandlerSync.java:34)


org.eclipse.rwt.internal.service.LifeCycleServiceHandler.ser vice(LifeCyc
leServiceHandler.java:140)


org.eclipse.rwt.internal.service.ServiceManager$HandlerDispa tcher.servic
e(ServiceManager.java:100)


org.eclipse.rwt.internal.engine.RWTDelegate.doPost(RWTDelega te.java:61)


org.eclipse.ui.internal.servlet.RequestHandler.service(Reque stHandler.ja
va:52)

javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequ
est(ServletRegistration.java:90)


org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(Prox
yServlet.java:111)


org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServ
let.java:59)

javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


org.eclipse.equinox.servletbridge.BridgeServlet.service(Brid geServlet.ja
va:115)

javax.servlet.http.HttpServlet.service(HttpServlet.java:803)



root cause

java.lang.LinkageError: loader constraint violation: loader (instance of
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously
initiated loading for a different type with name
"javax/servlet/http/HttpServletRequest"


it.mw.frontend.ApplicationWorkbenchAdvisor.postStartup(Appli cationWorkbe
nchAdvisor.java:102)

org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2244)


org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:3
72)


org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:153)

it.mw.frontend.Application.createUI(Application.java:15)


org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPoint
Manager.java:92)


org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.ja
va:212)


org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(R
WTLifeCycle.java:109)

java.lang.Thread.run(Unknown Source)



note The full stack trace of the root cause is available in the Apache
Tomcat/6.0.14 logs.

_____


Apache Tomcat/6.0.14



------=_NextPart_000_0043_01C877E7.3B53D680
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Apache Tomcat/6.0.14 - Error report</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.6000.16608" name=3DGENERATOR></HEAD>
<BODY bgColor=3D#ffffff>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D968503618-25022008><FONT=20
size=3D2>Hi,</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D968503618-25022008><FONT=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D968503618-25022008><FONT =
size=3D2>additionally=20
to Simon's comment:&nbsp;as&nbsp;you need servlet packages in the=20
postStartup-method ensure that they are imported using the Import =
Packages=20
Section in the Plug-in Manifest Editor, not the Required-Plug-in=20
section.&nbsp;Otherwise removing the javax.servlet bundle will leave you =
with=20
another problem... &nbsp;See the RAP demo bundle as =
example.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D968503618-25022008><FONT=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D968503618-25022008><FONT=20
size=3D2>Ciao</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D968503618-25022008><FONT=20
size=3D2>Frank</FONT></SPAN></DIV><BR>
<DIV class=3DOutlookMessageHeader lang=3Dde dir=3Dltr align=3Dleft>
<HR tabIndex=3D-1>
<FONT size=3D2><B>Von:</B> Simon Kaegi [mailto:simon_kaegi@ca.ibm.com]=20
<BR><B>Bereitgestellt:</B> Montag, 25. Februar 2008 =
16:08<BR><B>Bereitgestellt=20
in:</B> eclipse.technology.rap<BR><B>Unterhaltung:</B> loader constraint =

violation on Tomcat<BR><B>Betreff:</B> Re: loader constraint violation =
on=20
Tomcat<BR><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Hi Christian,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>It looks like you have two copies of =
the servlet=20
api visible.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>When running under the servletbridge =
you don't need=20
to provide the javax.servlet bundle since those classes are provided by =
the app=20
server -- Tomcat in this case.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Try removing the javax.servlet bundle =
from your=20
webapp.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>HTH</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-Simon</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Christian Alfarano" &lt;<A=20
href=3D"mailto:zerostress@libero.it">zerostress@libero.it</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:fpugci$kdi$1@build.eclipse.org">news:fpugci$kdi$1@build.ecli=
pse.org</A>...</DIV>Hi,<BR><BR>i=20
use my app lauching it from Eclipse+jetty and all works fine. If i =
<BR>export=20
my app under tomcat i have loader constraint violation exactly =
<BR>when i=20
execute the following code in the class that extends=20
<BR>WorkbenchAdvisor:<BR><BR>public void postStartup()=20
{<BR><BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; =
HttpServletRequest=20
request =3D=20
RWT.getRequest();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; =
String=20
idmedia =3D request.getParameter( "idmedia"=20
);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; =
if(idmedia!=3Dnull)=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; ....<BR>do=20
something<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;=20
}<BR>}<BR><BR><BR>I suppose that a class instance of tomcat goes in =
conflict=20
with one that <BR>my app bundles try to instance...<BR>Attached you =
can find=20
the server response. how can i workaround this=20
<BR>problem?<BR>Thanks<BR><BR>Christian<BR>
<P>
<HR>

<P></P>
<STYLE>H1 {
FONT-SIZE: 22px; COLOR: white; FONT-FAMILY: Tahoma,Arial,sans-serif; =
BACKGROUND-COLOR: #525d76
}
H2 {
FONT-SIZE: 16px; COLOR: white; FONT-FAMILY: Tahoma,Arial,sans-serif; =
BACKGROUND-COLOR: #525d76
}
H3 {
FONT-SIZE: 14px; COLOR: white; FONT-FAMILY: Tahoma,Arial,sans-serif; =
BACKGROUND-COLOR: #525d76
}
BODY {
COLOR: black; FONT-FAMILY: Tahoma,Arial,sans-serif; BACKGROUND-COLOR: =
white
}
B {
COLOR: white; FONT-FAMILY: Tahoma,Arial,sans-serif; BACKGROUND-COLOR: =
#525d76
}
P {
FONT-SIZE: 12px; BACKGROUND: white; COLOR: black; FONT-FAMILY: =
Tahoma,Arial,sans-serif
}
A {
COLOR: black
}
A.name {
COLOR: black
}
HR {
COLOR: #525d76
}
</STYLE>

<H1>HTTP Status 500 - </H1>
<HR noShade SIZE=3D1>

<P><B>type</B> Exception report</P>
<P><B>message</B> <U></U></P>
<P><B>description</B> <U>The server encountered an internal error () =
that=20
prevented it from fulfilling this request.</U></P>
<P><B>exception</B> </P><PRE>java.lang.RuntimeException: =
java.lang.LinkageError: loader constraint violation: loader (instance of =
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously =
initiated loading for a different type with name =
"javax/servlet/http/HttpServletRequest"
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.executeUIThr ead(RWTLifeCy=
cle.java:263)
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.execute(RWTL ifeCycle.java=
:149)
=
org.eclipse.rwt.internal.service.LifeCycleServiceHandler$1.r un(LifeCycleS=
erviceHandler.java:60)
=
org.eclipse.rwt.internal.service.LifeCycleServiceHandler.int ernalService(=
LifeCycleServiceHandler.java:176)
=
org.eclipse.rwt.internal.service.LifeCycleServiceHandler.acc ess$1(LifeCyc=
leServiceHandler.java:168)
=
org.eclipse.rwt.internal.service.LifeCycleServiceHandler$Lif eCycleService=
HandlerSync.doService(LifeCycleServiceHandler.java:133)
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.service=
Internal(RWTLifeCycleServiceHandlerSync.java:45)
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.service=
(RWTLifeCycleServiceHandlerSync.java:34)
=
org.eclipse.rwt.internal.service.LifeCycleServiceHandler.ser vice(LifeCycl=
eServiceHandler.java:140)
=
org.eclipse.rwt.internal.service.ServiceManager$HandlerDispa tcher.service=
(ServiceManager.java:100)
org.eclipse.rwt.internal.engine.RWTDelegate.doPost(RWTDelega te.java:61)
=
org.eclipse.ui.internal.servlet.RequestHandler.service(Reque stHandler.jav=
a:52)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
=
org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleReque=
st(ServletRegistration.java:90)
=
org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(Proxy=
Servlet.java:111)
=
org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServl=
et.java:59)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
=
org.eclipse.equinox.servletbridge.BridgeServlet.service(Brid geServlet.jav=
a:115)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
</PRE>
<P></P>
<P><B>root cause</B> </P><PRE>java.lang.LinkageError: loader =
constraint violation: loader (instance of =
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously =
initiated loading for a different type with name =
"javax/servlet/http/HttpServletRequest"
=
it.mw.frontend.ApplicationWorkbenchAdvisor.postStartup(Appli cationWorkben=
chAdvisor.java:102)
org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2244)
=
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:37=
2)
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:153)
it.mw.frontend.Application.createUI(Application.java:15)
=
org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPointM=
anager.java:92)
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.jav=
a:212)
=
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(RW=
TLifeCycle.java:109)
java.lang.Thread.run(Unknown Source)
</PRE>
<P></P>
<P><B>note</B> <U>The full stack trace of the root cause is available =
in the=20
Apache Tomcat/6.0.14 logs.</U></P>
<HR noShade SIZE=3D1>

<H3>Apache Tomcat/6.0.14</H3></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0043_01C877E7.3B53D680--
Re: loader constraint violation on Tomcat [message #75461 is a reply to message #75444] Mon, 25 February 2008 17:22 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
thanks Simon and Frank. I've fixed the problem in my app using your
suggestions.
Christian

Frank: the word "Ciao" suggests me something of italian.... I'm
italian!Are you from Italy? Ciao :)


Frank Appel ha scritto:
> Hi,
>
> additionally to Simon's comment: as you need servlet packages in the
> postStartup-method ensure that they are imported using the Import
> Packages Section in the Plug-in Manifest Editor, not the
> Required-Plug-in section. Otherwise removing the javax.servlet bundle
> will leave you with another problem... See the RAP demo bundle as example.
>
> Ciao
> Frank
>
> ------------------------------------------------------------ ------------
> *Von:* Simon Kaegi [mailto:simon_kaegi@ca.ibm.com]
> *Bereitgestellt:* Montag, 25. Februar 2008 16:08
> *Bereitgestellt in:* eclipse.technology.rap
> *Unterhaltung:* loader constraint violation on Tomcat
> *Betreff:* Re: loader constraint violation on Tomcat
>
> Hi Christian,
> It looks like you have two copies of the servlet api visible.
> When running under the servletbridge you don't need to provide the
> javax.servlet bundle since those classes are provided by the app server
> -- Tomcat in this case.
> Try removing the javax.servlet bundle from your webapp.
>
> HTH
> -Simon
>
> "Christian Alfarano" <zerostress@libero.it
> <mailto:zerostress@libero.it>> wrote in message
> news:fpugci$kdi$1@build.eclipse.org...
> Hi,
>
> i use my app lauching it from Eclipse+jetty and all works fine. If i
> export my app under tomcat i have loader constraint violation exactly
> when i execute the following code in the class that extends
> WorkbenchAdvisor:
>
> public void postStartup() {
>
> HttpServletRequest request = RWT.getRequest();
> String idmedia = request.getParameter( "idmedia" );
> if(idmedia!=null) {
> ....
> do something
> }
> }
>
>
> I suppose that a class instance of tomcat goes in conflict with one
> that
> my app bundles try to instance...
> Attached you can find the server response. how can i workaround this
> problem?
> Thanks
>
> Christian
>
> ------------------------------------------------------------ ------------
>
>
> HTTP Status 500 -
>
> ------------------------------------------------------------ ------------
>
> *type* Exception report
>
> *message* __
>
> *description* _The server encountered an internal error () that
> prevented it from fulfilling this request._
>
> *exception*
>
> java.lang.RuntimeException: java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously initiated loading for a different type with name "javax/servlet/http/HttpServletRequest"
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.executeUIThr ead(RWTLifeCycle.java:263)
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.execute(RWTL ifeCycle.java:149)
> org.eclipse.rwt.internal.service.LifeCycleServiceHandler$1.r un(LifeCycleServiceHandler.java:60)
> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.int ernalService(LifeCycleServiceHandler.java:176)
> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.acc ess$1(LifeCycleServiceHandler.java:168)
> org.eclipse.rwt.internal.service.LifeCycleServiceHandler$Lif eCycleServiceHandlerSync.doService(LifeCycleServiceHandler.j ava:133)
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.serviceInternal(RWTLifeCycleServiceHandlerSync.java:45 )
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.service(RWTLifeCycleServiceHandlerSync.java:34)
> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.ser vice(LifeCycleServiceHandler.java:140)
> org.eclipse.rwt.internal.service.ServiceManager$HandlerDispa tcher.service(ServiceManager.java:100)
> org.eclipse.rwt.internal.engine.RWTDelegate.doPost(RWTDelega te.java:61)
> org.eclipse.ui.internal.servlet.RequestHandler.service(Reque stHandler.java:52)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.java:90)
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:111)
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.java:59)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> org.eclipse.equinox.servletbridge.BridgeServlet.service(Brid geServlet.java:115)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
> *root cause*
>
> java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously initiated loading for a different type with name "javax/servlet/http/HttpServletRequest"
> it.mw.frontend.ApplicationWorkbenchAdvisor.postStartup(Appli cationWorkbenchAdvisor.java:102)
> org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2244)
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:372)
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:153)
> it.mw.frontend.Application.createUI(Application.java:15)
> org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPointManager.java:92)
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.java:212)
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(RWTLifeCycle.java:109)
> java.lang.Thread.run(Unknown Source)
>
> *note* _The full stack trace of the root cause is available in the
> Apache Tomcat/6.0.14 logs._
>
> ------------------------------------------------------------ ------------
>
>
> Apache Tomcat/6.0.14
>
Re: loader constraint violation on Tomcat [message #75495 is a reply to message #75461] Tue, 26 February 2008 02:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Non parlo italiano, ma amo la bella italia...

Don't know if that's understandable :-), but in former days I've been
more frequently in Emilia Romagna. I guess that's where I picked up the
ciao. So where are you from? (Sorry for miss-using the newsgroup for a
little chat, folks)

Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: Christian Alfarano [mailto:zerostress@libero.it]
Bereitgestellt: Montag, 25. Februar 2008 23:23
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: loader constraint violation on Tomcat
Betreff: Re: loader constraint violation on Tomcat


Hi,
thanks Simon and Frank. I've fixed the problem in my app using your
suggestions.
Christian

Frank: the word "Ciao" suggests me something of italian.... I'm
italian!Are you from Italy? Ciao :)


Frank Appel ha scritto:
> Hi,
>
> additionally to Simon's comment: as you need servlet packages in the
> postStartup-method ensure that they are imported using the Import
> Packages Section in the Plug-in Manifest Editor, not the
> Required-Plug-in section. Otherwise removing the javax.servlet bundle
> will leave you with another problem... See the RAP demo bundle as
example.
>
> Ciao
> Frank
>
>
------------------------------------------------------------ ------------
> *Von:* Simon Kaegi [mailto:simon_kaegi@ca.ibm.com]
> *Bereitgestellt:* Montag, 25. Februar 2008 16:08
> *Bereitgestellt in:* eclipse.technology.rap
> *Unterhaltung:* loader constraint violation on Tomcat
> *Betreff:* Re: loader constraint violation on Tomcat
>
> Hi Christian,
> It looks like you have two copies of the servlet api visible.
> When running under the servletbridge you don't need to provide the
> javax.servlet bundle since those classes are provided by the app
server
> -- Tomcat in this case.
> Try removing the javax.servlet bundle from your webapp.
>
> HTH
> -Simon
>
> "Christian Alfarano" <zerostress@libero.it
> <mailto:zerostress@libero.it>> wrote in message
> news:fpugci$kdi$1@build.eclipse.org...
> Hi,
>
> i use my app lauching it from Eclipse+jetty and all works fine. If
i
> export my app under tomcat i have loader constraint violation
exactly
> when i execute the following code in the class that extends
> WorkbenchAdvisor:
>
> public void postStartup() {
>
> HttpServletRequest request = RWT.getRequest();
> String idmedia = request.getParameter( "idmedia" );
> if(idmedia!=null) {
> ....
> do something
> }
> }
>
>
> I suppose that a class instance of tomcat goes in conflict with
one
> that
> my app bundles try to instance...
> Attached you can find the server response. how can i workaround
this
> problem?
> Thanks
>
> Christian
>
>
------------------------------------------------------------ ------------
>
>
> HTTP Status 500 -
>
>
------------------------------------------------------------ ------------
>
> *type* Exception report
>
> *message* __
>
> *description* _The server encountered an internal error () that
> prevented it from fulfilling this request._
>
> *exception*
>
> java.lang.RuntimeException: java.lang.LinkageError: loader
constraint violation: loader (instance of
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously
initiated loading for a different type with name
"javax/servlet/http/HttpServletRequest"
>
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.executeUIThr ead(RWTLifeC
ycle.java:263)
>
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.execute(RWTL ifeCycle.jav
a:149)
>
org.eclipse.rwt.internal.service.LifeCycleServiceHandler$1.r un(LifeCycle
ServiceHandler.java:60)
>
org.eclipse.rwt.internal.service.LifeCycleServiceHandler.int ernalService
(LifeCycleServiceHandler.java:176)
>
org.eclipse.rwt.internal.service.LifeCycleServiceHandler.acc ess$1(LifeCy
cleServiceHandler.java:168)
>
org.eclipse.rwt.internal.service.LifeCycleServiceHandler$Lif eCycleServic
eHandlerSync.doService(LifeCycleServiceHandler.java:133)
>
org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.servic
eInternal(RWTLifeCycleServiceHandlerSync.java:45)
>
org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.servic
e(RWTLifeCycleServiceHandlerSync.java:34)
>
org.eclipse.rwt.internal.service.LifeCycleServiceHandler.ser vice(LifeCyc
leServiceHandler.java:140)
>
org.eclipse.rwt.internal.service.ServiceManager$HandlerDispa tcher.servic
e(ServiceManager.java:100)
>
org.eclipse.rwt.internal.engine.RWTDelegate.doPost(RWTDelega te.java:61)
>
org.eclipse.ui.internal.servlet.RequestHandler.service(Reque stHandler.ja
va:52)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequ
est(ServletRegistration.java:90)
>
org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(Prox
yServlet.java:111)
>
org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServ
let.java:59)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
org.eclipse.equinox.servletbridge.BridgeServlet.service(Brid geServlet.ja
va:115)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
> *root cause*
>
> java.lang.LinkageError: loader constraint violation: loader
(instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader)
previously initiated loading for a different type with name
"javax/servlet/http/HttpServletRequest"
>
it.mw.frontend.ApplicationWorkbenchAdvisor.postStartup(Appli cationWorkbe
nchAdvisor.java:102)
> org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2244)
>
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:3
72)
>
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:153)
> it.mw.frontend.Application.createUI(Application.java:15)
>
org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPoint
Manager.java:92)
>
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.ja
va:212)
>
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(R
WTLifeCycle.java:109)
> java.lang.Thread.run(Unknown Source)
>
> *note* _The full stack trace of the root cause is available in the
> Apache Tomcat/6.0.14 logs._
>
>
------------------------------------------------------------ ------------
>
>
> Apache Tomcat/6.0.14
>
Re: loader constraint violation on Tomcat [message #75513 is a reply to message #75495] Tue, 26 February 2008 04:45 Go to previous message
Eclipse UserFriend
Ok, nice to meet you! i'm from Bari (south italy near the sea!) but
currently i'm working in Milan (sw dev on dvb-mhp, web); i'm using rap
for a personal project and i find it very interesting. Have a good job
with RAP dev :)

Ciao
Christian


Frank Appel ha scritto:
> Non parlo italiano, ma amo la bella italia...
>
> Don't know if that's understandable :-), but in former days I've been
> more frequently in Emilia Romagna. I guess that's where I picked up the
> ciao. So where are you from? (Sorry for miss-using the newsgroup for a
> little chat, folks)
>
> Ciao
> Frank
>
> -----Ursprüngliche Nachricht-----
> Von: Christian Alfarano [mailto:zerostress@libero.it]
> Bereitgestellt: Montag, 25. Februar 2008 23:23
> Bereitgestellt in: eclipse.technology.rap
> Unterhaltung: loader constraint violation on Tomcat
> Betreff: Re: loader constraint violation on Tomcat
>
>
> Hi,
> thanks Simon and Frank. I've fixed the problem in my app using your
> suggestions.
> Christian
>
> Frank: the word "Ciao" suggests me something of italian.... I'm
> italian!Are you from Italy? Ciao :)
>
>
> Frank Appel ha scritto:
>> Hi,
>>
>> additionally to Simon's comment: as you need servlet packages in the
>> postStartup-method ensure that they are imported using the Import
>> Packages Section in the Plug-in Manifest Editor, not the
>> Required-Plug-in section. Otherwise removing the javax.servlet bundle
>> will leave you with another problem... See the RAP demo bundle as
> example.
>> Ciao
>> Frank
>>
>>
> ------------------------------------------------------------ ------------
>> *Von:* Simon Kaegi [mailto:simon_kaegi@ca.ibm.com]
>> *Bereitgestellt:* Montag, 25. Februar 2008 16:08
>> *Bereitgestellt in:* eclipse.technology.rap
>> *Unterhaltung:* loader constraint violation on Tomcat
>> *Betreff:* Re: loader constraint violation on Tomcat
>>
>> Hi Christian,
>> It looks like you have two copies of the servlet api visible.
>> When running under the servletbridge you don't need to provide the
>> javax.servlet bundle since those classes are provided by the app
> server
>> -- Tomcat in this case.
>> Try removing the javax.servlet bundle from your webapp.
>>
>> HTH
>> -Simon
>>
>> "Christian Alfarano" <zerostress@libero.it
>> <mailto:zerostress@libero.it>> wrote in message
>> news:fpugci$kdi$1@build.eclipse.org...
>> Hi,
>>
>> i use my app lauching it from Eclipse+jetty and all works fine. If
> i
>> export my app under tomcat i have loader constraint violation
> exactly
>> when i execute the following code in the class that extends
>> WorkbenchAdvisor:
>>
>> public void postStartup() {
>>
>> HttpServletRequest request = RWT.getRequest();
>> String idmedia = request.getParameter( "idmedia" );
>> if(idmedia!=null) {
>> ....
>> do something
>> }
>> }
>>
>>
>> I suppose that a class instance of tomcat goes in conflict with
> one
>> that
>> my app bundles try to instance...
>> Attached you can find the server response. how can i workaround
> this
>> problem?
>> Thanks
>>
>> Christian
>>
>>
> ------------------------------------------------------------ ------------
>>
>> HTTP Status 500 -
>>
>>
> ------------------------------------------------------------ ------------
>> *type* Exception report
>>
>> *message* __
>>
>> *description* _The server encountered an internal error () that
>> prevented it from fulfilling this request._
>>
>> *exception*
>>
>> java.lang.RuntimeException: java.lang.LinkageError: loader
> constraint violation: loader (instance of
> org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously
> initiated loading for a different type with name
> "javax/servlet/http/HttpServletRequest"
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.executeUIThr ead(RWTLifeC
> ycle.java:263)
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.execute(RWTL ifeCycle.jav
> a:149)
> org.eclipse.rwt.internal.service.LifeCycleServiceHandler$1.r un(LifeCycle
> ServiceHandler.java:60)
> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.int ernalService
> (LifeCycleServiceHandler.java:176)
> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.acc ess$1(LifeCy
> cleServiceHandler.java:168)
> org.eclipse.rwt.internal.service.LifeCycleServiceHandler$Lif eCycleServic
> eHandlerSync.doService(LifeCycleServiceHandler.java:133)
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.servic
> eInternal(RWTLifeCycleServiceHandlerSync.java:45)
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.servic
> e(RWTLifeCycleServiceHandlerSync.java:34)
> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.ser vice(LifeCyc
> leServiceHandler.java:140)
> org.eclipse.rwt.internal.service.ServiceManager$HandlerDispa tcher.servic
> e(ServiceManager.java:100)
> org.eclipse.rwt.internal.engine.RWTDelegate.doPost(RWTDelega te.java:61)
> org.eclipse.ui.internal.servlet.RequestHandler.service(Reque stHandler.ja
> va:52)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>
> org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequ
> est(ServletRegistration.java:90)
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(Prox
> yServlet.java:111)
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServ
> let.java:59)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>
> org.eclipse.equinox.servletbridge.BridgeServlet.service(Brid geServlet.ja
> va:115)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>
>> *root cause*
>>
>> java.lang.LinkageError: loader constraint violation: loader
> (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader)
> previously initiated loading for a different type with name
> "javax/servlet/http/HttpServletRequest"
> it.mw.frontend.ApplicationWorkbenchAdvisor.postStartup(Appli cationWorkbe
> nchAdvisor.java:102)
>> org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2244)
>>
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:3
> 72)
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:153)
>> it.mw.frontend.Application.createUI(Application.java:15)
>>
> org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPoint
> Manager.java:92)
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.ja
> va:212)
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(R
> WTLifeCycle.java:109)
>> java.lang.Thread.run(Unknown Source)
>>
>> *note* _The full stack trace of the root cause is available in the
>> Apache Tomcat/6.0.14 logs._
>>
>>
> ------------------------------------------------------------ ------------
>>
>> Apache Tomcat/6.0.14
>>
>
Previous Topic:Preferences missing some elements
Next Topic:Problem in Progress Bar
Goto Forum:
  


Current Time: Tue Jul 22 09:39:31 EDT 2025

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

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

Back to the top