Class not found HibernateProxy

View: New views
15 Messages — Rating Filter:   Alert me  

Class not found HibernateProxy

by chadws :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am getting closer. I have my EJB bundle starting, but when it starts  
the entity manager I get the following exception:

3/31/09 1:04:57 PM (I) SessionFactoryImpl.<init> : building session  
factory
net.sf.cglib.core.CodeGenerationException:  
java.lang.reflect.InvocationTargetException-->null
        at  
net
sf
cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:
237)
        at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
        at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
        at  
org
hibernate
proxy
pojo
cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:
127)
        at  
org
hibernate
proxy
pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
        at  
org
hibernate
tuple
entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:
162)
        at  
org
hibernate
tuple
entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
        at  
org
hibernate
tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
        at  
org
hibernate
tuple
entity
EntityEntityModeToTuplizerMapping
<init>(EntityEntityModeToTuplizerMapping.java:56)
        at  
org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:
302)
        at  
org
hibernate
persister
entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
        at  
org
hibernate
persister
entity
SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
        at  
org
hibernate
persister.PersisterFactory.createClassPersister(PersisterFactory.java:
55)
        at  
org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:
226)
        at  
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:
1300)
        at  
org
hibernate
cfg
AnnotationConfiguration
buildSessionFactory(AnnotationConfiguration.java:915)
        at  
org
hibernate
ejb
Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
        at  
org
hibernate
ejb
HibernatePersistence
createContainerEntityManagerFactory(HibernatePersistence.java:127)
        at  
org
ow2
easybeans
persistence.JPersistenceContext.init(JPersistenceContext.java:72)
        at  
org
ow2
easybeans
persistence.JPersistenceContext.<init>(JPersistenceContext.java:65)
        at  
org
ow2
easybeans
persistence
PersistenceUnitManager
addExtraPersistenceUnitInfos(PersistenceUnitManager.java:88)
        at  
org
ow2
easybeans
persistence.PersistenceUnitManager.<init>(PersistenceUnitManager.java:
64)
        at  
org
ow2
easybeans
persistence
xml
PersistenceXmlFileAnalyzer
analyzePersistenceXmlFile(PersistenceXmlFileAnalyzer.java:143)
        at org.ow2.easybeans.container.JContainer3.start(JContainer3.java:321)
        at  
org.ow2.easybeans.osgi.ejbjar.Activator.startContainer(Activator.java:
147)
        at org.ow2.easybeans.osgi.ejbjar.Activator.start(Activator.java:101)
        at  
net
topekapublicschools
profile.osgi.Activator.startEJBContainer(Activator.java:59)
        at net.topekapublicschools.profile.osgi.Activator
$EasybeansServiceTrackerCustomizer.addingService(Activator.java:117)
        at org.osgi.util.tracker.ServiceTracker
$Tracked.trackAdding(ServiceTracker.java:1030)
        at org.osgi.util.tracker.ServiceTracker
$Tracked.track(ServiceTracker.java:1008)
        at org.osgi.util.tracker.ServiceTracker
$Tracked.serviceChanged(ServiceTracker.java:941)
        at  
org
apache
felix
framework
util
EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:820)
        at  
org
apache
felix
framework
util.EventDispatcher.fireEventImmediately(EventDispatcher.java:678)
        at  
org
apache
felix
framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:
609)
        at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3640)
        at org.apache.felix.framework.Felix.access$200(Felix.java:38)
        at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:841)
        at  
org
apache
felix
framework.ServiceRegistry.fireServiceChanged(ServiceRegistry.java:568)
        at  
org
apache
felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:
81)
        at org.apache.felix.framework.Felix.registerService(Felix.java:2773)
        at  
org
apache
felix
framework.BundleContextImpl.registerService(BundleContextImpl.java:252)
        at  
org
apache
felix
scr
impl
AbstractComponentManager
registerComponentService(AbstractComponentManager.java:698)
        at  
org
apache
felix
scr
impl
AbstractComponentManager
activateInternal(AbstractComponentManager.java:506)
        at org.apache.felix.scr.impl.AbstractComponentManager.access
$100(AbstractComponentManager.java:36)
        at org.apache.felix.scr.impl.AbstractComponentManager
$2.run(AbstractComponentManager.java:142)
        at  
org
apache
felix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:85)
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 net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
        at  
net
sf
cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:
219)
        ... 45 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/proxy/
HibernateProxy
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
        ... 51 more
INFO - 1:04:57 PM [S:  
org.ow2.easybeans.component.joram.joramcomponent] - ServiceEvent  
REGISTERED.


Does anyone know why I would get the "Caused by:  
java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy"  
and how I would resolve it?

Thanks,
-- Chad
THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.

Re: Class not found HibernateProxy

by Guillaume Sauthier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As you can see here:
http://fisheye.easybeans.org/browse/EasyBeans/trunk/easybeans-osgi/core.bundle/pom.xml?r=4874#l212

All hibernate classes are exported by the core module.

Can you check that ?
$> packages <core-module-id>

you should see org.hibernate.proxy

Do you use the latest easybeans' version ?
--G

Skinner Chad a écrit :

> I am getting closer. I have my EJB bundle starting, but when it starts
> the entity manager I get the following exception:
>
> 3/31/09 1:04:57 PM (I) SessionFactoryImpl.<init> : building session
> factory
> net.sf.cglib.core.CodeGenerationException:
> java.lang.reflect.InvocationTargetException-->null
>     at
> netsfcglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
>
>     at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
>     at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
>     at
> orghibernateproxypojocglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:127)
>
>     at
> orghibernateproxypojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
>
>     at
> orghibernatetupleentity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
>
>     at
> orghibernatetupleentity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
>
>     at
> orghibernatetuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
>
>     at
> orghibernatetupleentityEntityEntityModeToTuplizerMapping<init>(EntityEntityModeToTuplizerMapping.java:56)
>
>     at
> org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:302)
>
>     at
> orghibernatepersisterentity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
>
>     at
> orghibernatepersisterentitySingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
>
>     at
> orghibernatepersister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
>
>     at
> org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
>     at
> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
>
>     at
> orghibernatecfgAnnotationConfigurationbuildSessionFactory(AnnotationConfiguration.java:915)
>
>     at
> orghibernateejbEjb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
>
>     at
> orghibernateejbHibernatePersistencecreateContainerEntityManagerFactory(HibernatePersistence.java:127)
>
>     at
> orgow2easybeanspersistence.JPersistenceContext.init(JPersistenceContext.java:72)
>
>     at
> orgow2easybeanspersistence.JPersistenceContext.<init>(JPersistenceContext.java:65)
>
>     at
> orgow2easybeanspersistencePersistenceUnitManageraddExtraPersistenceUnitInfos(PersistenceUnitManager.java:88)
>
>     at
> orgow2easybeanspersistence.PersistenceUnitManager.<init>(PersistenceUnitManager.java:64)
>
>     at
> orgow2easybeanspersistencexmlPersistenceXmlFileAnalyzeranalyzePersistenceXmlFile(PersistenceXmlFileAnalyzer.java:143)
>
>     at
> org.ow2.easybeans.container.JContainer3.start(JContainer3.java:321)
>     at
> org.ow2.easybeans.osgi.ejbjar.Activator.startContainer(Activator.java:147)
>
>     at org.ow2.easybeans.osgi.ejbjar.Activator.start(Activator.java:101)
>     at
> nettopekapublicschoolsprofile.osgi.Activator.startEJBContainer(Activator.java:59)
>
>     at
> net.topekapublicschools.profile.osgi.Activator$EasybeansServiceTrackerCustomizer.addingService(Activator.java:117)
>
>     at
> org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.java:1030)
>
>     at
> org.osgi.util.tracker.ServiceTracker$Tracked.track(ServiceTracker.java:1008)
>
>     at
> org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:941)
>
>     at
> orgapachefelixframeworkutilEventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:820)
>
>     at
> orgapachefelixframeworkutil.EventDispatcher.fireEventImmediately(EventDispatcher.java:678)
>
>     at
> orgapachefelixframework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:609)
>
>     at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3640)
>     at org.apache.felix.framework.Felix.access$200(Felix.java:38)
>     at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:841)
>     at
> orgapachefelixframework.ServiceRegistry.fireServiceChanged(ServiceRegistry.java:568)
>
>     at
> orgapachefelix.framework.ServiceRegistry.registerService(ServiceRegistry.java:81)
>
>     at org.apache.felix.framework.Felix.registerService(Felix.java:2773)
>     at
> orgapachefelixframework.BundleContextImpl.registerService(BundleContextImpl.java:252)
>
>     at
> orgapachefelixscrimplAbstractComponentManagerregisterComponentService(AbstractComponentManager.java:698)
>
>     at
> orgapachefelixscrimplAbstractComponentManageractivateInternal(AbstractComponentManager.java:506)
>
>     at
> org.apache.felix.scr.impl.AbstractComponentManager.access$100(AbstractComponentManager.java:36)
>
>     at
> org.apache.felix.scr.impl.AbstractComponentManager$2.run(AbstractComponentManager.java:142)
>
>     at
> orgapachefelix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:85)
>
> Caused by: java.lang.reflect.InvocationTargetException
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sunreflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
>     at
> sunreflectDelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
>     at
> netsfcglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
>
>     ... 45 more
> Caused by: java.lang.NoClassDefFoundError:
> org/hibernate/proxy/HibernateProxy
>     at java.lang.ClassLoader.defineClass1(Native Method)
>     at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
>     ... 51 more
> INFO - 1:04:57 PM [S:
> org.ow2.easybeans.component.joram.joramcomponent] - ServiceEvent
> REGISTERED.
>
>
> Does anyone know why I would get the "Caused by:
> java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy"
> and how I would resolve it?
>
> Thanks,
> -- Chad
> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA,
> KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION
> CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY
> BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY
> REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING,
> PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL
> MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>
>

[Guillaume_Sauthier.vcf]

begin:vcard
fn:Guillaume Sauthier
n:Sauthier;Guillaume
org:<a href="http://www.ow2.org"><img title="OW2" alt="OW2 Consortium" border="0" src="http://www.ow2.org/xwiki/bin/skin/XWiki/DefaultSkin/logoOW2.png" /></a>
adr:;;;;;;France
email;internet:guillaume.sauthier@...
title:<a href="http://jonas.ow2.org">JOnAS Application Server</a>
x-mozilla-html:TRUE
url:http://jonas.ow2.org
version:2.1
end:vcard



Re: Re: Class not found HibernateProxy

by chadws :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am using the lastest stable release from the website: 1.0.2.

Yes, I do see that package exported, but am not certain what I am  
doing wrong. I have two bundles that I am deploying an entity project  
that contains all of my business model classes and JPA entities. The  
second bundle is the EJB bundle that contains the persistence.xml  
file. I believe that I have the EJB container loading, but when the  
entity manager starts it appears to fail with the Class not found  
error below... any ideas what I can check or does what I am doing seem  
wrong?

Thanks,
-- Chad


On Apr 1, 2009, at 4:30 AM, Guillaume Sauthier wrote:

> As you can see here:
> http://fisheye.easybeans.org/browse/EasyBeans/trunk/easybeans-osgi/corebundle/pom.xml?r=4874#l212
>
> All hibernate classes are exported by the core module.
>
> Can you check that ?
> $> packages <core-module-id>
>
> you should see org.hibernate.proxy
>
> Do you use the latest easybeans' version ?
> --G
>
> Skinner Chad a écrit :
>> I am getting closer. I have my EJB bundle starting, but when it  
>> starts the entity manager I get the following exception:
>>
>> 3/31/09 1:04:57 PM (I) SessionFactoryImpl.<init> : building session  
>> factory
>> net.sf.cglib.core.CodeGenerationException:  
>> java.lang.reflect.InvocationTargetException-->null
>>    at  
>> netsfcglib
>> .core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
>>    at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
>>    at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
>>    at  
>> orghibernateproxypojocglib
>> .CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:127)
>>    at  
>> orghibernateproxypojo
>> .cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
>>    at  
>> orghibernatetupleentity
>> .PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
>>    at  
>> orghibernatetupleentity
>> .AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
>>    at  
>> orghibernatetuple
>> .entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
>>    at  
>> orghibernatetupleentityEntityEntityModeToTuplizerMapping
>> <init>(EntityEntityModeToTuplizerMapping.java:56)
>>    at  
>> org
>> .hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:
>> 302)
>>    at  
>> orghibernatepersisterentity
>> .AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
>>    at  
>> orghibernatepersisterentitySingleTableEntityPersister
>> .<init>(SingleTableEntityPersister.java:109)
>>    at  
>> orghibernatepersister
>> .PersisterFactory.createClassPersister(PersisterFactory.java:55)
>>    at  
>> org
>> .hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:
>> 226)
>>    at  
>> org
>> .hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:
>> 1300)
>>    at  
>> orghibernatecfgAnnotationConfigurationbuildSessionFactory
>> (AnnotationConfiguration.java:915)
>>    at  
>> orghibernateejbEjb3Configuration
>> .buildEntityManagerFactory(Ejb3Configuration.java:730)
>>    at  
>> orghibernateejbHibernatePersistencecreateContainerEntityManagerFactory
>> (HibernatePersistence.java:127)
>>    at  
>> orgow2easybeanspersistence
>> .JPersistenceContext.init(JPersistenceContext.java:72)
>>    at  
>> orgow2easybeanspersistence
>> .JPersistenceContext.<init>(JPersistenceContext.java:65)
>>    at  
>> orgow2easybeanspersistencePersistenceUnitManageraddExtraPersistenceUnitInfos
>> (PersistenceUnitManager.java:88)
>>    at  
>> orgow2easybeanspersistence
>> .PersistenceUnitManager.<init>(PersistenceUnitManager.java:64)
>>    at  
>> orgow2easybeanspersistencexmlPersistenceXmlFileAnalyzeranalyzePersistenceXmlFile
>> (PersistenceXmlFileAnalyzer.java:143)
>>    at  
>> org.ow2.easybeans.container.JContainer3.start(JContainer3.java:321)
>>    at  
>> org
>> .ow2.easybeans.osgi.ejbjar.Activator.startContainer(Activator.java:
>> 147)
>>    at org.ow2.easybeans.osgi.ejbjar.Activator.start(Activator.java:
>> 101)
>>    at  
>> nettopekapublicschoolsprofile
>> .osgi.Activator.startEJBContainer(Activator.java:59)
>>    at net.topekapublicschools.profile.osgi.Activator
>> $EasybeansServiceTrackerCustomizer.addingService(Activator.java:117)
>>    at org.osgi.util.tracker.ServiceTracker
>> $Tracked.trackAdding(ServiceTracker.java:1030)
>>    at org.osgi.util.tracker.ServiceTracker
>> $Tracked.track(ServiceTracker.java:1008)
>>    at org.osgi.util.tracker.ServiceTracker
>> $Tracked.serviceChanged(ServiceTracker.java:941)
>>    at  
>> orgapachefelixframeworkutilEventDispatcher
>> .invokeServiceListenerCallback(EventDispatcher.java:820)
>>    at  
>> orgapachefelixframeworkutil
>> .EventDispatcher.fireEventImmediately(EventDispatcher.java:678)
>>    at  
>> orgapachefelixframework
>> .util.EventDispatcher.fireServiceEvent(EventDispatcher.java:609)
>>    at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:
>> 3640)
>>    at org.apache.felix.framework.Felix.access$200(Felix.java:38)
>>    at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:  
>> 841)
>>    at  
>> orgapachefelixframework
>> .ServiceRegistry.fireServiceChanged(ServiceRegistry.java:568)
>>    at  
>> orgapachefelix
>> .framework.ServiceRegistry.registerService(ServiceRegistry.java:81)
>>    at org.apache.felix.framework.Felix.registerService(Felix.java:
>> 2773)
>>    at  
>> orgapachefelixframework
>> .BundleContextImpl.registerService(BundleContextImpl.java:252)
>>    at  
>> orgapachefelixscrimplAbstractComponentManagerregisterComponentService  
>> (AbstractComponentManager.java:698)
>>    at  
>> orgapachefelixscrimplAbstractComponentManageractivateInternal
>> (AbstractComponentManager.java:506)
>>    at org.apache.felix.scr.impl.AbstractComponentManager.access
>> $100(AbstractComponentManager.java:36)
>>    at org.apache.felix.scr.impl.AbstractComponentManager
>> $2.run(AbstractComponentManager.java:142)
>>    at  
>> orgapachefelix
>> .scr.impl.ComponentActorThread.run(ComponentActorThread.java:85)
>> Caused by: java.lang.reflect.InvocationTargetException
>>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>    at  
>> sunreflect
>> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>    at  
>> sunreflectDelegatingMethodAccessorImpl
>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>    at java.lang.reflect.Method.invoke(Method.java:585)
>>    at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:
>> 384)
>>    at  
>> netsfcglib
>> .core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
>>    ... 45 more
>> Caused by: java.lang.NoClassDefFoundError: org/hibernate/proxy/
>> HibernateProxy
>>    at java.lang.ClassLoader.defineClass1(Native Method)
>>    at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
>>    ... 51 more
>> INFO - 1:04:57 PM [S:  
>> org.ow2.easybeans.component.joram.joramcomponent] - ServiceEvent  
>> REGISTERED.
>>
>>
>> Does anyone know why I would get the "Caused by:  
>> java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy"  
>> and how I would resolve it?
>>
>> Thanks,
>> -- Chad
>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN  
>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE  
>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL  
>> HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING  
>> US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  
>> UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING  
>> THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND  
>> MAY BE UNLAWFUL.
>>
>>
>
> <Guillaume_Sauthier.vcf>

THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.

Re: Re: Re: Class not found HibernateProxy

by Guillaume Sauthier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hmm it seems we'll have to update the web site :)
try with the latest release : 1.1.0 RC1, it is as stable as the older one...

Can you elaborate more on your packaging ?
What files exactly do you have in yuor 2 bundles ?
And what looks like the MANIFESTs ?

BTW, i remember that ekke had some issues with EJB / JPA separations in
different bundles. don't remember exactly what ...
--G

Skinner Chad a écrit :

> I am using the lastest stable release from the website: 1.0.2.
>
> Yes, I do see that package exported, but am not certain what I am
> doing wrong. I have two bundles that I am deploying an entity project
> that contains all of my business model classes and JPA entities. The
> second bundle is the EJB bundle that contains the persistence.xml
> file. I believe that I have the EJB container loading, but when the
> entity manager starts it appears to fail with the Class not found
> error below... any ideas what I can check or does what I am doing seem
> wrong?
>
> Thanks,
> -- Chad
>
>
> On Apr 1, 2009, at 4:30 AM, Guillaume Sauthier wrote:
>
>> As you can see here:
>> http://fisheye.easybeans.org/browse/EasyBeans/trunk/easybeans-osgi/corebundle/pom.xml?r=4874#l212 
>>
>>
>> All hibernate classes are exported by the core module.
>>
>> Can you check that ?
>> $> packages <core-module-id>
>>
>> you should see org.hibernate.proxy
>>
>> Do you use the latest easybeans' version ?
>> --G
>>
>> Skinner Chad a écrit :
>>> I am getting closer. I have my EJB bundle starting, but when it
>>> starts the entity manager I get the following exception:
>>>
>>> 3/31/09 1:04:57 PM (I) SessionFactoryImpl.<init> : building session
>>> factory
>>> net.sf.cglib.core.CodeGenerationException:
>>> java.lang.reflect.InvocationTargetException-->null
>>>    at
>>> netsfcglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
>>>
>>>    at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
>>>    at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
>>>    at
>>> orghibernateproxypojocglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:127)
>>>
>>>    at
>>> orghibernateproxypojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
>>>
>>>    at
>>> orghibernatetupleentity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
>>>
>>>    at
>>> orghibernatetupleentity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
>>>
>>>    at
>>> orghibernatetuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
>>>
>>>    at
>>> orghibernatetupleentityEntityEntityModeToTuplizerMapping<init>(EntityEntityModeToTuplizerMapping.java:56)
>>>
>>>    at
>>> org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:302)
>>>
>>>    at
>>> orghibernatepersisterentity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
>>>
>>>    at
>>> orghibernatepersisterentitySingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
>>>
>>>    at
>>> orghibernatepersister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
>>>
>>>    at
>>> org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
>>>
>>>    at
>>> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
>>>
>>>    at
>>> orghibernatecfgAnnotationConfigurationbuildSessionFactory(AnnotationConfiguration.java:915)
>>>
>>>    at
>>> orghibernateejbEjb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
>>>
>>>    at
>>> orghibernateejbHibernatePersistencecreateContainerEntityManagerFactory(HibernatePersistence.java:127)
>>>
>>>    at
>>> orgow2easybeanspersistence.JPersistenceContext.init(JPersistenceContext.java:72)
>>>
>>>    at
>>> orgow2easybeanspersistence.JPersistenceContext.<init>(JPersistenceContext.java:65)
>>>
>>>    at
>>> orgow2easybeanspersistencePersistenceUnitManageraddExtraPersistenceUnitInfos(PersistenceUnitManager.java:88)
>>>
>>>    at
>>> orgow2easybeanspersistence.PersistenceUnitManager.<init>(PersistenceUnitManager.java:64)
>>>
>>>    at
>>> orgow2easybeanspersistencexmlPersistenceXmlFileAnalyzeranalyzePersistenceXmlFile(PersistenceXmlFileAnalyzer.java:143)
>>>
>>>    at
>>> org.ow2.easybeans.container.JContainer3.start(JContainer3.java:321)
>>>    at
>>> org.ow2.easybeans.osgi.ejbjar.Activator.startContainer(Activator.java:147)
>>>
>>>    at org.ow2.easybeans.osgi.ejbjar.Activator.start(Activator.java:101)
>>>    at
>>> nettopekapublicschoolsprofile.osgi.Activator.startEJBContainer(Activator.java:59)
>>>
>>>    at
>>> net.topekapublicschools.profile.osgi.Activator$EasybeansServiceTrackerCustomizer.addingService(Activator.java:117)
>>>
>>>    at
>>> org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.java:1030)
>>>
>>>    at
>>> org.osgi.util.tracker.ServiceTracker$Tracked.track(ServiceTracker.java:1008)
>>>
>>>    at
>>> org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:941)
>>>
>>>    at
>>> orgapachefelixframeworkutilEventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:820)
>>>
>>>    at
>>> orgapachefelixframeworkutil.EventDispatcher.fireEventImmediately(EventDispatcher.java:678)
>>>
>>>    at
>>> orgapachefelixframework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:609)
>>>
>>>    at
>>> org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3640)
>>>    at org.apache.felix.framework.Felix.access$200(Felix.java:38)
>>>    at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:
>>> ==20
>>> 841)
>>>    at
>>> orgapachefelixframework.ServiceRegistry.fireServiceChanged(ServiceRegistry.java:568)
>>>
>>>    at
>>> orgapachefelix.framework.ServiceRegistry.registerService(ServiceRegistry.java:81)
>>>
>>>    at org.apache.felix.framework.Felix.registerService(Felix.java:2773)
>>>    at
>>> orgapachefelixframework.BundleContextImpl.registerService(BundleContextImpl.java:252)
>>>
>>>    at
>>> orgapachefelixscrimplAbstractComponentManagerregisterComponentService
>>> ==0
>>> (AbstractComponentManager.java:698)
>>>    at
>>> orgapachefelixscrimplAbstractComponentManageractivateInternal(AbstractComponentManager.java:506)
>>>
>>>    at
>>> org.apache.felix.scr.impl.AbstractComponentManager.access$100(AbstractComponentManager.java:36)
>>>
>>>    at
>>> org.apache.felix.scr.impl.AbstractComponentManager$2.run(AbstractComponentManager.java:142)
>>>
>>>    at
>>> orgapachefelix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:85)
>>>
>>> Caused by: java.lang.reflect.InvocationTargetException
>>>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>    at
>>> sunreflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>
>>>    at
>>> sunreflectDelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>
>>>    at java.lang.reflect.Method.invoke(Method.java:585)
>>>    at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
>>>    at
>>> netsfcglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
>>>
>>>    ... 45 more
>>> Caused by: java.lang.NoClassDefFoundError:
>>> org/hibernate/proxy/HibernateProxy
>>>    at java.lang.ClassLoader.defineClass1(Native Method)
>>>    at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
>>>    ... 51 more
>>> INFO - 1:04:57 PM [S:
>>> org.ow2.easybeans.component.joram.joramcomponent] - ServiceEvent
>>> REGISTERED.
>>>
>>>
>>> Does anyone know why I would get the "Caused by:
>>> java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy"
>>> and how I would resolve it?
>>>
>>> Thanks,
>>> -- Chad
>>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN
>>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE
>>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS
>>> MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF
>>> THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED
>>> FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION
>>> IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>>>
>>>
>>
>> <Guillaume_Sauthier.vcf>
>
> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA,
> KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION
> CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY
> BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY
> REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING,
> PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL
> MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>
>

[Guillaume_Sauthier.vcf]

begin:vcard
fn:Guillaume Sauthier
n:Sauthier;Guillaume
org:<a href="http://www.ow2.org"><img title="OW2" alt="OW2 Consortium" border="0" src="http://www.ow2.org/xwiki/bin/skin/XWiki/DefaultSkin/logoOW2.png" /></a>
adr:;;;;;;France
email;internet:guillaume.sauthier@...
title:<a href="http://jonas.ow2.org">JOnAS Application Server</a>
x-mozilla-html:TRUE
url:http://jonas.ow2.org
version:2.1
end:vcard



Re: Re: Re: Re: Class not found HibernateProxy

by chadws :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I don't know how you prefer to get the bundle contents, but here are the Manifest files and a tree layout of the bundle contents.


profile.model-0.0.1-SNAPSHOT.jar

-- MANIFEST.MF --

Manifest-Version: 1.0
Built-By: cskinne1
Created-By: Apache Maven Bundle Plugin
Bundle-Activator: net.topekapublicschools.profile.osgi.Activator
Import-Package: javax.ejb,javax.persistence,net.topekapublicschools.pr
 ofile.api,net.topekapublicschools.profile.entity,net.topekapublicscho
 ols.profile.service,net.topekapublicschools.profile.service.model,org
 .osgi.framework;version="1.3"
Bnd-LastModified: 1238522453671
Export-Package: net.topekapublicschoolsprofile.entity;uses:="javax.pe
 rsistence",net.topekapublicschools.profile.service,net.topekapublicsc
 hools.profile.service.model,net.topekapublicschools.profile.api;uses:
 ="javax.ejb,net.topekapublicschools.profile.entity"
Bundle-Version: 0.0.1.SNAPSHOT
Bundle-Name: Profile - Business Model
Bundle-Description: This OSGi bundle provides the entity bean implemen
 tations and the local and remote interfaces required for the Profile 
 operations.
Build-Jdk: 1.5.0_16
Private-Package: net.topekapublicschools.profile.osgi
Bundle-ManifestVersion: 2
Bundle-Vendor: Topeka Public Schools, USD 501
Bundle-SymbolicName: net.topekapublicschools.profile.model
Tool: Bnd-0.0.311

-- BUNDLE CONTENTS --

 +-profile.model-0.0.1-SNAPSHOT/
   +-net/
   | +-topekapublicschools/
   |   +-profile/
   |     +-entity/
   |     | +-Profile.class
   |     | +-Location.class
   |     | +-Location$LocationType.class
   |     | +-Job.class
   |     | +-AdminModuleComparator.class
   |     |
   |     +-api/
   |     | +-ProfileSynchronizerLocal.class
   |     | +-ProfileManagerLocal.class
   |     | +-LocationManagerLocal.class
   |     | +-JobManagerLocal.class
   |     |
   |     +-service/
   |       +-model/
   |       +-ProfileMenuProviderService.class
   |       +-AdministrationMenuProviderService.class
   |      
   +-META-INF/
     +-maven/
     | +-net.topekapublicschools/
     |   +-profile.model/
     |     +-pom.xml
     |     +-pom.properties
     |    
     +-MANIFEST.MF 


profile.ejb-0.0.1-SNAPSHOT.jar

-- MANIFEST.MF --

Manifest-Version: 1.0
Built-By: cskinne1
Bundle-Activator: net.topekapublicschools.profile.osgi.Activator
Created-By: Apache Maven Bundle Plugin
Import-Package: javax.annotation,javax.annotationsecurity,javax.ejb,j
 avax.persistence,javax.sql,net.topekapublicschools.common.utils,net.t
 opekapublicschools.profile.api,net.topekapublicschools.profile.ejb,ne
 t.topekapublicschools.profile.entity,net.topekapublicschools.profile.
 service,net.topekapublicschools.profile.service.model,org.osgi.framew
 ork;version="1.3",org.osgi.util.tracker;version="1.3",org.ow2.easybea
 ns.osgi.ejbjar
Bnd-LastModified: 1238522454318
Export-Package: net.topekapublicschools.profile.ejb;uses:="javax.ejb,n
 et.topekapublicschools.profile.entity,javax.persistence,net.topekapub
 licschools.profile.api,javax.annotation,javax.annotation.security,jav
 ax.sql,net.topekapublicschools.common.utils",net.topekapublicschools.
 profile.entity;uses:="javax.persistence",net.topekapublicschools.prof
 ile.service,net.topekapublicschools.profile.service.model,net.topekap
 ublicschools.profile.api;uses:="javax.ejb,net.topekapublicschools.pro
 file.entity"
Bundle-Version: 00.1.SNAPSHOT
Bundle-Name: Profile - EJB
Bundle-Description: This OSGi bundle contains the EJB3 implementation 
 classes for the local and remote interfaces in the Profile Business M
 odel.
Build-Jdk: 1.5.0_16
Private-Package: net.topekapublicschools.profile.osgi
Bundle-ManifestVersion: 2
Bundle-Vendor: Topeka Public Schools, USD 501
Bundle-SymbolicName: net.topekapublicschools.profile.ejb
Tool: Bnd-0.0.311

-- BUNDLE CONTENTS --

 +-profile.ejb-0.0.1-SNAPSHOT/
   +-net/
   | +-topekapublicschools/
   |   +-profile/
   |     +-entity/
   |     | +-Profile.class
   |     | +-Locationclass
   |     | +-Location$LocationType.class
   |     | +-Job.class
   |     | +-AdminModuleComparator.class
   |     |
   |     +-ejb/
   |     | +-ProfileSynchronizer.class
   |     | +-ProfileManager.class
   |     | +-LocationManager.class
   |     | +-JobManager.class
   |     |
   |     +-api/
   |     | +-ProfileSynchronizerLocal.class
   |     | +-ProfileManagerLocal.class
   |     | +-LocationManagerLocal.class
   |     | +-JobManagerLocal.class
   |     |
   |     +-service/
   |     | +-model/
   |     | +-ProfileMenuProviderService.class
   |     | +-AdministrationMenuProviderService.class
   |     |
   |     +-osgi/
   |       +-Activator$EasybeansServiceTrackerCustomizer.class
   |       +-Activator.class
   |      
   +-META-INF/
     +-maven/
     | +-net.topekapublicschools/
     |   +-profile.ejb/
     |     +-pom.xml
     |     +-pom.properties
     |    
     +-persistence.xml
     +-ejb-jar.xml
     +-MANIFEST.MF

On Apr 1, 2009, at 8:23 AM, Guillaume Sauthier wrote:

Hmm it seems we'll have to update the web site :)
try with the latest release : 1.1.0 RC1, it is as stable as the older one...

Can you elaborate more on your packaging ?
What files exactly do you have in yuor 2 bundles ?
And what looks like the MANIFESTs ?

BTW, i remember that ekke had some issues with EJB / JPA separations in different bundles. don't remember exactly what ...
--G

Skinner Chad a écrit :
I am using the lastest stable release from the website: 1.0.2.

Yes, I do see that package exported, but am not certain what I am doing wrong. I have two bundles that I am deploying an entity project that contains all of my business model classes and JPA entities. The second bundle is the EJB bundle that contains the persistence.xml file. I believe that I have the EJB container loading, but when the entity manager starts it appears to fail with the Class not found error below... any ideas what I can check or does what I am doing seem wrong?

Thanks,
-- Chad


On Apr 1, 2009, at 4:30 AM, Guillaume Sauthier wrote:

As you can see here:
http://fisheye.easybeans.org/browse/EasyBeans/trunk/easybeans-osgi/corebundle/pom.xml?r=4874#l212

All hibernate classes are exported by the core module.

Can you check that ?
$> packages <core-module-id>

you should see org.hibernate.proxy

Do you use the latest easybeans' version ?
--G

Skinner Chad a écrit :
I am getting closer. I have my EJB bundle starting, but when it starts the entity manager I get the following exception:

3/31/09 1:04:57 PM (I) SessionFactoryImpl.<init> : building session factory
net.sf.cglibcore.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
  at netsfcglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
  at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
  at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
  at orghibernateproxypojocglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:127)
  at orghibernateproxypojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
  at orghibernatetupleentity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
  at orghibernatetupleentity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
  at orghibernatetuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
  at orghibernatetupleentityEntityEntityModeToTuplizerMapping<init>(EntityEntityModeToTuplizerMapping.java:56)
  at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:302)
  at orghibernatepersisterentity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
  at orghibernatepersisterentitySingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
  at orghibernatepersister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
  at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
  at orghibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
  at orghibernatecfgAnnotationConfigurationbuildSessionFactory(AnnotationConfiguration.java:915)
  at orghibernateejbEjb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
  at orghibernateejbHibernatePersistencecreateContainerEntityManagerFactory(HibernatePersistence.java:127)
  at orgow2easybeanspersistence.JPersistenceContext.init(JPersistenceContext.java:72)
  at orgow2easybeanspersistence.JPersistenceContext.<init>(JPersistenceContext.java:65)
  at orgow2easybeanspersistencePersistenceUnitManageraddExtraPersistenceUnitInfos(PersistenceUnitManager.java:88)
  at orgow2easybeanspersistence.PersistenceUnitManager.<init>(PersistenceUnitManager.java:64)
  at orgow2easybeanspersistencexmlPersistenceXmlFileAnalyzeranalyzePersistenceXmlFile(PersistenceXmlFileAnalyzer.java:143)
  at org.ow2.easybeans.container.JContainer3.start(JContainer3.java:321)
  at org.ow2.easybeans.osgi.ejbjar.Activator.startContainer(Activator.java:147)
  at org.ow2.easybeans.osgi.ejbjar.Activator.start(Activator.java:101)
  at nettopekapublicschoolsprofile.osgi.Activator.startEJBContainer(Activator.java:59)
  at net.topekapublicschools.profile.osgi.Activator$EasybeansServiceTrackerCustomizer.addingService(Activator.java:117)
  at org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.java:1030)
  at org.osgi.util.tracker.ServiceTracker$Tracked.track(ServiceTracker.java:1008)
  at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:941)
  at orgapachefelixframeworkutilEventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:820)
  at orgapachefelixframeworkutil.EventDispatcher.fireEventImmediately(EventDispatcher.java:678)
  at orgapachefelixframework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:609)
  at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3640)
  at org.apache.felix.framework.Felix.access$200(Felix.java:38)
  at org.apachefelix.framework.Felix$2.serviceChanged(Felix.java: ==20
841)
  at orgapachefelixframework.ServiceRegistry.fireServiceChanged(ServiceRegistry.java:568)
  at orgapachefelix.framework.ServiceRegistry.registerService(ServiceRegistry.java:81)
  at org.apache.felix.framework.Felix.registerService(Felix.java:2773)
  at orgapachefelixframework.BundleContextImpl.registerService(BundleContextImpl.java:252)
  at orgapachefelixscrimplAbstractComponentManagerregisterComponentService ==0
(AbstractComponentManager.java:698)
  at orgapachefelixscrimplAbstractComponentManageractivateInternal(AbstractComponentManager.java:506)
  at org.apache.felix.scr.impl.AbstractComponentManager.access$100(AbstractComponentManager.java:36)
  at org.apache.felix.scr.impl.AbstractComponentManager$2.run(AbstractComponentManager.java:142)
  at orgapachefelix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:85)
Caused by: java.lang.reflect.InvocationTargetException
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sunreflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sunreflectDelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Methodjava:585)
  at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
  at netsfcglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
  ... 45 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
  ... 51 more
INFO - 1:04:57 PM [S: org.ow2.easybeans.component.joram.joramcomponent] - ServiceEvent REGISTERED.


Does anyone know why I would get the "Caused by: java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy" and how I would resolve it?

Thanks,
-- Chad
THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.



<Guillaume_Sauthier.vcf>

THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.



<Guillaume_Sauthier.vcf>


THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE. THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL. IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000. UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.

Re: Re: Re: Re: Re: Class not found HibernateProxy

by chadws :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hum, I just read this over a again and realized that my Entities are being copied into my EJB bundle which they should not be. I must have something wrong with my build as well.

-- Chad
On Apr 1, 2009, at 9:49 AM, Skinner Chad wrote:

I don't know how you prefer to get the bundle contents, but here are the Manifest files and a tree layout of the bundle contents.


profile.model-0.0.1-SNAPSHOT.jar

-- MANIFEST.MF --

Manifest-Version: 1.0
Built-By: cskinne1
Created-By: Apache Maven Bundle Plugin
Bundle-Activator: net.topekapublicschools.profile.osgi.Activator
Import-Package: javax.ejb,javax.persistence,net.topekapublicschools.pr
 ofile.api,net.topekapublicschools.profile.entity,net.topekapublicscho
 ols.profile.service,net.topekapublicschools.profile.service.model,org
 .osgi.framework;version="1.3"
Bnd-LastModified: 1238522453671
Export-Package: net.topekapublicschoolsprofile.entity;uses:="javax.pe
 rsistence",net.topekapublicschools.profile.service,net.topekapublicsc
 hools.profile.service.model,net.topekapublicschools.profile.api;uses:
 ="javax.ejb,net.topekapublicschools.profile.entity"
Bundle-Version: 0.0.1.SNAPSHOT
Bundle-Name: Profile - Business Model
Bundle-Description: This OSGi bundle provides the entity bean implemen
 tations and the local and remote interfaces required for the Profile 
 operations.
Build-Jdk: 1.5.0_16
Private-Package: net.topekapublicschools.profile.osgi
Bundle-ManifestVersion: 2
Bundle-Vendor: Topeka Public Schools, USD 501
Bundle-SymbolicName: net.topekapublicschools.profile.model
Tool: Bnd-0.0.311

-- BUNDLE CONTENTS --

 +-profile.model-0.0.1-SNAPSHOT/
   +-net/
   | +-topekapublicschools/
   |   +-profile/
   |     +-entity/
   |     | +-Profile.class
   |     | +-Location.class
   |     | +-Location$LocationType.class
   |     | +-Job.class
   |     | +-AdminModuleComparator.class
   |     |
   |     +-api/
   |     | +-ProfileSynchronizerLocal.class
   |     | +-ProfileManagerLocal.class
   |     | +-LocationManagerLocal.class
   |     | +-JobManagerLocal.class
   |     |
   |     +-service/
   |       +-model/
   |       +-ProfileMenuProviderService.class
   |       +-AdministrationMenuProviderService.class
   |      
   +-META-INF/
     +-maven/
     | +-net.topekapublicschools/
     |   +-profile.model/
     |     +-pom.xml
     |     +-pom.properties
     |    
     +-MANIFEST.MF 


profile.ejb-0.0.1-SNAPSHOT.jar

-- MANIFEST.MF --

Manifest-Version: 1.0
Built-By: cskinne1
Bundle-Activator: net.topekapublicschools.profile.osgi.Activator
Created-By: Apache Maven Bundle Plugin
Import-Package: javax.annotation,javax.annotationsecurity,javax.ejb,j
 avax.persistence,javax.sql,net.topekapublicschools.common.utils,net.t
 opekapublicschools.profile.api,net.topekapublicschools.profile.ejb,ne
 t.topekapublicschools.profile.entity,net.topekapublicschools.profile.
 service,net.topekapublicschools.profile.service.model,org.osgi.framew
 ork;version="1.3",org.osgi.util.tracker;version="1.3",org.ow2.easybea
 ns.osgi.ejbjar
Bnd-LastModified: 1238522454318
Export-Package: net.topekapublicschools.profile.ejb;uses:="javax.ejb,n
 et.topekapublicschools.profile.entity,javax.persistence,net.topekapub
 licschools.profile.api,javax.annotation,javax.annotation.security,jav
 ax.sql,net.topekapublicschools.common.utils",net.topekapublicschools.
 profile.entity;uses:="javax.persistence",net.topekapublicschools.prof
 ile.service,net.topekapublicschools.profile.service.model,net.topekap
 ublicschools.profile.api;uses:="javaxejb,net.topekapublicschools.pro
 file.entity"
Bundle-Version: 00.1.SNAPSHOT
Bundle-Name: Profile - EJB
Bundle-Description: This OSGi bundle contains the EJB3 implementation 
 classes for the local and remote interfaces in the Profile Business M
 odel.
Build-Jdk: 1.5.0_16
Private-Package: net.topekapublicschools.profile.osgi
Bundle-ManifestVersion: 2
Bundle-Vendor: Topeka Public Schools, USD 501
Bundle-SymbolicName: net.topekapublicschools.profile.ejb
Tool: Bnd-0.0.311

-- BUNDLE CONTENTS --

 +-profile.ejb-0.0.1-SNAPSHOT/
   +-net/
   | +-topekapublicschools/
   |   +-profile/
   |     +-entity/
   |     | +-Profile.class
   |     | +-Locationclass
   |     | +-Location$LocationType.class
   |     | +-Job.class
   |     | +-AdminModuleComparator.class
   |     |
   |     +-ejb/
   |     | +-ProfileSynchronizer.class
   |     | +-ProfileManager.class
   |     | +-LocationManager.class
   |     | +-JobManager.class
   |     |
   |     +-api/
   |     | +-ProfileSynchronizerLocal.class
   |     | +-ProfileManagerLocalclass
   |     | +-LocationManagerLocal.class
   |     | +-JobManagerLocal.class
   |     |
   |     +-service/
   |     | +-model/
   |     | +-ProfileMenuProviderService.class
   |     | +-AdministrationMenuProviderService.class
   |     |
   |     +-osgi/
   |       +-Activator$EasybeansServiceTrackerCustomizer.class
   |       +-Activator.class
   |      
   +-META-INF/
     +-maven/
     | +-net.topekapublicschools/
     |   +-profile.ejb/
     |     +-pom.xml
     |     +-pom.properties
     |    
     +-persistence.xml
     +-ejb-jar.xml
     +-MANIFEST.MF

On Apr 1, 2009, at 8:23 AM, Guillaume Sauthier wrote:

Hmm it seems we'll have to update the web site :)
try with the latest release : 1.1.0 RC1, it is as stable as the older one...

Can you elaborate more on your packaging ?
What files exactly do you have in yuor 2 bundles ?
And what looks like the MANIFESTs ?

BTW, i remember that ekke had some issues with EJB / JPA separations in different bundles. don't remember exactly what ...
--G

Skinner Chad a écrit :
I am using the lastest stable release from the website: 1.0.2.

Yes, I do see that package exported, but am not certain what I am doing wrong. I have two bundles that I am deploying an entity project that contains all of my business model classes and JPA entities. The second bundle is the EJB bundle that contains the persistence.xml file. I believe that I have the EJB container loading, but when the entity manager starts it appears to fail with the Class not found error below... any ideas what I can check or does what I am doing seem wrong?

Thanks,
-- Chad


On Apr 1, 2009, at 4:30 AM, Guillaume Sauthier wrote:

As you can see here:
http://fisheye.easybeans.org/browse/EasyBeans/trunk/easybeans-osgi/corebundle/pom.xml?r=4874#l212

All hibernate classes are exported by the core module.

Can you check that ?
$> packages <core-module-id>

you should see org.hibernate.proxy

Do you use the latest easybeans' version ?
--G

Skinner Chad a écrit :
I am getting closer. I have my EJB bundle starting, but when it starts the entity manager I get the following exception:

3/31/09 1:04:57 PM (I) SessionFactoryImpl.<init> : building session factory
net.sf.cglibcore.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
  at netsfcglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
  at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
  at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
  at orghibernateproxypojocglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:127)
  at orghibernateproxypojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
  at orghibernatetupleentity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
  at orghibernatetupleentity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
  at orghibernatetuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
  at orghibernatetupleentityEntityEntityModeToTuplizerMapping<init>(EntityEntityModeToTuplizerMapping.java:56)
  at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:302)
  at orghibernatepersisterentity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
  at orghibernatepersisterentitySingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
  at orghibernatepersister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
  at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
  at orghibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
  at orghibernatecfgAnnotationConfigurationbuildSessionFactory(AnnotationConfiguration.java:915)
  at orghibernateejbEjb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
  at orghibernateejbHibernatePersistencecreateContainerEntityManagerFactory(HibernatePersistence.java:127)
  at orgow2easybeanspersistence.JPersistenceContext.init(JPersistenceContext.java:72)
  at orgow2easybeanspersistence.JPersistenceContext.<init>(JPersistenceContext.java:65)
  at orgow2easybeanspersistencePersistenceUnitManageraddExtraPersistenceUnitInfos(PersistenceUnitManagerjava:88)
  at orgow2easybeanspersistence.PersistenceUnitManager.<init>(PersistenceUnitManager.java:64)
  at orgow2easybeanspersistencexmlPersistenceXmlFileAnalyzeranalyzePersistenceXmlFile(PersistenceXmlFileAnalyzer.java:143)
  at org.ow2.easybeans.container.JContainer3.start(JContainer3.java:321)
  at org.ow2.easybeans.osgi.ejbjar.Activator.startContainer(Activator.java:147)
  at org.ow2.easybeans.osgi.ejbjar.Activator.start(Activator.java:101)
  at nettopekapublicschoolsprofile.osgi.Activator.startEJBContainer(Activator.java:59)
  at net.topekapublicschools.profile.osgi.Activator$EasybeansServiceTrackerCustomizer.addingService(Activator.java:117)
  at org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.java:1030)
  at org.osgi.util.tracker.ServiceTracker$Tracked.track(ServiceTracker.java:1008)
  at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:941)
  at orgapachefelixframeworkutilEventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:820)
  at orgapachefelixframeworkutil.EventDispatcher.fireEventImmediately(EventDispatcher.java:678)
  at orgapachefelixframework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:609)
  at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3640)
  at org.apache.felix.framework.Felix.access$200(Felix.java:38)
  at org.apachefelix.framework.Felix$2.serviceChanged(Felix.java: ==20
841)
  at orgapachefelixframework.ServiceRegistry.fireServiceChanged(ServiceRegistry.java:568)
  at orgapachefelix.framework.ServiceRegistry.registerService(ServiceRegistry.java:81)
  at org.apache.felix.framework.Felix.registerService(Felix.java:2773)
  at orgapachefelixframework.BundleContextImpl.registerService(BundleContextImpl.java:252)
  at orgapachefelixscrimplAbstractComponentManagerregisterComponentService ==0
(AbstractComponentManager.java:698)
  at orgapachefelixscrimplAbstractComponentManageractivateInternal(AbstractComponentManager.java:506)
  at org.apache.felix.scr.impl.AbstractComponentManager.access$100(AbstractComponentManager.java:36)
  at org.apache.felix.scr.impl.AbstractComponentManager$2.run(AbstractComponentManager.java:142)
  at orgapachefelix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:85)
Caused by: javalang.reflect.InvocationTargetException
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sunreflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sunreflectDelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Methodjava:585)
  at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
  at netsfcglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
  ... 45 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
  ... 51 more
INFO - 1:04:57 PM [S: org.ow2.easybeans.component.joram.joramcomponent] - ServiceEvent REGISTERED.


Does anyone know why I would get the "Caused by: java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy" and how I would resolve it?

Thanks,
-- Chad
THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.



<Guillaume_Sauthier.vcf>

THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.



<Guillaume_Sauthier.vcf>


THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE. THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL. IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000. UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.


THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE. THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL. IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000. UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.

Re: Re: Re: Re: Re: Re: Class not found HibernateProxy

by chadws :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok, I have my Bundles building properly now and I have my Entities Loading, but when Hybernate starts I am still getting the error about the HibernateProxy class not being found Does anyone have any idea what I can do to get rid of these errors.

4/2/09 5:18:08 PM (S) JCLLoggerAdapter.error : Javassist Enhancement failed: net.topekapublicschools.profile.model.entity.Location
java.lang.RuntimeException: by java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy
at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:342)
at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:312)
at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:271)
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.ow2.easybeans.persistence.JPersistenceContext.init(JPersistenceContext.java:72)
at org.ow2.easybeans.persistence.JPersistenceContext.<init>(JPersistenceContext.java:65)
at org.ow2.easybeans.persistence.PersistenceUnitManager.addExtraPersistenceUnitInfos(PersistenceUnitManager.java:88)
at org.ow2.easybeans.persistence.PersistenceUnitManager.<init>(PersistenceUnitManager.java:64)
at org.ow2.easybeans.persistence.xml.PersistenceXmlFileAnalyzer.analyzePersistenceXmlFile(PersistenceXmlFileAnalyzer.java:193)
at org.ow2.easybeans.container.JContainer3.start(JContainer3.java:388)
at org.ow2.easybeans.osgi.ejbjar.Activator.startContainer(Activator.java:155)
at org.ow2.easybeans.osgi.ejbjar.Activator.start(Activator.java:105)
at net.topekapublicschools.profile.ejb.osgi.Activator.startEJBContainer(Activator.java:63)
at net.topekapublicschools.profile.ejb.osgi.Activator$EasybeansServiceTrackerCustomizer.addingService(Activator.java:131)
at org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.java:1030)
at org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(ServiceTracker.java:891)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:296)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:235)
at net.topekapublicschools.profile.ejb.osgi.Activator.start(Activator.java:54)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589)
at org.apache.felix.framework.Felix._startBundle(Felix.java:1671)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1588)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:382)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:363)
at org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWatcher.java:392)
at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:83)
Caused by: javassist.CannotCompileException: by java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy
at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:165)
at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:337)
... 39 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
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 javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:177)
at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:159)
... 40 more
4/2/09 5:18:08 PM (W) JCLLoggerAdapter.warn : could not create proxy fac


Thanks,
-- Chad



On Apr 1, 2009, at 10:25 AM, Skinner Chad wrote:

Hum, I just read this over a again and realized that my Entities are being copied into my EJB bundle which they should not be. I must have something wrong with my build as well.

-- Chad
On Apr 1, 2009, at 9:49 AM, Skinner Chad wrote:

I don't know how you prefer to get the bundle contents, but here are the Manifest files and a tree layout of the bundle contents.


profile.model-0.0.1-SNAPSHOT.jar

-- MANIFEST.MF --

Manifest-Version: 1.0
Built-By: cskinne1
Created-By: Apache Maven Bundle Plugin
Bundle-Activator: net.topekapublicschools.profile.osgi.Activator
Import-Package: javax.ejb,javax.persistence,net.topekapublicschools.pr
 ofile.api,net.topekapublicschools.profile.entity,net.topekapublicscho
 ols.profile.service,net.topekapublicschools.profile.service.model,org
 .osgi.framework;version="1.3"
Bnd-LastModified: 1238522453671
Export-Package: net.topekapublicschoolsprofile.entity;uses:="javax.pe
 rsistence",net.topekapublicschools.profile.service,net.topekapublicsc
 hools.profile.service.model,net.topekapublicschools.profile.api;uses:
 ="javax.ejb,net.topekapublicschools.profile.entity"
Bundle-Version: 0.0.1.SNAPSHOT
Bundle-Name: Profile - Business Model
Bundle-Description: This OSGi bundle provides the entity bean implemen
 tations and the local and remote interfaces required for the Profile 
 operations.
Build-Jdk: 1.5.0_16
Private-Package: net.topekapublicschools.profile.osgi
Bundle-ManifestVersion: 2
Bundle-Vendor: Topeka Public Schools, USD 501
Bundle-SymbolicName: net.topekapublicschools.profile.model
Tool: Bnd-0.0.311

-- BUNDLE CONTENTS --

 +-profile.model-0.0.1-SNAPSHOT/
   +-net/
   | +-topekapublicschools/
   |   +-profile/
   |     +-entity/
   |     | +-Profile.class
   |     | +-Location.class
   |     | +-Location$LocationType.class
   |     | +-Job.class
   |     | +-AdminModuleComparator.class
   |     |
   |     +-api/
   |     | +-ProfileSynchronizerLocal.class
   |     | +-ProfileManagerLocal.class
   |     | +-LocationManagerLocal.class
   |     | +-JobManagerLocal.class
   |     |
   |     +-service/
   |       +-model/
   |       +-ProfileMenuProviderService.class
   |       +-AdministrationMenuProviderService.class
   |      
   +-META-INF/
     +-maven/
     | +-net.topekapublicschools/
     |   +-profile.model/
     |     +-pom.xml
     |     +-pom.properties
     |    
     +-MANIFEST.MF 


profile.ejb-0.0.1-SNAPSHOT.jar

-- MANIFEST.MF --

Manifest-Version: 1.0
Built-By: cskinne1
Bundle-Activator: net.topekapublicschools.profile.osgi.Activator
Created-By: Apache Maven Bundle Plugin
Import-Package: javax.annotation,javax.annotationsecurity,javax.ejb,j
 avax.persistence,javax.sql,net.topekapublicschools.common.utils,net.t
 opekapublicschools.profile.api,net.topekapublicschools.profile.ejb,ne
 t.topekapublicschools.profile.entity,net.topekapublicschools.profile.
 service,net.topekapublicschools.profileservice.model,org.osgi.framew
 ork;version="1.3",org.osgi.util.tracker;version="1.3",org.ow2.easybea
 ns.osgi.ejbjar
Bnd-LastModified: 1238522454318
Export-Package: net.topekapublicschools.profile.ejb;uses:="javax.ejb,n
 et.topekapublicschools.profile.entity,javax.persistence,net.topekapub
 licschools.profile.api,javax.annotation,javax.annotation.security,jav
 ax.sql,net.topekapublicschools.common.utils",net.topekapublicschools.
 profile.entity;uses:="javax.persistence",net.topekapublicschools.prof
 ile.service,net.topekapublicschools.profile.service.model,net.topekap
 ublicschools.profile.api;uses:="javaxejb,net.topekapublicschools.pro
 file.entity"
Bundle-Version: 00.1.SNAPSHOT
Bundle-Name: Profile - EJB
Bundle-Description: This OSGi bundle contains the EJB3 implementation 
 classes for the local and remote interfaces in the Profile Business M
 odel.
Build-Jdk: 1.5.0_16
Private-Package: net.topekapublicschools.profile.osgi
Bundle-ManifestVersion: 2
Bundle-Vendor: Topeka Public Schools, USD 501
Bundle-SymbolicName: net.topekapublicschools.profile.ejb
Tool: Bnd-0.0.311

-- BUNDLE CONTENTS --

 +-profile.ejb-0.0.1-SNAPSHOT/
   +-net/
   | +-topekapublicschools/
   |   +-profile/
   |     +-entity/
   |     | +-Profile.class
   |     | +-Locationclass
   |     | +-Location$LocationType.class
   |     | +-Job.class
   |     | +-AdminModuleComparator.class
   |     |
   |     +-ejb/
   |     | +-ProfileSynchronizer.class
   |     | +-ProfileManager.class
   |     | +-LocationManager.class
   |     | +-JobManager.class
   |     |
   |     +-api/
   |     | +-ProfileSynchronizerLocal.class
   |     | +-ProfileManagerLocalclass
   |     | +-LocationManagerLocal.class
   |     | +-JobManagerLocal.class
   |     |
   |     +-service/
   |     | +-model/
   |     | +-ProfileMenuProviderService.class
   |     | +-AdministrationMenuProviderService.class
   |     |
   |     +-osgi/
   |       +-Activator$EasybeansServiceTrackerCustomizer.class
   |       +-Activator.class
   |      
   +-META-INF/
     +-maven/
     | +-net.topekapublicschools/
     |   +-profile.ejb/
     |     +-pom.xml
     |     +-pom.properties
     |    
     +-persistence.xml
     +-ejb-jar.xml
     +-MANIFEST.MF

On Apr 1, 2009, at 8:23 AM, Guillaume Sauthier wrote:

Hmm it seems we'll have to update the web site :)
try with the latest release : 1.1.0 RC1, it is as stable as the older one...

Can you elaborate more on your packaging ?
What files exactly do you have in yuor 2 bundles ?
And what looks like the MANIFESTs ?

BTW, i remember that ekke had some issues with EJB / JPA separations in different bundles. don't remember exactly what ...
--G

Skinner Chad a écrit :
I am using the lastest stable release from the website: 1.0.2.

Yes, I do see that package exported, but am not certain what I am doing wrong. I have two bundles that I am deploying an entity project that contains all of my business model classes and JPA entities. The second bundle is the EJB bundle that contains the persistence.xml file. I believe that I have the EJB container loading, but when the entity manager starts it appears to fail with the Class not found error below... any ideas what I can check or does what I am doing seem wrong?

Thanks,
-- Chad


On Apr 1, 2009, at 4:30 AM, Guillaume Sauthier wrote:

As you can see here:
http://fisheye.easybeans.org/browse/EasyBeans/trunk/easybeans-osgi/corebundle/pom.xml?r=4874#l212

All hibernate classes are exported by the core module.

Can you check that ?
$> packages <core-module-id>

you should see org.hibernate.proxy

Do you use the latest easybeans' version ?
--G

Skinner Chad a écrit :
I am getting closer. I have my EJB bundle starting, but when it starts the entity manager I get the following exception:

3/31/09 1:04:57 PM (I) SessionFactoryImpl.<init> : building session factory
net.sf.cglibcore.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
  at netsfcglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
  at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
  at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
  at orghibernateproxypojocglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:127)
  at orghibernateproxypojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
  at orghibernatetupleentity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
  at orghibernatetupleentity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
  at orghibernatetuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
  at orghibernatetupleentityEntityEntityModeToTuplizerMapping<init>(EntityEntityModeToTuplizerMapping.java:56)
  at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:302)
  at orghibernatepersisterentity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
  at orghibernatepersisterentitySingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
  at orghibernatepersister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
  at org.hibernate.impl.SessionFactoryImpl<init>(SessionFactoryImpl.java:226)
  at orghibernate.cfg.ConfigurationbuildSessionFactory(Configuration.java:1300)
  at orghibernatecfgAnnotationConfigurationbuildSessionFactory(AnnotationConfiguration.java:915)
  at orghibernateejbEjb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
  at orghibernateejbHibernatePersistencecreateContainerEntityManagerFactory(HibernatePersistence.java:127)
  at orgow2easybeanspersistence.JPersistenceContext.init(JPersistenceContext.java:72)
  at orgow2easybeanspersistence.JPersistenceContext.<init>(JPersistenceContext.java:65)
  at orgow2easybeanspersistencePersistenceUnitManageraddExtraPersistenceUnitInfos(PersistenceUnitManagerjava:88)
  at orgow2easybeanspersistence.PersistenceUnitManager.<init>(PersistenceUnitManager.java:64)
  at orgow2easybeanspersistencexmlPersistenceXmlFileAnalyzeranalyzePersistenceXmlFile(PersistenceXmlFileAnalyzer.java:143)
  at org.ow2.easybeans.container.JContainer3.start(JContainer3.java:321)
  at org.ow2.easybeans.osgi.ejbjar.Activator.startContainer(Activator.java:147)
  at org.ow2.easybeans.osgi.ejbjar.Activator.start(Activator.java:101)
  at nettopekapublicschoolsprofile.osgi.Activator.startEJBContainer(Activator.java:59)
  at net.topekapublicschools.profile.osgi.Activator$EasybeansServiceTrackerCustomizer.addingService(Activator.java:117)
  at org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.java:1030)
  at org.osgi.util.tracker.ServiceTracker$Tracked.track(ServiceTracker.java:1008)
  at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:941)
  at orgapachefelixframeworkutilEventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:820)
  at orgapachefelixframeworkutil.EventDispatcher.fireEventImmediately(EventDispatcher.java:678)
  at orgapachefelixframework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:609)
  at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3640)
  at org.apache.felix.framework.Felix.access$200(Felix.java:38)
  at org.apachefelix.framework.Felix$2.serviceChanged(Felix.java: ==20
841)
  at orgapachefelixframework.ServiceRegistry.fireServiceChanged(ServiceRegistry.java:568)
  at orgapachefelix.framework.ServiceRegistry.registerService(ServiceRegistry.java:81)
  at org.apache.felix.framework.Felix.registerService(Felix.java:2773)
  at orgapachefelixframework.BundleContextImpl.registerService(BundleContextImpl.java:252)
  at orgapachefelixscrimplAbstractComponentManagerregisterComponentService ==0
(AbstractComponentManager.java:698)
  at orgapachefelixscrimplAbstractComponentManageractivateInternal(AbstractComponentManager.java:506)
  at org.apache.felix.scr.impl.AbstractComponentManager.access$100(AbstractComponentManager.java:36)
  at org.apache.felix.scr.impl.AbstractComponentManager$2.run(AbstractComponentManager.java:142)
  at orgapachefelix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:85)
Caused by: javalang.reflect.InvocationTargetException
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sunreflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sunreflectDelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Methodjava:585)
  at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
  at netsfcglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
  ... 45 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
  ... 51 more
INFO - 1:04:57 PM [S: org.ow2.easybeans.component.joram.joramcomponent] - ServiceEvent REGISTERED.


Does anyone know why I would get the "Caused by: java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy" and how I would resolve it?

Thanks,
-- Chad
THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.



<Guillaume_Sauthier.vcf>

THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.



<Guillaume_Sauthier.vcf>


THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE. THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL. IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000. UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.


THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE. THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL. IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000. UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.


THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE. THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL. IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000. UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.

Re: Re: Re: Re: Re: Re: Re: Class not found HibernateProxy

by Guillaume Sauthier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Really try with the latest available easybaens-osgi release:
http://www.easybeans.net/xwiki/bin/view/News/Release1_1_0_RC1

--G

Skinner Chad a écrit :

> Ok, I have my Bundles building properly now and I have my Entities
> Loading, but when Hybernate starts I am still getting the error about
> the HibernateProxy class not being found Does anyone have any idea
> what I can do to get rid of these errors.
>
> 4/2/09 5:18:08 PM (S) JCLLoggerAdapter.error : Javassist Enhancement
> failed: net.topekapublicschools.profile.model.entity.Location
> java.lang.RuntimeException: by java.lang.NoClassDefFoundError:
> org/hibernate/proxy/HibernateProxy
> at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:342)
> at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:312)
> at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:271)
> 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.ow2.easybeans.persistence.JPersistenceContext.init(JPersistenceContext.java:72)
> at
> org.ow2.easybeans.persistence.JPersistenceContext.<init>(JPersistenceContext.java:65)
> at
> org.ow2.easybeans.persistence.PersistenceUnitManager.addExtraPersistenceUnitInfos(PersistenceUnitManager.java:88)
> at
> org.ow2.easybeans.persistence.PersistenceUnitManager.<init>(PersistenceUnitManager.java:64)
> at
> org.ow2.easybeans.persistence.xml.PersistenceXmlFileAnalyzer.analyzePersistenceXmlFile(PersistenceXmlFileAnalyzer.java:193)
> at org.ow2.easybeans.container.JContainer3.start(JContainer3.java:388)
> at
> org.ow2.easybeans.osgi.ejbjar.Activator.startContainer(Activator.java:155)
> at org.ow2.easybeans.osgi.ejbjar.Activator.start(Activator.java:105)
> at
> net.topekapublicschools.profile.ejb.osgi.Activator.startEJBContainer(Activator.java:63)
> at
> net.topekapublicschools.profile.ejb.osgi.Activator$EasybeansServiceTrackerCustomizer.addingService(Activator.java:131)
> at
> org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.java:1030)
> at
> org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(ServiceTracker.java:891)
> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:296)
> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:235)
> at
> net.topekapublicschools.profile.ejb.osgi.Activator.start(Activator.java:54)
> at
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589)
> at org.apache.felix.framework.Felix._startBundle(Felix.java:1671)
> at org.apache.felix.framework.Felix.startBundle(Felix.java:1588)
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:382)
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:363)
> at
> org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWatcher.java:392)
> at
> org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:83)
> Caused by: javassist.CannotCompileException: by
> java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy
> at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:165)
> at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:337)
> ... 39 more
> Caused by: java.lang.NoClassDefFoundError:
> org/hibernate/proxy/HibernateProxy
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
> 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 javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:177)
> at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:159)
> ... 40 more
> 4/2/09 5:18:08 PM (W) JCLLoggerAdapter.warn : could not create proxy fac
>
>
> Thanks,
> -- Chad
>
>
>
> On Apr 1, 2009, at 10:25 AM, Skinner Chad wrote:
>
>> Hum, I just read this over a again and realized that my Entities are
>> being copied into my EJB bundle which they should not be. I must have
>> something wrong with my build as well.
>>
>> -- Chad
>> On Apr 1, 2009, at 9:49 AM, Skinner Chad wrote:
>>
>>> I don't know how you prefer to get the bundle contents, but here are
>>> the Manifest files and a tree layout of the bundle contents.
>>>
>>>
>>> profile.model-0.0.1-SNAPSHOT.jar
>>>
>>> -- MANIFEST.MF --
>>>
>>> Manifest-Version: 1.0
>>> Built-By: cskinne1
>>> Created-By: Apache Maven Bundle Plugin
>>> Bundle-Activator: net.topekapublicschools.profile.osgi.Activator
>>> Import-Package: javax.ejb,javax.persistence,net.topekapublicschools.pr
>>>  ofile.api,net.topekapublicschools.profile.entity,net.topekapublicscho
>>>  ols.profile.service,net.topekapublicschools.profile.service.model,org
>>>  .osgi.framework;version="1.3"
>>> Bnd-LastModified: 1238522453671
>>> Export-Package: net.topekapublicschoolsprofile.entity;uses:="javax.pe
>>>  rsistence",net.topekapublicschools.profile.service,net.topekapublicsc
>>>  hools.profile.service.model,net.topekapublicschools.profile.api;uses:
>>>  ="javax.ejb,net.topekapublicschools.profile.entity"
>>> Bundle-Version: 0.0.1.SNAPSHOT
>>> Bundle-Name: Profile - Business Model
>>> Bundle-Description: This OSGi bundle provides the entity bean implemen
>>>  tations and the local and remote interfaces required for the Profile
>>>  operations.
>>> Build-Jdk: 1.5.0_16
>>> Private-Package: net.topekapublicschools.profile.osgi
>>> Bundle-DocURL: http://www.topekapublicschools.net/
>>> Bundle-ManifestVersion: 2
>>> Bundle-Vendor: Topeka Public Schools, USD 501
>>> Bundle-SymbolicName: net.topekapublicschools.profile.model
>>> Tool: Bnd-0.0.311
>>>
>>> -- BUNDLE CONTENTS --
>>>
>>>  +-profile.model-0.0.1-SNAPSHOT/
>>>    +-net/
>>>    | +-topekapublicschools/
>>>    |   +-profile/
>>>    |     +-entity/
>>>    |     | +-Profile.class
>>>    |     | +-Location.class
>>>    |     | +-Location$LocationType.class
>>>    |     | +-Job.class
>>>    |     | +-AdminModuleComparator.class
>>>    |     |
>>>    |     +-api/
>>>    |     | +-ProfileSynchronizerLocal.class
>>>    |     | +-ProfileManagerLocal.class
>>>    |     | +-LocationManagerLocal.class
>>>    |     | +-JobManagerLocal.class
>>>    |     |
>>>    |     +-service/
>>>    |       +-model/
>>>    |       +-ProfileMenuProviderService.class
>>>    |       +-AdministrationMenuProviderService.class
>>>    |      
>>>    +-META-INF/
>>>      +-maven/
>>>      | +-net.topekapublicschools/
>>>      |   +-profile.model/
>>>      |     +-pom.xml
>>>      |     +-pom.properties
>>>      |    
>>>      +-MANIFEST.MF
>>>
>>>
>>> profile.ejb-0.0.1-SNAPSHOT.jar
>>>
>>> -- MANIFEST.MF --
>>>
>>> Manifest-Version: 1.0
>>> Built-By: cskinne1
>>> Bundle-Activator: net.topekapublicschools.profile.osgi.Activator
>>> Created-By: Apache Maven Bundle Plugin
>>> Import-Package: javax.annotation,javax.annotationsecurity,javax.ejb,j
>>>  avax.persistence,javax.sql,net.topekapublicschools.common.utils,net.t
>>>  opekapublicschools.profile.api,net.topekapublicschools.profile.ejb,ne
>>>  t.topekapublicschools.profile.entity,net.topekapublicschools.profile.
>>>  service,net.topekapublicschools.profileservice.model,org.osgi.framew
>>>  ork;version="1.3",org.osgi.util.tracker;version="1.3",org.ow2.easybea
>>>  ns.osgi.ejbjar
>>> Bnd-LastModified: 1238522454318
>>> Export-Package: net.topekapublicschools.profile.ejb;uses:="javax.ejb,n
>>>  et.topekapublicschools.profile.entity,javax.persistence,net.topekapub
>>>  licschools.profile.api,javax.annotation,javax.annotation.security,jav
>>>  ax.sql,net.topekapublicschools.common.utils",net.topekapublicschools.
>>>  profile.entity;uses:="javax.persistence",net.topekapublicschools.prof
>>>  ile.service,net.topekapublicschools.profile.service.model,net.topekap
>>>  ublicschools.profile.api;uses:="javaxejb,net.topekapublicschools.pro
>>>  file.entity"
>>> Bundle-Version: 00.1.SNAPSHOT
>>> Bundle-Name: Profile - EJB
>>> Bundle-Description: This OSGi bundle contains the EJB3 implementation
>>>  classes for the local and remote interfaces in the Profile Business M
>>>  odel.
>>> Build-Jdk: 1.5.0_16
>>> Private-Package: net.topekapublicschools.profile.osgi
>>> Bundle-DocURL: http://www.topekapublicschools.net/
>>> Bundle-ManifestVersion: 2
>>> Bundle-Vendor: Topeka Public Schools, USD 501
>>> Bundle-SymbolicName: net.topekapublicschools.profile.ejb
>>> Tool: Bnd-0.0.311
>>>
>>> -- BUNDLE CONTENTS --
>>>
>>>  +-profile.ejb-0.0.1-SNAPSHOT/
>>>    +-net/
>>>    | +-topekapublicschools/
>>>    |   +-profile/
>>>    |     +-entity/
>>>    |     | +-Profile.class
>>>    |     | +-Locationclass
>>>    |     | +-Location$LocationType.class
>>>    |     | +-Job.class
>>>    |     | +-AdminModuleComparator.class
>>>    |     |
>>>    |     +-ejb/
>>>    |     | +-ProfileSynchronizer.class
>>>    |     | +-ProfileManager.class
>>>    |     | +-LocationManager.class
>>>    |     | +-JobManager.class
>>>    |     |
>>>    |     +-api/
>>>    |     | +-ProfileSynchronizerLocal.class
>>>    |     | +-ProfileManagerLocalclass
>>>    |     | +-LocationManagerLocal.class
>>>    |     | +-JobManagerLocal.class
>>>    |     |
>>>    |     +-service/
>>>    |     | +-model/
>>>    |     | +-ProfileMenuProviderService.class
>>>    |     | +-AdministrationMenuProviderService.class
>>>    |     |
>>>    |     +-osgi/
>>>    |       +-Activator$EasybeansServiceTrackerCustomizer.class
>>>    |       +-Activator.class
>>>    |      
>>>    +-META-INF/
>>>      +-maven/
>>>      | +-net.topekapublicschools/
>>>      |   +-profile.ejb/
>>>      |     +-pom.xml
>>>      |     +-pom.properties
>>>      |    
>>>      +-persistence.xml
>>>      +-ejb-jar.xml
>>>      +-MANIFEST.MF
>>>
>>> On Apr 1, 2009, at 8:23 AM, Guillaume Sauthier wrote:
>>>
>>>> Hmm it seems we'll have to update the web site :)
>>>> try with the latest release : 1.1.0 RC1, it is as stable as the
>>>> older one...
>>>>
>>>> Can you elaborate more on your packaging ?
>>>> What files exactly do you have in yuor 2 bundles ?
>>>> And what looks like the MANIFESTs ?
>>>>
>>>> BTW, i remember that ekke had some issues with EJB / JPA
>>>> separations in different bundles. don't remember exactly what ...
>>>> --G
>>>>
>>>> Skinner Chad a écrit :
>>>>> I am using the lastest stable release from the website: 1.0.2.
>>>>>
>>>>> Yes, I do see that package exported, but am not certain what I am
>>>>> doing wrong. I have two bundles that I am deploying an entity
>>>>> project that contains all of my business model classes and JPA
>>>>> entities. The second bundle is the EJB bundle that contains the
>>>>> persistence.xml file. I believe that I have the EJB container
>>>>> loading, but when the entity manager starts it appears to fail
>>>>> with the Class not found error below... any ideas what I can check
>>>>> or does what I am doing seem wrong?
>>>>>
>>>>> Thanks,
>>>>> -- Chad
>>>>>
>>>>>
>>>>> On Apr 1, 2009, at 4:30 AM, Guillaume Sauthier wrote:
>>>>>
>>>>>> As you can see here:
>>>>>> http://fisheye.easybeans.org/browse/EasyBeans/trunk/easybeans-osgi/corebundle/pom.xml?r=4874#l212 
>>>>>>
>>>>>>
>>>>>> All hibernate classes are exported by the core module.
>>>>>>
>>>>>> Can you check that ?
>>>>>> $> packages <core-module-id>
>>>>>>
>>>>>> you should see org.hibernate.proxy
>>>>>>
>>>>>> Do you use the latest easybeans' version ?
>>>>>> --G
>>>>>>
>>>>>> Skinner Chad a écrit :
>>>>>>> I am getting closer. I have my EJB bundle starting, but when it
>>>>>>> starts the entity manager I get the following exception:
>>>>>>>
>>>>>>> 3/31/09 1:04:57 PM (I) SessionFactoryImpl.<init> : building
>>>>>>> session factory
>>>>>>> net.sf.cglibcore.CodeGenerationException:
>>>>>>> java.lang.reflect.InvocationTargetException-->null
>>>>>>>   at
>>>>>>> netsfcglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
>>>>>>>
>>>>>>>   at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
>>>>>>>   at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
>>>>>>>   at
>>>>>>> orghibernateproxypojocglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:127)
>>>>>>>
>>>>>>>   at
>>>>>>> orghibernateproxypojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
>>>>>>>
>>>>>>>   at
>>>>>>> orghibernatetupleentity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
>>>>>>>
>>>>>>>   at
>>>>>>> orghibernatetupleentity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
>>>>>>>
>>>>>>>   at
>>>>>>> orghibernatetuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
>>>>>>>
>>>>>>>   at
>>>>>>> orghibernatetupleentityEntityEntityModeToTuplizerMapping<init>(EntityEntityModeToTuplizerMapping.java:56)
>>>>>>>
>>>>>>>   at
>>>>>>> org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:302)
>>>>>>>
>>>>>>>   at
>>>>>>> orghibernatepersisterentity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
>>>>>>>
>>>>>>>   at
>>>>>>> orghibernatepersisterentitySingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
>>>>>>>
>>>>>>>   at
>>>>>>> orghibernatepersister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
>>>>>>>
>>>>>>>   at
>>>>>>> org.hibernate.impl.SessionFactoryImpl<init>(SessionFactoryImpl.java:226)
>>>>>>>
>>>>>>>   at
>>>>>>> orghibernate.cfg.ConfigurationbuildSessionFactory(Configuration.java:1300)
>>>>>>>
>>>>>>>   at
>>>>>>> orghibernatecfgAnnotationConfigurationbuildSessionFactory(AnnotationConfiguration.java:915)
>>>>>>>
>>>>>>>   at
>>>>>>> orghibernateejbEjb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
>>>>>>>
>>>>>>>   at
>>>>>>> orghibernateejbHibernatePersistencecreateContainerEntityManagerFactory(HibernatePersistence.java:127)
>>>>>>>
>>>>>>>   at
>>>>>>> orgow2easybeanspersistence.JPersistenceContext.init(JPersistenceContext.java:72)
>>>>>>>
>>>>>>>   at
>>>>>>> orgow2easybeanspersistence.JPersistenceContext.<init>(JPersistenceContext.java:65)
>>>>>>>
>>>>>>>   at
>>>>>>> orgow2easybeanspersistencePersistenceUnitManageraddExtraPersistenceUnitInfos(PersistenceUnitManagerjava:88)
>>>>>>>
>>>>>>>   at
>>>>>>> orgow2easybeanspersistence.PersistenceUnitManager.<init>(PersistenceUnitManager.java:64)
>>>>>>>
>>>>>>>   at
>>>>>>> orgow2easybeanspersistencexmlPersistenceXmlFileAnalyzeranalyzePersistenceXmlFile(PersistenceXmlFileAnalyzer.java:143)
>>>>>>>
>>>>>>>   at
>>>>>>> org.ow2.easybeans.container.JContainer3.start(JContainer3.java:321)
>>>>>>>   at
>>>>>>> org.ow2.easybeans.osgi.ejbjar.Activator.startContainer(Activator.java:147)
>>>>>>>
>>>>>>>   at
>>>>>>> org.ow2.easybeans.osgi.ejbjar.Activator.start(Activator.java:101)
>>>>>>>   at
>>>>>>> nettopekapublicschoolsprofile.osgi.Activator.startEJBContainer(Activator.java:59)
>>>>>>>
>>>>>>>   at
>>>>>>> net.topekapublicschools.profile.osgi.Activator$EasybeansServiceTrackerCustomizer.addingService(Activator.java:117)
>>>>>>>
>>>>>>>   at
>>>>>>> org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.java:1030)
>>>>>>>
>>>>>>>   at
>>>>>>> org.osgi.util.tracker.ServiceTracker$Tracked.track(ServiceTracker.java:1008)
>>>>>>>
>>>>>>>   at
>>>>>>> org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:941)
>>>>>>>
>>>>>>>   at
>>>>>>> orgapachefelixframeworkutilEventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:820)
>>>>>>>
>>>>>>>   at
>>>>>>> orgapachefelixframeworkutil.EventDispatcher.fireEventImmediately(EventDispatcher.java:678)
>>>>>>>
>>>>>>>   at
>>>>>>> orgapachefelixframework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:609)
>>>>>>>
>>>>>>>   at
>>>>>>> org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3640)
>>>>>>>   at org.apache.felix.framework.Felix.access$200(Felix.java:38)
>>>>>>>   at
>>>>>>> org.apachefelix.framework.Felix$2.serviceChanged(Felix.java: ==20
>>>>>>> 841)
>>>>>>>   at
>>>>>>> orgapachefelixframework.ServiceRegistry.fireServiceChanged(ServiceRegistry.java:568)
>>>>>>>
>>>>>>>   at
>>>>>>> orgapachefelix.framework.ServiceRegistry.registerService(ServiceRegistry.java:81)
>>>>>>>
>>>>>>>   at
>>>>>>> org.apache.felix.framework.Felix.registerService(Felix.java:2773)
>>>>>>>   at
>>>>>>> orgapachefelixframework.BundleContextImpl.registerService(BundleContextImpl.java:252)
>>>>>>>
>>>>>>>   at
>>>>>>> orgapachefelixscrimplAbstractComponentManagerregisterComponentService
>>>>>>> ==0
>>>>>>> (AbstractComponentManager.java:698)
>>>>>>>   at
>>>>>>> orgapachefelixscrimplAbstractComponentManageractivateInternal(AbstractComponentManager.java:506)
>>>>>>>
>>>>>>>   at
>>>>>>> org.apache.felix.scr.impl.AbstractComponentManager.access$100(AbstractComponentManager.java:36)
>>>>>>>
>>>>>>>   at
>>>>>>> org.apache.felix.scr.impl.AbstractComponentManager$2.run(AbstractComponentManager.java:142)
>>>>>>>
>>>>>>>   at
>>>>>>> orgapachefelix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:85)
>>>>>>>
>>>>>>> Caused by: javalang.reflect.InvocationTargetException
>>>>>>>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>   at
>>>>>>> sunreflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>>
>>>>>>>   at
>>>>>>> sunreflectDelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>>
>>>>>>>   at java.lang.reflect.Method.invoke(Methodjava:585)
>>>>>>>   at
>>>>>>> net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
>>>>>>>   at
>>>>>>> netsfcglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
>>>>>>>
>>>>>>>   ... 45 more
>>>>>>> Caused by: java.lang.NoClassDefFoundError:
>>>>>>> org/hibernate/proxy/HibernateProxy
>>>>>>>   at java.lang.ClassLoader.defineClass1(Native Method)
>>>>>>>   at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
>>>>>>>   ... 51 more
>>>>>>> INFO - 1:04:57 PM [S:
>>>>>>> org.ow2.easybeans.component.joram.joramcomponent] - ServiceEvent
>>>>>>> REGISTERED.
>>>>>>>
>>>>>>>
>>>>>>> Does anyone know why I would get the "Caused by:
>>>>>>> java.lang.NoClassDefFoundError:
>>>>>>> org/hibernate/proxy/HibernateProxy" and how I would resolve it?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> -- Chad
>>>>>>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN
>>>>>>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE
>>>>>>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL
>>>>>>> HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER
>>>>>>> NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING
>>>>>>> 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING,
>>>>>>> DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS
>>>>>>> STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> <Guillaume_Sauthier.vcf>
>>>>>
>>>>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN
>>>>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE
>>>>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL
>>>>> HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING
>>>>> US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.
>>>>>  UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING
>>>>> THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND
>>>>> MAY BE UNLAWFUL.
>>>>>
>>>>>
>>>>
>>>> <Guillaume_Sauthier.vcf>
>>>
>>> ------------------------------------------------------------------------
>>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN
>>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE. THE
>>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL. IF THIS EMAIL HAS
>>> MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF
>>> THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000. UNAUTHORIZED
>>> FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION
>>> IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>>
>> ------------------------------------------------------------------------
>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN
>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE. THE
>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL. IF THIS EMAIL HAS
>> MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF
>> THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000. UNAUTHORIZED
>> FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION
>> IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>
> ------------------------------------------------------------------------
> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA,
> KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE. THE INFORMATION
> CONTAINED HEREIN MAY BE CONFIDENTIAL. IF THIS EMAIL HAS MISTAKENLY
> BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY
> REPLY EMAIL OR BY CALLING 785-295-3000. UNAUTHORIZED FORWARDING,
> PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL
> MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.

[Guillaume_Sauthier.vcf]

begin:vcard
fn:Guillaume Sauthier
n:Sauthier;Guillaume
org:<a href="http://www.ow2.org"><img title="OW2" alt="OW2 Consortium" border="0" src="http://www.ow2.org/xwiki/bin/skin/XWiki/DefaultSkin/logoOW2.png" /></a>
adr:;;;;;;France
email;internet:guillaume.sauthier@...
title:<a href="http://jonas.ow2.org">JOnAS Application Server</a>
x-mozilla-html:TRUE
url:http://jonas.ow2.org
version:2.1
end:vcard



Re: Re: Re: Re: Re: Re: Re: Re: Class not found HibernateProxy

by chadws :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'll send some more details later if needed, but I updated my  
Easybeans implementation and am still getting the Class Not Found  
Exception on HibernateProxy, but I was getting errors about needing to  
add imports to my manifest. After doing this I am getting the  
following errors.

WARNING: *** Package 'org.hibernate.event' is imported by bundle 38  
from bundle 38, but the exported package from bundle 38 does not  
contain the requested class  
'org.hibernate.event.EventListenersBeanInfo'. Please verify that the  
class name is correct in the importing bundle 38 and/or that the  
exported package is correctly bundled in 38. ***  
(java.lang.ClassNotFoundException: *** Package 'org.hibernate.event'  
is imported by bundle 38 from bundle 38, but the exported package from  
bundle 38 does not contain the requested class  
'org.hibernate.event.EventListenersBeanInfo'. Please verify that the  
class name is correct in the importing bundle 38 and/or that the  
exported package is correctly bundled in 38. ***)
WARNING: *** Package 'org.hibernate.event' is imported by bundle 79  
from bundle 38, but the exported package from bundle 38 does not  
contain the requested class  
'org.hibernate.event.EventListenersBeanInfo'. Please verify that the  
class name is correct in the importing bundle 79 and/or that the  
exported package is correctly bundled in 38. ***  
(java.lang.ClassNotFoundException: *** Package 'org.hibernate.event'  
is imported by bundle 79 from bundle 38, but the exported package from  
bundle 38 does not contain the requested class  
'org.hibernate.event.EventListenersBeanInfo'. Please verify that the  
class name is correct in the importing bundle 79 and/or that the  
exported package is correctly bundled in 38. ***)
WARNING: *** Package 'org.hibernate.util' is imported by bundle 38  
from bundle 38, but the exported package from bundle 38 does not  
contain the requested class 'org.hibernate.util.CloneableBeanInfo'.  
Please verify that the class name is correct in the importing bundle  
38 and/or that the exported package is correctly bundled in 38. ***  
(java.lang.ClassNotFoundException: *** Package 'org.hibernate.util' is  
imported by bundle 38 from bundle 38, but the exported package from  
bundle 38 does not contain the requested class  
'org.hibernate.util.CloneableBeanInfo'. Please verify that the class  
name is correct in the importing bundle 38 and/or that the exported  
package is correctly bundled in 38. ***)
WARNING: *** Package 'org.hibernate.util' is imported by bundle 79  
from bundle 38, but the exported package from bundle 38 does not  
contain the requested class 'org.hibernate.util.CloneableBeanInfo'.  
Please verify that the class name is correct in the importing bundle  
79 and/or that the exported package is correctly bundled in 38. ***  
(java.lang.ClassNotFoundException: *** Package 'org.hibernate.util' is  
imported by bundle 79 from bundle 38, but the exported package from  
bundle 38 does not contain the requested class  
'org.hibernate.util.CloneableBeanInfo'. Please verify that the class  
name is correct in the importing bundle 79 and/or that the exported  
package is correctly bundled in 38. ***)



I am also getting a number of exceptions similar to the following:

WARNING: *** Class 'net.topekapublicschools.profile.model.entity' was  
not found. Bundle 81 does not import package  
'net.topekapublicschools.profile.model', nor is the package exported  
by any other bundle or available from the system class loader. ***  
(java.lang.ClassNotFoundException: *** Class  
'net.topekapublicschools.profile.model.entity' was not found. Bundle  
81 does not import package 'net.topekapublicschools.profile.model',  
nor is the package exported by any other bundle or available from the  
system class loader. ***)
WARNING: *** Class 'p' was not found. Bundle 81 does not import  
package '', nor is the package exported by any other bundle or  
available from the system class loader. ***  
(java.lang.ClassNotFoundException: *** Class 'p' was not found. Bundle  
81 does not import package '', nor is the package exported by any  
other bundle or available from the system class loader. ***)



What is weird is that "entity" in  
net.topekapublischools.profile.model.entity is a package, not a class?

I am still at a loss any help appreciated.

- Chad

On Apr 3, 2009, at 2:35 AM, Guillaume Sauthier wrote:

> Really try with the latest available easybaens-osgi release:
> http://www.easybeans.net/xwiki/bin/view/News/Release1_1_0_RC1
>
> --G
>
> Skinner Chad a écrit :
>> Ok, I have my Bundles building properly now and I have my Entities  
>> Loading, but when Hybernate starts I am still getting the error  
>> about the HibernateProxy class not being found Does anyone have any  
>> idea what I can do to get rid of these errors.
>>
>> 4/2/09 5:18:08 PM (S) JCLLoggerAdapter.error : Javassist  
>> Enhancement failed:  
>> net.topekapublicschools.profile.model.entity.Location
>> java.lang.RuntimeException: by java.lang.NoClassDefFoundError: org/
>> hibernate/proxy/HibernateProxy
>> at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:
>> 342)
>> at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:
>> 312)
>> at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:
>> 271)
>> 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
>> .ow2
>> .easybeans
>> .persistence.JPersistenceContext.init(JPersistenceContext.java:72)
>> at  
>> org
>> .ow2
>> .easybeans
>> .persistence.JPersistenceContext.<init>(JPersistenceContext.java:65)
>> at  
>> org
>> .ow2
>> .easybeans
>> .persistence
>> .PersistenceUnitManager
>> .addExtraPersistenceUnitInfos(PersistenceUnitManager.java:88)
>> at  
>> org
>> .ow2
>> .easybeans
>> .persistence
>> .PersistenceUnitManager.<init>(PersistenceUnitManager.java:64)
>> at  
>> org
>> .ow2
>> .easybeans
>> .persistence
>> .xml
>> .PersistenceXmlFileAnalyzer
>> .analyzePersistenceXmlFile(PersistenceXmlFileAnalyzer.java:193)
>> at org.ow2.easybeans.container.JContainer3.start(JContainer3.java:
>> 388)
>> at  
>> org
>> .ow2.easybeans.osgi.ejbjar.Activator.startContainer(Activator.java:
>> 155)
>> at org.ow2.easybeans.osgi.ejbjar.Activator.start(Activator.java:105)
>> at  
>> net
>> .topekapublicschools
>> .profile.ejb.osgi.Activator.startEJBContainer(Activator.java:63)
>> at net.topekapublicschools.profile.ejb.osgi.Activator
>> $EasybeansServiceTrackerCustomizer.addingService(Activator.java:131)
>> at org.osgi.util.tracker.ServiceTracker
>> $Tracked.trackAdding(ServiceTracker.java:1030)
>> at org.osgi.util.tracker.ServiceTracker
>> $Tracked.trackInitialServices(ServiceTracker.java:891)
>> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:296)
>> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:235)
>> at  
>> net
>> .topekapublicschools
>> .profile.ejb.osgi.Activator.start(Activator.java:54)
>> at  
>> org
>> .apache
>> .felix.framework.util.SecureAction.startActivator(SecureAction.java:
>> 589)
>> at org.apache.felix.framework.Felix._startBundle(Felix.java:1671)
>> at org.apache.felix.framework.Felix.startBundle(Felix.java:1588)
>> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:382)
>> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:363)
>> at  
>> org
>> .apache
>> .felix
>> .fileinstall.DirectoryWatcher.doInstalled(DirectoryWatcher.java:392)
>> at  
>> org
>> .apache
>> .felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:83)
>> Caused by: javassist.CannotCompileException: by  
>> java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy
>> at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:165)
>> at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:
>> 337)
>> ... 39 more
>> Caused by: java.lang.NoClassDefFoundError: org/hibernate/proxy/
>> HibernateProxy
>> at java.lang.ClassLoader.defineClass1(Native Method)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
>> 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 javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:
>> 177)
>> at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:159)
>> ... 40 more
>> 4/2/09 5:18:08 PM (W) JCLLoggerAdapter.warn : could not create  
>> proxy fac
>>
>>
>> Thanks,
>> -- Chad
>>
>>
>>
>> On Apr 1, 2009, at 10:25 AM, Skinner Chad wrote:
>>
>>> Hum, I just read this over a again and realized that my Entities  
>>> are being copied into my EJB bundle which they should not be. I  
>>> must have something wrong with my build as well.
>>>
>>> -- Chad
>>> On Apr 1, 2009, at 9:49 AM, Skinner Chad wrote:
>>>
>>>> I don't know how you prefer to get the bundle contents, but here  
>>>> are the Manifest files and a tree layout of the bundle contents.
>>>>
>>>>
>>>> profile.model-0.0.1-SNAPSHOT.jar
>>>>
>>>> -- MANIFEST.MF --
>>>>
>>>> Manifest-Version: 1.0
>>>> Built-By: cskinne1
>>>> Created-By: Apache Maven Bundle Plugin
>>>> Bundle-Activator: net.topekapublicschools.profile.osgi.Activator
>>>> Import-Package:  
>>>> javax.ejb,javax.persistence,net.topekapublicschools.pr
>>>> ofile
>>>> .api,net.topekapublicschools.profile.entity,net.topekapublicscho
>>>> ols
>>>> .profile.service,net.topekapublicschools.profile.service.model,org
>>>> .osgi.framework;version="1.3"
>>>> Bnd-LastModified: 1238522453671
>>>> Export-Package:  
>>>> net.topekapublicschoolsprofile.entity;uses:="javax.pe
>>>> rsistence
>>>> ",net.topekapublicschools.profile.service,net.topekapublicsc
>>>> hools
>>>> .profile.service.model,net.topekapublicschools.profile.api;uses:
>>>> ="javax.ejb,net.topekapublicschools.profile.entity"
>>>> Bundle-Version: 0.0.1.SNAPSHOT
>>>> Bundle-Name: Profile - Business Model
>>>> Bundle-Description: This OSGi bundle provides the entity bean  
>>>> implemen
>>>> tations and the local and remote interfaces required for the  
>>>> Profile  operations.
>>>> Build-Jdk: 1.5.0_16
>>>> Private-Package: net.topekapublicschools.profile.osgi
>>>> Bundle-DocURL: http://www.topekapublicschools.net/
>>>> Bundle-ManifestVersion: 2
>>>> Bundle-Vendor: Topeka Public Schools, USD 501
>>>> Bundle-SymbolicName: net.topekapublicschools.profile.model
>>>> Tool: Bnd-0.0.311
>>>>
>>>> -- BUNDLE CONTENTS --
>>>>
>>>> +-profile.model-0.0.1-SNAPSHOT/
>>>>   +-net/
>>>>   | +-topekapublicschools/
>>>>   |   +-profile/
>>>>   |     +-entity/
>>>>   |     | +-Profile.class
>>>>   |     | +-Location.class
>>>>   |     | +-Location$LocationType.class
>>>>   |     | +-Job.class
>>>>   |     | +-AdminModuleComparator.class
>>>>   |     |
>>>>   |     +-api/
>>>>   |     | +-ProfileSynchronizerLocal.class
>>>>   |     | +-ProfileManagerLocal.class
>>>>   |     | +-LocationManagerLocal.class
>>>>   |     | +-JobManagerLocal.class
>>>>   |     |
>>>>   |     +-service/
>>>>   |       +-model/
>>>>   |       +-ProfileMenuProviderService.class
>>>>   |       +-AdministrationMenuProviderService.class
>>>>   |         +-META-INF/
>>>>     +-maven/
>>>>     | +-net.topekapublicschools/
>>>>     |   +-profile.model/
>>>>     |     +-pom.xml
>>>>     |     +-pom.properties
>>>>     |         +-MANIFEST.MF
>>>>
>>>> profile.ejb-0.0.1-SNAPSHOT.jar
>>>>
>>>> -- MANIFEST.MF --
>>>>
>>>> Manifest-Version: 1.0
>>>> Built-By: cskinne1
>>>> Bundle-Activator: net.topekapublicschools.profile.osgi.Activator
>>>> Created-By: Apache Maven Bundle Plugin
>>>> Import-Package:  
>>>> javax.annotation,javax.annotationsecurity,javax.ejb,j
>>>> avax
>>>> .persistence,javax.sql,net.topekapublicschools.common.utils,net.t
>>>> opekapublicschools
>>>> .profile.api,net.topekapublicschools.profile.ejb,ne
>>>> t
>>>> .topekapublicschools
>>>> .profile.entity,net.topekapublicschools.profile.
>>>> service
>>>> ,net.topekapublicschools.profileservice.model,org.osgi.framew
>>>> ork
>>>> ;version="1.3",org.osgi.util.tracker;version="1.3",org.ow2.easybea
>>>> ns.osgi.ejbjar
>>>> Bnd-LastModified: 1238522454318
>>>> Export-Package:  
>>>> net.topekapublicschools.profile.ejb;uses:="javax.ejb,n
>>>> et
>>>> .topekapublicschools.profile.entity,javax.persistence,net.topekapub
>>>> licschools
>>>> .profile.api,javax.annotation,javax.annotation.security,jav
>>>> ax
>>>> .sql,net.topekapublicschools.common.utils",net.topekapublicschools.
>>>> profile
>>>> .entity;uses:="javax.persistence",net.topekapublicschools.prof
>>>> ile
>>>> .service,net.topekapublicschools.profile.service.model,net.topekap
>>>> ublicschools
>>>> .profile.api;uses:="javaxejb,net.topekapublicschools.pro
>>>> file.entity"
>>>> Bundle-Version: 00.1.SNAPSHOT
>>>> Bundle-Name: Profile - EJB
>>>> Bundle-Description: This OSGi bundle contains the EJB3  
>>>> implementation  classes for the local and remote interfaces in  
>>>> the Profile Business M
>>>> odel.
>>>> Build-Jdk: 1.5.0_16
>>>> Private-Package: net.topekapublicschools.profile.osgi
>>>> Bundle-DocURL: http://www.topekapublicschools.net/
>>>> Bundle-ManifestVersion: 2
>>>> Bundle-Vendor: Topeka Public Schools, USD 501
>>>> Bundle-SymbolicName: net.topekapublicschools.profile.ejb
>>>> Tool: Bnd-0.0.311
>>>>
>>>> -- BUNDLE CONTENTS --
>>>>
>>>> +-profile.ejb-0.0.1-SNAPSHOT/
>>>>   +-net/
>>>>   | +-topekapublicschools/
>>>>   |   +-profile/
>>>>   |     +-entity/
>>>>   |     | +-Profile.class
>>>>   |     | +-Locationclass
>>>>   |     | +-Location$LocationType.class
>>>>   |     | +-Job.class
>>>>   |     | +-AdminModuleComparator.class
>>>>   |     |
>>>>   |     +-ejb/
>>>>   |     | +-ProfileSynchronizer.class
>>>>   |     | +-ProfileManager.class
>>>>   |     | +-LocationManager.class
>>>>   |     | +-JobManager.class
>>>>   |     |
>>>>   |     +-api/
>>>>   |     | +-ProfileSynchronizerLocal.class
>>>>   |     | +-ProfileManagerLocalclass
>>>>   |     | +-LocationManagerLocal.class
>>>>   |     | +-JobManagerLocal.class
>>>>   |     |
>>>>   |     +-service/
>>>>   |     | +-model/
>>>>   |     | +-ProfileMenuProviderService.class
>>>>   |     | +-AdministrationMenuProviderService.class
>>>>   |     |
>>>>   |     +-osgi/
>>>>   |       +-Activator$EasybeansServiceTrackerCustomizer.class
>>>>   |       +-Activator.class
>>>>   |         +-META-INF/
>>>>     +-maven/
>>>>     | +-net.topekapublicschools/
>>>>     |   +-profile.ejb/
>>>>     |     +-pom.xml
>>>>     |     +-pom.properties
>>>>     |         +-persistence.xml
>>>>     +-ejb-jar.xml
>>>>     +-MANIFEST.MF
>>>>
>>>> On Apr 1, 2009, at 8:23 AM, Guillaume Sauthier wrote:
>>>>
>>>>> Hmm it seems we'll have to update the web site :)
>>>>> try with the latest release : 1.1.0 RC1, it is as stable as the  
>>>>> older one...
>>>>>
>>>>> Can you elaborate more on your packaging ?
>>>>> What files exactly do you have in yuor 2 bundles ?
>>>>> And what looks like the MANIFESTs ?
>>>>>
>>>>> BTW, i remember that ekke had some issues with EJB / JPA  
>>>>> separations in different bundles. don't remember exactly what ...
>>>>> --G
>>>>>
>>>>> Skinner Chad a écrit :
>>>>>> I am using the lastest stable release from the website: 1.0.2.
>>>>>>
>>>>>> Yes, I do see that package exported, but am not certain what I  
>>>>>> am doing wrong. I have two bundles that I am deploying an  
>>>>>> entity project that contains all of my business model classes  
>>>>>> and JPA entities. The second bundle is the EJB bundle that  
>>>>>> contains the persistence.xml file. I believe that I have the  
>>>>>> EJB container loading, but when the entity manager starts it  
>>>>>> appears to fail with the Class not found error below... any  
>>>>>> ideas what I can check or does what I am doing seem wrong?
>>>>>>
>>>>>> Thanks,
>>>>>> -- Chad
>>>>>>
>>>>>>
>>>>>> On Apr 1, 2009, at 4:30 AM, Guillaume Sauthier wrote:
>>>>>>
>>>>>>> As you can see here:
>>>>>>> http://fisheye.easybeans.org/browse/EasyBeans/trunk/easybeans-osgi/corebundle/pom.xml?r=4874#l212
>>>>>>>
>>>>>>> All hibernate classes are exported by the core module.
>>>>>>>
>>>>>>> Can you check that ?
>>>>>>> $> packages <core-module-id>
>>>>>>>
>>>>>>> you should see org.hibernate.proxy
>>>>>>>
>>>>>>> Do you use the latest easybeans' version ?
>>>>>>> --G
>>>>>>>
>>>>>>> Skinner Chad a écrit :
>>>>>>>> I am getting closer. I have my EJB bundle starting, but when  
>>>>>>>> it starts the entity manager I get the following exception:
>>>>>>>>
>>>>>>>> 3/31/09 1:04:57 PM (I) SessionFactoryImpl.<init> : building  
>>>>>>>> session factory
>>>>>>>> net.sf.cglibcore.CodeGenerationException:  
>>>>>>>> java.lang.reflect.InvocationTargetException-->null
>>>>>>>>  at  
>>>>>>>> netsfcglib
>>>>>>>> .core
>>>>>>>> .AbstractClassGenerator.create(AbstractClassGenerator.java:237)
>>>>>>>>  at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
>>>>>>>>  at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
>>>>>>>>  at  
>>>>>>>> orghibernateproxypojocglib
>>>>>>>> .CGLIBLazyInitializer
>>>>>>>> .getProxyFactory(CGLIBLazyInitializer.java:127)
>>>>>>>>  at  
>>>>>>>> orghibernateproxypojo
>>>>>>>> .cglib
>>>>>>>> .CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
>>>>>>>>  at  
>>>>>>>> orghibernatetupleentity
>>>>>>>> .PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:
>>>>>>>> 162)
>>>>>>>>  at  
>>>>>>>> orghibernatetupleentity
>>>>>>>> .AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
>>>>>>>>  at  
>>>>>>>> orghibernatetuple
>>>>>>>> .entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
>>>>>>>>  at  
>>>>>>>> orghibernatetupleentityEntityEntityModeToTuplizerMapping
>>>>>>>> <init>(EntityEntityModeToTuplizerMapping.java:56)
>>>>>>>>  at  
>>>>>>>> org
>>>>>>>> .hibernate
>>>>>>>> .tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:302)
>>>>>>>>  at  
>>>>>>>> orghibernatepersisterentity
>>>>>>>> .AbstractEntityPersister.<init>(AbstractEntityPersister.java:
>>>>>>>> 434)
>>>>>>>>  at  
>>>>>>>> orghibernatepersisterentitySingleTableEntityPersister
>>>>>>>> .<init>(SingleTableEntityPersister.java:109)
>>>>>>>>  at  
>>>>>>>> orghibernatepersister
>>>>>>>> .PersisterFactory.createClassPersister(PersisterFactory.java:
>>>>>>>> 55)
>>>>>>>>  at  
>>>>>>>> org
>>>>>>>> .hibernate
>>>>>>>> .impl.SessionFactoryImpl<init>(SessionFactoryImpl.java:226)
>>>>>>>>  at  
>>>>>>>> orghibernate
>>>>>>>> .cfg.ConfigurationbuildSessionFactory(Configuration.java:1300)
>>>>>>>>  at  
>>>>>>>> orghibernatecfgAnnotationConfigurationbuildSessionFactory
>>>>>>>> (AnnotationConfiguration.java:915)
>>>>>>>>  at  
>>>>>>>> orghibernateejbEjb3Configuration
>>>>>>>> .buildEntityManagerFactory(Ejb3Configuration.java:730)
>>>>>>>>  at  
>>>>>>>> orghibernateejbHibernatePersistencecreateContainerEntityManagerFactory
>>>>>>>> (HibernatePersistence.java:127)
>>>>>>>>  at  
>>>>>>>> orgow2easybeanspersistence
>>>>>>>> .JPersistenceContext.init(JPersistenceContext.java:72)
>>>>>>>>  at  
>>>>>>>> orgow2easybeanspersistence
>>>>>>>> .JPersistenceContext.<init>(JPersistenceContext.java:65)
>>>>>>>>  at  
>>>>>>>> orgow2easybeanspersistencePersistenceUnitManageraddExtraPersistenceUnitInfos
>>>>>>>> (PersistenceUnitManagerjava:88)
>>>>>>>>  at  
>>>>>>>> orgow2easybeanspersistence
>>>>>>>> .PersistenceUnitManager.<init>(PersistenceUnitManager.java:64)
>>>>>>>>  at  
>>>>>>>> orgow2easybeanspersistencexmlPersistenceXmlFileAnalyzeranalyzePersistenceXmlFile
>>>>>>>> (PersistenceXmlFileAnalyzer.java:143)
>>>>>>>>  at  
>>>>>>>> org
>>>>>>>> .ow2.easybeans.container.JContainer3.start(JContainer3.java:
>>>>>>>> 321)
>>>>>>>>  at  
>>>>>>>> org
>>>>>>>> .ow2
>>>>>>>> .easybeans
>>>>>>>> .osgi.ejbjar.Activator.startContainer(Activator.java:147)
>>>>>>>>  at  
>>>>>>>> org.ow2.easybeans.osgi.ejbjar.Activator.start(Activator.java:
>>>>>>>> 101)
>>>>>>>>  at  
>>>>>>>> nettopekapublicschoolsprofile
>>>>>>>> .osgi.Activator.startEJBContainer(Activator.java:59)
>>>>>>>>  at net.topekapublicschools.profile.osgi.Activator
>>>>>>>> $
>>>>>>>> EasybeansServiceTrackerCustomizer
>>>>>>>> .addingService(Activator.java:117)
>>>>>>>>  at org.osgi.util.tracker.ServiceTracker
>>>>>>>> $Tracked.trackAdding(ServiceTracker.java:1030)
>>>>>>>>  at org.osgi.util.tracker.ServiceTracker
>>>>>>>> $Tracked.track(ServiceTracker.java:1008)
>>>>>>>>  at org.osgi.util.tracker.ServiceTracker
>>>>>>>> $Tracked.serviceChanged(ServiceTracker.java:941)
>>>>>>>>  at  
>>>>>>>> orgapachefelixframeworkutilEventDispatcher
>>>>>>>> .invokeServiceListenerCallback(EventDispatcher.java:820)
>>>>>>>>  at  
>>>>>>>> orgapachefelixframeworkutil
>>>>>>>> .EventDispatcher.fireEventImmediately(EventDispatcher.java:678)
>>>>>>>>  at  
>>>>>>>> orgapachefelixframework
>>>>>>>> .util.EventDispatcher.fireServiceEvent(EventDispatcher.java:
>>>>>>>> 609)
>>>>>>>>  at  
>>>>>>>> org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:
>>>>>>>> 3640)
>>>>>>>>  at org.apache.felix.framework.Felix.access$200(Felix.java:38)
>>>>>>>>  at org.apachefelix.framework.Felix
>>>>>>>> $2.serviceChanged(Felix.java: ==20
>>>>>>>> 841)
>>>>>>>>  at  
>>>>>>>> orgapachefelixframework
>>>>>>>> .ServiceRegistry.fireServiceChanged(ServiceRegistry.java:568)
>>>>>>>>  at  
>>>>>>>> orgapachefelix
>>>>>>>> .framework
>>>>>>>> .ServiceRegistry.registerService(ServiceRegistry.java:81)
>>>>>>>>  at  
>>>>>>>> org.apache.felix.framework.Felix.registerService(Felix.java:
>>>>>>>> 2773)
>>>>>>>>  at  
>>>>>>>> orgapachefelixframework
>>>>>>>> .BundleContextImpl.registerService(BundleContextImpl.java:252)
>>>>>>>>  at  
>>>>>>>> orgapachefelixscrimplAbstractComponentManagerregisterComponentService
>>>>>>>>  ==0
>>>>>>>> (AbstractComponentManager.java:698)
>>>>>>>>  at  
>>>>>>>> orgapachefelixscrimplAbstractComponentManageractivateInternal
>>>>>>>> (AbstractComponentManager.java:506)
>>>>>>>>  at org.apache.felix.scr.impl.AbstractComponentManager.access
>>>>>>>> $100(AbstractComponentManager.java:36)
>>>>>>>>  at org.apache.felix.scr.impl.AbstractComponentManager
>>>>>>>> $2.run(AbstractComponentManager.java:142)
>>>>>>>>  at  
>>>>>>>> orgapachefelix
>>>>>>>> .scr.impl.ComponentActorThread.run(ComponentActorThread.java:
>>>>>>>> 85)
>>>>>>>> Caused by: javalang.reflect.InvocationTargetException
>>>>>>>>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>>  at  
>>>>>>>> sunreflect
>>>>>>>> .NativeMethodAccessorImpl
>>>>>>>> .invoke(NativeMethodAccessorImpl.java:39)
>>>>>>>>  at  
>>>>>>>> sunreflectDelegatingMethodAccessorImpl
>>>>>>>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>>>  at java.lang.reflect.Method.invoke(Methodjava:585)
>>>>>>>>  at  
>>>>>>>> net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:
>>>>>>>> 384)
>>>>>>>>  at  
>>>>>>>> netsfcglib
>>>>>>>> .core
>>>>>>>> .AbstractClassGenerator.create(AbstractClassGenerator.java:219)
>>>>>>>>  ... 45 more
>>>>>>>> Caused by: java.lang.NoClassDefFoundError: org/hibernate/
>>>>>>>> proxy/HibernateProxy
>>>>>>>>  at java.lang.ClassLoader.defineClass1(Native Method)
>>>>>>>>  at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
>>>>>>>>  ... 51 more
>>>>>>>> INFO - 1:04:57 PM [S:  
>>>>>>>> org.ow2.easybeans.component.joram.joramcomponent] -  
>>>>>>>> ServiceEvent REGISTERED.
>>>>>>>>
>>>>>>>>
>>>>>>>> Does anyone know why I would get the "Caused by:  
>>>>>>>> java.lang.NoClassDefFoundError: org/hibernate/proxy/
>>>>>>>> HibernateProxy" and how I would resolve it?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> -- Chad
>>>>>>>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501  
>>>>>>>> IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  
>>>>>>>> THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF  
>>>>>>>> THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT  
>>>>>>>> AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING  
>>>>>>>> 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING,  
>>>>>>>> DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE  
>>>>>>>> IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> <Guillaume_Sauthier.vcf>
>>>>>>
>>>>>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN  
>>>>>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE  
>>>>>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS  
>>>>>> EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER  
>>>>>> NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING  
>>>>>> 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING,  
>>>>>> DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS  
>>>>>> STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>>>>>>
>>>>>>
>>>>>
>>>>> <Guillaume_Sauthier.vcf>
>>>>
>>>> ------------------------------------------------------------------------
>>>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN  
>>>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE. THE  
>>>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL. IF THIS EMAIL  
>>>> HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING  
>>>> US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  
>>>> UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING  
>>>> THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND  
>>>> MAY BE UNLAWFUL.
>>>
>>> ------------------------------------------------------------------------
>>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN  
>>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE. THE  
>>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL. IF THIS EMAIL  
>>> HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING  
>>> US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  
>>> UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING  
>>> THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND  
>>> MAY BE UNLAWFUL.
>>
>> ------------------------------------------------------------------------
>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN  
>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE. THE  
>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL. IF THIS EMAIL HAS  
>> MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF  
>> THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000. UNAUTHORIZED  
>> FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE  
>> INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE  
>> UNLAWFUL.
>
> <Guillaume_Sauthier.vcf>


Re: Re: Re: Re: Re: Re: Re: Re: Re: Class not found HibernateProxy

by Guillaume Sauthier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The ejb bundles currently needs to have a dynamic import * (or the fixed
list of imported packages, but we don't have this fixed list prior to
bytecode enhancement at the moment)
--G

[Guillaume_Sauthier.vcf]

begin:vcard
fn:Guillaume Sauthier
n:Sauthier;Guillaume
org:<a href="http://www.ow2.org"><img title="OW2" alt="OW2 Consortium" border="0" src="http://www.ow2.org/xwiki/bin/skin/XWiki/DefaultSkin/logoOW2.png" /></a>
adr:;;;;;;France
email;internet:guillaume.sauthier@...
title:<a href="http://jonas.ow2.org">JOnAS Application Server</a>
x-mozilla-html:TRUE
url:http://jonas.ow2.org
version:2.1
end:vcard



Re: Class not found HibernateProxy

by ekke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Guillaume Sauthier schrieb:
> The ejb bundles currently needs to have a dynamic import * (or the fixed
> list of imported packages, but we don't have this fixed list prior to
> bytecode enhancement at the moment)
> --G
I dont have a dynamic import * in my ejb bundles

I have:

enum bundle: exporting enums
entity bundle: exporting entities, importing enums
ejb-api bundle: exporting api, importing entities, enums
ejb-beans bundle: importing ejb-api, entities, enums

and I switch classloader before using ejbs:

ClassLoader currentContextClassLoader =
Thread.currentThread().getContextClassLoader();
 
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
               
// trying to get the TestBeanRemoteManagerI from initialContext
tbRemote = (TestBeanRemoteManagerI)
lookupEasyBeansInitialContext(TestBeanRemoteManagerI.EZB_REMOTE_CONTEXT);
               
// now test a bean from separate bundle where an @EJB is included
logger.debug(bundleMarker, "now lets do the tests with {}", tbRemote);
tbRemote.testSomeBeans();
   
   
Thread.currentThread().setContextClassLoader(currentContextClassLoader);



Re: Class not found HibernateProxy

by ekke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

ekke schrieb:

> Guillaume Sauthier schrieb:
>> The ejb bundles currently needs to have a dynamic import * (or the
>> fixed list of imported packages, but we don't have this fixed list
>> prior to bytecode enhancement at the moment)
>> --G
> I dont have a dynamic import * in my ejb bundles
>
> I have:
>
> enum bundle: exporting enums
> entity bundle: exporting entities, importing enums
> ejb-api bundle: exporting api, importing entities, enums
> ejb-beans bundle: importing ejb-api, entities, enums
>
> and I switch classloader before using ejbs:
>
> ClassLoader currentContextClassLoader =
> Thread.currentThread().getContextClassLoader();
>
> Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
>
>        
> // trying to get the TestBeanRemoteManagerI from initialContext
> tbRemote = (TestBeanRemoteManagerI)
> lookupEasyBeansInitialContext(TestBeanRemoteManagerI.EZB_REMOTE_CONTEXT);
>        
> // now test a bean from separate bundle where an @EJB is included
> logger.debug(bundleMarker, "now lets do the tests with {}", tbRemote);
> tbRemote.testSomeBeans();  
>          
>        
> Thread.currentThread().setContextClassLoader(currentContextClassLoader);
>
>
>
and my ejb bundle contains persistence.xml
and because auto-detect of annotations doesnt work
I list all my @Entity and @Embeddable

...
<class>org.ekkehard.ies.entitybean.container.PressContainer</class>
<class>org.ekkehard.ies.entitybean.container.ContainerKlassifizierung</class>
<class>org.ekkehard.ies.entitybean.container.Vignette</class>
etc ...


Re: Re: Re: Re: Re: Re: Re: Re: Class not found HibernateProxy

by chadws :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok, so I started a new test project based on the 1_1_0_RC1 code and it  
is starting properly and I can make the calls to my EJBs. However, I  
am trying to use the felix fileinstall bundle and this appears to work  
to install the bundle, but if I remove an EJB bundle from the  
container Easybeans throws a number of errors and then will no longer  
function. For example I do the following:

1) drop in my bundle, and it is started by the file install bundle
2) I can execute calls to my ejbs
3) I remove my bundle from the fileinstall directory
4) fileinstall stops the bundle and undeploys it
5) I place my bundle back in the file install directory and it is  
installed
6) Easybeans complains that the JNDI DB connection does not exist.

I should also point out that using the CL to install the bundle and  
then start, stop and restart works as I would expect. The errors only  
occur when deploying with fileinstall.

The url below is a stack trace that shows felix starting, the bundle  
being dropped into the fileinstall directory, calling a couple of ejbs  
and then removing the bundle from the fileinstall deploy directory.

http://paste2.org/p/184611

-- Chad


On Apr 3, 2009, at 2:35 AM, Guillaume Sauthier wrote:

> Really try with the latest available easybaens-osgi release:
> http://www.easybeans.net/xwiki/bin/view/News/Release1_1_0_RC1
>
> --G
>
> Skinner Chad a écrit :
>> Ok, I have my Bundles building properly now and I have my Entities  
>> Loading, but when Hybernate starts I am still getting the error  
>> about the HibernateProxy class not being found Does anyone have any  
>> idea what I can do to get rid of these errors.
>>
>> 4/2/09 5:18:08 PM (S) JCLLoggerAdapter.error : Javassist  
>> Enhancement failed:  
>> net.topekapublicschools.profile.model.entity.Location
>> java.lang.RuntimeException: by java.lang.NoClassDefFoundError: org/
>> hibernate/proxy/HibernateProxy
>> at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:
>> 342)
>> at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:
>> 312)
>> at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:
>> 271)
>> 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
>> .ow2
>> .easybeans
>> .persistence.JPersistenceContext.init(JPersistenceContext.java:72)
>> at  
>> org
>> .ow2
>> .easybeans
>> .persistence.JPersistenceContext.<init>(JPersistenceContext.java:65)
>> at  
>> org
>> .ow2
>> .easybeans
>> .persistence
>> .PersistenceUnitManager
>> .addExtraPersistenceUnitInfos(PersistenceUnitManager.java:88)
>> at  
>> org
>> .ow2
>> .easybeans
>> .persistence
>> .PersistenceUnitManager.<init>(PersistenceUnitManager.java:64)
>> at  
>> org
>> .ow2
>> .easybeans
>> .persistence
>> .xml
>> .PersistenceXmlFileAnalyzer
>> .analyzePersistenceXmlFile(PersistenceXmlFileAnalyzer.java:193)
>> at org.ow2.easybeans.container.JContainer3.start(JContainer3.java:
>> 388)
>> at  
>> org
>> .ow2.easybeans.osgi.ejbjar.Activator.startContainer(Activator.java:
>> 155)
>> at org.ow2.easybeans.osgi.ejbjar.Activator.start(Activator.java:105)
>> at  
>> net
>> .topekapublicschools
>> .profile.ejb.osgi.Activator.startEJBContainer(Activator.java:63)
>> at net.topekapublicschools.profile.ejb.osgi.Activator
>> $EasybeansServiceTrackerCustomizer.addingService(Activator.java:131)
>> at org.osgi.util.tracker.ServiceTracker
>> $Tracked.trackAdding(ServiceTracker.java:1030)
>> at org.osgi.util.tracker.ServiceTracker
>> $Tracked.trackInitialServices(ServiceTracker.java:891)
>> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:296)
>> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:235)
>> at  
>> net
>> .topekapublicschools
>> .profile.ejb.osgi.Activator.start(Activator.java:54)
>> at  
>> org
>> .apache
>> .felix.framework.util.SecureAction.startActivator(SecureAction.java:
>> 589)
>> at org.apache.felix.framework.Felix._startBundle(Felix.java:1671)
>> at org.apache.felix.framework.Felix.startBundle(Felix.java:1588)
>> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:382)
>> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:363)
>> at  
>> org
>> .apache
>> .felix
>> .fileinstall.DirectoryWatcher.doInstalled(DirectoryWatcher.java:392)
>> at  
>> org
>> .apache
>> .felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:83)
>> Caused by: javassist.CannotCompileException: by  
>> java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy
>> at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:165)
>> at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:
>> 337)
>> ... 39 more
>> Caused by: java.lang.NoClassDefFoundError: org/hibernate/proxy/
>> HibernateProxy
>> at java.lang.ClassLoader.defineClass1(Native Method)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
>> 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 javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:
>> 177)
>> at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:159)
>> ... 40 more
>> 4/2/09 5:18:08 PM (W) JCLLoggerAdapter.warn : could not create  
>> proxy fac
>>
>>
>> Thanks,
>> -- Chad
>>
>>
>>
>> On Apr 1, 2009, at 10:25 AM, Skinner Chad wrote:
>>
>>> Hum, I just read this over a again and realized that my Entities  
>>> are being copied into my EJB bundle which they should not be. I  
>>> must have something wrong with my build as well.
>>>
>>> -- Chad
>>> On Apr 1, 2009, at 9:49 AM, Skinner Chad wrote:
>>>
>>>> I don't know how you prefer to get the bundle contents, but here  
>>>> are the Manifest files and a tree layout of the bundle contents.
>>>>
>>>>
>>>> profile.model-0.0.1-SNAPSHOT.jar
>>>>
>>>> -- MANIFEST.MF --
>>>>
>>>> Manifest-Version: 1.0
>>>> Built-By: cskinne1
>>>> Created-By: Apache Maven Bundle Plugin
>>>> Bundle-Activator: net.topekapublicschools.profile.osgi.Activator
>>>> Import-Package:  
>>>> javax.ejb,javax.persistence,net.topekapublicschools.pr
>>>> ofile
>>>> .api,net.topekapublicschools.profile.entity,net.topekapublicscho
>>>> ols
>>>> .profile.service,net.topekapublicschools.profile.service.model,org
>>>> .osgi.framework;version="1.3"
>>>> Bnd-LastModified: 1238522453671
>>>> Export-Package:  
>>>> net.topekapublicschoolsprofile.entity;uses:="javax.pe
>>>> rsistence
>>>> ",net.topekapublicschools.profile.service,net.topekapublicsc
>>>> hools
>>>> .profile.service.model,net.topekapublicschools.profile.api;uses:
>>>> ="javax.ejb,net.topekapublicschools.profile.entity"
>>>> Bundle-Version: 0.0.1.SNAPSHOT
>>>> Bundle-Name: Profile - Business Model
>>>> Bundle-Description: This OSGi bundle provides the entity bean  
>>>> implemen
>>>> tations and the local and remote interfaces required for the  
>>>> Profile  operations.
>>>> Build-Jdk: 1.5.0_16
>>>> Private-Package: net.topekapublicschools.profile.osgi
>>>> Bundle-DocURL: http://www.topekapublicschools.net/
>>>> Bundle-ManifestVersion: 2
>>>> Bundle-Vendor: Topeka Public Schools, USD 501
>>>> Bundle-SymbolicName: net.topekapublicschools.profile.model
>>>> Tool: Bnd-0.0.311
>>>>
>>>> -- BUNDLE CONTENTS --
>>>>
>>>> +-profile.model-0.0.1-SNAPSHOT/
>>>>   +-net/
>>>>   | +-topekapublicschools/
>>>>   |   +-profile/
>>>>   |     +-entity/
>>>>   |     | +-Profile.class
>>>>   |     | +-Location.class
>>>>   |     | +-Location$LocationType.class
>>>>   |     | +-Job.class
>>>>   |     | +-AdminModuleComparator.class
>>>>   |     |
>>>>   |     +-api/
>>>>   |     | +-ProfileSynchronizerLocal.class
>>>>   |     | +-ProfileManagerLocal.class
>>>>   |     | +-LocationManagerLocal.class
>>>>   |     | +-JobManagerLocal.class
>>>>   |     |
>>>>   |     +-service/
>>>>   |       +-model/
>>>>   |       +-ProfileMenuProviderService.class
>>>>   |       +-AdministrationMenuProviderService.class
>>>>   |         +-META-INF/
>>>>     +-maven/
>>>>     | +-net.topekapublicschools/
>>>>     |   +-profile.model/
>>>>     |     +-pom.xml
>>>>     |     +-pom.properties
>>>>     |         +-MANIFEST.MF
>>>>
>>>> profile.ejb-0.0.1-SNAPSHOT.jar
>>>>
>>>> -- MANIFEST.MF --
>>>>
>>>> Manifest-Version: 1.0
>>>> Built-By: cskinne1
>>>> Bundle-Activator: net.topekapublicschools.profile.osgi.Activator
>>>> Created-By: Apache Maven Bundle Plugin
>>>> Import-Package:  
>>>> javax.annotation,javax.annotationsecurity,javax.ejb,j
>>>> avax
>>>> .persistence,javax.sql,net.topekapublicschools.common.utils,net.t
>>>> opekapublicschools
>>>> .profile.api,net.topekapublicschools.profile.ejb,ne
>>>> t
>>>> .topekapublicschools
>>>> .profile.entity,net.topekapublicschools.profile.
>>>> service
>>>> ,net.topekapublicschools.profileservice.model,org.osgi.framew
>>>> ork
>>>> ;version="1.3",org.osgi.util.tracker;version="1.3",org.ow2.easybea
>>>> ns.osgi.ejbjar
>>>> Bnd-LastModified: 1238522454318
>>>> Export-Package:  
>>>> net.topekapublicschools.profile.ejb;uses:="javax.ejb,n
>>>> et
>>>> .topekapublicschools.profile.entity,javax.persistence,net.topekapub
>>>> licschools
>>>> .profile.api,javax.annotation,javax.annotation.security,jav
>>>> ax
>>>> .sql,net.topekapublicschools.common.utils",net.topekapublicschools.
>>>> profile
>>>> .entity;uses:="javax.persistence",net.topekapublicschools.prof
>>>> ile
>>>> .service,net.topekapublicschools.profile.service.model,net.topekap
>>>> ublicschools
>>>> .profile.api;uses:="javaxejb,net.topekapublicschools.pro
>>>> file.entity"
>>>> Bundle-Version: 00.1.SNAPSHOT
>>>> Bundle-Name: Profile - EJB
>>>> Bundle-Description: This OSGi bundle contains the EJB3  
>>>> implementation  classes for the local and remote interfaces in  
>>>> the Profile Business M
>>>> odel.
>>>> Build-Jdk: 1.5.0_16
>>>> Private-Package: net.topekapublicschools.profile.osgi
>>>> Bundle-DocURL: http://www.topekapublicschools.net/
>>>> Bundle-ManifestVersion: 2
>>>> Bundle-Vendor: Topeka Public Schools, USD 501
>>>> Bundle-SymbolicName: net.topekapublicschools.profile.ejb
>>>> Tool: Bnd-0.0.311
>>>>
>>>> -- BUNDLE CONTENTS --
>>>>
>>>> +-profile.ejb-0.0.1-SNAPSHOT/
>>>>   +-net/
>>>>   | +-topekapublicschools/
>>>>   |   +-profile/
>>>>   |     +-entity/
>>>>   |     | +-Profile.class
>>>>   |     | +-Locationclass
>>>>   |     | +-Location$LocationType.class
>>>>   |     | +-Job.class
>>>>   |     | +-AdminModuleComparator.class
>>>>   |     |
>>>>   |     +-ejb/
>>>>   |     | +-ProfileSynchronizer.class
>>>>   |     | +-ProfileManager.class
>>>>   |     | +-LocationManager.class
>>>>   |     | +-JobManager.class
>>>>   |     |
>>>>   |     +-api/
>>>>   |     | +-ProfileSynchronizerLocal.class
>>>>   |     | +-ProfileManagerLocalclass
>>>>   |     | +-LocationManagerLocal.class
>>>>   |     | +-JobManagerLocal.class
>>>>   |     |
>>>>   |     +-service/
>>>>   |     | +-model/
>>>>   |     | +-ProfileMenuProviderService.class
>>>>   |     | +-AdministrationMenuProviderService.class
>>>>   |     |
>>>>   |     +-osgi/
>>>>   |       +-Activator$EasybeansServiceTrackerCustomizer.class
>>>>   |       +-Activator.class
>>>>   |         +-META-INF/
>>>>     +-maven/
>>>>     | +-net.topekapublicschools/
>>>>     |   +-profile.ejb/
>>>>     |     +-pom.xml
>>>>     |     +-pom.properties
>>>>     |         +-persistence.xml
>>>>     +-ejb-jar.xml
>>>>     +-MANIFEST.MF
>>>>
>>>> On Apr 1, 2009, at 8:23 AM, Guillaume Sauthier wrote:
>>>>
>>>>> Hmm it seems we'll have to update the web site :)
>>>>> try with the latest release : 1.1.0 RC1, it is as stable as the  
>>>>> older one...
>>>>>
>>>>> Can you elaborate more on your packaging ?
>>>>> What files exactly do you have in yuor 2 bundles ?
>>>>> And what looks like the MANIFESTs ?
>>>>>
>>>>> BTW, i remember that ekke had some issues with EJB / JPA  
>>>>> separations in different bundles. don't remember exactly what ...
>>>>> --G
>>>>>
>>>>> Skinner Chad a écrit :
>>>>>> I am using the lastest stable release from the website: 1.0.2.
>>>>>>
>>>>>> Yes, I do see that package exported, but am not certain what I  
>>>>>> am doing wrong. I have two bundles that I am deploying an  
>>>>>> entity project that contains all of my business model classes  
>>>>>> and JPA entities. The second bundle is the EJB bundle that  
>>>>>> contains the persistence.xml file. I believe that I have the  
>>>>>> EJB container loading, but when the entity manager starts it  
>>>>>> appears to fail with the Class not found error below... any  
>>>>>> ideas what I can check or does what I am doing seem wrong?
>>>>>>
>>>>>> Thanks,
>>>>>> -- Chad
>>>>>>
>>>>>>
>>>>>> On Apr 1, 2009, at 4:30 AM, Guillaume Sauthier wrote:
>>>>>>
>>>>>>> As you can see here:
>>>>>>> http://fisheye.easybeans.org/browse/EasyBeans/trunk/easybeans-osgi/corebundle/pom.xml?r=4874#l212
>>>>>>>
>>>>>>> All hibernate classes are exported by the core module.
>>>>>>>
>>>>>>> Can you check that ?
>>>>>>> $> packages <core-module-id>
>>>>>>>
>>>>>>> you should see org.hibernate.proxy
>>>>>>>
>>>>>>> Do you use the latest easybeans' version ?
>>>>>>> --G
>>>>>>>
>>>>>>> Skinner Chad a écrit :
>>>>>>>> I am getting closer. I have my EJB bundle starting, but when  
>>>>>>>> it starts the entity manager I get the following exception:
>>>>>>>>
>>>>>>>> 3/31/09 1:04:57 PM (I) SessionFactoryImpl.<init> : building  
>>>>>>>> session factory
>>>>>>>> net.sf.cglibcore.CodeGenerationException:  
>>>>>>>> java.lang.reflect.InvocationTargetException-->null
>>>>>>>>  at  
>>>>>>>> netsfcglib
>>>>>>>> .core
>>>>>>>> .AbstractClassGenerator.create(AbstractClassGenerator.java:237)
>>>>>>>>  at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
>>>>>>>>  at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
>>>>>>>>  at  
>>>>>>>> orghibernateproxypojocglib
>>>>>>>> .CGLIBLazyInitializer
>>>>>>>> .getProxyFactory(CGLIBLazyInitializer.java:127)
>>>>>>>>  at  
>>>>>>>> orghibernateproxypojo
>>>>>>>> .cglib
>>>>>>>> .CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
>>>>>>>>  at  
>>>>>>>> orghibernatetupleentity
>>>>>>>> .PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:
>>>>>>>> 162)
>>>>>>>>  at  
>>>>>>>> orghibernatetupleentity
>>>>>>>> .AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
>>>>>>>>  at  
>>>>>>>> orghibernatetuple
>>>>>>>> .entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
>>>>>>>>  at  
>>>>>>>> orghibernatetupleentityEntityEntityModeToTuplizerMapping
>>>>>>>> <init>(EntityEntityModeToTuplizerMapping.java:56)
>>>>>>>>  at  
>>>>>>>> org
>>>>>>>> .hibernate
>>>>>>>> .tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:302)
>>>>>>>>  at  
>>>>>>>> orghibernatepersisterentity
>>>>>>>> .AbstractEntityPersister.<init>(AbstractEntityPersister.java:
>>>>>>>> 434)
>>>>>>>>  at  
>>>>>>>> orghibernatepersisterentitySingleTableEntityPersister
>>>>>>>> .<init>(SingleTableEntityPersister.java:109)
>>>>>>>>  at  
>>>>>>>> orghibernatepersister
>>>>>>>> .PersisterFactory.createClassPersister(PersisterFactory.java:
>>>>>>>> 55)
>>>>>>>>  at  
>>>>>>>> org
>>>>>>>> .hibernate
>>>>>>>> .impl.SessionFactoryImpl<init>(SessionFactoryImpl.java:226)
>>>>>>>>  at  
>>>>>>>> orghibernate
>>>>>>>> .cfg.ConfigurationbuildSessionFactory(Configuration.java:1300)
>>>>>>>>  at  
>>>>>>>> orghibernatecfgAnnotationConfigurationbuildSessionFactory
>>>>>>>> (AnnotationConfiguration.java:915)
>>>>>>>>  at  
>>>>>>>> orghibernateejbEjb3Configuration
>>>>>>>> .buildEntityManagerFactory(Ejb3Configuration.java:730)
>>>>>>>>  at  
>>>>>>>> orghibernateejbHibernatePersistencecreateContainerEntityManagerFactory
>>>>>>>> (HibernatePersistence.java:127)
>>>>>>>>  at  
>>>>>>>> orgow2easybeanspersistence
>>>>>>>> .JPersistenceContext.init(JPersistenceContext.java:72)
>>>>>>>>  at  
>>>>>>>> orgow2easybeanspersistence
>>>>>>>> .JPersistenceContext.<init>(JPersistenceContext.java:65)
>>>>>>>>  at  
>>>>>>>> orgow2easybeanspersistencePersistenceUnitManageraddExtraPersistenceUnitInfos
>>>>>>>> (PersistenceUnitManagerjava:88)
>>>>>>>>  at  
>>>>>>>> orgow2easybeanspersistence
>>>>>>>> .PersistenceUnitManager.<init>(PersistenceUnitManager.java:64)
>>>>>>>>  at  
>>>>>>>> orgow2easybeanspersistencexmlPersistenceXmlFileAnalyzeranalyzePersistenceXmlFile
>>>>>>>> (PersistenceXmlFileAnalyzer.java:143)
>>>>>>>>  at  
>>>>>>>> org
>>>>>>>> .ow2.easybeans.container.JContainer3.start(JContainer3.java:
>>>>>>>> 321)
>>>>>>>>  at  
>>>>>>>> org
>>>>>>>> .ow2
>>>>>>>> .easybeans
>>>>>>>> .osgi.ejbjar.Activator.startContainer(Activator.java:147)
>>>>>>>>  at  
>>>>>>>> org.ow2.easybeans.osgi.ejbjar.Activator.start(Activator.java:
>>>>>>>> 101)
>>>>>>>>  at  
>>>>>>>> nettopekapublicschoolsprofile
>>>>>>>> .osgi.Activator.startEJBContainer(Activator.java:59)
>>>>>>>>  at net.topekapublicschools.profile.osgi.Activator
>>>>>>>> $
>>>>>>>> EasybeansServiceTrackerCustomizer
>>>>>>>> .addingService(Activator.java:117)
>>>>>>>>  at org.osgi.util.tracker.ServiceTracker
>>>>>>>> $Tracked.trackAdding(ServiceTracker.java:1030)
>>>>>>>>  at org.osgi.util.tracker.ServiceTracker
>>>>>>>> $Tracked.track(ServiceTracker.java:1008)
>>>>>>>>  at org.osgi.util.tracker.ServiceTracker
>>>>>>>> $Tracked.serviceChanged(ServiceTracker.java:941)
>>>>>>>>  at  
>>>>>>>> orgapachefelixframeworkutilEventDispatcher
>>>>>>>> .invokeServiceListenerCallback(EventDispatcher.java:820)
>>>>>>>>  at  
>>>>>>>> orgapachefelixframeworkutil
>>>>>>>> .EventDispatcher.fireEventImmediately(EventDispatcher.java:678)
>>>>>>>>  at  
>>>>>>>> orgapachefelixframework
>>>>>>>> .util.EventDispatcher.fireServiceEvent(EventDispatcher.java:
>>>>>>>> 609)
>>>>>>>>  at  
>>>>>>>> org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:
>>>>>>>> 3640)
>>>>>>>>  at org.apache.felix.framework.Felix.access$200(Felix.java:38)
>>>>>>>>  at org.apachefelix.framework.Felix
>>>>>>>> $2.serviceChanged(Felix.java: ==20
>>>>>>>> 841)
>>>>>>>>  at  
>>>>>>>> orgapachefelixframework
>>>>>>>> .ServiceRegistry.fireServiceChanged(ServiceRegistry.java:568)
>>>>>>>>  at  
>>>>>>>> orgapachefelix
>>>>>>>> .framework
>>>>>>>> .ServiceRegistry.registerService(ServiceRegistry.java:81)
>>>>>>>>  at  
>>>>>>>> org.apache.felix.framework.Felix.registerService(Felix.java:
>>>>>>>> 2773)
>>>>>>>>  at  
>>>>>>>> orgapachefelixframework
>>>>>>>> .BundleContextImpl.registerService(BundleContextImpl.java:252)
>>>>>>>>  at  
>>>>>>>> orgapachefelixscrimplAbstractComponentManagerregisterComponentService
>>>>>>>>  ==0
>>>>>>>> (AbstractComponentManager.java:698)
>>>>>>>>  at  
>>>>>>>> orgapachefelixscrimplAbstractComponentManageractivateInternal
>>>>>>>> (AbstractComponentManager.java:506)
>>>>>>>>  at org.apache.felix.scr.impl.AbstractComponentManager.access
>>>>>>>> $100(AbstractComponentManager.java:36)
>>>>>>>>  at org.apache.felix.scr.impl.AbstractComponentManager
>>>>>>>> $2.run(AbstractComponentManager.java:142)
>>>>>>>>  at  
>>>>>>>> orgapachefelix
>>>>>>>> .scr.impl.ComponentActorThread.run(ComponentActorThread.java:
>>>>>>>> 85)
>>>>>>>> Caused by: javalang.reflect.InvocationTargetException
>>>>>>>>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>>  at  
>>>>>>>> sunreflect
>>>>>>>> .NativeMethodAccessorImpl
>>>>>>>> .invoke(NativeMethodAccessorImpl.java:39)
>>>>>>>>  at  
>>>>>>>> sunreflectDelegatingMethodAccessorImpl
>>>>>>>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>>>  at java.lang.reflect.Method.invoke(Methodjava:585)
>>>>>>>>  at  
>>>>>>>> net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:
>>>>>>>> 384)
>>>>>>>>  at  
>>>>>>>> netsfcglib
>>>>>>>> .core
>>>>>>>> .AbstractClassGenerator.create(AbstractClassGenerator.java:219)
>>>>>>>>  ... 45 more
>>>>>>>> Caused by: java.lang.NoClassDefFoundError: org/hibernate/
>>>>>>>> proxy/HibernateProxy
>>>>>>>>  at java.lang.ClassLoader.defineClass1(Native Method)
>>>>>>>>  at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
>>>>>>>>  ... 51 more
>>>>>>>> INFO - 1:04:57 PM [S:  
>>>>>>>> org.ow2.easybeans.component.joram.joramcomponent] -  
>>>>>>>> ServiceEvent REGISTERED.
>>>>>>>>
>>>>>>>>
>>>>>>>> Does anyone know why I would get the "Caused by:  
>>>>>>>> java.lang.NoClassDefFoundError: org/hibernate/proxy/
>>>>>>>> HibernateProxy" and how I would resolve it?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> -- Chad
>>>>>>>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501  
>>>>>>>> IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  
>>>>>>>> THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF  
>>>>>>>> THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT  
>>>>>>>> AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING  
>>>>>>>> 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING,  
>>>>>>>> DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE  
>>>>>>>> IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> <Guillaume_Sauthier.vcf>
>>>>>>
>>>>>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN  
>>>>>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE  
>>>>>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS  
>>>>>> EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER  
>>>>>> NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING  
>>>>>> 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING,  
>>>>>> DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS  
>>>>>> STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>>>>>>
>>>>>>
>>>>>
>>>>> <Guillaume_Sauthier.vcf>
>>>>
>>>> ------------------------------------------------------------------------
>>>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN  
>>>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE. THE  
>>>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL. IF THIS EMAIL  
>>>> HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING  
>>>> US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  
>>>> UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING  
>>>> THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND  
>>>> MAY BE UNLAWFUL.
>>>
>>> ------------------------------------------------------------------------
>>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN  
>>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE. THE  
>>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL. IF THIS EMAIL  
>>> HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING  
>>> US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  
>>> UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING  
>>> THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND  
>>> MAY BE UNLAWFUL.
>>
>> ------------------------------------------------------------------------
>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN  
>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE. THE  
>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL. IF THIS EMAIL HAS  
>> MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF  
>> THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000. UNAUTHORIZED  
>> FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE  
>> INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE  
>> UNLAWFUL.
>
> <Guillaume_Sauthier.vcf>


Re: Re: Class not found HibernateProxy

by gembin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi,
 
 so, it means each method call should surround with set and restore classloader?
for example:
public class TestBean implements ITestBean{
    @EJB(mappedName="UserPersistenceServiceBean")IUserPersistenceService userService;
 
    public void test(){
         ClassLoader currentContextClassLoader = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
        userService.test();
       Thread.currentThread().setContextClassLoader(currentContextClassLoader);
    }
 
   public void test2(){
             //set classloader.........
             userService.test();
             //restore classloader.........
   }
 
}
 
 
-Gembin


 
2009/4/15 ekke <ekkehard@...>
Guillaume Sauthier schrieb:

The ejb bundles currently needs to have a dynamic import * (or the fixed list of imported packages, but we don't have this fixed list prior to bytecode enhancement at the moment)
--G
I dont have a dynamic import * in my ejb bundles

I have:

enum bundle: exporting enums
entity bundle: exporting entities, importing enums
ejb-api bundle: exporting api, importing entities, enums
ejb-beans bundle: importing ejb-api, entities, enums

and I switch classloader before using ejbs:

ClassLoader currentContextClassLoader = Thread.currentThread().getContextClassLoader();

Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
               
// trying to get the TestBeanRemoteManagerI from initialContext
tbRemote = (TestBeanRemoteManagerI) lookupEasyBeansInitialContext(TestBeanRemoteManagerI.EZB_REMOTE_CONTEXT);
               
// now test a bean from separate bundle where an @EJB is included
logger.debug(bundleMarker, "now lets do the tests with {}", tbRemote);
tbRemote.testSomeBeans();      
               
        Thread.currentThread().setContextClassLoader(currentContextClassLoader);





Re: Class not found HibernateProxy

by ekke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

张斌 schrieb:
> hi,
>  
>  so, it means each method call should surround with set and restore
> classloader?

try if it helps you with problems
this is the 'old' solution how to use libraries not build with OSGI in
mind (like hibernate) in an OSGI environment where those libraries are
using the ContextClassLoader

I'll do some more tests to find perhaps different solutions
but this needs time

and at the moment I'm
- migrating from eclipse 3.4.2 to 3.5.M6
- ...newest EasyBeans
- ...newest SLF4J / LogBack
- ...newest Riena

and preparing my Session at JAX (OSGI Experts Day) next week
where I'll explain and demonstrate my OSGI-Equinox-EasyBeans-Riena server

the server will become Open Source in june (open-erp-ware)

ekke


> for example:
> public class TestBean implements ITestBean{
>     @EJB(mappedName="UserPersistenceServiceBean")IUserPersistenceService
> userService;
>  
>     public void test(){
>          ClassLoader currentContextClassLoader =
> Thread.currentThread().getContextClassLoader();
>        
> Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
>         userService.test();
>        
> Thread.currentThread().setContextClassLoader(currentContextClassLoader);
>     }
>  
>    public void test2(){
>              //set classloader.........
>              userService.test();
>              //restore classloader.........
>    }
>  
> }
>  
>  
> -Gembin
>
>
>  
> 2009/4/15 ekke <ekkehard@...
> <mailto:ekkehard@...>>
>
>     Guillaume Sauthier schrieb:
>
>         The ejb bundles currently needs to have a dynamic import * (or
>         the fixed list of imported packages, but we don't have this
>         fixed list prior to bytecode enhancement at the moment)
>         --G
>
>     I dont have a dynamic import * in my ejb bundles
>
>     I have:
>
>     enum bundle: exporting enums
>     entity bundle: exporting entities, importing enums
>     ejb-api bundle: exporting api, importing entities, enums
>     ejb-beans bundle: importing ejb-api, entities, enums
>
>     and I switch classloader before using ejbs:
>
>     ClassLoader currentContextClassLoader =
>     Thread.currentThread().getContextClassLoader();
>
>     Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
>                    
>     // trying to get the TestBeanRemoteManagerI from initialContext
>     tbRemote = (TestBeanRemoteManagerI)
>     lookupEasyBeansInitialContext(TestBeanRemoteManagerI.EZB_REMOTE_CONTEXT);
>                    
>     // now test a bean from separate bundle where an @EJB is included
>     logger.debug(bundleMarker, "now lets do the tests with {}", tbRemote);
>     tbRemote.testSomeBeans();      
>                    
>            
>     Thread.currentThread().setContextClassLoader(currentContextClassLoader);
>
>
>
>