XStream

CLONE -Exception thrown by CGLIB converter duting initialization of XStream

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 1.2.2
  • Fix Version/s: None
  • Component/s: Converters
  • Labels:
    None
  • JDK version and platform:
    JDK 1.6_03, WinXP,

Description

exception that thrown:
Exception in thread "pool-2-thread-1" java.lang.ExceptionInInitializerError
at com.thoughtworks.xstream.converters.reflection.CGLIBEnhancedConverter.canConvert(CGLIBEnhancedConverter.java:59)
at com.thoughtworks.xstream.core.DefaultConverterLookup.registerConverter(DefaultConverterLookup.java:58)
at com.thoughtworks.xstream.XStream.registerConverter(XStream.java:1033)
at com.thoughtworks.xstream.XStream.dynamicallyRegisterConverter(XStream.java:663)
at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:646)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:375)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:301)
at com.nolio.platform.server.dataservices.logic.packages.loaders.ApplicationLoader.loadApplicationsFromFile(ApplicationLoader.java:43)
at com.nolio.platform.server.dataservices.logic.packages.loaders.PackageLoader.loadPackage(PackageLoader.java:79)
at com.nolio.platform.server.dataservices.logic.packages.loaders.PackageLoader.loadPackage(PackageLoader.java:44)
at com.nolio.platform.server.dataservices.logic.packages.loaders.PackageLoader.loadFromFileObject(PackageLoader.java:36)
at com.nolio.platform.server.dataservices.logic.packages.PackagesScanner.run(PackagesScanner.java:130)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassCastException: net.sf.cglib.proxy.Enhancer$EnhancerKey$$KeyFactoryByCGLIB$$7fb24d72 cannot be cast to net.sf.cglib.core.KeyFactory
at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
... 15 more

don't know if this relevant: thrown inside of WebApp running in embedded Jetty 6

Activity

Hide
Brill Pappin added a comment -

I've reopened this because its looking like it might actually be in XStream:
I can't be sure, and may actually be a bug in cglib, but it is definitely XStream calling the code that generates the exception.
It may be the way XStream is using cglib and it will need to be verified by a developer.

This should be reproducible with XStream 1.3 and cglib 2.1_3.

Key stack is:

jvm 1 | 2008-09-08 10:31:33.602::WARN: Nested in java.lang.ExceptionInInitializerError:
jvm 1 | java.lang.ClassCastException: net.sf.cglib.proxy.Enhancer$EnhancerKey$$KeyFactoryByCGLIB$$7fb24d72 cannot be cast to net.sf.cglib.core.KeyFactory
jvm 1 | at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
jvm 1 | at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
jvm 1 | at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
jvm 1 | at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
jvm 1 | at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
jvm 1 | at com.thoughtworks.xstream.converters.reflection.CGLIBEnhancedConverter.canConvert(CGLIBEnhancedConverter.java:67)
jvm 1 | at com.thoughtworks.xstream.core.DefaultConverterLookup.lookupConverterForType(DefaultConverterLookup.java:60)
jvm 1 | at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:65)
jvm 1 | at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:59)
jvm 1 | at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:142)
jvm 1 | at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
jvm 1 | at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:931)
jvm 1 | at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:917)
jvm 1 | at com.thoughtworks.xstream.XStream.fromXML(XStream.java:861)

Show
Brill Pappin added a comment - I've reopened this because its looking like it might actually be in XStream: I can't be sure, and may actually be a bug in cglib, but it is definitely XStream calling the code that generates the exception. It may be the way XStream is using cglib and it will need to be verified by a developer. This should be reproducible with XStream 1.3 and cglib 2.1_3. Key stack is: jvm 1 | 2008-09-08 10:31:33.602::WARN: Nested in java.lang.ExceptionInInitializerError: jvm 1 | java.lang.ClassCastException: net.sf.cglib.proxy.Enhancer$EnhancerKey$$KeyFactoryByCGLIB$$7fb24d72 cannot be cast to net.sf.cglib.core.KeyFactory jvm 1 | at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145) jvm 1 | at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117) jvm 1 | at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108) jvm 1 | at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104) jvm 1 | at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69) jvm 1 | at com.thoughtworks.xstream.converters.reflection.CGLIBEnhancedConverter.canConvert(CGLIBEnhancedConverter.java:67) jvm 1 | at com.thoughtworks.xstream.core.DefaultConverterLookup.lookupConverterForType(DefaultConverterLookup.java:60) jvm 1 | at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:65) jvm 1 | at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:59) jvm 1 | at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:142) jvm 1 | at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33) jvm 1 | at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:931) jvm 1 | at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:917) jvm 1 | at com.thoughtworks.xstream.XStream.fromXML(XStream.java:861)
Hide
Brill Pappin added a comment -

This was cloned from XSTR-518

Show
Brill Pappin added a comment - This was cloned from XSTR-518
Hide
Joerg Schaible added a comment -

Closed as duplicate. Fix your classpath! I'll invite you to the user's list for discussion (although Codehaus' mail is currently roughly down due to spam mail attack), but you may also search the archives, I've already explained more than once.

Show
Joerg Schaible added a comment - Closed as duplicate. Fix your classpath! I'll invite you to the user's list for discussion (although Codehaus' mail is currently roughly down due to spam mail attack), but you may also search the archives, I've already explained more than once.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: