Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] JMX MBean and class loading issues
[Teneo] JMX MBean and class loading issues [message #619202] Fri, 06 June 2008 17:30
Matthias Treitler is currently offline Matthias TreitlerFriend
Messages: 117
Registered: July 2009
Senior Member
Hello!

I am using EMF for my domain models and use Teneo to store the model
instances to the database. My model has a Jobplan that contains 0 ... n
JobTasks. The code is generated with an EList as you know.

My problem: I am using JMX MBeans. There I have the operation "addTask".
This method shoud add the passed item to this Elist of the jobplan:
So far i have implemented it this way:
I am getting my default (EMF) Resource from my Persistence plugin and
querying with getContents the Jobplan instance. This works so far. But
when I want to access the EList of the Jobplan and then I get the
following exception:

06.06.2008 19:13:06 org.eclipse.emf.teneo.TeneoException <init>
SCHWERWIEGEND: Class not found:
org.eclipse.emf.teneo.hibernate.mapping.elist.HibernatePersi stableEList
java.lang.ClassNotFoundException:
org.eclipse.emf.teneo.hibernate.mapping.elist.HibernatePersi stableEList
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276 )
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.eclipse.emf.teneo.extension.DefaultExtensionManager.getE xtension(DefaultExtensionManager.java:124)
at
org.eclipse.emf.teneo.extension.DefaultExtensionManager.getE xtension(DefaultExtensionManager.java:273)
at
org.eclipse.emf.teneo.hibernate.mapping.property.EListProper tyHandler.createPersistableList(EListPropertyHandler.java:38 8)
at
org.eclipse.emf.teneo.hibernate.mapping.property.EListProper tyHandler.set(EListPropertyHandler.java:337)
at
org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropert yValues(AbstractEntityTuplizer.java:337)
at
org.hibernate.persister.entity.AbstractEntityPersister.setPr opertyValues(AbstractEntityPersister.java:3566)
at
org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseL oad.java:129)
at
org.hibernate.loader.Loader.initializeEntitiesAndCollections (Loader.java:854)
at org.hibernate.loader.Loader.doQuery(Loader.java:729)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyColle ctions(Loader.java:236)
at org.hibernate.loader.Loader.loadCollection(Loader.java:1994)
at
org.hibernate.loader.collection.CollectionLoader.initialize( CollectionLoader.java:36)
at
org.hibernate.persister.collection.AbstractCollectionPersist er.initialize(AbstractCollectionPersister.java:565)
at
org.hibernate.event.def.DefaultInitializeCollectionEventList ener.onInitializeCollection(DefaultInitializeCollectionEvent Listener.java:60)
at
org.eclipse.emf.teneo.hibernate.mapping.EMFInitializeCollect ionEventListener.onInitializeCollection(EMFInitializeCollect ionEventListener.java:61)
at
org.hibernate.impl.SessionImpl.initializeCollection(SessionI mpl.java:1716)
at
org.hibernate.collection.AbstractPersistentCollection.initia lize(AbstractPersistentCollection.java:344)
at
org.hibernate.collection.AbstractPersistentCollection.read(A bstractPersistentCollection.java:86)
at
org.hibernate.collection.PersistentList.toArray(PersistentLi st.java:123)
at
org.eclipse.emf.teneo.hibernate.mapping.elist.HibernatePersi stableEList.doLoad(HibernatePersistableEList.java:138)
at
org.eclipse.emf.teneo.mapping.elist.PersistableEList.load(Pe rsistableEList.java:207)
at
org.eclipse.emf.teneo.mapping.elist.PersistableEList.delegat eSize(PersistableEList.java:443)
at
org.eclipse.emf.common.util.DelegatingEList.size(DelegatingE List.java:224)
at
at.quorum.octopus.executor.jmx.beans.JobplanManager.addJobpl an(JobplanManager.java:276)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenRetur n(ConvertingMethod.java:167)
at
com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIn trospector.java:96)
at
com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIn trospector.java:33)
at
com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntro spector.java:208)
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.jav a:120)
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.jav a:262)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke (DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer .java:761)
at
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RM IConnectionImpl.java:1426)
at
javax.management.remote.rmi.RMIConnectionImpl.access$200(RMI ConnectionImpl.java:72)
at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOper ation.run(RMIConnectionImpl.java:1264)
at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOp eration(RMIConnectionImpl.java:1359)
at
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConn ectionImpl.java:788)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.ja va:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspo rt.java:535)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TC PTransport.java:790)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCP Transport.java:649)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Threa dPoolExecutor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
06.06.2008 19:13:06 org.eclipse.emf.teneo.TeneoException <init>
SCHWERWIEGEND: The field incoming can not be set using object
org.hibernate.collection.PersistentList on target
at.quorum.octopus.model.odm.impl.ScriptJobTaskImpl
org.eclipse.emf.teneo.extension.TeneoExtensionException: Class not found:
org.eclipse.emf.teneo.hibernate.mapping.elist.HibernatePersi stableEList
at
org.eclipse.emf.teneo.extension.DefaultExtensionManager.getE xtension(DefaultExtensionManager.java:147)
at
org.eclipse.emf.teneo.extension.DefaultExtensionManager.getE xtension(DefaultExtensionManager.java:273)
at
org.eclipse.emf.teneo.hibernate.mapping.property.EListProper tyHandler.createPersistableList(EListPropertyHandler.java:38 8)
at
org.eclipse.emf.teneo.hibernate.mapping.property.EListProper tyHandler.set(EListPropertyHandler.java:337)
at
org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropert yValues(AbstractEntityTuplizer.java:337)
at
org.hibernate.persister.entity.AbstractEntityPersister.setPr opertyValues(AbstractEntityPersister.java:3566)
at
org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseL oad.java:129)
at
org.hibernate.loader.Loader.initializeEntitiesAndCollections (Loader.java:854)
at org.hibernate.loader.Loader.doQuery(Loader.java:729)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyColle ctions(Loader.java:236)
at org.hibernate.loader.Loader.loadCollection(Loader.java:1994)
at
org.hibernate.loader.collection.CollectionLoader.initialize( CollectionLoader.java:36)
at
org.hibernate.persister.collection.AbstractCollectionPersist er.initialize(AbstractCollectionPersister.java:565)
at
org.hibernate.event.def.DefaultInitializeCollectionEventList ener.onInitializeCollection(DefaultInitializeCollectionEvent Listener.java:60)
at
org.eclipse.emf.teneo.hibernate.mapping.EMFInitializeCollect ionEventListener.onInitializeCollection(EMFInitializeCollect ionEventListener.java:61)
at
org.hibernate.impl.SessionImpl.initializeCollection(SessionI mpl.java:1716)
at
org.hibernate.collection.AbstractPersistentCollection.initia lize(AbstractPersistentCollection.java:344)
at
org.hibernate.collection.AbstractPersistentCollection.read(A bstractPersistentCollection.java:86)
at
org.hibernate.collection.PersistentList.toArray(PersistentLi st.java:123)
at
org.eclipse.emf.teneo.hibernate.mapping.elist.HibernatePersi stableEList.doLoad(HibernatePersistableEList.java:138)
at
org.eclipse.emf.teneo.mapping.elist.PersistableEList.load(Pe rsistableEList.java:207)
at
org.eclipse.emf.teneo.mapping.elist.PersistableEList.delegat eSize(PersistableEList.java:443)
at
org.eclipse.emf.common.util.DelegatingEList.size(DelegatingE List.java:224)
at
at.quorum.octopus.executor.jmx.beans.JobplanManager.addJobpl an(JobplanManager.java:276)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenRetur n(ConvertingMethod.java:167)
at
com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIn trospector.java:96)
at
com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIn trospector.java:33)
at
com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntro spector.java:208)
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.jav a:120)
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.jav a:262)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke (DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer .java:761)
at
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RM IConnectionImpl.java:1426)
at
javax.management.remote.rmi.RMIConnectionImpl.access$200(RMI ConnectionImpl.java:72)
at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOper ation.run(RMIConnectionImpl.java:1264)
at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOp eration(RMIConnectionImpl.java:1359)
at
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConn ectionImpl.java:788)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.ja va:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspo rt.java:535)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TC PTransport.java:790)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCP Transport.java:649)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Threa dPoolExecutor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException:
org.eclipse.emf.teneo.hibernate.mapping.elist.HibernatePersi stableEList
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276 )
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.eclipse.emf.teneo.extension.DefaultExtensionManager.getE xtension(DefaultExtensionManager.java:124)
... 53 more


Ok, it seems to me that this problem is bounded to OSGi and class loading
issues. But why cannot he load the hibernate EList ?!?
The JMX plug-in depends on my "Persistence" plug-in like all other
plug-ins that need to store things to database. In every other plug-in
this works but not in my JMX plug-in?! Does the JMX code run in a special
"thread"?!?

My Bean is a standard model bean which implements a YXZMBean and extends
from the StandardEmitterMBean. I am using JDK 1.6.

How can I solve my problem?!? Is there any work around?!?

Please help me!!!

Best regards,
Matthias
Previous Topic:CDO internals
Next Topic:EMF Compare & ChangeDescription on Teneo/Database backed EMF objects
Goto Forum:
  


Current Time: Sat Apr 04 12:21:55 GMT 2020

Powered by FUDForum. Page generated in 0.01542 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top