[Javassist Users] - VerifyError with addLocalVariable() and insertAfter()
by Herkules000
Hi all!
This is my first post here and I am a javassist newbie. So hopefully my problem can easily be solved.
>From a real usecase, I condensed the following fragment demonstrating my problem:
ClassPool cp = ClassPool.getDefault();
| CtClass cl = cp.getCtClass("jatest.Test");
| CtMethod m = cl.getDeclaredMethod("foo");
|
| m.addLocalVariable("bar", CtClass.longType);
| m.insertAfter("bar;", true);
|
| Object o = cl.toClass().newInstance();
The class 'Test' is as simple as it can get:
public class Test {
| public void foo() {}
| }
|
Running the code delivers a VerifyError which I think it shouldn't:
Exception in thread "main" java.lang.VerifyError: (class: jatest/Test, method: foo signature: ()V) Register pair 1/2 contains wrong type
| at java.lang.Class.getDeclaredConstructors0(Native Method)
| at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
| at java.lang.Class.getConstructor0(Class.java:2699)
| at java.lang.Class.newInstance0(Class.java:326)
| at java.lang.Class.newInstance(Class.java:308)
| at jatest.Main.main(Main.java:27)
Tested with 3.11 and 3.5. Where is my fault?
Thank you,
- Joerg
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254349#4254349
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254349
15 years, 4 months
[Installation, Configuration & Deployment] - JBoss 5.0.0.GA failing to deploy
by azharaltaf
Hi,
I am trying to deploy an EAR file which was working perfectly fine on JBoss 4.0.0.5. I am using Eclipse Galileo to deploy the EAR file and I am getting the following exception.
15:40:44,174 ERROR [AbstractKernelController] Error installing to PostClassLoader: name=vfszip:/C:/jboss-5.0.0.GA/server/all/deploy/icba10.ear state=ClassLoader mode=Manual requiredState=PostClassLoader
| org.jboss.deployers.spi.DeploymentException: Cannot process metadata
| at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
| at org.jboss.deployment.AnnotationMetaDataDeployer.deploy(AnnotationMetaDataDeployer.java:181)
| at org.jboss.deployment.AnnotationMetaDataDeployer.deploy(AnnotationMetaDataDeployer.java:93)
| 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:1210)
| 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:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| 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:545)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
| at org.jboss.Main.boot(Main.java:209)
| at org.jboss.Main$1.run(Main.java:547)
| at java.lang.Thread.run(Unknown Source)
| Caused by: java.lang.IllegalArgumentException: ApplicationException is only valid on an Exception
| at org.jboss.metadata.annotation.creator.ejb.jboss.ApplicationExceptionProcessor.create(ApplicationExceptionProcessor.java:60)
| at org.jboss.metadata.annotation.creator.ejb.jboss.ApplicationExceptionProcessor.process(ApplicationExceptionProcessor.java:71)
| at org.jboss.metadata.annotation.creator.ejb.jboss.ApplicationExceptionProcessor.process(ApplicationExceptionProcessor.java:46)
| at org.jboss.metadata.annotation.creator.AbstractCreator.process(AbstractCreator.java:154)
| at org.jboss.metadata.annotation.creator.AbstractCreator.processMetaData(AbstractCreator.java:87)
| at org.jboss.metadata.annotation.creator.ejb.jboss.JBoss50Creator.create(JBoss50Creator.java:109)
| at org.jboss.deployment.OptAnnotationMetaDataDeployer.processJBossMetaData(OptAnnotationMetaDataDeployer.java:134)
| at org.jboss.deployment.OptAnnotationMetaDataDeployer.processMetaData(OptAnnotationMetaDataDeployer.java:84)
| at org.jboss.deployment.AnnotationMetaDataDeployer.deploy(AnnotationMetaDataDeployer.java:177)
| ... 21 more
I have not copied any Jar files into any location besides the ones that come with the JBoss.5.0.0.GA zip file.
Hope anyone could help me out as this is holding me back.
Thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254341#4254341
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254341
15 years, 4 months
[JBoss Cache Users] - org.jboss.cache.lock.UpgradeException: upgrade lock for /lpr
by ravendra.gupta
Hi All, I am using Jboss cache 'Implementation-Version: 1.4.1.SP9'
I needed simple functionality to store and retrive objects into cache because of memory constraints.
my design is, two threads putting objects on a node concurrently after putting few thousands objects it throws org.jboss.cache.lock.UpgradeException exception
| 08:48:27,987 ERROR [LocalCache] cache put error. Key: [187885DataLoaderThread-27]. Cache: [/lpr/DataLoaderThread-27]
| org.jboss.cache.lock.UpgradeException: failure upgrading lock: fqn=/lpr, caller=Thread[DataLoaderThread-27,5,jboss], lock=read owners=[Thread[DataLoad
| erThread-28,5,jboss]] (activeReaders=1, activeWriter=null, waitingReaders=0, waitingWriters=0, waitingUpgrader=0)
| at org.jboss.cache.Node.acquire(Node.java:517)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.acquireNodeLock(PessimisticLockInterceptor.java:410)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.lock(PessimisticLockInterceptor.java:322)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:189)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:32)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:379)
| at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:174)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:157)
| at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5919)
| at org.jboss.cache.TreeCache.put(TreeCache.java:3858)
| at org.jboss.cache.TreeCache.put(TreeCache.java:3799)
| at sun.reflect.GeneratedMethodAccessor213.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy185.put(Unknown Source)
| at com.logica.heca.lpr.cache.LocalCache.put(LocalCache.java:99)
| at com.logica.heca.lpr.cache.ContactVOCache.put(ContactVOCache.java:45)
| at com.logica.heca.lpr.dataLoader.DataLoaderThread.run(DataLoaderThread.java:169)
| Caused by: org.jboss.cache.lock.UpgradeException: upgrade lock for /lpr could not be acquired after 50000 ms. Lock map ownership Read lock owners: [Th
| read[DataLoaderThread-28,5,jboss]]
| Write lock owner: null
| (caller=Thread[DataLoaderThread-27,5,jboss], lock info: read owners=[] (activeReaders=1, activeWriter=null, waitingReaders=0, waitingWriters=0, waiti
| ngUpgrader=0))
| at org.jboss.cache.lock.IdentityLock.acquireWriteLock(IdentityLock.java:187)
| at org.jboss.cache.Node.acquireWriteLock(Node.java:562)
| at org.jboss.cache.Node.acquire(Node.java:509)
| ... 26 more
| 08:48:27,987 ERROR [DataLoaderThread] What happend? ... we got an unexpected Exception in the worker thread [DataLoaderThread-27]. The thread termina
| tes
| com.logica.heca.lpr.common.exception.FatalException: Could not store object
| at com.logica.heca.lpr.cache.LocalCache.put(LocalCache.java:102)
| at com.logica.heca.lpr.cache.ContactVOCache.put(ContactVOCache.java:45)
| at com.logica.heca.lpr.dataLoader.DataLoaderThread.run(DataLoaderThread.java:169)
| Caused by: org.jboss.cache.lock.UpgradeException: failure upgrading lock: fqn=/lpr, caller=Thread[DataLoaderThread-27,5,jboss], lock=read owners=[Thre
| ad[DataLoaderThread-28,5,jboss]] (activeReaders=1, activeWriter=null, waitingReaders=0, waitingWriters=0, waitingUpgrader=0)
| at org.jboss.cache.Node.acquire(Node.java:517)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.acquireNodeLock(PessimisticLockInterceptor.java:410)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.lock(PessimisticLockInterceptor.java:322)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:189)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:32)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:379)
| at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:174)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:157)
| at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5919)
| at org.jboss.cache.TreeCache.put(TreeCache.java:3858)
| at org.jboss.cache.TreeCache.put(TreeCache.java:3799)
| at sun.reflect.GeneratedMethodAccessor213.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy185.put(Unknown Source)
| at com.logica.heca.lpr.cache.LocalCache.put(LocalCache.java:99)
| ... 2 more
| Caused by: org.jboss.cache.lock.UpgradeException: upgrade lock for /lpr could not be acquired after 50000 ms. Lock map ownership Read lock owners: [Th
| read[DataLoaderThread-28,5,jboss]]
| Write lock owner: null
| (caller=Thread[DataLoaderThread-27,5,jboss], lock info: read owners=[] (activeReaders=1, activeWriter=null, waitingReaders=0, waitingWriters=0, waiti
| ngUpgrader=0))
| at org.jboss.cache.lock.IdentityLock.acquireWriteLock(IdentityLock.java:187)
| at org.jboss.cache.Node.acquireWriteLock(Node.java:562)
| at org.jboss.cache.Node.acquire(Node.java:509)
| ... 26 more
|
|
cache config file :
<mbean code="org.jboss.cache.TreeCache" name="logica_lpr:service=LocalCache">
| <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
| <attribute name="LockParentForChildInsertRemove">true</attribute>
| <attribute name="LockAcquisitionTimeout">50000</attribute>
|
|
| <attribute name="CacheMode">LOCAL</attribute>
| <attribute name="EvictionPolicyClass">org.jboss.cache.eviction.ElementSizePolicy</attribute>
| <!-- Specific eviction policy configurations. This is LRU -->
| <attribute name="EvictionPolicyConfig">
| <config>
| <attribute name="wakeUpIntervalSeconds">1</attribute>
| <!-- Cache wide default -->
| <region name="/_default_">
| <attribute name="maxNodes">2</attribute>
| <attribute name="maxElementsPerNode">15000</attribute>
| </region>
|
| </config>
| </attribute>
| </mbean>
any help from anybody would be highly appreciable
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254336#4254336
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254336
15 years, 4 months