You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Neill Lima <ne...@visual-meta.com> on 2015/03/20 09:58:52 UTC

Tomcat8 gives me WSOD due to LinkageError

Hello list,

I'm not sure if this the right place to ask, but here it goes...

I have a existing WebApp that I'm planning to upgrade to Tomcat8 (version
8.0.20 as of today). It is running stable in Tomcat7 already for ages.

Tomcat8 does not embed the JasperListener so I added it manually to my
pom.xml otherwise I was getting NoClassDefFoundError.

<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-jasper</artifactId>
    <version>8.0.20</version>
</dependency>

The application bootstraps properly but when I launch a request to it, I'm
getting the following exception;

Caused by: java.lang.LinkageError: loader constraint violation: when
resolving method
"org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(Ljavax/servlet/ServletConfig;)Lorg/apache/tomcat/InstanceManager;"
the class loader (instance of org/apache/catalina/loader/WebappClassLoader)
of the current class, jsp/WEB_002dINF/jsp/home_005fpage_jsp, and the class
loader (instance of java/net/URLClassLoader) for the method's defining
class, org/apache/jasper/runtime/InstanceManagerFactory, have different
Class objects for the type org/apache/tomcat/InstanceManager used in the
signature at
jsp.WEB_002dINF.jsp.home_005fpage_jsp._jspInit(home_005fpage_jsp.java:128)
at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:49) at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)

Has anyone experienced/resolved this before?

Re: Tomcat8 gives me WSOD due to LinkageError

Posted by Neill Lima <ne...@visual-meta.com>.
Hello Christopher,

Thanks for the reply. Actually not, I am working with out-of-the-box
Tomcat7 and Tomcat8 in this case. I wonder if any classloader changes
occurred in the last builds that could have affected this.

Thanks,

Neill

On Wed, Mar 25, 2015 at 5:44 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Neill,
>
> On 3/20/15 12:28 PM, Neill Lima wrote:
> > As of today I figured out that the jasper.jar in Tomcat's \lib
> > takes care of the task out of the box. I've tweaked my pom a few
> > times, but I started fresh today and realized it. So no pom updates
> > were necessary. Still I'm getting this exception I mentioned in the
> > earlier e-mail:
> >
> > Caused by: java.lang.LinkageError: loader constraint violation:
> > when resolving method
> >
> "org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(Ljavax/servlet/ServletConfig;)Lorg/apache/tomcat/InstanceManager;"
> >
> >
> the class loader (instance of org/apache/catalina/loader/WebappClassLoader)
> > of the current class, jsp/WEB_002dINF/jsp/home_005fpage_jsp, and
> > the class loader (instance of java/net/URLClassLoader) for the
> > method's defining class,
> > org/apache/jasper/runtime/InstanceManagerFactory, have different
> > Class objects for the type org/apache/tomcat/InstanceManager used
> > in the signature at
> >
> jsp.WEB_002dINF.jsp.home_005fpage_jsp._jspInit(home_005fpage_jsp.java:128)
> >
> >
> at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:49) at
> >
> org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
> >
> >  It does not happen on my current Tomcat7 deploy though.
>
> Do you have any other Tomcat-provided libraries in your web
> applications' WEB-INF/lib directory?
>
> That can cause all kinds of problems.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
>
> iQIcBAEBCAAGBQJVEuXfAAoJEBzwKT+lPKRYhhgP/imvJyCrUmMw73gkqr/5fUVr
> rmucRx+GaNscY51Bj3boXco/2ANyQDUnIvbubdz57bDzqb6r+Jz7t6rfuK5H27sJ
> W0Kzu0Et7r8Ec9RQPBZ1iRz7jWdG0/DzRsGMcee7APzoomI3mUa0veJDpto3JKbo
> hacvB1SaLX7xatUI3GEQcBB6i15kF2Pu3khylQjUH9XMOd+QwFBah74h1DnwGzAZ
> j5V6VCRaeXAq314qGBFv+SE/3XeCJuKsranRvuatJcIHAHCbolDuh55mmM5UW/1u
> c+7mCsEQ74HeWc8CckxfO87mTDcGI1ppsJ5fm+oNoQVoctyJ0Zp6J4qcyp7K6ZK4
> cHwESgq6ZKf45AfJVHPses2arTniXHyRFUAWs/0En72rtNvMg9yzcoO0kmy2PYEN
> MQWrrfA6zVcnVemL1qxOugbAxD3/dA8N4PD+Wml6Ck/PfQ2K4RYdt9BlW8cMBEPe
> LdQZd/ezBOvs0FWZWtW1KFgKJgrDsUNMApr7r/JD0tY0urGJ1JSHfJKFUeJEoTsc
> e8C+UIV93dkdb5lRZEe64UhHRCdWHx4C6oYzURHu69KX8Bj3y1jrbtA6xw+/nHWV
> g/Ec2dZUyqEHBpM76ueU/B/0BRK3+RThH4PMMedAyEiR1xYsI150sbMBiF3DxSEJ
> quW2uCaBpsZpOuFDfjDS
> =H2X/
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat8 gives me WSOD due to LinkageError

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Neill,

On 3/20/15 12:28 PM, Neill Lima wrote:
> As of today I figured out that the jasper.jar in Tomcat's \lib
> takes care of the task out of the box. I've tweaked my pom a few
> times, but I started fresh today and realized it. So no pom updates
> were necessary. Still I'm getting this exception I mentioned in the
> earlier e-mail:
> 
> Caused by: java.lang.LinkageError: loader constraint violation:
> when resolving method 
> "org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(Ljavax/servlet/ServletConfig;)Lorg/apache/tomcat/InstanceManager;"
>
> 
the class loader (instance of org/apache/catalina/loader/WebappClassLoader)
> of the current class, jsp/WEB_002dINF/jsp/home_005fpage_jsp, and
> the class loader (instance of java/net/URLClassLoader) for the
> method's defining class,
> org/apache/jasper/runtime/InstanceManagerFactory, have different 
> Class objects for the type org/apache/tomcat/InstanceManager used
> in the signature at 
> jsp.WEB_002dINF.jsp.home_005fpage_jsp._jspInit(home_005fpage_jsp.java:128)
>
> 
at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:49) at
> org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
>
>  It does not happen on my current Tomcat7 deploy though.

Do you have any other Tomcat-provided libraries in your web
applications' WEB-INF/lib directory?

That can cause all kinds of problems.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVEuXfAAoJEBzwKT+lPKRYhhgP/imvJyCrUmMw73gkqr/5fUVr
rmucRx+GaNscY51Bj3boXco/2ANyQDUnIvbubdz57bDzqb6r+Jz7t6rfuK5H27sJ
W0Kzu0Et7r8Ec9RQPBZ1iRz7jWdG0/DzRsGMcee7APzoomI3mUa0veJDpto3JKbo
hacvB1SaLX7xatUI3GEQcBB6i15kF2Pu3khylQjUH9XMOd+QwFBah74h1DnwGzAZ
j5V6VCRaeXAq314qGBFv+SE/3XeCJuKsranRvuatJcIHAHCbolDuh55mmM5UW/1u
c+7mCsEQ74HeWc8CckxfO87mTDcGI1ppsJ5fm+oNoQVoctyJ0Zp6J4qcyp7K6ZK4
cHwESgq6ZKf45AfJVHPses2arTniXHyRFUAWs/0En72rtNvMg9yzcoO0kmy2PYEN
MQWrrfA6zVcnVemL1qxOugbAxD3/dA8N4PD+Wml6Ck/PfQ2K4RYdt9BlW8cMBEPe
LdQZd/ezBOvs0FWZWtW1KFgKJgrDsUNMApr7r/JD0tY0urGJ1JSHfJKFUeJEoTsc
e8C+UIV93dkdb5lRZEe64UhHRCdWHx4C6oYzURHu69KX8Bj3y1jrbtA6xw+/nHWV
g/Ec2dZUyqEHBpM76ueU/B/0BRK3+RThH4PMMedAyEiR1xYsI150sbMBiF3DxSEJ
quW2uCaBpsZpOuFDfjDS
=H2X/
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat8 gives me WSOD due to LinkageError

Posted by Neill Lima <ne...@visual-meta.com>.
Hello Chris,

As of today I figured out that the jasper.jar in Tomcat's \lib takes care
of the task out of the box. I've tweaked my pom a few times, but I started
fresh today and realized it. So no pom updates were necessary. Still I'm
getting this exception I mentioned in the earlier e-mail:

Caused by: java.lang.LinkageError: loader constraint violation: when
resolving method
"org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(Ljavax/servlet/ServletConfig;)Lorg/apache/tomcat/InstanceManager;"
the class loader (instance of org/apache/catalina/loader/WebappClassLoader)
of the current class, jsp/WEB_002dINF/jsp/home_005fpage_jsp, and the class
loader (instance of java/net/URLClassLoader) for the method's defining
class, org/apache/jasper/runtime/InstanceManagerFactory, have different
Class objects for the type org/apache/tomcat/InstanceManager used in the
signature at
jsp.WEB_002dINF.jsp.home_005fpage_jsp._jspInit(home_005fpage_jsp.java:128)
at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:49) at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)

It does not happen on my current Tomcat7 deploy though.



On Fri, Mar 20, 2015 at 5:08 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Neill,
>
> On 3/20/15 4:58 AM, Neill Lima wrote:
> > I have a existing WebApp that I'm planning to upgrade to Tomcat8
> > (version 8.0.20 as of today). It is running stable in Tomcat7
> > already for ages.
>
> Great.
>
> > Tomcat8 does not embed the JasperListener so I added it manually to
> > my pom.xml otherwise I was getting NoClassDefFoundError.
>
> Wait, what? What do you mean "Tomcat8 does not embed the
> JasperListener"? What are you actually trying to do? Just run a JSP?
> It should work out of the box without any Maven foolishness.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
>
> iQIcBAEBCAAGBQJVDEXwAAoJEBzwKT+lPKRYQsUQAJjQDrBPvSP5mEg8IsME5kDz
> Y39SDR5I0XQ0cLM3IIgCCFKpfTU71gvbLdJflQSz6JU833iye2E515IijKnlnINr
> 0FiJ1E2ogKLJWfmhu28f0VWFXJ3Dy+qSL2AT1H4yF8ed+JTfXWFkzKzkoxSuXeMn
> TKBTUxXfD7f4ei9EEK3ZEDvWUIJ7w6v4gBJ8BriOZ9/iLYTiZ9S90KL/ilp4Iypw
> 2/ncET7WqoLqshM4g+fswEeSjOeEQn5J50gebqubUxhsmfUt+BYXGDIchAc8yUVp
> MTjJw5r9QpOCgeNyuMdK4Vg/DCcgsTzhHT7rcYh1iItwckqpcr04rc/AlYFnEU/u
> 78MzHR6U0iIAx49tWb6bwRbsjnygFKPHX49dAlhmdopijuNumrl6yvmUyR5fTA8d
> RNvcXbHhMm06SesW7QvkUPZk8Qq6W/2WBH+kKuMMmBXzJt0p7XG3BvgtTqLwBUDj
> 7oGli1p8JsV0pg/pYERW4lpNuDg1LsLuzCg1EvRJ7wuoN6j1k47uL6c7dNw4QdFE
> p6DpKpeCZH85y4CCupqexwmhut/OYIF2F6W2NMBgn78SfY8HD51FrBnb9zeiq1Gr
> PgeitwooTzyafWNAvNbPv2TUO6qXzvrY6+eA2UurizMYN30ir3tDh+IwcYNG7OtW
> bcIjoFmirZ36tYJIgwn1
> =wbJX
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat8 gives me WSOD due to LinkageError

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Neill,

On 3/20/15 4:58 AM, Neill Lima wrote:
> I have a existing WebApp that I'm planning to upgrade to Tomcat8
> (version 8.0.20 as of today). It is running stable in Tomcat7
> already for ages.

Great.

> Tomcat8 does not embed the JasperListener so I added it manually to
> my pom.xml otherwise I was getting NoClassDefFoundError.

Wait, what? What do you mean "Tomcat8 does not embed the
JasperListener"? What are you actually trying to do? Just run a JSP?
It should work out of the box without any Maven foolishness.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVDEXwAAoJEBzwKT+lPKRYQsUQAJjQDrBPvSP5mEg8IsME5kDz
Y39SDR5I0XQ0cLM3IIgCCFKpfTU71gvbLdJflQSz6JU833iye2E515IijKnlnINr
0FiJ1E2ogKLJWfmhu28f0VWFXJ3Dy+qSL2AT1H4yF8ed+JTfXWFkzKzkoxSuXeMn
TKBTUxXfD7f4ei9EEK3ZEDvWUIJ7w6v4gBJ8BriOZ9/iLYTiZ9S90KL/ilp4Iypw
2/ncET7WqoLqshM4g+fswEeSjOeEQn5J50gebqubUxhsmfUt+BYXGDIchAc8yUVp
MTjJw5r9QpOCgeNyuMdK4Vg/DCcgsTzhHT7rcYh1iItwckqpcr04rc/AlYFnEU/u
78MzHR6U0iIAx49tWb6bwRbsjnygFKPHX49dAlhmdopijuNumrl6yvmUyR5fTA8d
RNvcXbHhMm06SesW7QvkUPZk8Qq6W/2WBH+kKuMMmBXzJt0p7XG3BvgtTqLwBUDj
7oGli1p8JsV0pg/pYERW4lpNuDg1LsLuzCg1EvRJ7wuoN6j1k47uL6c7dNw4QdFE
p6DpKpeCZH85y4CCupqexwmhut/OYIF2F6W2NMBgn78SfY8HD51FrBnb9zeiq1Gr
PgeitwooTzyafWNAvNbPv2TUO6qXzvrY6+eA2UurizMYN30ir3tDh+IwcYNG7OtW
bcIjoFmirZ36tYJIgwn1
=wbJX
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org