java.lang.Exception: could not read class [org.terracotta.modules.annotations.InstrumentedClass] as byte array

Terracotta | ak | 8 years ago
  1. 0

    could not read class [org.terracotta.modules.annotations.InstrumentedClass] as byte array

    Terracotta | 8 years ago | ak
    java.lang.Exception: could not read class [org.terracotta.modules.annotations.InstrumentedClass] as byte array
  2. 0

    I get a lots of errors when application is trying to load various classes and check them for annotations during application start up when using jboss seam and terracotta annotations. Without tim-annotations there is no problem. Is there a way in terracotta to narrow scope where to look for annotations (typical in spring, seam and other frameworks). If we can set to look only to our package than startup will be faster and we get rid of errors as well i guess or is the problem somewhere else? There is simple war file in attachment which produces error when deployed on tomcat 6 with terracotta enabled. tc-config.xml is in WEB-INF directory. Let me know if you need any help or whole maven project. Project does nothing just starts web application with seam configured inside web.xml. No special classes or pages. Error happens at startup of application and application fails to start as result. Palko See more in forum: http://forums.terracotta.org/forums/posts/list/1526.page#9275 Example of error output java.lang.Exception: could not read class [javax.ejb.Stateful] as byte array at com.tc.backport175.bytecode.DefaultBytecodeProvider.getBytecode(DefaultBytecodeProvider.java:42) at com.tc.backport175.bytecode.AnnotationReader.getBytecodeFor(AnnotationReader.java:168) at com.tc.backport175.bytecode.AnnotationDefaults.getDefaults(AnnotationDefaults.java:50) at com.tc.backport175.bytecode.AnnotationReader$AnnotationBuilderVisitor.visitEnd(AnnotationReader.java:1140) at com.tc.asm.ClassReader.readAnnotationValues(ClassReader.java:1535) at com.tc.asm.ClassReader.accept(ClassReader.java:580) at com.tc.asm.ClassReader.accept(ClassReader.java:420) at com.tc.backport175.bytecode.AnnotationReader.parse(AnnotationReader.java:944) at com.tc.backport175.bytecode.AnnotationReader.<init>(AnnotationReader.java:958) at com.tc.backport175.bytecode.AnnotationReader.getReaderFor(AnnotationReader.java:209) at com.tc.backport175.bytecode.AnnotationReader.getReaderFor(AnnotationReader.java:193) at com.tc.aspectwerkz.reflect.impl.asm.AsmClassInfo.getAnnotationReader(AsmClassInfo.java:968) at com.tc.aspectwerkz.reflect.impl.asm.AsmFieldInfo.getAnnotations(AsmFieldInfo.java:96) at com.tc.aspectwerkz.expression.ExpressionVisitor.visitAttributes(ExpressionVisitor.java:815) at com.tc.aspectwerkz.expression.ExpressionVisitor.visitAnnotatedNode(ExpressionVisitor.java:1021) at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:171) at com.tc.aspectwerkz.expression.ast.ASTGet.jjtAccept(ASTGet.java:22) at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:100) at com.tc.aspectwerkz.expression.ast.ASTExpression.jjtAccept(ASTExpression.java:22) at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:88) at com.tc.aspectwerkz.expression.ExpressionVisitor.match(ExpressionVisitor.java:74) at com.tc.object.config.Root.matches(Root.java:94) at com.tc.object.config.StandardDSOClientConfigHelperImpl.findMatchingRootDefinition(StandardDSOClientConfigHelperImpl.java:997) at com.tc.object.config.StandardDSOClientConfigHelperImpl.classContainsAnyRoots(StandardDSOClientConfigHelperImpl.java:1006) at com.tc.object.config.StandardDSOClientConfigHelperImpl.shouldBeAdapted(StandardDSOClientConfigHelperImpl.java:1236) at com.tc.object.bytecode.hook.impl.DefaultWeavingStrategy.transform(DefaultWeavingStrategy.java:139) at com.tc.object.bytecode.hook.impl.DSOContextImpl.preProcess(DSOContextImpl.java:170) at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.defineClass0Pre(ClassProcessorHelper.java:678) at java.lang.ClassLoader.defineClass(ClassLoader.java:620)

    Terracotta Project Issue Tracker | 8 years ago | Pavel Savara
    java.lang.Exception: could not read class [javax.ejb.Stateful] as byte array
  3. 0

    I get a lots of errors when application is trying to load various classes and check them for annotations during application start up when using jboss seam and terracotta annotations. Without tim-annotations there is no problem. Is there a way in terracotta to narrow scope where to look for annotations (typical in spring, seam and other frameworks). If we can set to look only to our package than startup will be faster and we get rid of errors as well i guess or is the problem somewhere else? There is simple war file in attachment which produces error when deployed on tomcat 6 with terracotta enabled. tc-config.xml is in WEB-INF directory. Let me know if you need any help or whole maven project. Project does nothing just starts web application with seam configured inside web.xml. No special classes or pages. Error happens at startup of application and application fails to start as result. Palko See more in forum: http://forums.terracotta.org/forums/posts/list/1526.page#9275 Example of error output java.lang.Exception: could not read class [javax.ejb.Stateful] as byte array at com.tc.backport175.bytecode.DefaultBytecodeProvider.getBytecode(DefaultBytecodeProvider.java:42) at com.tc.backport175.bytecode.AnnotationReader.getBytecodeFor(AnnotationReader.java:168) at com.tc.backport175.bytecode.AnnotationDefaults.getDefaults(AnnotationDefaults.java:50) at com.tc.backport175.bytecode.AnnotationReader$AnnotationBuilderVisitor.visitEnd(AnnotationReader.java:1140) at com.tc.asm.ClassReader.readAnnotationValues(ClassReader.java:1535) at com.tc.asm.ClassReader.accept(ClassReader.java:580) at com.tc.asm.ClassReader.accept(ClassReader.java:420) at com.tc.backport175.bytecode.AnnotationReader.parse(AnnotationReader.java:944) at com.tc.backport175.bytecode.AnnotationReader.<init>(AnnotationReader.java:958) at com.tc.backport175.bytecode.AnnotationReader.getReaderFor(AnnotationReader.java:209) at com.tc.backport175.bytecode.AnnotationReader.getReaderFor(AnnotationReader.java:193) at com.tc.aspectwerkz.reflect.impl.asm.AsmClassInfo.getAnnotationReader(AsmClassInfo.java:968) at com.tc.aspectwerkz.reflect.impl.asm.AsmFieldInfo.getAnnotations(AsmFieldInfo.java:96) at com.tc.aspectwerkz.expression.ExpressionVisitor.visitAttributes(ExpressionVisitor.java:815) at com.tc.aspectwerkz.expression.ExpressionVisitor.visitAnnotatedNode(ExpressionVisitor.java:1021) at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:171) at com.tc.aspectwerkz.expression.ast.ASTGet.jjtAccept(ASTGet.java:22) at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:100) at com.tc.aspectwerkz.expression.ast.ASTExpression.jjtAccept(ASTExpression.java:22) at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:88) at com.tc.aspectwerkz.expression.ExpressionVisitor.match(ExpressionVisitor.java:74) at com.tc.object.config.Root.matches(Root.java:94) at com.tc.object.config.StandardDSOClientConfigHelperImpl.findMatchingRootDefinition(StandardDSOClientConfigHelperImpl.java:997) at com.tc.object.config.StandardDSOClientConfigHelperImpl.classContainsAnyRoots(StandardDSOClientConfigHelperImpl.java:1006) at com.tc.object.config.StandardDSOClientConfigHelperImpl.shouldBeAdapted(StandardDSOClientConfigHelperImpl.java:1236) at com.tc.object.bytecode.hook.impl.DefaultWeavingStrategy.transform(DefaultWeavingStrategy.java:139) at com.tc.object.bytecode.hook.impl.DSOContextImpl.preProcess(DSOContextImpl.java:170) at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.defineClass0Pre(ClassProcessorHelper.java:678) at java.lang.ClassLoader.defineClass(ClassLoader.java:620)

    Terracotta Project Issue Tracker | 8 years ago | Pavel Savara
    java.lang.Exception: could not read class [javax.ejb.Stateful] as byte array
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Terracotta Annotations and Seam

    Terracotta | 8 years ago | toonti
    java.lang.Exception: could not read class [javax.ejb.Stateful] as byte array
  6. 0

    [akka-user] i'm meet problems will user ActiveObject in java~

    Google Groups | 7 years ago | 曹江华
    java.lang.Exception: could not read class [org.codehaus.aspectwerkz.annotation.Aspect] as byte array

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.Exception

      could not read class [org.terracotta.modules.annotations.InstrumentedClass] as byte array

      at com.tc.backport175.bytecode.DefaultBytecodeProvider.getBytecode()
    2. com.tc.backport175
      AnnotationReader$AnnotationBuilderVisitor.visitEnd
      1. com.tc.backport175.bytecode.DefaultBytecodeProvider.getBytecode(DefaultBytecodeProvider.java:42)
      2. com.tc.backport175.bytecode.AnnotationReader.getBytecodeFor(AnnotationReader.java:168)
      3. com.tc.backport175.bytecode.AnnotationDefaults.getDefaults(AnnotationDefaults.java:50)
      4. com.tc.backport175.bytecode.AnnotationReader$AnnotationBuilderVisitor.visitEnd(AnnotationReader.java:1140)
      4 frames
    3. com.tc.asm
      ClassReader.accept
      1. com.tc.asm.ClassReader.readAnnotationValues(ClassReader.java:1535)
      2. com.tc.asm.ClassReader.accept(ClassReader.java:580)
      3. com.tc.asm.ClassReader.accept(ClassReader.java:420)
      3 frames
    4. com.tc.backport175
      AnnotationReader.getReaderFor
      1. com.tc.backport175.bytecode.AnnotationReader.parse(AnnotationReader.java:944)
      2. com.tc.backport175.bytecode.AnnotationReader.<init>(AnnotationReader.java:958)
      3. com.tc.backport175.bytecode.AnnotationReader.getReaderFor(AnnotationReader.java:209)
      4. com.tc.backport175.bytecode.AnnotationReader.getReaderFor(AnnotationReader.java:193)
      4 frames
    5. com.tc.aspectwerkz
      ExpressionVisitor.match
      1. com.tc.aspectwerkz.reflect.impl.asm.AsmClassInfo.getAnnotationReader(AsmClassInfo.java:968)
      2. com.tc.aspectwerkz.reflect.impl.asm.AsmFieldInfo.getAnnotations(AsmFieldInfo.java:96)
      3. com.tc.aspectwerkz.expression.ExpressionVisitor.visitAttributes(ExpressionVisitor.java:815)
      4. com.tc.aspectwerkz.expression.ExpressionVisitor.visitAnnotatedNode(ExpressionVisitor.java:1021)
      5. com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:171)
      6. com.tc.aspectwerkz.expression.ast.ASTGet.jjtAccept(ASTGet.java:22)
      7. com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:100)
      8. com.tc.aspectwerkz.expression.ast.ASTExpression.jjtAccept(ASTExpression.java:22)
      9. com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:88)
      10. com.tc.aspectwerkz.expression.ExpressionVisitor.match(ExpressionVisitor.java:74)
      10 frames
    6. com.tc.object
      ClassProcessorHelper.defineClass0Pre
      1. com.tc.object.config.Root.matches(Root.java:94)
      2. com.tc.object.config.StandardDSOClientConfigHelperImpl.findMatchingRootDefinition(StandardDSOClientConfigHelperImpl.java:997)
      3. com.tc.object.config.StandardDSOClientConfigHelperImpl.classContainsAnyRoots(StandardDSOClientConfigHelperImpl.java:1006)
      4. com.tc.object.config.StandardDSOClientConfigHelperImpl.shouldBeAdapted(StandardDSOClientConfigHelperImpl.java:1236)
      5. com.tc.object.bytecode.hook.impl.DefaultWeavingStrategy.transform(DefaultWeavingStrategy.java:139)
      6. com.tc.object.bytecode.hook.impl.DSOContextImpl.preProcess(DSOContextImpl.java:170)
      7. com.tc.object.bytecode.hook.impl.ClassProcessorHelper.defineClass0Pre(ClassProcessorHelper.java:678)
      7 frames
    7. Java RT
      ClassLoader.loadClassInternal
      1. java.lang.ClassLoader.defineClass(ClassLoader.java:620)
      2. java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
      3. java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
      4. java.net.URLClassLoader.access$000(URLClassLoader.java:56)
      5. java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      6. java.security.AccessController.doPrivileged(Native Method)
      7. java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      8. java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      9. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
      10. java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      11. java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      11 frames