0 Replies Latest reply: May 12, 2011 3:15 AM by kumaran d RSS

JBoss-5.1.0.GA and JBoss-aop-2.1.8.GA deployment Issue  JPA Entity javassist.CannotCompileException: [source error] no such class:

kumaran d Newbie

Hi

 

i am new to JBoss AOP,  after going through the document i have configured JBoss aop 2.1.7 GA with JBoss-5.1.0. GA  and enabled LoadtimeWeaving in aop.xml  

 

My web application uses JPA and configured JBoss AOP Interceptor,  At the server startup i am getting following exception only for JPA entites, 

 

Am i missing something ? i want to remove this exceptions at server startup.

 

Thanks in advance.

 

 

12:04:29,225 ERROR [Instrumentor] [warn] AOP Instrumentor failed to transform com.sample.entity.Employee_$$_javassist_8

javassist.CannotCompileException: [source error] no such class: com.sample.entity.Employee_$$_javassist_8

        at javassist.CtBehavior.setBody(CtBehavior.java:368)

        at javassist.CtBehavior.setBody(CtBehavior.java:334)

        at javassist.CtNewMethod.make(CtNewMethod.java:137)

        at org.jboss.aop.instrument.GeneratedAdvisorInstrumentor.createAdvisorCtors(GeneratedAdvisorInstrumentor.java:42

7)

        at org.jboss.aop.instrument.GeneratedAdvisorInstrumentor.createAdvisorClass(GeneratedAdvisorInstrumentor.java:31

3)

        at org.jboss.aop.instrument.GeneratedAdvisorInstrumentor.doSetupBasics(GeneratedAdvisorInstrumentor.java:561)

        at org.jboss.aop.instrument.Instrumentor.setupBasics(Instrumentor.java:949)

        at org.jboss.aop.instrument.MethodExecutionTransformer.instrument(MethodExecutionTransformer.java:143)

        at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:744)

        at org.jboss.aop.instrument.GeneratedAdvisorInstrumentor.transform(GeneratedAdvisorInstrumentor.java:117)

        at org.jboss.aop.SuperClassesFirstWeavingStrategy.instrumentClass(SuperClassesFirstWeavingStrategy.java:202)

        at org.jboss.aop.SuperClassesFirstWeavingStrategy.translate(SuperClassesFirstWeavingStrategy.java:69)

        at org.jboss.aop.AspectManager.translate(AspectManager.java:1071)

        at org.jboss.aop.AspectManager.transform(AspectManager.java:1015)

        at org.jboss.aop.standalone.AOPTransformer.aspectTransform(AOPTransformer.java:87)

        at org.jboss.aop.standalone.AOPTransformer.transform(AOPTransformer.java:75)

        at sun.instrument.TransformerManager.transform(TransformerManager.java:169)

        at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365)

        at java.lang.ClassLoader.defineClass1(Native Method)

        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)

        at java.lang.ClassLoader.defineClass(ClassLoader.java:616)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:181)

        at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:163)

        at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:339)

        at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:314)

        at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:273)

        at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:162

)

        at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:66)

        at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:183)

        at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:158)

        at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:76)

        at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:80

)

        at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:325)

        at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:457)

        at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:131)

        at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)

        at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:261)

        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)

        at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)

        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)

        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)

        at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:301)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)

        at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)

        at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)

        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelCont

rollerContextAction.java:241)

        at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)

        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerCo

ntextAction.java:109)

        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAc

tion.java:70)

        at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)

        at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)

        at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)

        at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContext

Action.java:62)

        at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:

71)

        at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:5

1)

        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1016)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)

        at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)

        at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)

        at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer

.java:62)

        at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

        at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

        at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

        at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

        at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

        at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53

)

        at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:

361)

        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

        at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileServi

ce.java:306)

        at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

        at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

        at org.jboss.Main.boot(Main.java:221)

        at org.jboss.Main$1.run(Main.java:556)

        at java.lang.Thread.run(Thread.java:619)

Caused by: compile error: no such class: com.sample.entity.Employee_$$_javassist_8

        at javassist.compiler.MemberResolver.searchImports(MemberResolver.java:436)

        at javassist.compiler.MemberResolver.lookupClass(MemberResolver.java:412)

        at javassist.compiler.MemberResolver.lookupClassByJvmName(MemberResolver.java:330)

        at javassist.compiler.MemberResolver.resolveJvmClassName(MemberResolver.java:480)

        at javassist.compiler.MemberCodeGen.resolveClassName(MemberCodeGen.java:1140)

        at javassist.compiler.CodeGen.atClassObject(CodeGen.java:1559)

        at javassist.compiler.CodeGen.atExpr(CodeGen.java:1454)

        at javassist.compiler.ast.Expr.accept(Expr.java:67)

        at javassist.compiler.JvstCodeGen.atMethodArgs(JvstCodeGen.java:357)

        at javassist.compiler.MemberCodeGen.atMethodCallCore(MemberCodeGen.java:555)

        at javassist.compiler.MemberCodeGen.atCallExpr(MemberCodeGen.java:523)

        at javassist.compiler.JvstCodeGen.atCallExpr(JvstCodeGen.java:243)

        at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45)

        at javassist.compiler.CodeGen.atAssignCore(CodeGen.java:859)

        at javassist.compiler.CodeGen.atVariableAssign(CodeGen.java:792)

        at javassist.compiler.CodeGen.atDeclarator(CodeGen.java:726)

        at javassist.compiler.ast.Declarator.accept(Declarator.java:99)

        at javassist.compiler.CodeGen.atStmnt(CodeGen.java:350)

        at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)

        at javassist.compiler.CodeGen.atStmnt(CodeGen.java:350)

        at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)

        at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:291)

        at javassist.compiler.Javac.compileBody(Javac.java:222)

        at javassist.CtBehavior.setBody(CtBehavior.java:360)

        ... 105 more

12:04:29,443 ERROR [STDERR] 38515 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory - Factory name: persistence

.unit:unitName=#MyJpaUnit

12:04:29,443 ERROR [STDERR] 38515 [main] INFO org.hibernate.util.NamingHelper - JNDI InitialContext properties:{java.nam