[JBoss AOP] - Re: Dynamic AOP and User-Defined Class Loader
by shu_boston
Hi,
Thank you very much for your help. I tried what you said in the topic you created, and I have bad news and good news :P
Unfortunatelly, it still doens't work with 2.0.0 CR8, but I found it works with 1.5.6. When I override getResource(), my application is sometime required to load "Object.class" and "Throwable.class". Yes, "Object.class" not "java.lang.Object.class". Then, my classloader (getResource()) loads "java.lang.Object.class" by calling super.getResrouce("java/lang/Object.class") instead of loading "Object.class", however, I still got the following exception.
| Caused by: java.lang.RuntimeException: cannot find Object: java.lang.Object found in Object.class
| at javassist.CtClassType.getClassFile2(CtClassType.java:192)
| at javassist.CtClassType.prune(CtClassType.java:1302)
| at javassist.scopedpool.ScopedClassPool.cacheCtClass(ScopedClassPool.java:227)
| at javassist.ClassPool.get0(ClassPool.java:467)
| at javassist.ClassPool.get(ClassPool.java:433)
| at javassist.compiler.MemberResolver.lookupClass0(MemberResolver.java:425)
| at javassist.compiler.MemberResolver.lookupClass(MemberResolver.java:389)
| at javassist.compiler.MemberResolver.lookupClassByJvmName(MemberResolver.java:310)
| at javassist.compiler.MemberResolver.resolveJvmClassName(MemberResolver.java:460)
| at javassist.compiler.MemberCodeGen.resolveClassName(MemberCodeGen.java:1140)
| at javassist.compiler.CodeGen.atDeclarator(CodeGen.java:711)
| 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)
| at javassist.CtBehavior.setBody(CtBehavior.java:334)
| at javassist.CtNewMethod.make(CtNewMethod.java:135)
| at javassist.CtNewMethod.make(CtNewMethod.java:104)
| at org.jboss.aop.instrument.JoinPointGenerator.addAspectFieldAndGetter(JoinPointGenerator.java:589)
| at org.jboss.aop.instrument.JoinPointGenerator.initialiseAdviceInfosAndAddFields(JoinPointGenerator.java:568)
| at org.jboss.aop.instrument.JoinPointGenerator.generateJoinpointClass(JoinPointGenerator.java:409)
| at org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:287)
| ... 7 more
|
I'm actually fine now since my code works with 1.5.6 thanks to your advice, however I think this is a bug in 2.0.0 CR8. Hope this help you.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4151830#4151830
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4151830
18 years, 1 month
[JBoss jBPM] - Re: Problem with Timer execution. process classloader can't
by a.wintersteiger
Hi rayun,
I have exactly the same problem and - thanks for posting - am working on it since last friday. I have built a simple test process and the problem comes in with *even only one timer* - but only when you fork! I have tried the same thing without any forked executions, works fine.
But I only get the StaleObjectStateException, like this:
anonymous wrote :
| 17:42:59,231 INFO [DbPersistenceService] optimistic locking failed
| 17:42:59,247 INFO [Services] problem closing service 'persistence': optimistic locking failed
| 17:42:59,309 WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.job.Timer - this operation breaks ==
| 17:42:59,341 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
| org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.job.Timer#271874]
| at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1765)
| at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2523)
| at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2697)
| at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:74)
| at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:146)
| at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
| at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
| at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
| at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
| at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
| at org.jbpm.persistence.db.DbPersistenceService.commit(DbPersistenceService.java:256)
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:214)
| at org.jbpm.svc.Services.close(Services.java:225)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| at org.jbpm.job.executor.JobExecutorThread.executeJob(JobExecutorThread.java:184)
| at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:64)
|
with this process definition:
| <process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="simple">
| <start-state name="start">
| <transition to="fork1" name="to_state">
| </transition>
| </start-state>
|
| <state name="first">
| <timer duedate="2 Minutes" name="Wait2Minutes" transition="to_end">
| <action></action>
| </timer>
| <transition to="join1" name="to_end">
| </transition>
| </state>
|
| <fork name="fork1">
| <transition to="node1"></transition>
| <transition to="first" name="to first"></transition>
| </fork>
|
| <join name="join1">
| <transition to="end"></transition>
| </join>
|
| <node name="node1">
| <transition to="join1"></transition>
| </node>
|
|
| <end-state name="end"></end-state>
| </process-definition>
|
Your ClassNotFoundException looks to me like you have forgotten to deploy your handler classes together with the process...?!? Maybe can tell more tomorrow.
Andy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4151815#4151815
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4151815
18 years, 1 month