You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Shahul Hameed <sh...@hotmail.co.uk> on 2009/12/02 14:18:57 UTC
java.lang.VerifyError: Cannot inherit from final class
Hi
I am getting the following exception when my application starts up
Caused by: java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(Webapp
ClassLoader.java:1817)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoa
der.java:872)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1325)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1204)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at uk.co.and.commons.services.soap.AbstractSOAPService.afterPropertiesSe
t(AbstractSOAPService.java:231)
at uk.co.and.tin.service.RegistrationService.afterPropertiesSet(Registra
tionService.java:46)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 39 more
AbstractSOAPService.java:231 (where this exception is thrown )contains this line :
JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance();
I am using dynamic client to make web service calls ..
I
have checked if there are any references to the cxf-bundle-2.1.4 jar
but there is only one and thats in the WEB-INF lib directory.
Any help would be much appreciated.
Best Regards
Shahul Hameed
Re: java.lang.VerifyError: Cannot inherit from final class
Posted by Daniel Kulp <dk...@apache.org>.
Not really sure. Is the javac version appropriate (java 5 or higher?).
I really don't know what would cause it. Maybe an older version of jaxb in
the tomcat shared/lib? Or possibly jaxb is in the endorsed area? I'm
really not sure.
Dan
On Fri December 4 2009 6:04:45 am Shahul Hameed wrote:
> Hi Dan
>
> I am getting this error on our dev environment however my local eclipse
> works fine :
>
> SEVERE org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
> Could not compile java files for
> http://dev-andregws/regWS/services/soap/authenticatedSession.wsdl.
>
> [ERROR] IOException during exec() of compiler "javac". Check your path
> environment variable.
>
> Caused by: javax.xml.bind.JAXBException: "uk.co.and.register.schemas"
> doesnt contain ObjectFactory.class or jaxb.index
>
> I did confirm that the javac is on the path
>
> $which javac
> $/usr/bin/javac
>
> echo $PATH
> /usr/bin:/usr/sfw/bin:/usr/local/bin:/export/home/hyperlocal/bin$
>
> So you can see that /usr/bin is on the path ..
>
> Another strange thing is this error occured on my local machine and to fix
> this I had to create a new Tomcat instance (deleting all temp, work dirs
> didnt work) and all worked, but I cant do that on the dev or prod
> environment.
>
> Any ideas what may be wrong.
>
> Best Regards
>
> Shahul Hameed
>
> > From: dkulp@apache.org
> > To: users@cxf.apache.org
> > Subject: Re: java.lang.VerifyError: Cannot inherit from final class
> > Date: Thu, 3 Dec 2009 10:52:09 -0500
> > CC: shahul@hotmail.co.uk
> >
> > On Thu December 3 2009 4:09:31 am Shahul Hameed wrote:
> > > Hi Dan
> > >
> > > You were right .. I was getting an old version of DynamicClientFactory
> > > from one of the jars GroovyWS-all.jar
> > >
> > > I removed it from the class path and it worked.
> > >
> > > Thanks very much for your help.
> > >
> > > Also do I need to have the same version of CXF (2.1.4) at the cleint
> > > side coz the team which develops the webservices uses 2.1.4
> >
> > You shouldn't. That's one of the nice things about soap. Nothing
> > about the software on either end is really exposed on the wire. :-)
> >
> > Dan
> >
> > > Best Regards
> > >
> > > Shahul Hameed
> > >
> > > > From: dkulp@apache.org
> > > > To: users@cxf.apache.org
> > > > Subject: Re: java.lang.VerifyError: Cannot inherit from final class
> > > > Date: Wed, 2 Dec 2009 15:19:29 -0500
> > > > CC: shahul@hotmail.co.uk
> > > >
> > > >
> > > > Check for other versions of:
> > > > org.apache.cxf.endpoint.dynamic.DynamicClientFactory
> > > >
> > > > The OLD OLD versions of DynamicClientFactory were final. When the
> > > > JaxWsDynamicClientFactory class was added, the final restriction was
> > > > taken off. Thus, it kind of sounds like you are getting a new
> > > > JaxWsDynamicClientFactory, but somehow getting an old
> > > > DynamicClientFactory.
> > > >
> > > > That all said, consider upgrading everything to a newer version of
> > > > CXF. 2.1.7 or 2.2.5. :-)
> > > >
> > > > Dan
> > > >
> > > > On Wed December 2 2009 8:18:57 am Shahul Hameed wrote:
> > > > > Hi
> > > > >
> > > > > I am getting the following exception when my application starts up
> > > > >
> > > > > Caused by: java.lang.VerifyError: Cannot inherit from final class
> > > > > at java.lang.ClassLoader.defineClass1(Native Method)
> > > > > at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
> > > > > at
> > > > >
> > > > > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
> > > > >12 4) at
> > > > >
> > > > > org.apache.catalina.loader.WebappClassLoader.findClassInternal(Weba
> > > > >pp ClassLoader.java:1817)
> > > > > at
> > > > >
> > > > > org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassL
> > > > >oa der.java:872)
> > > > > at
> > > > >
> > > > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassL
> > > > >oa der.java:1325)
> > > > > at
> > > > >
> > > > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassL
> > > > >oa der.java:1204)
> > > > > at
> > > > > java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at
> > > > >
> > > > > uk.co.and.commons.services.soap.AbstractSOAPService.afterProperties
> > > > >Se t(AbstractSOAPService.java:231)
> > > > > at
> > > > >
> > > > > uk.co.and.tin.service.RegistrationService.afterPropertiesSet(Regist
> > > > >ra tionService.java:46)
> > > > > at
> > > > >
> > > > > org.springframework.beans.factory.support.AbstractAutowireCapableBe
> > > > >an
> > > > >
> > > > > Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1
> > > > >369) at
> > > > > org.springframework.beans.factory.support.AbstractAutowireCapableBe
> > > > >an
> > > > > Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335
> > > > >) ... 39 more
> > > > >
> > > > >
> > > > > AbstractSOAPService.java:231 (where this exception is thrown
> > > > > )contains this line :
> > > > >
> > > > > JaxWsDynamicClientFactory factory =
> > > > > JaxWsDynamicClientFactory.newInstance();
> > > > >
> > > > > I am using dynamic client to make web service calls ..
> > > > >
> > > > > I
> > > > > have checked if there are any references to the cxf-bundle-2.1.4
> > > > > jar but there is only one and thats in the WEB-INF lib directory.
> > > > >
> > > > > Any help would be much appreciated.
> > > > >
> > > > >
> > > > > Best Regards
> > > > >
> > > > > Shahul Hameed
>
--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
RE: java.lang.VerifyError: Cannot inherit from final class
Posted by Shahul Hameed <sh...@hotmail.co.uk>.
Hi Dan
I am getting this error on our dev environment however my local eclipse works fine :
SEVERE org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient Could not compile java files for http://dev-andregws/regWS/services/soap/authenticatedSession.wsdl.
[ERROR] IOException during exec() of compiler "javac". Check your path environment variable.
Caused by: javax.xml.bind.JAXBException: "uk.co.and.register.schemas" doesnt contain ObjectFactory.class or jaxb.index
I did confirm that the javac is on the path
$which javac
$/usr/bin/javac
echo $PATH
/usr/bin:/usr/sfw/bin:/usr/local/bin:/export/home/hyperlocal/bin$
So you can see that /usr/bin is on the path ..
Another strange thing is this error occured on my local machine and to fix this I had to create a new Tomcat instance (deleting all temp, work dirs didnt work) and all worked, but I cant do that on the dev or prod environment.
Any ideas what may be wrong.
Best Regards
Shahul Hameed
> From: dkulp@apache.org
> To: users@cxf.apache.org
> Subject: Re: java.lang.VerifyError: Cannot inherit from final class
> Date: Thu, 3 Dec 2009 10:52:09 -0500
> CC: shahul@hotmail.co.uk
>
> On Thu December 3 2009 4:09:31 am Shahul Hameed wrote:
> > Hi Dan
> >
> > You were right .. I was getting an old version of DynamicClientFactory from
> > one of the jars GroovyWS-all.jar
> >
> > I removed it from the class path and it worked.
> >
> > Thanks very much for your help.
> >
> > Also do I need to have the same version of CXF (2.1.4) at the cleint side
> > coz the team which develops the webservices uses 2.1.4
>
> You shouldn't. That's one of the nice things about soap. Nothing about the
> software on either end is really exposed on the wire. :-)
>
> Dan
>
>
> >
> >
> > Best Regards
> >
> > Shahul Hameed
> >
> > > From: dkulp@apache.org
> > > To: users@cxf.apache.org
> > > Subject: Re: java.lang.VerifyError: Cannot inherit from final class
> > > Date: Wed, 2 Dec 2009 15:19:29 -0500
> > > CC: shahul@hotmail.co.uk
> > >
> > >
> > > Check for other versions of:
> > > org.apache.cxf.endpoint.dynamic.DynamicClientFactory
> > >
> > > The OLD OLD versions of DynamicClientFactory were final. When the
> > > JaxWsDynamicClientFactory class was added, the final restriction was
> > > taken off. Thus, it kind of sounds like you are getting a new
> > > JaxWsDynamicClientFactory, but somehow getting an old
> > > DynamicClientFactory.
> > >
> > > That all said, consider upgrading everything to a newer version of CXF.
> > > 2.1.7 or 2.2.5. :-)
> > >
> > > Dan
> > >
> > > On Wed December 2 2009 8:18:57 am Shahul Hameed wrote:
> > > > Hi
> > > >
> > > > I am getting the following exception when my application starts up
> > > >
> > > > Caused by: java.lang.VerifyError: Cannot inherit from final class
> > > > at java.lang.ClassLoader.defineClass1(Native Method)
> > > > at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
> > > > at
> > > > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
> > > > 4) at
> > > > org.apache.catalina.loader.WebappClassLoader.findClassInternal(Webapp
> > > > ClassLoader.java:1817)
> > > > at
> > > > org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoa
> > > > der.java:872)
> > > > at
> > > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
> > > > der.java:1325)
> > > > at
> > > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
> > > > der.java:1204)
> > > > at
> > > > java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at
> > > > uk.co.and.commons.services.soap.AbstractSOAPService.afterPropertiesSe
> > > > t(AbstractSOAPService.java:231)
> > > > at
> > > > uk.co.and.tin.service.RegistrationService.afterPropertiesSet(Registra
> > > > tionService.java:46)
> > > > at
> > > > org.springframework.beans.factory.support.AbstractAutowireCapableBean
> > > >
> > > > Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
> > > > at
> > > > org.springframework.beans.factory.support.AbstractAutowireCapableBean
> > > > Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
> > > > ... 39 more
> > > >
> > > >
> > > > AbstractSOAPService.java:231 (where this exception is thrown )contains
> > > > this line :
> > > >
> > > > JaxWsDynamicClientFactory factory =
> > > > JaxWsDynamicClientFactory.newInstance();
> > > >
> > > > I am using dynamic client to make web service calls ..
> > > >
> > > > I
> > > > have checked if there are any references to the cxf-bundle-2.1.4 jar
> > > > but there is only one and thats in the WEB-INF lib directory.
> > > >
> > > > Any help would be much appreciated.
> > > >
> > > >
> > > > Best Regards
> > > >
> > > > Shahul Hameed
> >
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
Re: java.lang.VerifyError: Cannot inherit from final class
Posted by Daniel Kulp <dk...@apache.org>.
On Thu December 3 2009 4:09:31 am Shahul Hameed wrote:
> Hi Dan
>
> You were right .. I was getting an old version of DynamicClientFactory from
> one of the jars GroovyWS-all.jar
>
> I removed it from the class path and it worked.
>
> Thanks very much for your help.
>
> Also do I need to have the same version of CXF (2.1.4) at the cleint side
> coz the team which develops the webservices uses 2.1.4
You shouldn't. That's one of the nice things about soap. Nothing about the
software on either end is really exposed on the wire. :-)
Dan
>
>
> Best Regards
>
> Shahul Hameed
>
> > From: dkulp@apache.org
> > To: users@cxf.apache.org
> > Subject: Re: java.lang.VerifyError: Cannot inherit from final class
> > Date: Wed, 2 Dec 2009 15:19:29 -0500
> > CC: shahul@hotmail.co.uk
> >
> >
> > Check for other versions of:
> > org.apache.cxf.endpoint.dynamic.DynamicClientFactory
> >
> > The OLD OLD versions of DynamicClientFactory were final. When the
> > JaxWsDynamicClientFactory class was added, the final restriction was
> > taken off. Thus, it kind of sounds like you are getting a new
> > JaxWsDynamicClientFactory, but somehow getting an old
> > DynamicClientFactory.
> >
> > That all said, consider upgrading everything to a newer version of CXF.
> > 2.1.7 or 2.2.5. :-)
> >
> > Dan
> >
> > On Wed December 2 2009 8:18:57 am Shahul Hameed wrote:
> > > Hi
> > >
> > > I am getting the following exception when my application starts up
> > >
> > > Caused by: java.lang.VerifyError: Cannot inherit from final class
> > > at java.lang.ClassLoader.defineClass1(Native Method)
> > > at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
> > > at
> > > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
> > > 4) at
> > > org.apache.catalina.loader.WebappClassLoader.findClassInternal(Webapp
> > > ClassLoader.java:1817)
> > > at
> > > org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoa
> > > der.java:872)
> > > at
> > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
> > > der.java:1325)
> > > at
> > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
> > > der.java:1204)
> > > at
> > > java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at
> > > uk.co.and.commons.services.soap.AbstractSOAPService.afterPropertiesSe
> > > t(AbstractSOAPService.java:231)
> > > at
> > > uk.co.and.tin.service.RegistrationService.afterPropertiesSet(Registra
> > > tionService.java:46)
> > > at
> > > org.springframework.beans.factory.support.AbstractAutowireCapableBean
> > >
> > > Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
> > > at
> > > org.springframework.beans.factory.support.AbstractAutowireCapableBean
> > > Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
> > > ... 39 more
> > >
> > >
> > > AbstractSOAPService.java:231 (where this exception is thrown )contains
> > > this line :
> > >
> > > JaxWsDynamicClientFactory factory =
> > > JaxWsDynamicClientFactory.newInstance();
> > >
> > > I am using dynamic client to make web service calls ..
> > >
> > > I
> > > have checked if there are any references to the cxf-bundle-2.1.4 jar
> > > but there is only one and thats in the WEB-INF lib directory.
> > >
> > > Any help would be much appreciated.
> > >
> > >
> > > Best Regards
> > >
> > > Shahul Hameed
>
--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
RE: java.lang.VerifyError: Cannot inherit from final class
Posted by Shahul Hameed <sh...@hotmail.co.uk>.
Hi Dan
You were right .. I was getting an old version of DynamicClientFactory from one of the jars GroovyWS-all.jar
I removed it from the class path and it worked.
Thanks very much for your help.
Also do I need to have the same version of CXF (2.1.4) at the cleint side coz the team which develops the webservices uses 2.1.4
Best Regards
Shahul Hameed
> From: dkulp@apache.org
> To: users@cxf.apache.org
> Subject: Re: java.lang.VerifyError: Cannot inherit from final class
> Date: Wed, 2 Dec 2009 15:19:29 -0500
> CC: shahul@hotmail.co.uk
>
>
> Check for other versions of:
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory
>
> The OLD OLD versions of DynamicClientFactory were final. When the
> JaxWsDynamicClientFactory class was added, the final restriction was taken
> off. Thus, it kind of sounds like you are getting a new
> JaxWsDynamicClientFactory, but somehow getting an old DynamicClientFactory.
>
> That all said, consider upgrading everything to a newer version of CXF. 2.1.7
> or 2.2.5. :-)
>
> Dan
>
>
> On Wed December 2 2009 8:18:57 am Shahul Hameed wrote:
> > Hi
> >
> > I am getting the following exception when my application starts up
> >
> > Caused by: java.lang.VerifyError: Cannot inherit from final class
> > at java.lang.ClassLoader.defineClass1(Native Method)
> > at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
> > at
> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12 4)
> > at
> > org.apache.catalina.loader.WebappClassLoader.findClassInternal(Webapp
> > ClassLoader.java:1817)
> > at
> > org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoa
> > der.java:872)
> > at
> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
> > der.java:1325)
> > at
> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
> > der.java:1204)
> > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
> > at
> > uk.co.and.commons.services.soap.AbstractSOAPService.afterPropertiesSe
> > t(AbstractSOAPService.java:231)
> > at
> > uk.co.and.tin.service.RegistrationService.afterPropertiesSet(Registra
> > tionService.java:46)
> > at
> > org.springframework.beans.factory.support.AbstractAutowireCapableBean
> > Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369) at
> > org.springframework.beans.factory.support.AbstractAutowireCapableBean
> > Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335) ...
> > 39 more
> >
> >
> > AbstractSOAPService.java:231 (where this exception is thrown )contains this
> > line :
> >
> > JaxWsDynamicClientFactory factory =
> > JaxWsDynamicClientFactory.newInstance();
> >
> > I am using dynamic client to make web service calls ..
> >
> > I
> > have checked if there are any references to the cxf-bundle-2.1.4 jar
> > but there is only one and thats in the WEB-INF lib directory.
> >
> > Any help would be much appreciated.
> >
> >
> > Best Regards
> >
> > Shahul Hameed
> >
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
Re: java.lang.VerifyError: Cannot inherit from final class
Posted by Daniel Kulp <dk...@apache.org>.
Check for other versions of:
org.apache.cxf.endpoint.dynamic.DynamicClientFactory
The OLD OLD versions of DynamicClientFactory were final. When the
JaxWsDynamicClientFactory class was added, the final restriction was taken
off. Thus, it kind of sounds like you are getting a new
JaxWsDynamicClientFactory, but somehow getting an old DynamicClientFactory.
That all said, consider upgrading everything to a newer version of CXF. 2.1.7
or 2.2.5. :-)
Dan
On Wed December 2 2009 8:18:57 am Shahul Hameed wrote:
> Hi
>
> I am getting the following exception when my application starts up
>
> Caused by: java.lang.VerifyError: Cannot inherit from final class
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
> at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12 4)
> at
> org.apache.catalina.loader.WebappClassLoader.findClassInternal(Webapp
> ClassLoader.java:1817)
> at
> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoa
> der.java:872)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
> der.java:1325)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
> der.java:1204)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
> at
> uk.co.and.commons.services.soap.AbstractSOAPService.afterPropertiesSe
> t(AbstractSOAPService.java:231)
> at
> uk.co.and.tin.service.RegistrationService.afterPropertiesSet(Registra
> tionService.java:46)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBean
> Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBean
> Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335) ...
> 39 more
>
>
> AbstractSOAPService.java:231 (where this exception is thrown )contains this
> line :
>
> JaxWsDynamicClientFactory factory =
> JaxWsDynamicClientFactory.newInstance();
>
> I am using dynamic client to make web service calls ..
>
> I
> have checked if there are any references to the cxf-bundle-2.1.4 jar
> but there is only one and thats in the WEB-INF lib directory.
>
> Any help would be much appreciated.
>
>
> Best Regards
>
> Shahul Hameed
>
--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog