Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Teneo] org.hibernate.proxy.HibernateProxy not found when running as RCP
[Teneo] org.hibernate.proxy.HibernateProxy not found when running as RCP [message #491704] Thu, 15 October 2009 14:11 Go to next message
Frank Grimm is currently offline Frank Grimm
Messages: 22
Registered: July 2009
Junior Member
Dear newsgroup,

I'm trying to use Teneo in a RCP project, but when I run the RCP
application, the following error occurs:

org.hibernate.HibernateException: Unable to instantiate default tuplizer
[org.eclipse.emf.teneo.hibernate.tuplizer.EMFTuplizer]
at
org.hibernate.tuple.entity.EntityTuplizerFactory.constructTu plizer(EntityTuplizerFactory.java:110)
at
org.hibernate.tuple.entity.EntityTuplizerFactory.constructTu plizer(EntityTuplizerFactory.java:82)
at
org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping . <init>(EntityEntityModeToTuplizerMapping.java:72)
at
org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:323)
at
org.hibernate.persister.entity.AbstractEntityPersister.<init >(AbstractEntityPersister.java:456)
at
org.hibernate.persister.entity.JoinedSubclassEntityPersister . <init>(JoinedSubclassEntityPersister.java:113)
at
org.hibernate.persister.PersisterFactory.createClassPersiste r(PersisterFactory.java:87)
at
org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:267)
at
org.hibernate.cfg.Configuration.buildSessionFactory(Configur ation.java:1341)
at
org.eclipse.emf.teneo.hibernate.HbSessionDataStore.buildSess ionFactory(HbSessionDataStore.java:198)
at
org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initializ e(HbSessionDataStore.java:86)
[...]
Caused by: java.lang.ClassNotFoundException:
org.hibernate.proxy.HibernateProxy
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:494)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:398)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:105)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320 )

The RCP currently consists of only one plugin yet. When I run this
plugin as an ordinary Java application, Teneo works fine. But the
above-mentioned exception occurs when it is started as an RCP.

The plugin contains all the required Hibernate jars and depends on
Teneo's core and Hibernate plugins: org.eclipse.emf.teneo,
org.eclipse.emf.teneo.eclipse, org.eclipse.emf.teneo.hibernate.eclipse,
org.apache.commons.logging,org.eclipse.emf.teneo.annotations ,
org.eclipse.emf.teneo.hibernate.mapper, org.eclipse.emf.teneo.hibernate

The Hibernate jars are added in the plugin's bundle classpath and each
jar's packages are added to the bundles exported packages. (Even the
Eclipse-BuddyPolicy: dependent line exists, but I guess this is irrelevant.)

Apparently I miss to configure something. May be somebody recognizes my
mistake.

Thanks,
Frank
Re: [Teneo] org.hibernate.proxy.HibernateProxy not found when running as RCP [message #491750 is a reply to message #491704] Thu, 15 October 2009 16:10 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5332
Registered: July 2009
Senior Member
Hi Frank,
These CNE's are always annoying... I think the classloading behavior of running as a java app is different than running
in an osgi environment (although also the java app uses the plugin classpath definitions).

Can you post/link the manifest.mf of the rcp plugin and the hibernate plugin here? Are your model classes located in
another plugin (if so can you also attach/post its manifest.mf?).

gr. Martin

Frank Grimm wrote:
> Dear newsgroup,
>
> I'm trying to use Teneo in a RCP project, but when I run the RCP
> application, the following error occurs:
>
> org.hibernate.HibernateException: Unable to instantiate default tuplizer
> [org.eclipse.emf.teneo.hibernate.tuplizer.EMFTuplizer]
> at
> org.hibernate.tuple.entity.EntityTuplizerFactory.constructTu plizer(EntityTuplizerFactory.java:110)
> at
> org.hibernate.tuple.entity.EntityTuplizerFactory.constructTu plizer(EntityTuplizerFactory.java:82)
> at
> org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping . <init>(EntityEntityModeToTuplizerMapping.java:72)
> at
> org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:323)
> at
> org.hibernate.persister.entity.AbstractEntityPersister.<init >(AbstractEntityPersister.java:456)
> at
> org.hibernate.persister.entity.JoinedSubclassEntityPersister . <init>(JoinedSubclassEntityPersister.java:113)
> at
> org.hibernate.persister.PersisterFactory.createClassPersiste r(PersisterFactory.java:87)
> at
> org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:267)
> at
> org.hibernate.cfg.Configuration.buildSessionFactory(Configur ation.java:1341)
> at
> org.eclipse.emf.teneo.hibernate.HbSessionDataStore.buildSess ionFactory(HbSessionDataStore.java:198)
> at
> org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initializ e(HbSessionDataStore.java:86)
> [...]
> Caused by: java.lang.ClassNotFoundException:
> org.hibernate.proxy.HibernateProxy
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:494)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:398)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:105)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320 )
>
> The RCP currently consists of only one plugin yet. When I run this
> plugin as an ordinary Java application, Teneo works fine. But the
> above-mentioned exception occurs when it is started as an RCP.
>
> The plugin contains all the required Hibernate jars and depends on
> Teneo's core and Hibernate plugins: org.eclipse.emf.teneo,
> org.eclipse.emf.teneo.eclipse, org.eclipse.emf.teneo.hibernate.eclipse,
> org.apache.commons.logging,org.eclipse.emf.teneo.annotations ,
> org.eclipse.emf.teneo.hibernate.mapper, org.eclipse.emf.teneo.hibernate
>
> The Hibernate jars are added in the plugin's bundle classpath and each
> jar's packages are added to the bundles exported packages. (Even the
> Eclipse-BuddyPolicy: dependent line exists, but I guess this is irrelevant.)
>
> Apparently I miss to configure something. May be somebody recognizes my
> mistake.
>
> Thanks,
> Frank


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] org.hibernate.proxy.HibernateProxy not found when running as RCP [message #491896 is a reply to message #491750] Fri, 16 October 2009 13:11 Go to previous messageGo to next message
Frank Grimm is currently offline Frank Grimm
Messages: 22
Registered: July 2009
Junior Member
Dear Martin,

On 10/15/2009 06:10 PM, Martin Taal wrote:
> Can you post/link the manifest.mf of the rcp plugin and the hibernate
> plugin here? Are your model classes located in another plugin (if so can
> you also attach/post its manifest.mf?).

I'm using two plugins: on contains the hibernate jars and a little teneo
test (which triggers the CNE), the other plugin contains the Ecore model.

Here is the test plugin's bundle:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Teneo JARs
Bundle-SymbolicName: teneojars;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: jars/antlr-2.7.6.jar,
jars/asm-3.2.jar,
jars/cglib-2.2.jar,
jars/commons-collections-3.1.jar,
jars/dom4j-1.6.1.jar,
jars/h2-1.1.119.jar,
jars/hibernate3.jar,
jars/jta-1.1.jar,
jars/log4j-1.2.15.jar,
jars/slf4j-api-1.5.8.jar,
jars/slf4j-log4j12-1.5.8.jar,
.
Require-Bundle:
org.eclipse.emf.teneo;bundle-version="1.1.1";visibility:=reexport,
org.eclipse.emf.teneo.eclipse;bundle-version="1.1.0";visibility:=reexport,
org.eclipse.emf.teneo.hibernate.eclipse;bundle-version="1.1.0 ";visibility:=reexport,
org.apache.commons.logging;bundle-version="1.0.4";visibility:=reexport,
org.eclipse.emf.teneo.annotations;bundle-version="1.1.0";visibility:=reexport,
org.eclipse.emf.teneo.hibernate.mapper;visibility:=reexport,
org.eclipse.emf.teneo.hibernate;visibility:=reexport,
de.scopeset.ec.sde;bundle-version="1.0.0",
org.eclipse.ui;bundle-version="3.5.1"
Export-Package: antlr,
[...]
Eclipse-BuddyPolicy: dependent

And here is the model plugin's (de.scopeset.ec.sde) bundle:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: de.scopeset.ec.sde;singleton:=true
Bundle-Version: 1.0.0
Bundle-ClassPath: de.scopeset.ec.sde.jar
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: de.scopeset.ec.sde,
de.scopeset.ec.sde.impl,
de.scopeset.ec.sde.util
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport,
org.junit4;bundle-version="4.5.0"
Bundle-ActivationPolicy: lazy

Thanks,
Frank
Re: [Teneo] org.hibernate.proxy.HibernateProxy not found when running as RCP [message #491908 is a reply to message #491896] Fri, 16 October 2009 13:36 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5332
Registered: July 2009
Senior Member
Hi Frank,
Can you try the following: set the Eclipse-BuddyPolicy: dependent
in the model plugin?

I also would propose a different plugin structure:
- a hibernate libraries plugin with just the hibernate jar files with: Eclipse-BuddyPolicy: dependent
- a model class plugin which contains the model classes
- a separate plugin with your test class which required the commons-logging plugin, the org.eclipse.emf.teneo.hibernate
plugin, model-plugin as well as the hibernate plugin

gr. Martin

Frank Grimm wrote:
> Dear Martin,
>
> On 10/15/2009 06:10 PM, Martin Taal wrote:
>> Can you post/link the manifest.mf of the rcp plugin and the hibernate
>> plugin here? Are your model classes located in another plugin (if so can
>> you also attach/post its manifest.mf?).
>
> I'm using two plugins: on contains the hibernate jars and a little teneo
> test (which triggers the CNE), the other plugin contains the Ecore model.
>
> Here is the test plugin's bundle:
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Teneo JARs
> Bundle-SymbolicName: teneojars;singleton:=true
> Bundle-Version: 1.0.0.qualifier
> Bundle-RequiredExecutionEnvironment: J2SE-1.5
> Bundle-ClassPath: jars/antlr-2.7.6.jar,
> jars/asm-3.2.jar,
> jars/cglib-2.2.jar,
> jars/commons-collections-3.1.jar,
> jars/dom4j-1.6.1.jar,
> jars/h2-1.1.119.jar,
> jars/hibernate3.jar,
> jars/jta-1.1.jar,
> jars/log4j-1.2.15.jar,
> jars/slf4j-api-1.5.8.jar,
> jars/slf4j-log4j12-1.5.8.jar,
> .
> Require-Bundle:
> org.eclipse.emf.teneo;bundle-version="1.1.1";visibility:=reexport,
> org.eclipse.emf.teneo.eclipse;bundle-version="1.1.0";visibility:=reexport,
> org.eclipse.emf.teneo.hibernate.eclipse;bundle-version="1.1.0 ";visibility:=reexport,
> org.apache.commons.logging;bundle-version="1.0.4";visibility:=reexport,
> org.eclipse.emf.teneo.annotations;bundle-version="1.1.0";visibility:=reexport,
> org.eclipse.emf.teneo.hibernate.mapper;visibility:=reexport,
> org.eclipse.emf.teneo.hibernate;visibility:=reexport,
> de.scopeset.ec.sde;bundle-version="1.0.0",
> org.eclipse.ui;bundle-version="3.5.1"
> Export-Package: antlr,
> [...]
> Eclipse-BuddyPolicy: dependent
>
> And here is the model plugin's (de.scopeset.ec.sde) bundle:
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: %pluginName
> Bundle-SymbolicName: de.scopeset.ec.sde;singleton:=true
> Bundle-Version: 1.0.0
> Bundle-ClassPath: de.scopeset.ec.sde.jar
> Bundle-Vendor: %providerName
> Bundle-Localization: plugin
> Bundle-RequiredExecutionEnvironment: J2SE-1.5
> Export-Package: de.scopeset.ec.sde,
> de.scopeset.ec.sde.impl,
> de.scopeset.ec.sde.util
> Require-Bundle: org.eclipse.core.runtime,
> org.eclipse.emf.ecore;visibility:=reexport,
> org.junit4;bundle-version="4.5.0"
> Bundle-ActivationPolicy: lazy
>
> Thanks,
> Frank


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] org.hibernate.proxy.HibernateProxy not found when running as RCP [message #493424 is a reply to message #491908] Mon, 26 October 2009 08:21 Go to previous messageGo to next message
Frank Grimm is currently offline Frank Grimm
Messages: 22
Registered: July 2009
Junior Member
Dear Martin,

On 10/16/2009 03:36 PM, Martin Taal wrote:

> Can you try the following: set the Eclipse-BuddyPolicy: dependent
> in the model plugin?
>
> I also would propose a different plugin structure:
> - a hibernate libraries plugin with just the hibernate jar files with:
> Eclipse-BuddyPolicy: dependent
> - a model class plugin which contains the model classes
> - a separate plugin with your test class which required the
> commons-logging plugin, the org.eclipse.emf.teneo.hibernate plugin,
> model-plugin as well as the hibernate plugin

following your advise worked, thanks! In addition, I had to switch from
javaassist to cglib following your explanation given at
https://bugs.eclipse.org/bugs/show_bug.cgi?id=292151#c3

Thanks,
Frank

> Frank Grimm wrote:
>> Dear Martin,
>>
>> On 10/15/2009 06:10 PM, Martin Taal wrote:
>>> Can you post/link the manifest.mf of the rcp plugin and the hibernate
>>> plugin here? Are your model classes located in another plugin (if so can
>>> you also attach/post its manifest.mf?).
>>
>> I'm using two plugins: on contains the hibernate jars and a little teneo
>> test (which triggers the CNE), the other plugin contains the Ecore model.
>>
>> Here is the test plugin's bundle:
>>
>> Manifest-Version: 1.0
>> Bundle-ManifestVersion: 2
>> Bundle-Name: Teneo JARs
>> Bundle-SymbolicName: teneojars;singleton:=true
>> Bundle-Version: 1.0.0.qualifier
>> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>> Bundle-ClassPath: jars/antlr-2.7.6.jar,
>> jars/asm-3.2.jar,
>> jars/cglib-2.2.jar,
>> jars/commons-collections-3.1.jar,
>> jars/dom4j-1.6.1.jar,
>> jars/h2-1.1.119.jar,
>> jars/hibernate3.jar,
>> jars/jta-1.1.jar,
>> jars/log4j-1.2.15.jar,
>> jars/slf4j-api-1.5.8.jar,
>> jars/slf4j-log4j12-1.5.8.jar,
>> .
>> Require-Bundle:
>> org.eclipse.emf.teneo;bundle-version="1.1.1";visibility:=reexport,
>> org.eclipse.emf.teneo.eclipse;bundle-version="1.1.0";visibility:=reexport,
>>
>> org.eclipse.emf.teneo.hibernate.eclipse;bundle-version="1.1.0 ";visibility:=reexport,
>>
>> org.apache.commons.logging;bundle-version="1.0.4";visibility:=reexport,
>> org.eclipse.emf.teneo.annotations;bundle-version="1.1.0";visibility:=reexport,
>>
>> org.eclipse.emf.teneo.hibernate.mapper;visibility:=reexport,
>> org.eclipse.emf.teneo.hibernate;visibility:=reexport,
>> de.scopeset.ec.sde;bundle-version="1.0.0",
>> org.eclipse.ui;bundle-version="3.5.1"
>> Export-Package: antlr,
>> [...]
>> Eclipse-BuddyPolicy: dependent
>>
>> And here is the model plugin's (de.scopeset.ec.sde) bundle:
>>
>> Manifest-Version: 1.0
>> Bundle-ManifestVersion: 2
>> Bundle-Name: %pluginName
>> Bundle-SymbolicName: de.scopeset.ec.sde;singleton:=true
>> Bundle-Version: 1.0.0
>> Bundle-ClassPath: de.scopeset.ec.sde.jar
>> Bundle-Vendor: %providerName
>> Bundle-Localization: plugin
>> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>> Export-Package: de.scopeset.ec.sde,
>> de.scopeset.ec.sde.impl,
>> de.scopeset.ec.sde.util
>> Require-Bundle: org.eclipse.core.runtime,
>> org.eclipse.emf.ecore;visibility:=reexport,
>> org.junit4;bundle-version="4.5.0"
>> Bundle-ActivationPolicy: lazy
>>
>> Thanks,
>> Frank
>
>
Re: [Teneo] org.hibernate.proxy.HibernateProxy not found when running as RCP [message #493428 is a reply to message #493424] Mon, 26 October 2009 08:45 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5332
Registered: July 2009
Senior Member
Good to hear Frank! For other users, I also added this issue to the troubleshooting section:
http://www.elver.org/hibernate/troubleshooting.html#javassis t_duplicate

gr. Martin

Frank Grimm wrote:
> Dear Martin,
>
> On 10/16/2009 03:36 PM, Martin Taal wrote:
>
>> Can you try the following: set the Eclipse-BuddyPolicy: dependent
>> in the model plugin?
>>
>> I also would propose a different plugin structure:
>> - a hibernate libraries plugin with just the hibernate jar files with:
>> Eclipse-BuddyPolicy: dependent
>> - a model class plugin which contains the model classes
>> - a separate plugin with your test class which required the
>> commons-logging plugin, the org.eclipse.emf.teneo.hibernate plugin,
>> model-plugin as well as the hibernate plugin
>
> following your advise worked, thanks! In addition, I had to switch from
> javaassist to cglib following your explanation given at
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=292151#c3
>
> Thanks,
> Frank
>
>> Frank Grimm wrote:
>>> Dear Martin,
>>>
>>> On 10/15/2009 06:10 PM, Martin Taal wrote:
>>>> Can you post/link the manifest.mf of the rcp plugin and the hibernate
>>>> plugin here? Are your model classes located in another plugin (if so can
>>>> you also attach/post its manifest.mf?).
>>> I'm using two plugins: on contains the hibernate jars and a little teneo
>>> test (which triggers the CNE), the other plugin contains the Ecore model.
>>>
>>> Here is the test plugin's bundle:
>>>
>>> Manifest-Version: 1.0
>>> Bundle-ManifestVersion: 2
>>> Bundle-Name: Teneo JARs
>>> Bundle-SymbolicName: teneojars;singleton:=true
>>> Bundle-Version: 1.0.0.qualifier
>>> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>>> Bundle-ClassPath: jars/antlr-2.7.6.jar,
>>> jars/asm-3.2.jar,
>>> jars/cglib-2.2.jar,
>>> jars/commons-collections-3.1.jar,
>>> jars/dom4j-1.6.1.jar,
>>> jars/h2-1.1.119.jar,
>>> jars/hibernate3.jar,
>>> jars/jta-1.1.jar,
>>> jars/log4j-1.2.15.jar,
>>> jars/slf4j-api-1.5.8.jar,
>>> jars/slf4j-log4j12-1.5.8.jar,
>>> .
>>> Require-Bundle:
>>> org.eclipse.emf.teneo;bundle-version="1.1.1";visibility:=reexport,
>>> org.eclipse.emf.teneo.eclipse;bundle-version="1.1.0";visibility:=reexport,
>>>
>>> org.eclipse.emf.teneo.hibernate.eclipse;bundle-version="1.1.0 ";visibility:=reexport,
>>>
>>> org.apache.commons.logging;bundle-version="1.0.4";visibility:=reexport,
>>> org.eclipse.emf.teneo.annotations;bundle-version="1.1.0";visibility:=reexport,
>>>
>>> org.eclipse.emf.teneo.hibernate.mapper;visibility:=reexport,
>>> org.eclipse.emf.teneo.hibernate;visibility:=reexport,
>>> de.scopeset.ec.sde;bundle-version="1.0.0",
>>> org.eclipse.ui;bundle-version="3.5.1"
>>> Export-Package: antlr,
>>> [...]
>>> Eclipse-BuddyPolicy: dependent
>>>
>>> And here is the model plugin's (de.scopeset.ec.sde) bundle:
>>>
>>> Manifest-Version: 1.0
>>> Bundle-ManifestVersion: 2
>>> Bundle-Name: %pluginName
>>> Bundle-SymbolicName: de.scopeset.ec.sde;singleton:=true
>>> Bundle-Version: 1.0.0
>>> Bundle-ClassPath: de.scopeset.ec.sde.jar
>>> Bundle-Vendor: %providerName
>>> Bundle-Localization: plugin
>>> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>>> Export-Package: de.scopeset.ec.sde,
>>> de.scopeset.ec.sde.impl,
>>> de.scopeset.ec.sde.util
>>> Require-Bundle: org.eclipse.core.runtime,
>>> org.eclipse.emf.ecore;visibility:=reexport,
>>> org.junit4;bundle-version="4.5.0"
>>> Bundle-ActivationPolicy: lazy
>>>
>>> Thanks,
>>> Frank
>>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] org.hibernate.proxy.HibernateProxy not found when running as RCP [message #1060650 is a reply to message #493428] Mon, 27 May 2013 13:25 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal Karaca
Messages: 744
Registered: July 2009
Senior Member
Hi Martin,
Could you please update the link to the specific javaassist duplicate method error?
Can't find it in the Teneo docs.

Thanks!

Martin Taal wrote on Mon, 26 October 2009 09:45
Good to hear Frank! For other users, I also added this issue to the troubleshooting section:
http://www.elver.org/hibernate/troubleshooting.html#javassis t_duplicate

gr. Martin

Frank Grimm wrote:
> Dear Martin,
>
> On 10/16/2009 03:36 PM, Martin Taal wrote:
>
>> Can you try the following: set the Eclipse-BuddyPolicy: dependent
>> in the model plugin?
>>
>> I also would propose a different plugin structure:
>> - a hibernate libraries plugin with just the hibernate jar files with:
>> Eclipse-BuddyPolicy: dependent
>> - a model class plugin which contains the model classes
>> - a separate plugin with your test class which required the
>> commons-logging plugin, the org.eclipse.emf.teneo.hibernate plugin,
>> model-plugin as well as the hibernate plugin
>
> following your advise worked, thanks! In addition, I had to switch from
> javaassist to cglib following your explanation given at
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=292151#c3
>
> Thanks,
> Frank
>
>> Frank Grimm wrote:
>>> Dear Martin,
>>>
>>> On 10/15/2009 06:10 PM, Martin Taal wrote:
>>>> Can you post/link the manifest.mf of the rcp plugin and the hibernate
>>>> plugin here? Are your model classes located in another plugin (if so can
>>>> you also attach/post its manifest.mf?).
>>> I'm using two plugins: on contains the hibernate jars and a little teneo
>>> test (which triggers the CNE), the other plugin contains the Ecore model.
>>>
>>> Here is the test plugin's bundle:
>>>
>>> Manifest-Version: 1.0
>>> Bundle-ManifestVersion: 2
>>> Bundle-Name: Teneo JARs
>>> Bundle-SymbolicName: teneojars;singleton:=true
>>> Bundle-Version: 1.0.0.qualifier
>>> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>>> Bundle-ClassPath: jars/antlr-2.7.6.jar,
>>> jars/asm-3.2.jar,
>>> jars/cglib-2.2.jar,
>>> jars/commons-collections-3.1.jar,
>>> jars/dom4j-1.6.1.jar,
>>> jars/h2-1.1.119.jar,
>>> jars/hibernate3.jar,
>>> jars/jta-1.1.jar,
>>> jars/log4j-1.2.15.jar,
>>> jars/slf4j-api-1.5.8.jar,
>>> jars/slf4j-log4j12-1.5.8.jar,
>>> .
>>> Require-Bundle:
>>> org.eclipse.emf.teneo;bundle-version="1.1.1";visibility:=reexport,
>>> org.eclipse.emf.teneo.eclipse;bundle-version="1.1.0";visibility:=reexport,
>>>
>>> org.eclipse.emf.teneo.hibernate.eclipse;bundle-version="1.1.0 ";visibility:=reexport,
>>>
>>> org.apache.commons.logging;bundle-version="1.0.4";visibility:=reexport,
>>> org.eclipse.emf.teneo.annotations;bundle-version="1.1.0";visibility:=reexport,
>>>
>>> org.eclipse.emf.teneo.hibernate.mapper;visibility:=reexport,
>>> org.eclipse.emf.teneo.hibernate;visibility:=reexport,
>>> de.scopeset.ec.sde;bundle-version="1.0.0",
>>> org.eclipse.ui;bundle-version="3.5.1"
>>> Export-Package: antlr,
>>> [...]
>>> Eclipse-BuddyPolicy: dependent
>>>
>>> And here is the model plugin's (de.scopeset.ec.sde) bundle:
>>>
>>> Manifest-Version: 1.0
>>> Bundle-ManifestVersion: 2
>>> Bundle-Name: %pluginName
>>> Bundle-SymbolicName: de.scopeset.ec.sde;singleton:=true
>>> Bundle-Version: 1.0.0
>>> Bundle-ClassPath: de.scopeset.ec.sde.jar
>>> Bundle-Vendor: %providerName
>>> Bundle-Localization: plugin
>>> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>>> Export-Package: de.scopeset.ec.sde,
>>> de.scopeset.ec.sde.impl,
>>> de.scopeset.ec.sde.util
>>> Require-Bundle: org.eclipse.core.runtime,
>>> org.eclipse.emf.ecore;visibility:=reexport,
>>> org.junit4;bundle-version="4.5.0"
>>> Bundle-ActivationPolicy: lazy
>>>
>>> Thanks,
>>> Frank
>>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org

Re: [Teneo] org.hibernate.proxy.HibernateProxy not found when running as RCP [message #1060656 is a reply to message #1060650] Mon, 27 May 2013 14:23 Go to previous message
Martin Taal is currently offline Martin Taal
Messages: 5332
Registered: July 2009
Senior Member
Here it is:
http://wiki.eclipse.org/Teneo/Hibernate/FAQ#Duplicate_method_exception_with_javaassist

gr. Martin

On 05/27/2013 03:25 PM, Erdal Karaca wrote:
> Hi Martin,
> Could you please update the link to the specific javaassist duplicate method error?
> Can't find it in the Teneo docs.
>
> Thanks!
>
> Martin Taal wrote on Mon, 26 October 2009 09:45
>> Good to hear Frank! For other users, I also added this issue to the troubleshooting section:
>> http://www.elver.org/hibernate/troubleshooting.html#javassis t_duplicate
>>
>> gr. Martin
>>
>> Frank Grimm wrote:
>> > Dear Martin,
>> > > On 10/16/2009 03:36 PM, Martin Taal wrote:
>> > >> Can you try the following: set the Eclipse-BuddyPolicy: dependent
>> >> in the model plugin?
>> >>
>> >> I also would propose a different plugin structure:
>> >> - a hibernate libraries plugin with just the hibernate jar files with:
>> >> Eclipse-BuddyPolicy: dependent
>> >> - a model class plugin which contains the model classes
>> >> - a separate plugin with your test class which required the
>> >> commons-logging plugin, the org.eclipse.emf.teneo.hibernate plugin,
>> >> model-plugin as well as the hibernate plugin
>> > > following your advise worked, thanks! In addition, I had to switch from
>> > javaassist to cglib following your explanation given at
>> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=292151#c3
>> > > Thanks,
>> > Frank
>> > >> Frank Grimm wrote:
>> >>> Dear Martin,
>> >>>
>> >>> On 10/15/2009 06:10 PM, Martin Taal wrote:
>> >>>> Can you post/link the manifest.mf of the rcp plugin and the hibernate
>> >>>> plugin here? Are your model classes located in another plugin (if so can
>> >>>> you also attach/post its manifest.mf?).
>> >>> I'm using two plugins: on contains the hibernate jars and a little teneo
>> >>> test (which triggers the CNE), the other plugin contains the Ecore model.
>> >>>
>> >>> Here is the test plugin's bundle:
>> >>>
>> >>> Manifest-Version: 1.0
>> >>> Bundle-ManifestVersion: 2
>> >>> Bundle-Name: Teneo JARs
>> >>> Bundle-SymbolicName: teneojars;singleton:=true
>> >>> Bundle-Version: 1.0.0.qualifier
>> >>> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>> >>> Bundle-ClassPath: jars/antlr-2.7.6.jar,
>> >>> jars/asm-3.2.jar,
>> >>> jars/cglib-2.2.jar,
>> >>> jars/commons-collections-3.1.jar,
>> >>> jars/dom4j-1.6.1.jar,
>> >>> jars/h2-1.1.119.jar,
>> >>> jars/hibernate3.jar,
>> >>> jars/jta-1.1.jar,
>> >>> jars/log4j-1.2.15.jar,
>> >>> jars/slf4j-api-1.5.8.jar,
>> >>> jars/slf4j-log4j12-1.5.8.jar,
>> >>> .
>> >>> Require-Bundle:
>> >>> org.eclipse.emf.teneo;bundle-version="1.1.1";visibility:=reexport,
>> >>> org.eclipse.emf.teneo.eclipse;bundle-version="1.1.0";visibility:=reexport,
>> >>>
>> >>> org.eclipse.emf.teneo.hibernate.eclipse;bundle-version="1.1.0 ";visibility:=reexport,
>> >>>
>> >>> org.apache.commons.logging;bundle-version="1.0.4";visibility:=reexport,
>> >>> org.eclipse.emf.teneo.annotations;bundle-version="1.1.0";visibility:=reexport,
>> >>>
>> >>> org.eclipse.emf.teneo.hibernate.mapper;visibility:=reexport,
>> >>> org.eclipse.emf.teneo.hibernate;visibility:=reexport,
>> >>> de.scopeset.ec.sde;bundle-version="1.0.0",
>> >>> org.eclipse.ui;bundle-version="3.5.1"
>> >>> Export-Package: antlr,
>> >>> [...]
>> >>> Eclipse-BuddyPolicy: dependent
>> >>>
>> >>> And here is the model plugin's (de.scopeset.ec.sde) bundle:
>> >>>
>> >>> Manifest-Version: 1.0
>> >>> Bundle-ManifestVersion: 2
>> >>> Bundle-Name: %pluginName
>> >>> Bundle-SymbolicName: de.scopeset.ec.sde;singleton:=true
>> >>> Bundle-Version: 1.0.0
>> >>> Bundle-ClassPath: de.scopeset.ec.sde.jar
>> >>> Bundle-Vendor: %providerName
>> >>> Bundle-Localization: plugin
>> >>> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>> >>> Export-Package: de.scopeset.ec.sde,
>> >>> de.scopeset.ec.sde.impl,
>> >>> de.scopeset.ec.sde.util
>> >>> Require-Bundle: org.eclipse.core.runtime,
>> >>> org.eclipse.emf.ecore;visibility:=reexport,
>> >>> org.junit4;bundle-version="4.5.0"
>> >>> Bundle-ActivationPolicy: lazy
>> >>>
>> >>> Thanks,
>> >>> Frank
>> >>
>>
>>
>> --
>>
>> With Regards, Martin Taal
>>
>> Springsite/Elver.org
>> Office: Hardwareweg 4, 3821 BV Amersfoort
>> Postal: Nassaulaan 7, 3941 EC Doorn
>> The Netherlands
>> Cell: +31 (0)6 288 48 943
>> Tel: +31 (0)84 420 2397
>> Fax: +31 (0)84 225 9307
>> Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
>> Web: www.springsite.com - www.elver.org
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Previous Topic: problem with inheritance and access to subclass
Next Topic:[Texo] Generated Code
Goto Forum:
  


Current Time: Sun Sep 21 06:13:36 GMT 2014

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

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