• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • nadeem
  • Reporter: palko
  • November 06, 2008
  • 1
  • Watchers: 0
  • February 25, 2009
  • December 16, 2008

Attachments

Description

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.(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)

Comments

Pavel Savara 2008-11-07

This is more simple example of the problem. Session is not shared and only one pojo class is instrumented.

If annotation tim is inside tc-config then it produces errors if it is commented than application starts without problems and you can access index.html, index.jsp.

Pavel Savara 2008-11-07

Just to avoid confusion the newer (bigger) attachment it that more simple example.

Pavel Savara 2008-11-11

New war including missing jsf libraries

Alex Miller 2008-12-16

Please merge fix to 2.7 branch for 2.7.3.

nadeem ghani 2009-01-27

import attached war file in sessions configurator copy tc-config.xml from [war]/WEB-INF/tc-config.xml into sessions-configurator and save start all

App starts up and root page displays without exception

(There are some errors on startup, e.g.

AW::WARNING - could not load class [javax/faces/application/FacesMessage$Severity] as a resource in loader [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ ———-> Parent Classloader: org.apache.catalina.loader.StandardClassLoader@25c9a4 ]

but this issue is fixed)