[EJB 3.0] - Exception during passivation : Caused by: java.lang.NoClassD
by ejb3workshop
I am using JBoss 4.0.4 GA with EJB3 RC 8. Most of my statefull session bean throw the following exception during passivation.
There seams to be little or no impact to the application, but still not very nice. Any idea how I can fix this problem. I already tried added jaxen to the lib directory, but it still does not work.
anonymous wrote :
| 16:07:03,561 ERROR [SimpleStatefulCache] problem passivation thread
| javax.ejb.EJBException: Could not passivate; failed to save state
| at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.
| at org.jboss.ejb3.cache.simple.SimpleStatefulCache.passivate(SimpleStatefulCache.java:194)
| at org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTask.run(SimpleStatefulCache.java:129)
| Caused by: java.io.IOException
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:129)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
| at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:287)
| at org.jboss.serial.io.MarshalledObject.(MarshalledObject.java:51)
| at org.jboss.ejb3.stateful.StatefulBeanContext.writeExternal(StatefulBeanContext.java:401)
| at org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:287)
| at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.
| ... 2 more
| Caused by: java.lang.reflect.InvocationTargetException
| at sun.reflect.GeneratedMethodAccessor334.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
| ... 20 more
| Caused by: java.io.IOException
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:129)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.ejb3.stateful.NestedStatefulBeanContext.writeExternal(NestedStatefulBeanContext.java:46)
| at org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:287)
| at java.util.ArrayList.writeObject(ArrayList.java:569)
| ... 24 more
| Caused by: java.lang.reflect.InvocationTargetException
| 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:585)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
| ... 65 more
| Caused by: java.io.IOException
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:129)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:287)
| at EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap.writeObject(ConcurrentReaderHashMap.java:1230)
| ... 70 more
| Caused by: java.lang.reflect.InvocationTargetException
| 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:585)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
| ... 77 more
| Caused by: java.io.IOException
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:129)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:287)
| at EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap.writeObject(ConcurrentReaderHashMap.java:1230)
| ... 82 more
| Caused by: java.lang.reflect.InvocationTargetException
| 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:585)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
| ... 114 more
| Caused by: java.io.IOException
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:129)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:287)
| at EDU.oswego.cs.dl.util.concurrent.CopyOnWriteArrayList.writeObject(CopyOnWriteArrayList.java:772)
| ... 119 more
| Caused by: java.lang.reflect.InvocationTargetException
| at sun.reflect.GeneratedMethodAccessor442.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
| ... 136 more
| Caused by: java.lang.NoClassDefFoundError: org/jaxen/VariableContext
| at java.lang.Class.getDeclaredMethods0(Native Method)
| at java.lang.Class.privateGetDeclaredMethods(Class.java:2365)
| at java.lang.Class.getDeclaredMethod(Class.java:1907)
| at org.jboss.serial.classmetamodel.ClassMetaData.lookupMethodOnHierarchy(ClassMetaData.java:101)
| at org.jboss.serial.classmetamodel.ClassMetaData.lookupInternalMethods(ClassMetaData.java:417)
| at org.jboss.serial.classmetamodel.ClassMetaData.(ClassMetaData.java:121)
| at org.jboss.serial.classmetamodel.ClassMetamodelFactory.getClassMetaData(ClassMetamodelFactory.java:335)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:167)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
| at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.ObjectOutputStreamProxy.writeFields(ObjectOutputStreamProxy.java:79)
| at org.jboss.serial.persister.ObjectOutputStreamProxy.defaultWriteObject(ObjectOutputStreamProxy.java:68)
| at java.util.Vector.writeObject(Vector.java:1018)
| ... 140 more
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977274#3977274
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977274
19 years, 7 months
[Management, JMX/JBoss] - java.lang.NoSuchMethodError while hot deplying SAR
by yantriki
I have the following problem:
When I try to hot deploy the SAR file I get the following exception. However when the jboss is started from the command line and the SAR file already exists, there is no such problem. I am just instantiating a ServiceLocator class which creates a context = new IntialContext() within the constructor of ServiceLocator class (line 721).
Appreciate any insight that you can offer.
vivek
11:02:49,218 INFO [CORViewNotifications] Unbinding JNDI name: queue/CORViewNoti
| fications
| 11:02:49,218 INFO [CORViewNotifications] Unbinding JNDI name: topic/CORViewNoti
| fications
| 11:02:49,218 INFO [CORViewService] Service destroyed
| 11:03:01,171 INFO [CORViewService] Service created
| 11:03:01,171 WARN [ServiceController] Problem creating service corview:service=
| CORViewService
| java.lang.NoSuchMethodError: org.vss.utils.ServiceLocator: method <init>()V not
| found
| at org.vss.mbean.CORViewService.createService(CORViewService.java:721)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBean
| Support.java:260)
| at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:
| 188)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977271#3977271
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977271
19 years, 7 months
[Microcontainer] - What happened to Microcontainer 2.0.0.M1 - a progress report
by adrian@jboss.org
Since the release of 1.0.2 has been a while I wanted to
explain why the 2.0.0 release hasn't happened (yet) and
a bit about what it contains.
2.0.0 adds AOP to the Microcontainer
2.0.0 is finished (has been since about March), the remaining tasks are
1) AOP 2.0 to use the org.jboss.metadata metadata repository rather
than the original org.jboss.repository implementation
2) Complete the org.jboss.metadata implementation.
It is basically done, but the integration hooks like AOP are not there.
3) Some tidyup of parts of the api to remove redundant stuff
that was adding during 2.0.0 development and then replaced
as well as extending some api like ControllerContextAware
to the entire lifecycle not just registration.
4) Productization work - I need to sit down and write some examples
about some of the new features.
(4) is the main reason why there hasn't been a release.
There would be little point producing a release without
explaining some of these new features (a few simple tasters
are at the end of this).
The other reason is that a lot of this work is being done for JBoss5
what we also call the "Microcontainer project" but it actually
has little to do with the basic IOC container beyond using it.
In fact, if you download the current JBoss5 code from trunk,
it uses the Microcontainer instead the JMX MicroKernel
(well actually the JMX MicroKernel still exists as a facade over the Microcontainer).
So basically, the JBoss Microcontainer 2.0.0 schedule has been
incorporated with the JBoss5 schedule.
Betas and release candidates will be alongside the AS releases.
As promised Simple tasters:
1) AOP integration - instance level AOP
You can "annotate" an MC bean such that only for that POJO
instance something special happens. e.g.
make a particular instance a webservice (even though
the original class didn't have the anotations).
| <bean name="Whatever" ...>
| <annotation>@javax.jws.Webservice</annotation>
| etc.
|
2) AOP integration - "aspectized" dependencies
Suppose you wanted to apply transaction demarcation
(REQUIRED, NOT_SUPPORTED, etc.) to some pojos.
This requires an interceptor but the interceptor also
requires a dependency (the transaction manager).
This dependency is an implementation detail that shouldn't
have to be made on every bean.
Instead, the AOP/MC integration automatically works out
the dependency for you. You can simply annotate the bean
which will
1) Introduce the interceptor
2) Add the dependency that the interceptor must be started
which transitively needs some other service (the TM in this case).
e.g. (this is pseudo, i.e. the names are not real)
transaction-demarcation-beans.xml
| <deployment>
|
| <!--
| Deploy the aspect so it is known to the microcontainer
|
| The pointcut just says apply this aspect to any pojo
| with the annotation
| -->
|
| <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
| name="Tx-Demarcated"
| class="org.jboss.tm.DemarcationInterceptor"
| pointcut="execution(* @org.jboss.tm.TxDemarcation->*(..))">
| <property name="transactionManager"><inject bean="TransactionManager"/></property>
| </aop:aspect>
|
| <!-- The transaction manager -->
|
| <bean name="TransationManager class="org.jboss.tm.TxManager"/>
| </deployment>
|
Now it will apply this interceptor to the following class
| @TxDemarcation(Demarcation.REQUIRED)
| public class MyPOJO {}
|
Or if the class didn't have the annotation, you can add it
at deployment
| <bean name="test" class="com.acme.MyPOJO">
| <annotation>@org.jboss.tm.TxDemarcation(org.jboss.tm.Demarcation.REQUIRED)</annotation>
| </bean>
|
Of course a real implementation would probably use the EJB3 annotations
and the jboss-aspects project's interceptors.
NOTE: The bean is guaranteed to start only after the interceptor
is ready and that only when the transaction manager is ready.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977269#3977269
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977269
19 years, 7 months
[Security & JAAS/JBoss] - EJB & java web start application security issue
by michalzel
Hello!
I made java application which performs access to EJB(3.0) remote component. To have classes dynamicly loaded from server I put:
| URL policyResource = Main.class.getResource ("/client.policy");
| System.setProperty("java.security.policy",policyResource.toString ());
| System.setSecurityManager (new RMISecurityManager ());
| Thread.currentThread ().setContextClassLoader (RMIClassLoader.getClassLoader ("http://127.0.0.1:8083/"));
|
I grant all permisions to client and application works fine.
When I run it from a web start I got:
| (some AWT stuff)
| Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers)
| at java.security.AccessControlContext.checkPermission(Unknown Source)
| at java.security.AccessController.checkPermission(Unknown Source)
| at java.lang.SecurityManager.checkPermission(Unknown Source)
| at java.lang.SecurityManager.checkMemberAccess(Unknown Source)
| at java.lang.Class.checkMemberAccess(Unknown Source)
| at java.lang.Class.getDeclaredMethods(Unknown Source)
| at org.jboss.aop.util.MethodHashing.getInterfaceHashes(MethodHashing.java:150)
| at org.jboss.aop.util.MethodHashing.calculateHash(MethodHashing.java:219)
| at org.jboss.ejb3.ProxyUtils.<clinit>(ProxyUtils.java:65)
| ... 44 more
| Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:79)
| at $Proxy0.findData(Unknown Source)
| at fetching.EJBRowSetDataFetcher.refreshData(EJBRowSetDataFetcher.java:63)
|
I signed all jars and put following:
| <security>
| <all-permissions/>
| </security>
|
In jnlp file. What may be the cause?
Sorry if it is wrong forum, but I found it the closest to exception message.
regards
Michal
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977268#3977268
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977268
19 years, 7 months