Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » The newbie struggle (But still made it).
The newbie struggle (But still made it). [message #127807] Fri, 01 August 2008 16:20 Go to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Dears,

My environment: Eclipse Ganymede, latest EMF.
RCP Application.
MacOSX Leopard
MySQL Database.


Please find some feedback from a "First User".

I am building an RCP application using an EMF generated model.
from .xsd. I decided to try JPOX over Hibernate first.

I followed the instruction on www.elver.org. Which I discovered
as some serious shortcomings in the tutorial for a newbie like me.
I would like to list here, my experience which can be used to update the
tutorial: I managed to get through and connect to the database but it
took 3 days.

1) JPOX libraries

It's not clear which JPOX libraries and versions are needed in the elver
install tutorial.

What should be clarified is the exact require libs and version.

- The JPOX core version
- The JPOX Enhancement version
- The JDO Version. (2.0 or 2.1?).

A newbie is fooled into getting the latest JPOX version which is not
compatible with the examples. (Version 1.1.9 seems to be the correct
one). The JPOX site doesn't link to the JDO site, nor does the elver
install tutorial.

Next, when visiting the JPOX site, I find out there is a JPOX eclipse
plugin. This is mentioned in the elver tutorial, but the tutorial should
also mention, how to configure this plugin or if it's needed at all?
(It doesn't seem to provide the JPOX libraries so what does it do in
relation to the emft/teneo plugin? I can see it contributes wizards for
schema tool.). This plugin when installed is: org.jpox.ide.eclipse.


2) OR mapping

When configuring JPOX, to do auto-enhancement, it turns out an
additional library is needed. BCEL or some other .class enhancer.
This should also be mentioned in the tutorial.

After this, I managed to enable the project for JPOX and generate the
..jdo file. All fine.

The class which are enhanced do generate some warnings, which seem to
be more related to other plugins.

One example:

Aug 1, 2008 5:39:48 PM org.jpox.util.JDK14Logger warn
WARNING: Extension Point "org.eclipse.core.contenttype.contentTypes" not
registered, but plugin "" defined in
jar:file:/Applications/eclipse/plugins/org.eclipse.core.cont enttype_3.3.0.v20080604-1400.jar!/plugin.xml
refers to it.

At the end I still get this:

"JPOX Enhancer completed with success for 6 classes. Consult the log for
full details"

Ok, next I create a database, and add the log.properties and I create
the static class. Unfortunatly the tutorial doesn't tell you how to call
this class from the RCP app. I chose to create a new run-configuration
calling this static class.

I run the class: Get the following (Which all seems good).

Aug 1, 2008 6:04:12 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
INFO: Registering a jpox resource factory for all uri's with jpox as the
protocol/extension
Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
INFO: Registering a jpox resource factory for all uri's with ejdo as the
protocol/extension
Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
INFO: Registering a jpox resource dao factory for all uri's with jpoxdao
as the protocol/extension

....and it goes on, finally connecting to the database! Eureka.

Cheers / Christophe
Re: The newbie struggle (But still made it). [message #127847 is a reply to message #127807] Sat, 02 August 2008 06:04 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Christophe,
Thanks for the detailed feedback. See comments inline.

gr. Martin

Christophe Bouhier wrote:
> Dears,
>
> My environment: Eclipse Ganymede, latest EMF.
> RCP Application.
> MacOSX Leopard
> MySQL Database.
>
>
> Please find some feedback from a "First User".
>
> I am building an RCP application using an EMF generated model.
> from .xsd. I decided to try JPOX over Hibernate first.
>
> I followed the instruction on www.elver.org. Which I discovered
> as some serious shortcomings in the tutorial for a newbie like me.
> I would like to list here, my experience which can be used to update the
> tutorial: I managed to get through and connect to the database but it
> took 3 days.
>
> 1) JPOX libraries
>
> It's not clear which JPOX libraries and versions are needed in the elver
> install tutorial.
MT>> These are exact the same as defined on the jpox website:
http://www.jpox.org/docs/1_1/dependencies.html
See also here: http://www.elver.org/jpox/installation.html#JPOX+Libraries
The hyperlink I use there is not precise enough I will change that to the
one I mention above.


>
> What should be clarified is the exact require libs and version.
>
> - The JPOX core version
> - The JPOX Enhancement version
> - The JDO Version. (2.0 or 2.1?).
>
> A newbie is fooled into getting the latest JPOX version which is not
> compatible with the examples. (Version 1.1.9 seems to be the correct
> one). The JPOX site doesn't link to the JDO site, nor does the elver
> install tutorial.
MT>> I understand, I will make more clear that Teneo depends on the 1.1.9 release.
(it is listed here: http://www.elver.org/jpox/, but it's a bit hidden)

>
> Next, when visiting the JPOX site, I find out there is a JPOX eclipse
> plugin. This is mentioned in the elver tutorial, but the tutorial should
> also mention, how to configure this plugin or if it's needed at all?
MT>> My assumption here is that the documentation is provided by jpox.
Afaik jpox/datanucleus has excellent documentation.

> (It doesn't seem to provide the JPOX libraries so what does it do in
> relation to the emft/teneo plugin? I can see it contributes wizards for
> schema tool.). This plugin when installed is: org.jpox.ide.eclipse.
MT>> It provides automatic enhancement of your class files when eclipse rebuilds.

>
>
> 2) OR mapping
>
> When configuring JPOX, to do auto-enhancement, it turns out an
> additional library is needed. BCEL or some other .class enhancer.
> This should also be mentioned in the tutorial.
MT>> See the jpox website and remarks above.

>
> After this, I managed to enable the project for JPOX and generate the
> ..jdo file. All fine.
>
> The class which are enhanced do generate some warnings, which seem to
> be more related to other plugins.
>
> One example:
>
> Aug 1, 2008 5:39:48 PM org.jpox.util.JDK14Logger warn
> WARNING: Extension Point "org.eclipse.core.contenttype.contentTypes" not
> registered, but plugin "" defined in
> jar:file:/Applications/eclipse/plugins/org.eclipse.core.cont enttype_3.3.0.v20080604-1400.jar!/plugin.xml
> refers to it.
MT>> This is a jpox issue.

>

> At the end I still get this:
>
> "JPOX Enhancer completed with success for 6 classes. Consult the log for
> full details"
>
> Ok, next I create a database, and add the log.properties and I create
> the static class. Unfortunatly the tutorial doesn't tell you how to call
> this class from the RCP app. I chose to create a new run-configuration
> calling this static class.
MT>> Correct, it is not a rcp tutorial.

>
> I run the class: Get the following (Which all seems good).
>
> Aug 1, 2008 6:04:12 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
> INFO: Registering a jpox resource factory for all uri's with jpox as the
> protocol/extension
> Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
> INFO: Registering a jpox resource factory for all uri's with ejdo as the
> protocol/extension
> Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
> INFO: Registering a jpox resource dao factory for all uri's with jpoxdao
> as the protocol/extension
>
> ....and it goes on, finally connecting to the database! Eureka.
MT>> That's good, thanks again for the time/effort you took to write this up.
I will update the Teneo/elver.org website to be more precise were required.

>
> Cheers / Christophe
>
>
>
>
>
>
>
>
>
>


--

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: The newbie struggle (But still made it). [message #127861 is a reply to message #127847] Sun, 03 August 2008 09:44 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010703040000010308010506
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi Martin,

Thank you for pointing out the JPOX dependencies page.
I understand that you don't want to repeat instructions from
JPOX or eclipse. I feel though if like me, you come
from J2SE background, with no previous exposure to JPOX,
it's very overwhelming at first, and you and up jumping
between the sites (elver, jpox, jdo, eclipse emf) to put the puzzle
together. This is not in Teneo's favor.

I can imagine (Or I would wish for), that the EMF tutorials at some
point would actually also generate the persistence side, and
do it for you a-z. This would be a huge accomplishment, and push EMF
persistence forward by a big leap. For me it's been a frustrating
experience.

To continue to report my experience, as I moved along a bit.
I went on to try out to Library Editor tutorial, but unfortunately
ran into this class loading problem. (JPOX being in a separate plugin
looking for classes).

The Buddy-Policy hint doesn't seem to help. (Actually also on the elver
tutorial, it's not precise enough how it should be set).

I also tried with Hibernate, the Hibernate tutorial went well. It seems
that hibernate is somehow smarter than jpox. It doesn't need a separate
plugin for enhancement/schema generation or .jdo or class enhancements?
(Or it all happens under the cover). Is it safe to say that hibernate is
a better choice from this perspective?

When running the hibernate library editor tutorial, I also ran into the
same classloading problem.

I tried this pointer: http://www.hibernate.org/311.html, without success.

So here I am, both JPOX and Hibernate connect
to the database with my model in a standalone fashion, but not in an RCP
setup with libraries in a separate eclipse plugin.

I post my manifest files here, perhaps this can shed some light?
(Note that I export the packages).

Thanks for the help!
Christophe

stack trace:

With hibernate:


Caused by: java.lang.NoClassDefFoundError: org/hibernate/SessionFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:165)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:554)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:524)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:455)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:443)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:423)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374 )
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:165)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:554)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:524)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:455)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:443)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:423)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374 )
at org.eclipse.emf.teneo.hibernate.HbHelper.<clinit>(HbHelper.java:56)
at
com.kualasoft.hatari.hatari.presentation.HatariEditorPlugin$ Implementation.connectHibernate(HatariEditorPlugin.java:151)







Martin Taal wrote:
> Hi Christophe,
> Thanks for the detailed feedback. See comments inline.
>
> gr. Martin
>
> Christophe Bouhier wrote:
>> Dears,
>>
>> My environment: Eclipse Ganymede, latest EMF.
>> RCP Application.
>> MacOSX Leopard
>> MySQL Database.
>>
>>
>> Please find some feedback from a "First User".
>>
>> I am building an RCP application using an EMF generated model.
>> from .xsd. I decided to try JPOX over Hibernate first.
>>
>> I followed the instruction on www.elver.org. Which I discovered
>> as some serious shortcomings in the tutorial for a newbie like me.
>> I would like to list here, my experience which can be used to update
>> the tutorial: I managed to get through and connect to the database but
>> it took 3 days.
>>
>> 1) JPOX libraries
>>
>> It's not clear which JPOX libraries and versions are needed in the elver
>> install tutorial.
> MT>> These are exact the same as defined on the jpox website:
> http://www.jpox.org/docs/1_1/dependencies.html
> See also here: http://www.elver.org/jpox/installation.html#JPOX+Libraries
> The hyperlink I use there is not precise enough I will change that to the
> one I mention above.
>
>
>>
>> What should be clarified is the exact require libs and version.
>>
>> - The JPOX core version
>> - The JPOX Enhancement version
>> - The JDO Version. (2.0 or 2.1?).
>>
>> A newbie is fooled into getting the latest JPOX version which is not
>> compatible with the examples. (Version 1.1.9 seems to be the correct
>> one). The JPOX site doesn't link to the JDO site, nor does the elver
>> install tutorial.
> MT>> I understand, I will make more clear that Teneo depends on the
> 1.1.9 release.
> (it is listed here: http://www.elver.org/jpox/, but it's a bit hidden)
>
>>
>> Next, when visiting the JPOX site, I find out there is a JPOX eclipse
>> plugin. This is mentioned in the elver tutorial, but the tutorial should
>> also mention, how to configure this plugin or if it's needed at all?
> MT>> My assumption here is that the documentation is provided by jpox.
> Afaik jpox/datanucleus has excellent documentation.
>
>> (It doesn't seem to provide the JPOX libraries so what does it do in
>> relation to the emft/teneo plugin? I can see it contributes wizards
>> for schema tool.). This plugin when installed is: org.jpox.ide.eclipse.
> MT>> It provides automatic enhancement of your class files when eclipse
> rebuilds.
>
>>
>>
>> 2) OR mapping
>>
>> When configuring JPOX, to do auto-enhancement, it turns out an
>> additional library is needed. BCEL or some other .class enhancer.
>> This should also be mentioned in the tutorial.
> MT>> See the jpox website and remarks above.
>
>>
>> After this, I managed to enable the project for JPOX and generate the
>> ..jdo file. All fine.
>>
>> The class which are enhanced do generate some warnings, which seem to
>> be more related to other plugins.
>>
>> One example:
>>
>> Aug 1, 2008 5:39:48 PM org.jpox.util.JDK14Logger warn
>> WARNING: Extension Point "org.eclipse.core.contenttype.contentTypes"
>> not registered, but plugin "" defined in
>> jar:file:/Applications/eclipse/plugins/org.eclipse.core.cont enttype_3.3.0.v20080604-1400.jar!/plugin.xml
>> refers to it.
> MT>> This is a jpox issue.
>
>>
>
>> At the end I still get this:
>>
>> "JPOX Enhancer completed with success for 6 classes. Consult the log
>> for full details"
>>
>> Ok, next I create a database, and add the log.properties and I create
>> the static class. Unfortunatly the tutorial doesn't tell you how to call
>> this class from the RCP app. I chose to create a new run-configuration
>> calling this static class.
> MT>> Correct, it is not a rcp tutorial.
>
>>
>> I run the class: Get the following (Which all seems good).
>>
>> Aug 1, 2008 6:04:12 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>> INFO: Registering a jpox resource factory for all uri's with jpox as
>> the protocol/extension
>> Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>> INFO: Registering a jpox resource factory for all uri's with ejdo as
>> the protocol/extension
>> Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>> INFO: Registering a jpox resource dao factory for all uri's with
>> jpoxdao as the protocol/extension
>>
>> ....and it goes on, finally connecting to the database! Eureka.
> MT>> That's good, thanks again for the time/effort you took to write
> this up.
> I will update the Teneo/elver.org website to be more precise were required.
>
>>
>> Cheers / Christophe
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>


--------------010703040000010308010506
Content-Type: text/plain;
name="MANIFEST.MF"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="MANIFEST.MF"

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: JPOX 1.1.9 Plug-in
Eclipse-BuddyPolicy: registered
Bundle-SymbolicName: com.kualasoft.jpox_1.1.9
Bundle-Version: 1.0.0
Bundle-Vendor: KUALASOFT
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: bcel-5.2.jar,
jdo2-api-2.0.jar,
jpox-1.1.9.jar,
jpox-enhancer-1.1.9.jar,
jpox-rdbms-1.2.2.jar,
mysql-connector-java-5.1.6-bin.jar,
.
Export-Package: com.mysql.jdbc,
com.mysql.jdbc.exceptions,
com.mysql.jdbc.exceptions.jdbc4,
com.mysql.jdbc.integration.c3p0,
com.mysql.jdbc.integration.jboss,
com.mysql.jdbc.interceptors,
com.mysql.jdbc.jdbc2.optional,
com.mysql.jdbc.log,
com.mysql.jdbc.profiler,
com.mysql.jdbc.util,
javax.jdo,
javax.jdo.datastore,
javax.jdo.identity,
javax.jdo.listener,
javax.jdo.spi,
org.apache.bcel,
org.apache.bcel.classfile,
org.apache.bcel.generic,
org.apache.bcel.util,
org.apache.bcel.verifier,
org.apache.bcel.verifier.exc,
org.apache.bcel.verifier.statics,
org.apache.bcel.verifier.structurals,
org.gjt.mm.mysql,
org.jpox,
org.jpox.api,
org.jpox.cache,
org.jpox.datasource,
org.jpox.enhancer,
org.jpox.enhancer.bcel,
org.jpox.enhancer.bcel.metadata,
org.jpox.enhancer.bcel.method,
org.jpox.enhancer.metadata,
org.jpox.enhancer.tools,
org.jpox.exceptions,
org.jpox.management,
org.jpox.metadata,
org.jpox.plugin,
org.jpox.resource,
org.jpox.sco,
org.jpox.sco.exceptions,
org.jpox.state,
org.jpox.state.jdo,
org.jpox.state.jpa,
org.jpox.store,
org.jpox.store.exceptions,
org.jpox.store.expression,
org.jpox.store.extent,
org.jpox.store.fieldmanager,
org.jpox.store.mapping,
org.jpox.store.poid,
org.jpox.store.query,
org.jpox.store.rdbms,
org.jpox.store.rdbms.adapter,
org.jpox.store.rdbms.columninfo,
org.jpox.store.rdbms.datasource,
org.jpox.store.rdbms.datatype,
org.jpox.store.rdbms.exceptions,
org.jpox.store.rdbms.expression,
org.jpox.store.rdbms.extent,
org.jpox.store.rdbms.fieldmanager,
org.jpox.store.rdbms.key,
org.jpox.store.rdbms.mapping,
org.jpox.store.rdbms.mapping.oracle,
org.jpox.store.rdbms.poid,
org.jpox.store.rdbms.query,
org.jpox.store.rdbms.request,
org.jpox.store.rdbms.schema,
org.jpox.store.rdbms.scostore,
org.jpox.store.rdbms.sqlidentifier,
org.jpox.store.rdbms.table,
org.jpox.store.rdbms.typeinfo,
org.jpox.store.scostore,
org.jpox.util

--------------010703040000010308010506
Content-Type: text/plain;
name="MANIFEST.MF"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="MANIFEST.MF"

Manifest-Version: 1.0
Eclipse-BuddyPolicy: registered
Bundle-ManifestVersion: 2
Bundle-Name: Hb Plug-in
Bundle-SymbolicName: com.kualasoft.hb
Bundle-Version: 1.0.0
Bundle-Vendor: KUALASOFT
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: com.mysql.jdbc,
com.mysql.jdbc.exceptions,
com.mysql.jdbc.exceptions.jdbc4,
com.mysql.jdbc.integration.c3p0,
com.mysql.jdbc.integration.jboss,
com.mysql.jdbc.interceptors,
com.mysql.jdbc.jdbc2.optional,
com.mysql.jdbc.log,
com.mysql.jdbc.profiler,
com.mysql.jdbc.util,
org.gjt.mm.mysql,
org.hibernate,
org.hibernate.action,
org.hibernate.bytecode,
org.hibernate.bytecode.cglib,
org.hibernate.bytecode.javassist,
org.hibernate.bytecode.util,
org.hibernate.cache,
org.hibernate.cache.entry,
org.hibernate.cfg,
org.hibernate.classic,
org.hibernate.collection,
org.hibernate.connection,
org.hibernate.context,
org.hibernate.criterion,
org.hibernate.dialect,
org.hibernate.dialect.function,
org.hibernate.dialect.lock,
org.hibernate.engine,
org.hibernate.engine.loading,
org.hibernate.engine.query,
org.hibernate.engine.query.sql,
org.hibernate.engine.transaction,
org.hibernate.event,
org.hibernate.event.def,
org.hibernate.exception,
org.hibernate.hql,
org.hibernate.hql.antlr,
org.hibernate.hql.ast,
org.hibernate.hql.ast.exec,
org.hibernate.hql.ast.tree,
org.hibernate.hql.ast.util,
org.hibernate.hql.classic,
org.hibernate.id,
org.hibernate.id.enhanced,
org.hibernate.id.insert,
org.hibernate.impl,
org.hibernate.intercept,
org.hibernate.intercept.cglib,
org.hibernate.intercept.javassist,
org.hibernate.jdbc,
org.hibernate.jmx,
org.hibernate.loader,
org.hibernate.loader.collection,
org.hibernate.loader.criteria,
org.hibernate.loader.custom,
org.hibernate.loader.custom.sql,
org.hibernate.loader.entity,
org.hibernate.loader.hql,
org.hibernate.lob,
org.hibernate.mapping,
org.hibernate.metadata,
org.hibernate.param,
org.hibernate.persister,
org.hibernate.persister.collection,
org.hibernate.persister.entity,
org.hibernate.pretty,
org.hibernate.property,
org.hibernate.proxy,
org.hibernate.proxy.dom4j,
org.hibernate.proxy.map,
org.hibernate.proxy.pojo,
org.hibernate.proxy.pojo.cglib,
org.hibernate.proxy.pojo.javassist,
org.hibernate.secure,
org.hibernate.sql,
org.hibernate.stat,
org.hibernate.tool.hbm2ddl,
org.hibernate.tool.instrument,
org.hibernate.tool.instrument.cglib,
org.hibernate.tool.instrument.javassist,
org.hibernate.transaction,
org.hibernate.transform,
org.hibernate.tuple,
org.hibernate.tuple.component,
org.hibernate.tuple.entity,
org.hibernate.type,
org.hibernate.usertype,
org.hibernate.util

--------------010703040000010308010506--
Re: The newbie struggle (But still made it). [message #127874 is a reply to message #127861] Sun, 03 August 2008 10:57 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Christophe Bouhier wrote:

You know sometimes, you write down what you have done and it actually
gives you the opportunity to think it through and have a nice summary.
Now, I my case I actually found that the Manifest files I posted just
this mornging, Are not the same for resp. JPOX and Hibernate. I added a
classpath entry to the Hibernate libraries in the same way as for the
JPOX manifest file, and promptly it worked. Sorry for the noise.

rgds / Christophe


> Hi Martin,
>
> Thank you for pointing out the JPOX dependencies page.
> I understand that you don't want to repeat instructions from
> JPOX or eclipse. I feel though if like me, you come
> from J2SE background, with no previous exposure to JPOX,
> it's very overwhelming at first, and you and up jumping
> between the sites (elver, jpox, jdo, eclipse emf) to put the puzzle
> together. This is not in Teneo's favor.
>
> I can imagine (Or I would wish for), that the EMF tutorials at some
> point would actually also generate the persistence side, and
> do it for you a-z. This would be a huge accomplishment, and push EMF
> persistence forward by a big leap. For me it's been a frustrating
> experience.
>
> To continue to report my experience, as I moved along a bit.
> I went on to try out to Library Editor tutorial, but unfortunately
> ran into this class loading problem. (JPOX being in a separate plugin
> looking for classes).
>
> The Buddy-Policy hint doesn't seem to help. (Actually also on the elver
> tutorial, it's not precise enough how it should be set).
>
> I also tried with Hibernate, the Hibernate tutorial went well. It seems
> that hibernate is somehow smarter than jpox. It doesn't need a separate
> plugin for enhancement/schema generation or .jdo or class enhancements?
> (Or it all happens under the cover). Is it safe to say that hibernate is
> a better choice from this perspective?
>
> When running the hibernate library editor tutorial, I also ran into the
> same classloading problem.
>
> I tried this pointer: http://www.hibernate.org/311.html, without success.
>
> So here I am, both JPOX and Hibernate connect
> to the database with my model in a standalone fashion, but not in an RCP
> setup with libraries in a separate eclipse plugin.
>
> I post my manifest files here, perhaps this can shed some light?
> (Note that I export the packages).
>
> Thanks for the help!
> Christophe
>
> stack trace:
>
> With hibernate:
>
>
> Caused by: java.lang.NoClassDefFoundError: org/hibernate/SessionFactory
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:165)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:554)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:524)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:455)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:443)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:423)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374 )
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:165)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:554)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:524)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:455)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:443)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:423)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374 )
> at org.eclipse.emf.teneo.hibernate.HbHelper.<clinit>(HbHelper.java:56)
> at
> com.kualasoft.hatari.hatari.presentation.HatariEditorPlugin$ Implementation.connectHibernate(HatariEditorPlugin.java:151)
>
>
>
>
>
>
>
>
> Martin Taal wrote:
>> Hi Christophe,
>> Thanks for the detailed feedback. See comments inline.
>>
>> gr. Martin
>>
>> Christophe Bouhier wrote:
>>> Dears,
>>>
>>> My environment: Eclipse Ganymede, latest EMF.
>>> RCP Application.
>>> MacOSX Leopard
>>> MySQL Database.
>>>
>>>
>>> Please find some feedback from a "First User".
>>>
>>> I am building an RCP application using an EMF generated model.
>>> from .xsd. I decided to try JPOX over Hibernate first.
>>>
>>> I followed the instruction on www.elver.org. Which I discovered
>>> as some serious shortcomings in the tutorial for a newbie like me.
>>> I would like to list here, my experience which can be used to update
>>> the tutorial: I managed to get through and connect to the database
>>> but it took 3 days.
>>>
>>> 1) JPOX libraries
>>>
>>> It's not clear which JPOX libraries and versions are needed in the elver
>>> install tutorial.
>> MT>> These are exact the same as defined on the jpox website:
>> http://www.jpox.org/docs/1_1/dependencies.html
>> See also here: http://www.elver.org/jpox/installation.html#JPOX+Libraries
>> The hyperlink I use there is not precise enough I will change that to the
>> one I mention above.
>>
>>
>>>
>>> What should be clarified is the exact require libs and version.
>>>
>>> - The JPOX core version
>>> - The JPOX Enhancement version
>>> - The JDO Version. (2.0 or 2.1?).
>>>
>>> A newbie is fooled into getting the latest JPOX version which is not
>>> compatible with the examples. (Version 1.1.9 seems to be the correct
>>> one). The JPOX site doesn't link to the JDO site, nor does the elver
>>> install tutorial.
>> MT>> I understand, I will make more clear that Teneo depends on the
>> 1.1.9 release.
>> (it is listed here: http://www.elver.org/jpox/, but it's a bit hidden)
>>
>>>
>>> Next, when visiting the JPOX site, I find out there is a JPOX eclipse
>>> plugin. This is mentioned in the elver tutorial, but the tutorial should
>>> also mention, how to configure this plugin or if it's needed at all?
>> MT>> My assumption here is that the documentation is provided by jpox.
>> Afaik jpox/datanucleus has excellent documentation.
>>
>>> (It doesn't seem to provide the JPOX libraries so what does it do in
>>> relation to the emft/teneo plugin? I can see it contributes wizards
>>> for schema tool.). This plugin when installed is: org.jpox.ide.eclipse.
>> MT>> It provides automatic enhancement of your class files when
>> eclipse rebuilds.
>>
>>>
>>>
>>> 2) OR mapping
>>>
>>> When configuring JPOX, to do auto-enhancement, it turns out an
>>> additional library is needed. BCEL or some other .class enhancer.
>>> This should also be mentioned in the tutorial.
>> MT>> See the jpox website and remarks above.
>>
>>>
>>> After this, I managed to enable the project for JPOX and generate the
>>> ..jdo file. All fine.
>>>
>>> The class which are enhanced do generate some warnings, which seem to
>>> be more related to other plugins.
>>>
>>> One example:
>>>
>>> Aug 1, 2008 5:39:48 PM org.jpox.util.JDK14Logger warn
>>> WARNING: Extension Point "org.eclipse.core.contenttype.contentTypes"
>>> not registered, but plugin "" defined in
>>> jar:file:/Applications/eclipse/plugins/org.eclipse.core.cont enttype_3.3.0.v20080604-1400.jar!/plugin.xml
>>> refers to it.
>> MT>> This is a jpox issue.
>>
>>>
>>
>>> At the end I still get this:
>>>
>>> "JPOX Enhancer completed with success for 6 classes. Consult the log
>>> for full details"
>>>
>>> Ok, next I create a database, and add the log.properties and I create
>>> the static class. Unfortunatly the tutorial doesn't tell you how to call
>>> this class from the RCP app. I chose to create a new run-configuration
>>> calling this static class.
>> MT>> Correct, it is not a rcp tutorial.
>>
>>>
>>> I run the class: Get the following (Which all seems good).
>>>
>>> Aug 1, 2008 6:04:12 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>>> INFO: Registering a jpox resource factory for all uri's with jpox as
>>> the protocol/extension
>>> Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>>> INFO: Registering a jpox resource factory for all uri's with ejdo as
>>> the protocol/extension
>>> Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>>> INFO: Registering a jpox resource dao factory for all uri's with
>>> jpoxdao as the protocol/extension
>>>
>>> ....and it goes on, finally connecting to the database! Eureka.
>> MT>> That's good, thanks again for the time/effort you took to write
>> this up.
>> I will update the Teneo/elver.org website to be more precise were
>> required.
>>
>>>
>>> Cheers / Christophe
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
Re: The newbie struggle (But still made it). [message #127888 is a reply to message #127861] Sun, 03 August 2008 11:02 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Christophe,
Yes Teneo assumes that you have some knowledge of Jpox or Hibernate. Teneo does not hide
jpox/hibernate. Teneo tries to work inside jpox/hibernate so therefore this assumption.

Regarding the eclipse-buddypolicy. It should be set to dependent, you have registered.
See here, the bold part of the page:
http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
http://www.elver.org/hibernate/installation.html#Hibernate+L ibraries

Do you mean that from the tutorial I don't refer back to the download & install page? This would
probably/maybe help. Let me know then I can change this.

Correct, Hibernate does not require compile-time enhancement.Hibernate is more widely used by Teneo
users and features follows use. Because of lack of time I did not have time yet to upgrade to the
latest release of Jpox.

gr. Martin

Christophe Bouhier wrote:
> Hi Martin,
>
> Thank you for pointing out the JPOX dependencies page.
> I understand that you don't want to repeat instructions from
> JPOX or eclipse. I feel though if like me, you come
> from J2SE background, with no previous exposure to JPOX,
> it's very overwhelming at first, and you and up jumping
> between the sites (elver, jpox, jdo, eclipse emf) to put the puzzle
> together. This is not in Teneo's favor.
>
> I can imagine (Or I would wish for), that the EMF tutorials at some
> point would actually also generate the persistence side, and
> do it for you a-z. This would be a huge accomplishment, and push EMF
> persistence forward by a big leap. For me it's been a frustrating
> experience.
>
> To continue to report my experience, as I moved along a bit.
> I went on to try out to Library Editor tutorial, but unfortunately
> ran into this class loading problem. (JPOX being in a separate plugin
> looking for classes).
>
> The Buddy-Policy hint doesn't seem to help. (Actually also on the elver
> tutorial, it's not precise enough how it should be set).
>
> I also tried with Hibernate, the Hibernate tutorial went well. It seems
> that hibernate is somehow smarter than jpox. It doesn't need a separate
> plugin for enhancement/schema generation or .jdo or class enhancements?
> (Or it all happens under the cover). Is it safe to say that hibernate is
> a better choice from this perspective?
>
> When running the hibernate library editor tutorial, I also ran into the
> same classloading problem.
>
> I tried this pointer: http://www.hibernate.org/311.html, without success.
>
> So here I am, both JPOX and Hibernate connect
> to the database with my model in a standalone fashion, but not in an RCP
> setup with libraries in a separate eclipse plugin.
>
> I post my manifest files here, perhaps this can shed some light?
> (Note that I export the packages).
>
> Thanks for the help!
> Christophe
>
> stack trace:
>
> With hibernate:
>
>
> Caused by: java.lang.NoClassDefFoundError: org/hibernate/SessionFactory
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:165)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:554)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:524)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:455)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:443)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:423)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374 )
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:165)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:554)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:524)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:455)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:443)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:423)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374 )
> at org.eclipse.emf.teneo.hibernate.HbHelper.<clinit>(HbHelper.java:56)
> at
> com.kualasoft.hatari.hatari.presentation.HatariEditorPlugin$ Implementation.connectHibernate(HatariEditorPlugin.java:151)
>
>
>
>
>
>
>
>
> Martin Taal wrote:
>> Hi Christophe,
>> Thanks for the detailed feedback. See comments inline.
>>
>> gr. Martin
>>
>> Christophe Bouhier wrote:
>>> Dears,
>>>
>>> My environment: Eclipse Ganymede, latest EMF.
>>> RCP Application.
>>> MacOSX Leopard
>>> MySQL Database.
>>>
>>>
>>> Please find some feedback from a "First User".
>>>
>>> I am building an RCP application using an EMF generated model.
>>> from .xsd. I decided to try JPOX over Hibernate first.
>>>
>>> I followed the instruction on www.elver.org. Which I discovered
>>> as some serious shortcomings in the tutorial for a newbie like me.
>>> I would like to list here, my experience which can be used to update
>>> the tutorial: I managed to get through and connect to the database
>>> but it took 3 days.
>>>
>>> 1) JPOX libraries
>>>
>>> It's not clear which JPOX libraries and versions are needed in the elver
>>> install tutorial.
>> MT>> These are exact the same as defined on the jpox website:
>> http://www.jpox.org/docs/1_1/dependencies.html
>> See also here: http://www.elver.org/jpox/installation.html#JPOX+Libraries
>> The hyperlink I use there is not precise enough I will change that to the
>> one I mention above.
>>
>>
>>>
>>> What should be clarified is the exact require libs and version.
>>>
>>> - The JPOX core version
>>> - The JPOX Enhancement version
>>> - The JDO Version. (2.0 or 2.1?).
>>>
>>> A newbie is fooled into getting the latest JPOX version which is not
>>> compatible with the examples. (Version 1.1.9 seems to be the correct
>>> one). The JPOX site doesn't link to the JDO site, nor does the elver
>>> install tutorial.
>> MT>> I understand, I will make more clear that Teneo depends on the
>> 1.1.9 release.
>> (it is listed here: http://www.elver.org/jpox/, but it's a bit hidden)
>>
>>>
>>> Next, when visiting the JPOX site, I find out there is a JPOX eclipse
>>> plugin. This is mentioned in the elver tutorial, but the tutorial should
>>> also mention, how to configure this plugin or if it's needed at all?
>> MT>> My assumption here is that the documentation is provided by jpox.
>> Afaik jpox/datanucleus has excellent documentation.
>>
>>> (It doesn't seem to provide the JPOX libraries so what does it do in
>>> relation to the emft/teneo plugin? I can see it contributes wizards
>>> for schema tool.). This plugin when installed is: org.jpox.ide.eclipse.
>> MT>> It provides automatic enhancement of your class files when
>> eclipse rebuilds.
>>
>>>
>>>
>>> 2) OR mapping
>>>
>>> When configuring JPOX, to do auto-enhancement, it turns out an
>>> additional library is needed. BCEL or some other .class enhancer.
>>> This should also be mentioned in the tutorial.
>> MT>> See the jpox website and remarks above.
>>
>>>
>>> After this, I managed to enable the project for JPOX and generate the
>>> ..jdo file. All fine.
>>>
>>> The class which are enhanced do generate some warnings, which seem to
>>> be more related to other plugins.
>>>
>>> One example:
>>>
>>> Aug 1, 2008 5:39:48 PM org.jpox.util.JDK14Logger warn
>>> WARNING: Extension Point "org.eclipse.core.contenttype.contentTypes"
>>> not registered, but plugin "" defined in
>>> jar:file:/Applications/eclipse/plugins/org.eclipse.core.cont enttype_3.3.0.v20080604-1400.jar!/plugin.xml
>>> refers to it.
>> MT>> This is a jpox issue.
>>
>>>
>>
>>> At the end I still get this:
>>>
>>> "JPOX Enhancer completed with success for 6 classes. Consult the log
>>> for full details"
>>>
>>> Ok, next I create a database, and add the log.properties and I create
>>> the static class. Unfortunatly the tutorial doesn't tell you how to call
>>> this class from the RCP app. I chose to create a new run-configuration
>>> calling this static class.
>> MT>> Correct, it is not a rcp tutorial.
>>
>>>
>>> I run the class: Get the following (Which all seems good).
>>>
>>> Aug 1, 2008 6:04:12 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>>> INFO: Registering a jpox resource factory for all uri's with jpox as
>>> the protocol/extension
>>> Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>>> INFO: Registering a jpox resource factory for all uri's with ejdo as
>>> the protocol/extension
>>> Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>>> INFO: Registering a jpox resource dao factory for all uri's with
>>> jpoxdao as the protocol/extension
>>>
>>> ....and it goes on, finally connecting to the database! Eureka.
>> MT>> That's good, thanks again for the time/effort you took to write
>> this up.
>> I will update the Teneo/elver.org website to be more precise were
>> required.
>>
>>>
>>> Cheers / Christophe
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>


--

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: The newbie struggle (But still made it). [message #127988 is a reply to message #127888] Tue, 05 August 2008 08:49 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Hi,

Martin Taal wrote:
> Regarding the eclipse-buddypolicy. It should be set to dependent, you
> have registered.
> See here, the bold part of the page:
> http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
Yes, changed it but I also set below in the editor plugin. Is this needed?

Eclipse-RegisterBuddy: com.kualasoft.hb

> Do you mean that from the tutorial I don't refer back to the download &
> install page? This would probably/maybe help. Let me know then I can
> change this.
What I mean, is that the exact Hibernate libs are not listed in the
tutorial, when you download hibernate, you get all kind of stuff, which
is not needed for the tutorial.


Also made more progress, I have now loaded a complex .xsd with many
references, and I am able to connect to the database. I do have a
problem that the editor opens read-only. Also I think my setup is not
correct, as I have the following behaviour.

1. I create a new model. .mymodel
2. I write some "required" fields, to be able to save the model.
3. The model is reflected properly in the database. this is all fine.
4. The model is read-only, I can't add child/sible to it.
5. the file I chose when creating the model is not visible on the file
system. This kind of makes sense, as the resource is opened with the
HiberbateResourceFactory. But, how do I re-open my model using the
editor open/open-uri. I tried with the hibernate protocol
hibernate://dsname=something.mymodel, but get an error on this.

I guess, what I need to understand is how the filesystem resources and
hibernate resources can be used in parallel? Or how do I re-open my
hibernate resource in the editor?

any help is most welcome.

Thank you, Christophe.
Re: The newbie struggle (But still made it). [message #128163 is a reply to message #127988] Wed, 06 August 2008 11:41 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Christophe,
I am currently on holiday, I will answer your post tomorrow morning.

gr. Martin

Christophe Bouhier wrote:
> Hi,
>
> Martin Taal wrote:
>> Regarding the eclipse-buddypolicy. It should be set to dependent, you
>> have registered.
>> See here, the bold part of the page:
>> http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
>
> Yes, changed it but I also set below in the editor plugin. Is this needed?
>
> Eclipse-RegisterBuddy: com.kualasoft.hb
>
>> Do you mean that from the tutorial I don't refer back to the download
>> & install page? This would probably/maybe help. Let me know then I can
>> change this.
> What I mean, is that the exact Hibernate libs are not listed in the
> tutorial, when you download hibernate, you get all kind of stuff, which
> is not needed for the tutorial.
>
>
> Also made more progress, I have now loaded a complex .xsd with many
> references, and I am able to connect to the database. I do have a
> problem that the editor opens read-only. Also I think my setup is not
> correct, as I have the following behaviour.
>
> 1. I create a new model. .mymodel
> 2. I write some "required" fields, to be able to save the model.
> 3. The model is reflected properly in the database. this is all fine.
> 4. The model is read-only, I can't add child/sible to it.
> 5. the file I chose when creating the model is not visible on the file
> system. This kind of makes sense, as the resource is opened with the
> HiberbateResourceFactory. But, how do I re-open my model using the
> editor open/open-uri. I tried with the hibernate protocol
> hibernate://dsname=something.mymodel, but get an error on this.
>
> I guess, what I need to understand is how the filesystem resources and
> hibernate resources can be used in parallel? Or how do I re-open my
> hibernate resource in the editor?
>
> any help is most welcome.
>
> Thank you, Christophe.


--

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: The newbie struggle (But still made it). [message #128228 is a reply to message #127988] Thu, 07 August 2008 10:14 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Christophe,
Does this help for the read-only issue:
http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg04688.html

The registerbuddy is not required in case of buddypolicy dependent.

Regarding your question about the resource. You have to study how EMF resources work and how Eclipse
editors are opened. I don't develop using Eclipse rcp so I can't give you that much information.
Here is an example of the gmf tutorial:
http://www.elver.org/hibernate/gmftutorial/tutorial3.html#Op en+editor+action

gr. Martin

Christophe Bouhier wrote:
> Hi,
>
> Martin Taal wrote:
>> Regarding the eclipse-buddypolicy. It should be set to dependent, you
>> have registered.
>> See here, the bold part of the page:
>> http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
>
> Yes, changed it but I also set below in the editor plugin. Is this needed?
>
> Eclipse-RegisterBuddy: com.kualasoft.hb
>
>> Do you mean that from the tutorial I don't refer back to the download
>> & install page? This would probably/maybe help. Let me know then I can
>> change this.
> What I mean, is that the exact Hibernate libs are not listed in the
> tutorial, when you download hibernate, you get all kind of stuff, which
> is not needed for the tutorial.
>
>
> Also made more progress, I have now loaded a complex .xsd with many
> references, and I am able to connect to the database. I do have a
> problem that the editor opens read-only. Also I think my setup is not
> correct, as I have the following behaviour.
>
> 1. I create a new model. .mymodel
> 2. I write some "required" fields, to be able to save the model.
> 3. The model is reflected properly in the database. this is all fine.
> 4. The model is read-only, I can't add child/sible to it.
> 5. the file I chose when creating the model is not visible on the file
> system. This kind of makes sense, as the resource is opened with the
> HiberbateResourceFactory. But, how do I re-open my model using the
> editor open/open-uri. I tried with the hibernate protocol
> hibernate://dsname=something.mymodel, but get an error on this.
>
> I guess, what I need to understand is how the filesystem resources and
> hibernate resources can be used in parallel? Or how do I re-open my
> hibernate resource in the editor?
>
> any help is most welcome.
>
> Thank you, Christophe.


--

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: The newbie struggle (But still made it). [message #128454 is a reply to message #128228] Fri, 08 August 2008 21:59 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Yes, the adaptorfactory enhancement did the trick.
I can open with Open URI, and a name ending with .mymodel

So all working well, except changes are not reflected. I am not
sure why the SQL databse is not update when reloading a changed .xsd. I
am re-generating the model and edit code and no change in the database.
Is this one of those parameters I need to pass?

Thanks for all your help. I am close to be fully in production with teneo.

Cheers / Christophe



Martin Taal wrote:
> Hi Christophe,
> Does this help for the read-only issue:
> http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg04688.html
>
> The registerbuddy is not required in case of buddypolicy dependent.
>
> Regarding your question about the resource. You have to study how EMF
> resources work and how Eclipse editors are opened. I don't develop using
> Eclipse rcp so I can't give you that much information. Here is an
> example of the gmf tutorial:
> http://www.elver.org/hibernate/gmftutorial/tutorial3.html#Op en+editor+action
>
>
> gr. Martin
>
> Christophe Bouhier wrote:
>> Hi,
>>
>> Martin Taal wrote:
>>> Regarding the eclipse-buddypolicy. It should be set to dependent, you
>>> have registered.
>>> See here, the bold part of the page:
>>> http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
>>
>>
>> Yes, changed it but I also set below in the editor plugin. Is this
>> needed?
>>
>> Eclipse-RegisterBuddy: com.kualasoft.hb
>>
>>> Do you mean that from the tutorial I don't refer back to the download
>>> & install page? This would probably/maybe help. Let me know then I
>>> can change this.
>> What I mean, is that the exact Hibernate libs are not listed in the
>> tutorial, when you download hibernate, you get all kind of stuff,
>> which is not needed for the tutorial.
>>
>>
>> Also made more progress, I have now loaded a complex .xsd with many
>> references, and I am able to connect to the database. I do have a
>> problem that the editor opens read-only. Also I think my setup is not
>> correct, as I have the following behaviour.
>>
>> 1. I create a new model. .mymodel
>> 2. I write some "required" fields, to be able to save the model.
>> 3. The model is reflected properly in the database. this is all fine.
>> 4. The model is read-only, I can't add child/sible to it.
>> 5. the file I chose when creating the model is not visible on the file
>> system. This kind of makes sense, as the resource is opened with the
>> HiberbateResourceFactory. But, how do I re-open my model using the
>> editor open/open-uri. I tried with the hibernate protocol
>> hibernate://dsname=something.mymodel, but get an error on this.
>>
>> I guess, what I need to understand is how the filesystem resources and
>> hibernate resources can be used in parallel? Or how do I re-open my
>> hibernate resource in the editor?
>>
>> any help is most welcome.
>>
>> Thank you, Christophe.
>
>
Re: The newbie struggle (But still made it). [message #128468 is a reply to message #128454] Sat, 09 August 2008 09:36 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Christophe,
Regarding updating the db schema, what value did you set for the hbm2ddl hibernate option?

gr. Martin

Christophe Bouhier wrote:
> Yes, the adaptorfactory enhancement did the trick.
> I can open with Open URI, and a name ending with .mymodel
>
> So all working well, except changes are not reflected. I am not
> sure why the SQL databse is not update when reloading a changed .xsd. I
> am re-generating the model and edit code and no change in the database.
> Is this one of those parameters I need to pass?
>
> Thanks for all your help. I am close to be fully in production with teneo.
>
> Cheers / Christophe
>
>
>
> Martin Taal wrote:
>> Hi Christophe,
>> Does this help for the read-only issue:
>> http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg04688.html
>>
>>
>> The registerbuddy is not required in case of buddypolicy dependent.
>>
>> Regarding your question about the resource. You have to study how EMF
>> resources work and how Eclipse editors are opened. I don't develop
>> using Eclipse rcp so I can't give you that much information. Here is
>> an example of the gmf tutorial:
>> http://www.elver.org/hibernate/gmftutorial/tutorial3.html#Op en+editor+action
>>
>>
>> gr. Martin
>>
>> Christophe Bouhier wrote:
>>> Hi,
>>>
>>> Martin Taal wrote:
>>>> Regarding the eclipse-buddypolicy. It should be set to dependent,
>>>> you have registered.
>>>> See here, the bold part of the page:
>>>> http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
>>>
>>>
>>>
>>> Yes, changed it but I also set below in the editor plugin. Is this
>>> needed?
>>>
>>> Eclipse-RegisterBuddy: com.kualasoft.hb
>>>
>>>> Do you mean that from the tutorial I don't refer back to the
>>>> download & install page? This would probably/maybe help. Let me know
>>>> then I can change this.
>>> What I mean, is that the exact Hibernate libs are not listed in the
>>> tutorial, when you download hibernate, you get all kind of stuff,
>>> which is not needed for the tutorial.
>>>
>>>
>>> Also made more progress, I have now loaded a complex .xsd with many
>>> references, and I am able to connect to the database. I do have a
>>> problem that the editor opens read-only. Also I think my setup is not
>>> correct, as I have the following behaviour.
>>>
>>> 1. I create a new model. .mymodel
>>> 2. I write some "required" fields, to be able to save the model.
>>> 3. The model is reflected properly in the database. this is all fine.
>>> 4. The model is read-only, I can't add child/sible to it.
>>> 5. the file I chose when creating the model is not visible on the
>>> file system. This kind of makes sense, as the resource is opened with
>>> the HiberbateResourceFactory. But, how do I re-open my model using
>>> the editor open/open-uri. I tried with the hibernate protocol
>>> hibernate://dsname=something.mymodel, but get an error on this.
>>>
>>> I guess, what I need to understand is how the filesystem resources
>>> and hibernate resources can be used in parallel? Or how do I re-open
>>> my hibernate resource in the editor?
>>>
>>> any help is most welcome.
>>>
>>> Thank you, Christophe.
>>
>>


--

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: The newbie struggle (But still made it). [message #128482 is a reply to message #128468] Sat, 09 August 2008 12:35 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Martin Taal wrote:
> Hi Christophe,
> Regarding updating the db schema, what value did you set for the hbm2ddl
> hibernate option?
>
> gr. Martin
>
> Christophe Bouhier wrote:
>> Yes, the adaptorfactory enhancement did the trick.
>> I can open with Open URI, and a name ending with .mymodel
>>
>> So all working well, except changes are not reflected. I am not
>> sure why the SQL databse is not update when reloading a changed .xsd.
>> I am re-generating the model and edit code and no change in the database.
>> Is this one of those parameters I need to pass?
>>
>> Thanks for all your help. I am close to be fully in production with
>> teneo.
>>
>> Cheers / Christophe
>>
>>
>>
>> Martin Taal wrote:
>>> Hi Christophe,
>>> Does this help for the read-only issue:
>>> http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg04688.html
>>>
>>>
>>> The registerbuddy is not required in case of buddypolicy dependent.
>>>
>>> Regarding your question about the resource. You have to study how EMF
>>> resources work and how Eclipse editors are opened. I don't develop
>>> using Eclipse rcp so I can't give you that much information. Here is
>>> an example of the gmf tutorial:
>>> http://www.elver.org/hibernate/gmftutorial/tutorial3.html#Op en+editor+action
>>>
>>>
>>> gr. Martin
>>>
>>> Christophe Bouhier wrote:
>>>> Hi,
>>>>
>>>> Martin Taal wrote:
>>>>> Regarding the eclipse-buddypolicy. It should be set to dependent,
>>>>> you have registered.
>>>>> See here, the bold part of the page:
>>>>> http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
>>>>
>>>>
>>>>
>>>>
>>>> Yes, changed it but I also set below in the editor plugin. Is this
>>>> needed?
>>>>
>>>> Eclipse-RegisterBuddy: com.kualasoft.hb
>>>>
>>>>> Do you mean that from the tutorial I don't refer back to the
>>>>> download & install page? This would probably/maybe help. Let me
>>>>> know then I can change this.
>>>> What I mean, is that the exact Hibernate libs are not listed in the
>>>> tutorial, when you download hibernate, you get all kind of stuff,
>>>> which is not needed for the tutorial.
>>>>
>>>>
>>>> Also made more progress, I have now loaded a complex .xsd with many
>>>> references, and I am able to connect to the database. I do have a
>>>> problem that the editor opens read-only. Also I think my setup is
>>>> not correct, as I have the following behaviour.
>>>>
>>>> 1. I create a new model. .mymodel
>>>> 2. I write some "required" fields, to be able to save the model.
>>>> 3. The model is reflected properly in the database. this is all fine.
>>>> 4. The model is read-only, I can't add child/sible to it.
>>>> 5. the file I chose when creating the model is not visible on the
>>>> file system. This kind of makes sense, as the resource is opened
>>>> with the HiberbateResourceFactory. But, how do I re-open my model
>>>> using the editor open/open-uri. I tried with the hibernate protocol
>>>> hibernate://dsname=something.mymodel, but get an error on this.
>>>>
>>>> I guess, what I need to understand is how the filesystem resources
>>>> and hibernate resources can be used in parallel? Or how do I re-open
>>>> my hibernate resource in the editor?
>>>>
>>>> any help is most welcome.
>>>>
>>>> Thank you, Christophe.
>>>
>>>
>
>
Re: The newbie struggle (But still made it). [message #128494 is a reply to message #128468] Sat, 09 August 2008 12:35 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
It's not set at all.
Is 'update' the right value?



Martin Taal wrote:
> Hi Christophe,
> Regarding updating the db schema, what value did you set for the hbm2ddl
> hibernate option?
>
> gr. Martin
>
> Christophe Bouhier wrote:
>> Yes, the adaptorfactory enhancement did the trick.
>> I can open with Open URI, and a name ending with .mymodel
>>
>> So all working well, except changes are not reflected. I am not
>> sure why the SQL databse is not update when reloading a changed .xsd.
>> I am re-generating the model and edit code and no change in the database.
>> Is this one of those parameters I need to pass?
>>
>> Thanks for all your help. I am close to be fully in production with
>> teneo.
>>
>> Cheers / Christophe
>>
>>
>>
>> Martin Taal wrote:
>>> Hi Christophe,
>>> Does this help for the read-only issue:
>>> http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg04688.html
>>>
>>>
>>> The registerbuddy is not required in case of buddypolicy dependent.
>>>
>>> Regarding your question about the resource. You have to study how EMF
>>> resources work and how Eclipse editors are opened. I don't develop
>>> using Eclipse rcp so I can't give you that much information. Here is
>>> an example of the gmf tutorial:
>>> http://www.elver.org/hibernate/gmftutorial/tutorial3.html#Op en+editor+action
>>>
>>>
>>> gr. Martin
>>>
>>> Christophe Bouhier wrote:
>>>> Hi,
>>>>
>>>> Martin Taal wrote:
>>>>> Regarding the eclipse-buddypolicy. It should be set to dependent,
>>>>> you have registered.
>>>>> See here, the bold part of the page:
>>>>> http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
>>>>
>>>>
>>>>
>>>>
>>>> Yes, changed it but I also set below in the editor plugin. Is this
>>>> needed?
>>>>
>>>> Eclipse-RegisterBuddy: com.kualasoft.hb
>>>>
>>>>> Do you mean that from the tutorial I don't refer back to the
>>>>> download & install page? This would probably/maybe help. Let me
>>>>> know then I can change this.
>>>> What I mean, is that the exact Hibernate libs are not listed in the
>>>> tutorial, when you download hibernate, you get all kind of stuff,
>>>> which is not needed for the tutorial.
>>>>
>>>>
>>>> Also made more progress, I have now loaded a complex .xsd with many
>>>> references, and I am able to connect to the database. I do have a
>>>> problem that the editor opens read-only. Also I think my setup is
>>>> not correct, as I have the following behaviour.
>>>>
>>>> 1. I create a new model. .mymodel
>>>> 2. I write some "required" fields, to be able to save the model.
>>>> 3. The model is reflected properly in the database. this is all fine.
>>>> 4. The model is read-only, I can't add child/sible to it.
>>>> 5. the file I chose when creating the model is not visible on the
>>>> file system. This kind of makes sense, as the resource is opened
>>>> with the HiberbateResourceFactory. But, how do I re-open my model
>>>> using the editor open/open-uri. I tried with the hibernate protocol
>>>> hibernate://dsname=something.mymodel, but get an error on this.
>>>>
>>>> I guess, what I need to understand is how the filesystem resources
>>>> and hibernate resources can be used in parallel? Or how do I re-open
>>>> my hibernate resource in the editor?
>>>>
>>>> any help is most welcome.
>>>>
>>>> Thank you, Christophe.
>>>
>>>
>
>
Re: The newbie struggle (But still made it). [message #128507 is a reply to message #128494] Sun, 10 August 2008 08:02 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Yes, the hibernate manual also describes some other values which can be relevant in different
situations.

gr. Martin

Christophe Bouhier wrote:
> It's not set at all.
> Is 'update' the right value?
>
>
>
> Martin Taal wrote:
>> Hi Christophe,
>> Regarding updating the db schema, what value did you set for the
>> hbm2ddl hibernate option?
>>
>> gr. Martin
>>
>> Christophe Bouhier wrote:
>>> Yes, the adaptorfactory enhancement did the trick.
>>> I can open with Open URI, and a name ending with .mymodel
>>>
>>> So all working well, except changes are not reflected. I am not
>>> sure why the SQL databse is not update when reloading a changed .xsd.
>>> I am re-generating the model and edit code and no change in the
>>> database.
>>> Is this one of those parameters I need to pass?
>>>
>>> Thanks for all your help. I am close to be fully in production with
>>> teneo.
>>>
>>> Cheers / Christophe
>>>
>>>
>>>
>>> Martin Taal wrote:
>>>> Hi Christophe,
>>>> Does this help for the read-only issue:
>>>> http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg04688.html
>>>>
>>>>
>>>> The registerbuddy is not required in case of buddypolicy dependent.
>>>>
>>>> Regarding your question about the resource. You have to study how
>>>> EMF resources work and how Eclipse editors are opened. I don't
>>>> develop using Eclipse rcp so I can't give you that much information.
>>>> Here is an example of the gmf tutorial:
>>>> http://www.elver.org/hibernate/gmftutorial/tutorial3.html#Op en+editor+action
>>>>
>>>>
>>>> gr. Martin
>>>>
>>>> Christophe Bouhier wrote:
>>>>> Hi,
>>>>>
>>>>> Martin Taal wrote:
>>>>>> Regarding the eclipse-buddypolicy. It should be set to dependent,
>>>>>> you have registered.
>>>>>> See here, the bold part of the page:
>>>>>> http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Yes, changed it but I also set below in the editor plugin. Is this
>>>>> needed?
>>>>>
>>>>> Eclipse-RegisterBuddy: com.kualasoft.hb
>>>>>
>>>>>> Do you mean that from the tutorial I don't refer back to the
>>>>>> download & install page? This would probably/maybe help. Let me
>>>>>> know then I can change this.
>>>>> What I mean, is that the exact Hibernate libs are not listed in the
>>>>> tutorial, when you download hibernate, you get all kind of stuff,
>>>>> which is not needed for the tutorial.
>>>>>
>>>>>
>>>>> Also made more progress, I have now loaded a complex .xsd with many
>>>>> references, and I am able to connect to the database. I do have a
>>>>> problem that the editor opens read-only. Also I think my setup is
>>>>> not correct, as I have the following behaviour.
>>>>>
>>>>> 1. I create a new model. .mymodel
>>>>> 2. I write some "required" fields, to be able to save the model.
>>>>> 3. The model is reflected properly in the database. this is all fine.
>>>>> 4. The model is read-only, I can't add child/sible to it.
>>>>> 5. the file I chose when creating the model is not visible on the
>>>>> file system. This kind of makes sense, as the resource is opened
>>>>> with the HiberbateResourceFactory. But, how do I re-open my model
>>>>> using the editor open/open-uri. I tried with the hibernate protocol
>>>>> hibernate://dsname=something.mymodel, but get an error on this.
>>>>>
>>>>> I guess, what I need to understand is how the filesystem resources
>>>>> and hibernate resources can be used in parallel? Or how do I
>>>>> re-open my hibernate resource in the editor?
>>>>>
>>>>> any help is most welcome.
>>>>>
>>>>> Thank you, Christophe.
>>>>
>>>>
>>
>>


--

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: The newbie struggle (But still made it). [message #128534 is a reply to message #128507] Mon, 11 August 2008 06:40 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Hi Martin,

I am sorry setting:

props.setProperty(Environment.HBM2DDL_AUTO, "update");

doesn't solve the issue.

When I drop the DB and recreate, the changes are applied.
Is there a formal way to migrate a DB to a new schema?


Here is the full code:

final Properties props = new Properties();
props.setProperty(Environment.DRIVER, "com.mysql.jdbc.Driver");
props.setProperty(Environment.USER, "root");
props.setProperty(Environment.URL,
"jdbc:mysql://127.0.0.1:3306/icebreaker");
// props.setProperty(Environment.PASS, "root"); Remove to ommit the
password authentication.
props.setProperty(Environment.HBM2DDL_AUTO, "update"); // Use when
the dabase changed?

props.setProperty(Environment.DIALECT,"org.hibernate.dialect.MySQLInnoDBDialect ");

// Initialize create the HbDataStore
HbDataStore hbds = HbHelper.INSTANCE
.createRegisterDataStore("icebreaker");
hbds.setEPackages(new EPackage[] { IcebreakerPackage.eINSTANCE });
hbds.setProperties(props);
hbds.initialize();

rgds / Christophe

Martin Taal wrote:
> Yes, the hibernate manual also describes some other values which can be
> relevant in different situations.
>
> gr. Martin
Re: The newbie struggle (But still made it). [message #128546 is a reply to message #128534] Mon, 11 August 2008 09:34 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Christophe,
The hbm2ddl update setting adds columns, table and foreign keys. It does not add indexes. So afaics
the setting update should work (it works for me). Can you put on logging and check the log in the
beginning?
See here for logging:
http://www.elver.org/hibernate/troubleshooting.html#runtime

gr. Martin

Christophe Bouhier wrote:
> Hi Martin,
>
> I am sorry setting:
>
> props.setProperty(Environment.HBM2DDL_AUTO, "update");
>
> doesn't solve the issue.
>
> When I drop the DB and recreate, the changes are applied.
> Is there a formal way to migrate a DB to a new schema?
>
>
> Here is the full code:
>
> final Properties props = new Properties();
> props.setProperty(Environment.DRIVER, "com.mysql.jdbc.Driver");
> props.setProperty(Environment.USER, "root");
> props.setProperty(Environment.URL,
> "jdbc:mysql://127.0.0.1:3306/icebreaker");
> // props.setProperty(Environment.PASS, "root"); Remove to
> ommit the password authentication.
> props.setProperty(Environment.HBM2DDL_AUTO, "update"); //
> Use when the dabase changed?
>
> props.setProperty(Environment.DIALECT,"org.hibernate.dialect.MySQLInnoDBDialect ");
>
>
> // Initialize create the HbDataStore
> HbDataStore hbds = HbHelper.INSTANCE
> .createRegisterDataStore("icebreaker");
> hbds.setEPackages(new EPackage[] {
> IcebreakerPackage.eINSTANCE });
> hbds.setProperties(props);
> hbds.initialize();
>
> rgds / Christophe
>
> Martin Taal wrote:
>> Yes, the hibernate manual also describes some other values which can
>> be relevant in different situations.
>>
>> gr. Martin


--

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: The newbie struggle (But still made it). [message #128572 is a reply to message #128546] Mon, 11 August 2008 12:17 Go to previous message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Hi,

Ok, it seems the change I want to make is not reflected, but when
I add a table it indeed works and the new table is added.

The change I was making is a to alter a column to be nullable by adding
minOccurs="0 and this is not reflected.

I guess, I can conclude that alterations to the columns like Index or
null don't work. I presume this is more a Hibernate issue than a teneo
issue.

rgds, Christophe


Martin Taal wrote:
> Hi Christophe,
> The hbm2ddl update setting adds columns, table and foreign keys. It does
> not add indexes. So afaics the setting update should work (it works for
> me). Can you put on logging and check the log in the beginning?
> See here for logging:
> http://www.elver.org/hibernate/troubleshooting.html#runtime
>
> gr. Martin
>
> Christophe Bouhier wrote:
>> Hi Martin,
>>
>> I am sorry setting:
>>
>> props.setProperty(Environment.HBM2DDL_AUTO, "update");
>>
>> doesn't solve the issue.
>>
>> When I drop the DB and recreate, the changes are applied.
>> Is there a formal way to migrate a DB to a new schema?
>>
>>
>> Here is the full code:
>>
>> final Properties props = new Properties();
>> props.setProperty(Environment.DRIVER,
>> "com.mysql.jdbc.Driver");
>> props.setProperty(Environment.USER, "root");
>> props.setProperty(Environment.URL,
>> "jdbc:mysql://127.0.0.1:3306/icebreaker");
>> // props.setProperty(Environment.PASS, "root"); Remove to
>> ommit the password authentication.
>> props.setProperty(Environment.HBM2DDL_AUTO, "update"); //
>> Use when the dabase changed?
>>
>> props.setProperty(Environment.DIALECT,"org.hibernate.dialect.MySQLInnoDBDialect ");
>>
>>
>> // Initialize create the HbDataStore
>> HbDataStore hbds = HbHelper.INSTANCE
>> .createRegisterDataStore("icebreaker");
>> hbds.setEPackages(new EPackage[] {
>> IcebreakerPackage.eINSTANCE });
>> hbds.setProperties(props);
>> hbds.initialize();
>>
>> rgds / Christophe
>>
>> Martin Taal wrote:
>>> Yes, the hibernate manual also describes some other values which can
>>> be relevant in different situations.
>>>
>>> gr. Martin
>
>
Re: The newbie struggle (But still made it). [message #620171 is a reply to message #127807] Sat, 02 August 2008 06:04 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Christophe,
Thanks for the detailed feedback. See comments inline.

gr. Martin

Christophe Bouhier wrote:
> Dears,
>
> My environment: Eclipse Ganymede, latest EMF.
> RCP Application.
> MacOSX Leopard
> MySQL Database.
>
>
> Please find some feedback from a "First User".
>
> I am building an RCP application using an EMF generated model.
> from .xsd. I decided to try JPOX over Hibernate first.
>
> I followed the instruction on www.elver.org. Which I discovered
> as some serious shortcomings in the tutorial for a newbie like me.
> I would like to list here, my experience which can be used to update the
> tutorial: I managed to get through and connect to the database but it
> took 3 days.
>
> 1) JPOX libraries
>
> It's not clear which JPOX libraries and versions are needed in the elver
> install tutorial.
MT>> These are exact the same as defined on the jpox website:
http://www.jpox.org/docs/1_1/dependencies.html
See also here: http://www.elver.org/jpox/installation.html#JPOX+Libraries
The hyperlink I use there is not precise enough I will change that to the
one I mention above.


>
> What should be clarified is the exact require libs and version.
>
> - The JPOX core version
> - The JPOX Enhancement version
> - The JDO Version. (2.0 or 2.1?).
>
> A newbie is fooled into getting the latest JPOX version which is not
> compatible with the examples. (Version 1.1.9 seems to be the correct
> one). The JPOX site doesn't link to the JDO site, nor does the elver
> install tutorial.
MT>> I understand, I will make more clear that Teneo depends on the 1.1.9 release.
(it is listed here: http://www.elver.org/jpox/, but it's a bit hidden)

>
> Next, when visiting the JPOX site, I find out there is a JPOX eclipse
> plugin. This is mentioned in the elver tutorial, but the tutorial should
> also mention, how to configure this plugin or if it's needed at all?
MT>> My assumption here is that the documentation is provided by jpox.
Afaik jpox/datanucleus has excellent documentation.

> (It doesn't seem to provide the JPOX libraries so what does it do in
> relation to the emft/teneo plugin? I can see it contributes wizards for
> schema tool.). This plugin when installed is: org.jpox.ide.eclipse.
MT>> It provides automatic enhancement of your class files when eclipse rebuilds.

>
>
> 2) OR mapping
>
> When configuring JPOX, to do auto-enhancement, it turns out an
> additional library is needed. BCEL or some other .class enhancer.
> This should also be mentioned in the tutorial.
MT>> See the jpox website and remarks above.

>
> After this, I managed to enable the project for JPOX and generate the
> ..jdo file. All fine.
>
> The class which are enhanced do generate some warnings, which seem to
> be more related to other plugins.
>
> One example:
>
> Aug 1, 2008 5:39:48 PM org.jpox.util.JDK14Logger warn
> WARNING: Extension Point "org.eclipse.core.contenttype.contentTypes" not
> registered, but plugin "" defined in
> jar:file:/Applications/eclipse/plugins/org.eclipse.core.cont enttype_3.3.0.v20080604-1400.jar!/plugin.xml
> refers to it.
MT>> This is a jpox issue.

>

> At the end I still get this:
>
> "JPOX Enhancer completed with success for 6 classes. Consult the log for
> full details"
>
> Ok, next I create a database, and add the log.properties and I create
> the static class. Unfortunatly the tutorial doesn't tell you how to call
> this class from the RCP app. I chose to create a new run-configuration
> calling this static class.
MT>> Correct, it is not a rcp tutorial.

>
> I run the class: Get the following (Which all seems good).
>
> Aug 1, 2008 6:04:12 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
> INFO: Registering a jpox resource factory for all uri's with jpox as the
> protocol/extension
> Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
> INFO: Registering a jpox resource factory for all uri's with ejdo as the
> protocol/extension
> Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
> INFO: Registering a jpox resource dao factory for all uri's with jpoxdao
> as the protocol/extension
>
> ....and it goes on, finally connecting to the database! Eureka.
MT>> That's good, thanks again for the time/effort you took to write this up.
I will update the Teneo/elver.org website to be more precise were required.

>
> Cheers / Christophe
>
>
>
>
>
>
>
>
>
>


--

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: The newbie struggle (But still made it). [message #620172 is a reply to message #127847] Sun, 03 August 2008 09:44 Go to previous message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010703040000010308010506
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi Martin,

Thank you for pointing out the JPOX dependencies page.
I understand that you don't want to repeat instructions from
JPOX or eclipse. I feel though if like me, you come
from J2SE background, with no previous exposure to JPOX,
it's very overwhelming at first, and you and up jumping
between the sites (elver, jpox, jdo, eclipse emf) to put the puzzle
together. This is not in Teneo's favor.

I can imagine (Or I would wish for), that the EMF tutorials at some
point would actually also generate the persistence side, and
do it for you a-z. This would be a huge accomplishment, and push EMF
persistence forward by a big leap. For me it's been a frustrating
experience.

To continue to report my experience, as I moved along a bit.
I went on to try out to Library Editor tutorial, but unfortunately
ran into this class loading problem. (JPOX being in a separate plugin
looking for classes).

The Buddy-Policy hint doesn't seem to help. (Actually also on the elver
tutorial, it's not precise enough how it should be set).

I also tried with Hibernate, the Hibernate tutorial went well. It seems
that hibernate is somehow smarter than jpox. It doesn't need a separate
plugin for enhancement/schema generation or .jdo or class enhancements?
(Or it all happens under the cover). Is it safe to say that hibernate is
a better choice from this perspective?

When running the hibernate library editor tutorial, I also ran into the
same classloading problem.

I tried this pointer: http://www.hibernate.org/311.html, without success.

So here I am, both JPOX and Hibernate connect
to the database with my model in a standalone fashion, but not in an RCP
setup with libraries in a separate eclipse plugin.

I post my manifest files here, perhaps this can shed some light?
(Note that I export the packages).

Thanks for the help!
Christophe

stack trace:

With hibernate:


Caused by: java.lang.NoClassDefFoundError: org/hibernate/SessionFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:165)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:554)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:524)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:455)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:443)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:423)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374 )
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:165)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:554)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:524)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:455)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:443)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:423)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374 )
at org.eclipse.emf.teneo.hibernate.HbHelper.<clinit>(HbHelper.java:56)
at
com.kualasoft.hatari.hatari.presentation.HatariEditorPlugin$ Implementation.connectHibernate(HatariEditorPlugin.java:151)







Martin Taal wrote:
> Hi Christophe,
> Thanks for the detailed feedback. See comments inline.
>
> gr. Martin
>
> Christophe Bouhier wrote:
>> Dears,
>>
>> My environment: Eclipse Ganymede, latest EMF.
>> RCP Application.
>> MacOSX Leopard
>> MySQL Database.
>>
>>
>> Please find some feedback from a "First User".
>>
>> I am building an RCP application using an EMF generated model.
>> from .xsd. I decided to try JPOX over Hibernate first.
>>
>> I followed the instruction on www.elver.org. Which I discovered
>> as some serious shortcomings in the tutorial for a newbie like me.
>> I would like to list here, my experience which can be used to update
>> the tutorial: I managed to get through and connect to the database but
>> it took 3 days.
>>
>> 1) JPOX libraries
>>
>> It's not clear which JPOX libraries and versions are needed in the elver
>> install tutorial.
> MT>> These are exact the same as defined on the jpox website:
> http://www.jpox.org/docs/1_1/dependencies.html
> See also here: http://www.elver.org/jpox/installation.html#JPOX+Libraries
> The hyperlink I use there is not precise enough I will change that to the
> one I mention above.
>
>
>>
>> What should be clarified is the exact require libs and version.
>>
>> - The JPOX core version
>> - The JPOX Enhancement version
>> - The JDO Version. (2.0 or 2.1?).
>>
>> A newbie is fooled into getting the latest JPOX version which is not
>> compatible with the examples. (Version 1.1.9 seems to be the correct
>> one). The JPOX site doesn't link to the JDO site, nor does the elver
>> install tutorial.
> MT>> I understand, I will make more clear that Teneo depends on the
> 1.1.9 release.
> (it is listed here: http://www.elver.org/jpox/, but it's a bit hidden)
>
>>
>> Next, when visiting the JPOX site, I find out there is a JPOX eclipse
>> plugin. This is mentioned in the elver tutorial, but the tutorial should
>> also mention, how to configure this plugin or if it's needed at all?
> MT>> My assumption here is that the documentation is provided by jpox.
> Afaik jpox/datanucleus has excellent documentation.
>
>> (It doesn't seem to provide the JPOX libraries so what does it do in
>> relation to the emft/teneo plugin? I can see it contributes wizards
>> for schema tool.). This plugin when installed is: org.jpox.ide.eclipse.
> MT>> It provides automatic enhancement of your class files when eclipse
> rebuilds.
>
>>
>>
>> 2) OR mapping
>>
>> When configuring JPOX, to do auto-enhancement, it turns out an
>> additional library is needed. BCEL or some other .class enhancer.
>> This should also be mentioned in the tutorial.
> MT>> See the jpox website and remarks above.
>
>>
>> After this, I managed to enable the project for JPOX and generate the
>> ..jdo file. All fine.
>>
>> The class which are enhanced do generate some warnings, which seem to
>> be more related to other plugins.
>>
>> One example:
>>
>> Aug 1, 2008 5:39:48 PM org.jpox.util.JDK14Logger warn
>> WARNING: Extension Point "org.eclipse.core.contenttype.contentTypes"
>> not registered, but plugin "" defined in
>> jar:file:/Applications/eclipse/plugins/org.eclipse.core.cont enttype_3.3.0.v20080604-1400.jar!/plugin.xml
>> refers to it.
> MT>> This is a jpox issue.
>
>>
>
>> At the end I still get this:
>>
>> "JPOX Enhancer completed with success for 6 classes. Consult the log
>> for full details"
>>
>> Ok, next I create a database, and add the log.properties and I create
>> the static class. Unfortunatly the tutorial doesn't tell you how to call
>> this class from the RCP app. I chose to create a new run-configuration
>> calling this static class.
> MT>> Correct, it is not a rcp tutorial.
>
>>
>> I run the class: Get the following (Which all seems good).
>>
>> Aug 1, 2008 6:04:12 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>> INFO: Registering a jpox resource factory for all uri's with jpox as
>> the protocol/extension
>> Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>> INFO: Registering a jpox resource factory for all uri's with ejdo as
>> the protocol/extension
>> Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>> INFO: Registering a jpox resource dao factory for all uri's with
>> jpoxdao as the protocol/extension
>>
>> ....and it goes on, finally connecting to the database! Eureka.
> MT>> That's good, thanks again for the time/effort you took to write
> this up.
> I will update the Teneo/elver.org website to be more precise were required.
>
>>
>> Cheers / Christophe
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>


--------------010703040000010308010506
Content-Type: text/plain;
name="MANIFEST.MF"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="MANIFEST.MF"

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: JPOX 1.1.9 Plug-in
Eclipse-BuddyPolicy: registered
Bundle-SymbolicName: com.kualasoft.jpox_1.1.9
Bundle-Version: 1.0.0
Bundle-Vendor: KUALASOFT
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: bcel-5.2.jar,
jdo2-api-2.0.jar,
jpox-1.1.9.jar,
jpox-enhancer-1.1.9.jar,
jpox-rdbms-1.2.2.jar,
mysql-connector-java-5.1.6-bin.jar,
.
Export-Package: com.mysql.jdbc,
com.mysql.jdbc.exceptions,
com.mysql.jdbc.exceptions.jdbc4,
com.mysql.jdbc.integration.c3p0,
com.mysql.jdbc.integration.jboss,
com.mysql.jdbc.interceptors,
com.mysql.jdbc.jdbc2.optional,
com.mysql.jdbc.log,
com.mysql.jdbc.profiler,
com.mysql.jdbc.util,
javax.jdo,
javax.jdo.datastore,
javax.jdo.identity,
javax.jdo.listener,
javax.jdo.spi,
org.apache.bcel,
org.apache.bcel.classfile,
org.apache.bcel.generic,
org.apache.bcel.util,
org.apache.bcel.verifier,
org.apache.bcel.verifier.exc,
org.apache.bcel.verifier.statics,
org.apache.bcel.verifier.structurals,
org.gjt.mm.mysql,
org.jpox,
org.jpox.api,
org.jpox.cache,
org.jpox.datasource,
org.jpox.enhancer,
org.jpox.enhancer.bcel,
org.jpox.enhancer.bcel.metadata,
org.jpox.enhancer.bcel.method,
org.jpox.enhancer.metadata,
org.jpox.enhancer.tools,
org.jpox.exceptions,
org.jpox.management,
org.jpox.metadata,
org.jpox.plugin,
org.jpox.resource,
org.jpox.sco,
org.jpox.sco.exceptions,
org.jpox.state,
org.jpox.state.jdo,
org.jpox.state.jpa,
org.jpox.store,
org.jpox.store.exceptions,
org.jpox.store.expression,
org.jpox.store.extent,
org.jpox.store.fieldmanager,
org.jpox.store.mapping,
org.jpox.store.poid,
org.jpox.store.query,
org.jpox.store.rdbms,
org.jpox.store.rdbms.adapter,
org.jpox.store.rdbms.columninfo,
org.jpox.store.rdbms.datasource,
org.jpox.store.rdbms.datatype,
org.jpox.store.rdbms.exceptions,
org.jpox.store.rdbms.expression,
org.jpox.store.rdbms.extent,
org.jpox.store.rdbms.fieldmanager,
org.jpox.store.rdbms.key,
org.jpox.store.rdbms.mapping,
org.jpox.store.rdbms.mapping.oracle,
org.jpox.store.rdbms.poid,
org.jpox.store.rdbms.query,
org.jpox.store.rdbms.request,
org.jpox.store.rdbms.schema,
org.jpox.store.rdbms.scostore,
org.jpox.store.rdbms.sqlidentifier,
org.jpox.store.rdbms.table,
org.jpox.store.rdbms.typeinfo,
org.jpox.store.scostore,
org.jpox.util

--------------010703040000010308010506
Content-Type: text/plain;
name="MANIFEST.MF"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="MANIFEST.MF"

Manifest-Version: 1.0
Eclipse-BuddyPolicy: registered
Bundle-ManifestVersion: 2
Bundle-Name: Hb Plug-in
Bundle-SymbolicName: com.kualasoft.hb
Bundle-Version: 1.0.0
Bundle-Vendor: KUALASOFT
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: com.mysql.jdbc,
com.mysql.jdbc.exceptions,
com.mysql.jdbc.exceptions.jdbc4,
com.mysql.jdbc.integration.c3p0,
com.mysql.jdbc.integration.jboss,
com.mysql.jdbc.interceptors,
com.mysql.jdbc.jdbc2.optional,
com.mysql.jdbc.log,
com.mysql.jdbc.profiler,
com.mysql.jdbc.util,
org.gjt.mm.mysql,
org.hibernate,
org.hibernate.action,
org.hibernate.bytecode,
org.hibernate.bytecode.cglib,
org.hibernate.bytecode.javassist,
org.hibernate.bytecode.util,
org.hibernate.cache,
org.hibernate.cache.entry,
org.hibernate.cfg,
org.hibernate.classic,
org.hibernate.collection,
org.hibernate.connection,
org.hibernate.context,
org.hibernate.criterion,
org.hibernate.dialect,
org.hibernate.dialect.function,
org.hibernate.dialect.lock,
org.hibernate.engine,
org.hibernate.engine.loading,
org.hibernate.engine.query,
org.hibernate.engine.query.sql,
org.hibernate.engine.transaction,
org.hibernate.event,
org.hibernate.event.def,
org.hibernate.exception,
org.hibernate.hql,
org.hibernate.hql.antlr,
org.hibernate.hql.ast,
org.hibernate.hql.ast.exec,
org.hibernate.hql.ast.tree,
org.hibernate.hql.ast.util,
org.hibernate.hql.classic,
org.hibernate.id,
org.hibernate.id.enhanced,
org.hibernate.id.insert,
org.hibernate.impl,
org.hibernate.intercept,
org.hibernate.intercept.cglib,
org.hibernate.intercept.javassist,
org.hibernate.jdbc,
org.hibernate.jmx,
org.hibernate.loader,
org.hibernate.loader.collection,
org.hibernate.loader.criteria,
org.hibernate.loader.custom,
org.hibernate.loader.custom.sql,
org.hibernate.loader.entity,
org.hibernate.loader.hql,
org.hibernate.lob,
org.hibernate.mapping,
org.hibernate.metadata,
org.hibernate.param,
org.hibernate.persister,
org.hibernate.persister.collection,
org.hibernate.persister.entity,
org.hibernate.pretty,
org.hibernate.property,
org.hibernate.proxy,
org.hibernate.proxy.dom4j,
org.hibernate.proxy.map,
org.hibernate.proxy.pojo,
org.hibernate.proxy.pojo.cglib,
org.hibernate.proxy.pojo.javassist,
org.hibernate.secure,
org.hibernate.sql,
org.hibernate.stat,
org.hibernate.tool.hbm2ddl,
org.hibernate.tool.instrument,
org.hibernate.tool.instrument.cglib,
org.hibernate.tool.instrument.javassist,
org.hibernate.transaction,
org.hibernate.transform,
org.hibernate.tuple,
org.hibernate.tuple.component,
org.hibernate.tuple.entity,
org.hibernate.type,
org.hibernate.usertype,
org.hibernate.util

--------------010703040000010308010506--
Re: The newbie struggle (But still made it). [message #620173 is a reply to message #127861] Sun, 03 August 2008 10:57 Go to previous message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Christophe Bouhier wrote:

You know sometimes, you write down what you have done and it actually
gives you the opportunity to think it through and have a nice summary.
Now, I my case I actually found that the Manifest files I posted just
this mornging, Are not the same for resp. JPOX and Hibernate. I added a
classpath entry to the Hibernate libraries in the same way as for the
JPOX manifest file, and promptly it worked. Sorry for the noise.

rgds / Christophe


> Hi Martin,
>
> Thank you for pointing out the JPOX dependencies page.
> I understand that you don't want to repeat instructions from
> JPOX or eclipse. I feel though if like me, you come
> from J2SE background, with no previous exposure to JPOX,
> it's very overwhelming at first, and you and up jumping
> between the sites (elver, jpox, jdo, eclipse emf) to put the puzzle
> together. This is not in Teneo's favor.
>
> I can imagine (Or I would wish for), that the EMF tutorials at some
> point would actually also generate the persistence side, and
> do it for you a-z. This would be a huge accomplishment, and push EMF
> persistence forward by a big leap. For me it's been a frustrating
> experience.
>
> To continue to report my experience, as I moved along a bit.
> I went on to try out to Library Editor tutorial, but unfortunately
> ran into this class loading problem. (JPOX being in a separate plugin
> looking for classes).
>
> The Buddy-Policy hint doesn't seem to help. (Actually also on the elver
> tutorial, it's not precise enough how it should be set).
>
> I also tried with Hibernate, the Hibernate tutorial went well. It seems
> that hibernate is somehow smarter than jpox. It doesn't need a separate
> plugin for enhancement/schema generation or .jdo or class enhancements?
> (Or it all happens under the cover). Is it safe to say that hibernate is
> a better choice from this perspective?
>
> When running the hibernate library editor tutorial, I also ran into the
> same classloading problem.
>
> I tried this pointer: http://www.hibernate.org/311.html, without success.
>
> So here I am, both JPOX and Hibernate connect
> to the database with my model in a standalone fashion, but not in an RCP
> setup with libraries in a separate eclipse plugin.
>
> I post my manifest files here, perhaps this can shed some light?
> (Note that I export the packages).
>
> Thanks for the help!
> Christophe
>
> stack trace:
>
> With hibernate:
>
>
> Caused by: java.lang.NoClassDefFoundError: org/hibernate/SessionFactory
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:165)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:554)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:524)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:455)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:443)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:423)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374 )
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:165)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:554)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:524)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:455)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:443)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:423)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374 )
> at org.eclipse.emf.teneo.hibernate.HbHelper.<clinit>(HbHelper.java:56)
> at
> com.kualasoft.hatari.hatari.presentation.HatariEditorPlugin$ Implementation.connectHibernate(HatariEditorPlugin.java:151)
>
>
>
>
>
>
>
>
> Martin Taal wrote:
>> Hi Christophe,
>> Thanks for the detailed feedback. See comments inline.
>>
>> gr. Martin
>>
>> Christophe Bouhier wrote:
>>> Dears,
>>>
>>> My environment: Eclipse Ganymede, latest EMF.
>>> RCP Application.
>>> MacOSX Leopard
>>> MySQL Database.
>>>
>>>
>>> Please find some feedback from a "First User".
>>>
>>> I am building an RCP application using an EMF generated model.
>>> from .xsd. I decided to try JPOX over Hibernate first.
>>>
>>> I followed the instruction on www.elver.org. Which I discovered
>>> as some serious shortcomings in the tutorial for a newbie like me.
>>> I would like to list here, my experience which can be used to update
>>> the tutorial: I managed to get through and connect to the database
>>> but it took 3 days.
>>>
>>> 1) JPOX libraries
>>>
>>> It's not clear which JPOX libraries and versions are needed in the elver
>>> install tutorial.
>> MT>> These are exact the same as defined on the jpox website:
>> http://www.jpox.org/docs/1_1/dependencies.html
>> See also here: http://www.elver.org/jpox/installation.html#JPOX+Libraries
>> The hyperlink I use there is not precise enough I will change that to the
>> one I mention above.
>>
>>
>>>
>>> What should be clarified is the exact require libs and version.
>>>
>>> - The JPOX core version
>>> - The JPOX Enhancement version
>>> - The JDO Version. (2.0 or 2.1?).
>>>
>>> A newbie is fooled into getting the latest JPOX version which is not
>>> compatible with the examples. (Version 1.1.9 seems to be the correct
>>> one). The JPOX site doesn't link to the JDO site, nor does the elver
>>> install tutorial.
>> MT>> I understand, I will make more clear that Teneo depends on the
>> 1.1.9 release.
>> (it is listed here: http://www.elver.org/jpox/, but it's a bit hidden)
>>
>>>
>>> Next, when visiting the JPOX site, I find out there is a JPOX eclipse
>>> plugin. This is mentioned in the elver tutorial, but the tutorial should
>>> also mention, how to configure this plugin or if it's needed at all?
>> MT>> My assumption here is that the documentation is provided by jpox.
>> Afaik jpox/datanucleus has excellent documentation.
>>
>>> (It doesn't seem to provide the JPOX libraries so what does it do in
>>> relation to the emft/teneo plugin? I can see it contributes wizards
>>> for schema tool.). This plugin when installed is: org.jpox.ide.eclipse.
>> MT>> It provides automatic enhancement of your class files when
>> eclipse rebuilds.
>>
>>>
>>>
>>> 2) OR mapping
>>>
>>> When configuring JPOX, to do auto-enhancement, it turns out an
>>> additional library is needed. BCEL or some other .class enhancer.
>>> This should also be mentioned in the tutorial.
>> MT>> See the jpox website and remarks above.
>>
>>>
>>> After this, I managed to enable the project for JPOX and generate the
>>> ..jdo file. All fine.
>>>
>>> The class which are enhanced do generate some warnings, which seem to
>>> be more related to other plugins.
>>>
>>> One example:
>>>
>>> Aug 1, 2008 5:39:48 PM org.jpox.util.JDK14Logger warn
>>> WARNING: Extension Point "org.eclipse.core.contenttype.contentTypes"
>>> not registered, but plugin "" defined in
>>> jar:file:/Applications/eclipse/plugins/org.eclipse.core.cont enttype_3.3.0.v20080604-1400.jar!/plugin.xml
>>> refers to it.
>> MT>> This is a jpox issue.
>>
>>>
>>
>>> At the end I still get this:
>>>
>>> "JPOX Enhancer completed with success for 6 classes. Consult the log
>>> for full details"
>>>
>>> Ok, next I create a database, and add the log.properties and I create
>>> the static class. Unfortunatly the tutorial doesn't tell you how to call
>>> this class from the RCP app. I chose to create a new run-configuration
>>> calling this static class.
>> MT>> Correct, it is not a rcp tutorial.
>>
>>>
>>> I run the class: Get the following (Which all seems good).
>>>
>>> Aug 1, 2008 6:04:12 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>>> INFO: Registering a jpox resource factory for all uri's with jpox as
>>> the protocol/extension
>>> Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>>> INFO: Registering a jpox resource factory for all uri's with ejdo as
>>> the protocol/extension
>>> Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>>> INFO: Registering a jpox resource dao factory for all uri's with
>>> jpoxdao as the protocol/extension
>>>
>>> ....and it goes on, finally connecting to the database! Eureka.
>> MT>> That's good, thanks again for the time/effort you took to write
>> this up.
>> I will update the Teneo/elver.org website to be more precise were
>> required.
>>
>>>
>>> Cheers / Christophe
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
Re: The newbie struggle (But still made it). [message #620174 is a reply to message #127861] Sun, 03 August 2008 11:02 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Christophe,
Yes Teneo assumes that you have some knowledge of Jpox or Hibernate. Teneo does not hide
jpox/hibernate. Teneo tries to work inside jpox/hibernate so therefore this assumption.

Regarding the eclipse-buddypolicy. It should be set to dependent, you have registered.
See here, the bold part of the page:
http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
http://www.elver.org/hibernate/installation.html#Hibernate+L ibraries

Do you mean that from the tutorial I don't refer back to the download & install page? This would
probably/maybe help. Let me know then I can change this.

Correct, Hibernate does not require compile-time enhancement.Hibernate is more widely used by Teneo
users and features follows use. Because of lack of time I did not have time yet to upgrade to the
latest release of Jpox.

gr. Martin

Christophe Bouhier wrote:
> Hi Martin,
>
> Thank you for pointing out the JPOX dependencies page.
> I understand that you don't want to repeat instructions from
> JPOX or eclipse. I feel though if like me, you come
> from J2SE background, with no previous exposure to JPOX,
> it's very overwhelming at first, and you and up jumping
> between the sites (elver, jpox, jdo, eclipse emf) to put the puzzle
> together. This is not in Teneo's favor.
>
> I can imagine (Or I would wish for), that the EMF tutorials at some
> point would actually also generate the persistence side, and
> do it for you a-z. This would be a huge accomplishment, and push EMF
> persistence forward by a big leap. For me it's been a frustrating
> experience.
>
> To continue to report my experience, as I moved along a bit.
> I went on to try out to Library Editor tutorial, but unfortunately
> ran into this class loading problem. (JPOX being in a separate plugin
> looking for classes).
>
> The Buddy-Policy hint doesn't seem to help. (Actually also on the elver
> tutorial, it's not precise enough how it should be set).
>
> I also tried with Hibernate, the Hibernate tutorial went well. It seems
> that hibernate is somehow smarter than jpox. It doesn't need a separate
> plugin for enhancement/schema generation or .jdo or class enhancements?
> (Or it all happens under the cover). Is it safe to say that hibernate is
> a better choice from this perspective?
>
> When running the hibernate library editor tutorial, I also ran into the
> same classloading problem.
>
> I tried this pointer: http://www.hibernate.org/311.html, without success.
>
> So here I am, both JPOX and Hibernate connect
> to the database with my model in a standalone fashion, but not in an RCP
> setup with libraries in a separate eclipse plugin.
>
> I post my manifest files here, perhaps this can shed some light?
> (Note that I export the packages).
>
> Thanks for the help!
> Christophe
>
> stack trace:
>
> With hibernate:
>
>
> Caused by: java.lang.NoClassDefFoundError: org/hibernate/SessionFactory
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:165)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:554)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:524)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:455)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:443)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:423)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374 )
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:165)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:554)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:524)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:455)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:443)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:423)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374 )
> at org.eclipse.emf.teneo.hibernate.HbHelper.<clinit>(HbHelper.java:56)
> at
> com.kualasoft.hatari.hatari.presentation.HatariEditorPlugin$ Implementation.connectHibernate(HatariEditorPlugin.java:151)
>
>
>
>
>
>
>
>
> Martin Taal wrote:
>> Hi Christophe,
>> Thanks for the detailed feedback. See comments inline.
>>
>> gr. Martin
>>
>> Christophe Bouhier wrote:
>>> Dears,
>>>
>>> My environment: Eclipse Ganymede, latest EMF.
>>> RCP Application.
>>> MacOSX Leopard
>>> MySQL Database.
>>>
>>>
>>> Please find some feedback from a "First User".
>>>
>>> I am building an RCP application using an EMF generated model.
>>> from .xsd. I decided to try JPOX over Hibernate first.
>>>
>>> I followed the instruction on www.elver.org. Which I discovered
>>> as some serious shortcomings in the tutorial for a newbie like me.
>>> I would like to list here, my experience which can be used to update
>>> the tutorial: I managed to get through and connect to the database
>>> but it took 3 days.
>>>
>>> 1) JPOX libraries
>>>
>>> It's not clear which JPOX libraries and versions are needed in the elver
>>> install tutorial.
>> MT>> These are exact the same as defined on the jpox website:
>> http://www.jpox.org/docs/1_1/dependencies.html
>> See also here: http://www.elver.org/jpox/installation.html#JPOX+Libraries
>> The hyperlink I use there is not precise enough I will change that to the
>> one I mention above.
>>
>>
>>>
>>> What should be clarified is the exact require libs and version.
>>>
>>> - The JPOX core version
>>> - The JPOX Enhancement version
>>> - The JDO Version. (2.0 or 2.1?).
>>>
>>> A newbie is fooled into getting the latest JPOX version which is not
>>> compatible with the examples. (Version 1.1.9 seems to be the correct
>>> one). The JPOX site doesn't link to the JDO site, nor does the elver
>>> install tutorial.
>> MT>> I understand, I will make more clear that Teneo depends on the
>> 1.1.9 release.
>> (it is listed here: http://www.elver.org/jpox/, but it's a bit hidden)
>>
>>>
>>> Next, when visiting the JPOX site, I find out there is a JPOX eclipse
>>> plugin. This is mentioned in the elver tutorial, but the tutorial should
>>> also mention, how to configure this plugin or if it's needed at all?
>> MT>> My assumption here is that the documentation is provided by jpox.
>> Afaik jpox/datanucleus has excellent documentation.
>>
>>> (It doesn't seem to provide the JPOX libraries so what does it do in
>>> relation to the emft/teneo plugin? I can see it contributes wizards
>>> for schema tool.). This plugin when installed is: org.jpox.ide.eclipse.
>> MT>> It provides automatic enhancement of your class files when
>> eclipse rebuilds.
>>
>>>
>>>
>>> 2) OR mapping
>>>
>>> When configuring JPOX, to do auto-enhancement, it turns out an
>>> additional library is needed. BCEL or some other .class enhancer.
>>> This should also be mentioned in the tutorial.
>> MT>> See the jpox website and remarks above.
>>
>>>
>>> After this, I managed to enable the project for JPOX and generate the
>>> ..jdo file. All fine.
>>>
>>> The class which are enhanced do generate some warnings, which seem to
>>> be more related to other plugins.
>>>
>>> One example:
>>>
>>> Aug 1, 2008 5:39:48 PM org.jpox.util.JDK14Logger warn
>>> WARNING: Extension Point "org.eclipse.core.contenttype.contentTypes"
>>> not registered, but plugin "" defined in
>>> jar:file:/Applications/eclipse/plugins/org.eclipse.core.cont enttype_3.3.0.v20080604-1400.jar!/plugin.xml
>>> refers to it.
>> MT>> This is a jpox issue.
>>
>>>
>>
>>> At the end I still get this:
>>>
>>> "JPOX Enhancer completed with success for 6 classes. Consult the log
>>> for full details"
>>>
>>> Ok, next I create a database, and add the log.properties and I create
>>> the static class. Unfortunatly the tutorial doesn't tell you how to call
>>> this class from the RCP app. I chose to create a new run-configuration
>>> calling this static class.
>> MT>> Correct, it is not a rcp tutorial.
>>
>>>
>>> I run the class: Get the following (Which all seems good).
>>>
>>> Aug 1, 2008 6:04:12 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>>> INFO: Registering a jpox resource factory for all uri's with jpox as
>>> the protocol/extension
>>> Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>>> INFO: Registering a jpox resource factory for all uri's with ejdo as
>>> the protocol/extension
>>> Aug 1, 2008 6:04:13 PM org.eclipse.emf.teneo.jpox.JpoxHelper <clinit>
>>> INFO: Registering a jpox resource dao factory for all uri's with
>>> jpoxdao as the protocol/extension
>>>
>>> ....and it goes on, finally connecting to the database! Eureka.
>> MT>> That's good, thanks again for the time/effort you took to write
>> this up.
>> I will update the Teneo/elver.org website to be more precise were
>> required.
>>
>>>
>>> Cheers / Christophe
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>


--

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: The newbie struggle (But still made it). [message #620181 is a reply to message #127888] Tue, 05 August 2008 08:49 Go to previous message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Hi,

Martin Taal wrote:
> Regarding the eclipse-buddypolicy. It should be set to dependent, you
> have registered.
> See here, the bold part of the page:
> http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
Yes, changed it but I also set below in the editor plugin. Is this needed?

Eclipse-RegisterBuddy: com.kualasoft.hb

> Do you mean that from the tutorial I don't refer back to the download &
> install page? This would probably/maybe help. Let me know then I can
> change this.
What I mean, is that the exact Hibernate libs are not listed in the
tutorial, when you download hibernate, you get all kind of stuff, which
is not needed for the tutorial.


Also made more progress, I have now loaded a complex .xsd with many
references, and I am able to connect to the database. I do have a
problem that the editor opens read-only. Also I think my setup is not
correct, as I have the following behaviour.

1. I create a new model. .mymodel
2. I write some "required" fields, to be able to save the model.
3. The model is reflected properly in the database. this is all fine.
4. The model is read-only, I can't add child/sible to it.
5. the file I chose when creating the model is not visible on the file
system. This kind of makes sense, as the resource is opened with the
HiberbateResourceFactory. But, how do I re-open my model using the
editor open/open-uri. I tried with the hibernate protocol
hibernate://dsname=something.mymodel, but get an error on this.

I guess, what I need to understand is how the filesystem resources and
hibernate resources can be used in parallel? Or how do I re-open my
hibernate resource in the editor?

any help is most welcome.

Thank you, Christophe.
Re: The newbie struggle (But still made it). [message #620195 is a reply to message #127988] Wed, 06 August 2008 11:41 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Christophe,
I am currently on holiday, I will answer your post tomorrow morning.

gr. Martin

Christophe Bouhier wrote:
> Hi,
>
> Martin Taal wrote:
>> Regarding the eclipse-buddypolicy. It should be set to dependent, you
>> have registered.
>> See here, the bold part of the page:
>> http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
>
> Yes, changed it but I also set below in the editor plugin. Is this needed?
>
> Eclipse-RegisterBuddy: com.kualasoft.hb
>
>> Do you mean that from the tutorial I don't refer back to the download
>> & install page? This would probably/maybe help. Let me know then I can
>> change this.
> What I mean, is that the exact Hibernate libs are not listed in the
> tutorial, when you download hibernate, you get all kind of stuff, which
> is not needed for the tutorial.
>
>
> Also made more progress, I have now loaded a complex .xsd with many
> references, and I am able to connect to the database. I do have a
> problem that the editor opens read-only. Also I think my setup is not
> correct, as I have the following behaviour.
>
> 1. I create a new model. .mymodel
> 2. I write some "required" fields, to be able to save the model.
> 3. The model is reflected properly in the database. this is all fine.
> 4. The model is read-only, I can't add child/sible to it.
> 5. the file I chose when creating the model is not visible on the file
> system. This kind of makes sense, as the resource is opened with the
> HiberbateResourceFactory. But, how do I re-open my model using the
> editor open/open-uri. I tried with the hibernate protocol
> hibernate://dsname=something.mymodel, but get an error on this.
>
> I guess, what I need to understand is how the filesystem resources and
> hibernate resources can be used in parallel? Or how do I re-open my
> hibernate resource in the editor?
>
> any help is most welcome.
>
> Thank you, Christophe.


--

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: The newbie struggle (But still made it). [message #620200 is a reply to message #127988] Thu, 07 August 2008 10:14 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Christophe,
Does this help for the read-only issue:
http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg04688.html

The registerbuddy is not required in case of buddypolicy dependent.

Regarding your question about the resource. You have to study how EMF resources work and how Eclipse
editors are opened. I don't develop using Eclipse rcp so I can't give you that much information.
Here is an example of the gmf tutorial:
http://www.elver.org/hibernate/gmftutorial/tutorial3.html#Op en+editor+action

gr. Martin

Christophe Bouhier wrote:
> Hi,
>
> Martin Taal wrote:
>> Regarding the eclipse-buddypolicy. It should be set to dependent, you
>> have registered.
>> See here, the bold part of the page:
>> http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
>
> Yes, changed it but I also set below in the editor plugin. Is this needed?
>
> Eclipse-RegisterBuddy: com.kualasoft.hb
>
>> Do you mean that from the tutorial I don't refer back to the download
>> & install page? This would probably/maybe help. Let me know then I can
>> change this.
> What I mean, is that the exact Hibernate libs are not listed in the
> tutorial, when you download hibernate, you get all kind of stuff, which
> is not needed for the tutorial.
>
>
> Also made more progress, I have now loaded a complex .xsd with many
> references, and I am able to connect to the database. I do have a
> problem that the editor opens read-only. Also I think my setup is not
> correct, as I have the following behaviour.
>
> 1. I create a new model. .mymodel
> 2. I write some "required" fields, to be able to save the model.
> 3. The model is reflected properly in the database. this is all fine.
> 4. The model is read-only, I can't add child/sible to it.
> 5. the file I chose when creating the model is not visible on the file
> system. This kind of makes sense, as the resource is opened with the
> HiberbateResourceFactory. But, how do I re-open my model using the
> editor open/open-uri. I tried with the hibernate protocol
> hibernate://dsname=something.mymodel, but get an error on this.
>
> I guess, what I need to understand is how the filesystem resources and
> hibernate resources can be used in parallel? Or how do I re-open my
> hibernate resource in the editor?
>
> any help is most welcome.
>
> Thank you, Christophe.


--

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: The newbie struggle (But still made it). [message #620217 is a reply to message #128228] Fri, 08 August 2008 21:59 Go to previous message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Yes, the adaptorfactory enhancement did the trick.
I can open with Open URI, and a name ending with .mymodel

So all working well, except changes are not reflected. I am not
sure why the SQL databse is not update when reloading a changed .xsd. I
am re-generating the model and edit code and no change in the database.
Is this one of those parameters I need to pass?

Thanks for all your help. I am close to be fully in production with teneo.

Cheers / Christophe



Martin Taal wrote:
> Hi Christophe,
> Does this help for the read-only issue:
> http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg04688.html
>
> The registerbuddy is not required in case of buddypolicy dependent.
>
> Regarding your question about the resource. You have to study how EMF
> resources work and how Eclipse editors are opened. I don't develop using
> Eclipse rcp so I can't give you that much information. Here is an
> example of the gmf tutorial:
> http://www.elver.org/hibernate/gmftutorial/tutorial3.html#Op en+editor+action
>
>
> gr. Martin
>
> Christophe Bouhier wrote:
>> Hi,
>>
>> Martin Taal wrote:
>>> Regarding the eclipse-buddypolicy. It should be set to dependent, you
>>> have registered.
>>> See here, the bold part of the page:
>>> http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
>>
>>
>> Yes, changed it but I also set below in the editor plugin. Is this
>> needed?
>>
>> Eclipse-RegisterBuddy: com.kualasoft.hb
>>
>>> Do you mean that from the tutorial I don't refer back to the download
>>> & install page? This would probably/maybe help. Let me know then I
>>> can change this.
>> What I mean, is that the exact Hibernate libs are not listed in the
>> tutorial, when you download hibernate, you get all kind of stuff,
>> which is not needed for the tutorial.
>>
>>
>> Also made more progress, I have now loaded a complex .xsd with many
>> references, and I am able to connect to the database. I do have a
>> problem that the editor opens read-only. Also I think my setup is not
>> correct, as I have the following behaviour.
>>
>> 1. I create a new model. .mymodel
>> 2. I write some "required" fields, to be able to save the model.
>> 3. The model is reflected properly in the database. this is all fine.
>> 4. The model is read-only, I can't add child/sible to it.
>> 5. the file I chose when creating the model is not visible on the file
>> system. This kind of makes sense, as the resource is opened with the
>> HiberbateResourceFactory. But, how do I re-open my model using the
>> editor open/open-uri. I tried with the hibernate protocol
>> hibernate://dsname=something.mymodel, but get an error on this.
>>
>> I guess, what I need to understand is how the filesystem resources and
>> hibernate resources can be used in parallel? Or how do I re-open my
>> hibernate resource in the editor?
>>
>> any help is most welcome.
>>
>> Thank you, Christophe.
>
>
Re: The newbie struggle (But still made it). [message #620218 is a reply to message #128454] Sat, 09 August 2008 09:36 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Christophe,
Regarding updating the db schema, what value did you set for the hbm2ddl hibernate option?

gr. Martin

Christophe Bouhier wrote:
> Yes, the adaptorfactory enhancement did the trick.
> I can open with Open URI, and a name ending with .mymodel
>
> So all working well, except changes are not reflected. I am not
> sure why the SQL databse is not update when reloading a changed .xsd. I
> am re-generating the model and edit code and no change in the database.
> Is this one of those parameters I need to pass?
>
> Thanks for all your help. I am close to be fully in production with teneo.
>
> Cheers / Christophe
>
>
>
> Martin Taal wrote:
>> Hi Christophe,
>> Does this help for the read-only issue:
>> http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg04688.html
>>
>>
>> The registerbuddy is not required in case of buddypolicy dependent.
>>
>> Regarding your question about the resource. You have to study how EMF
>> resources work and how Eclipse editors are opened. I don't develop
>> using Eclipse rcp so I can't give you that much information. Here is
>> an example of the gmf tutorial:
>> http://www.elver.org/hibernate/gmftutorial/tutorial3.html#Op en+editor+action
>>
>>
>> gr. Martin
>>
>> Christophe Bouhier wrote:
>>> Hi,
>>>
>>> Martin Taal wrote:
>>>> Regarding the eclipse-buddypolicy. It should be set to dependent,
>>>> you have registered.
>>>> See here, the bold part of the page:
>>>> http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
>>>
>>>
>>>
>>> Yes, changed it but I also set below in the editor plugin. Is this
>>> needed?
>>>
>>> Eclipse-RegisterBuddy: com.kualasoft.hb
>>>
>>>> Do you mean that from the tutorial I don't refer back to the
>>>> download & install page? This would probably/maybe help. Let me know
>>>> then I can change this.
>>> What I mean, is that the exact Hibernate libs are not listed in the
>>> tutorial, when you download hibernate, you get all kind of stuff,
>>> which is not needed for the tutorial.
>>>
>>>
>>> Also made more progress, I have now loaded a complex .xsd with many
>>> references, and I am able to connect to the database. I do have a
>>> problem that the editor opens read-only. Also I think my setup is not
>>> correct, as I have the following behaviour.
>>>
>>> 1. I create a new model. .mymodel
>>> 2. I write some "required" fields, to be able to save the model.
>>> 3. The model is reflected properly in the database. this is all fine.
>>> 4. The model is read-only, I can't add child/sible to it.
>>> 5. the file I chose when creating the model is not visible on the
>>> file system. This kind of makes sense, as the resource is opened with
>>> the HiberbateResourceFactory. But, how do I re-open my model using
>>> the editor open/open-uri. I tried with the hibernate protocol
>>> hibernate://dsname=something.mymodel, but get an error on this.
>>>
>>> I guess, what I need to understand is how the filesystem resources
>>> and hibernate resources can be used in parallel? Or how do I re-open
>>> my hibernate resource in the editor?
>>>
>>> any help is most welcome.
>>>
>>> Thank you, Christophe.
>>
>>


--

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: The newbie struggle (But still made it). [message #620219 is a reply to message #128468] Sat, 09 August 2008 12:35 Go to previous message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Martin Taal wrote:
> Hi Christophe,
> Regarding updating the db schema, what value did you set for the hbm2ddl
> hibernate option?
>
> gr. Martin
>
> Christophe Bouhier wrote:
>> Yes, the adaptorfactory enhancement did the trick.
>> I can open with Open URI, and a name ending with .mymodel
>>
>> So all working well, except changes are not reflected. I am not
>> sure why the SQL databse is not update when reloading a changed .xsd.
>> I am re-generating the model and edit code and no change in the database.
>> Is this one of those parameters I need to pass?
>>
>> Thanks for all your help. I am close to be fully in production with
>> teneo.
>>
>> Cheers / Christophe
>>
>>
>>
>> Martin Taal wrote:
>>> Hi Christophe,
>>> Does this help for the read-only issue:
>>> http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg04688.html
>>>
>>>
>>> The registerbuddy is not required in case of buddypolicy dependent.
>>>
>>> Regarding your question about the resource. You have to study how EMF
>>> resources work and how Eclipse editors are opened. I don't develop
>>> using Eclipse rcp so I can't give you that much information. Here is
>>> an example of the gmf tutorial:
>>> http://www.elver.org/hibernate/gmftutorial/tutorial3.html#Op en+editor+action
>>>
>>>
>>> gr. Martin
>>>
>>> Christophe Bouhier wrote:
>>>> Hi,
>>>>
>>>> Martin Taal wrote:
>>>>> Regarding the eclipse-buddypolicy. It should be set to dependent,
>>>>> you have registered.
>>>>> See here, the bold part of the page:
>>>>> http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
>>>>
>>>>
>>>>
>>>>
>>>> Yes, changed it but I also set below in the editor plugin. Is this
>>>> needed?
>>>>
>>>> Eclipse-RegisterBuddy: com.kualasoft.hb
>>>>
>>>>> Do you mean that from the tutorial I don't refer back to the
>>>>> download & install page? This would probably/maybe help. Let me
>>>>> know then I can change this.
>>>> What I mean, is that the exact Hibernate libs are not listed in the
>>>> tutorial, when you download hibernate, you get all kind of stuff,
>>>> which is not needed for the tutorial.
>>>>
>>>>
>>>> Also made more progress, I have now loaded a complex .xsd with many
>>>> references, and I am able to connect to the database. I do have a
>>>> problem that the editor opens read-only. Also I think my setup is
>>>> not correct, as I have the following behaviour.
>>>>
>>>> 1. I create a new model. .mymodel
>>>> 2. I write some "required" fields, to be able to save the model.
>>>> 3. The model is reflected properly in the database. this is all fine.
>>>> 4. The model is read-only, I can't add child/sible to it.
>>>> 5. the file I chose when creating the model is not visible on the
>>>> file system. This kind of makes sense, as the resource is opened
>>>> with the HiberbateResourceFactory. But, how do I re-open my model
>>>> using the editor open/open-uri. I tried with the hibernate protocol
>>>> hibernate://dsname=something.mymodel, but get an error on this.
>>>>
>>>> I guess, what I need to understand is how the filesystem resources
>>>> and hibernate resources can be used in parallel? Or how do I re-open
>>>> my hibernate resource in the editor?
>>>>
>>>> any help is most welcome.
>>>>
>>>> Thank you, Christophe.
>>>
>>>
>
>
Re: The newbie struggle (But still made it). [message #620220 is a reply to message #128468] Sat, 09 August 2008 12:35 Go to previous message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
It's not set at all.
Is 'update' the right value?



Martin Taal wrote:
> Hi Christophe,
> Regarding updating the db schema, what value did you set for the hbm2ddl
> hibernate option?
>
> gr. Martin
>
> Christophe Bouhier wrote:
>> Yes, the adaptorfactory enhancement did the trick.
>> I can open with Open URI, and a name ending with .mymodel
>>
>> So all working well, except changes are not reflected. I am not
>> sure why the SQL databse is not update when reloading a changed .xsd.
>> I am re-generating the model and edit code and no change in the database.
>> Is this one of those parameters I need to pass?
>>
>> Thanks for all your help. I am close to be fully in production with
>> teneo.
>>
>> Cheers / Christophe
>>
>>
>>
>> Martin Taal wrote:
>>> Hi Christophe,
>>> Does this help for the read-only issue:
>>> http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg04688.html
>>>
>>>
>>> The registerbuddy is not required in case of buddypolicy dependent.
>>>
>>> Regarding your question about the resource. You have to study how EMF
>>> resources work and how Eclipse editors are opened. I don't develop
>>> using Eclipse rcp so I can't give you that much information. Here is
>>> an example of the gmf tutorial:
>>> http://www.elver.org/hibernate/gmftutorial/tutorial3.html#Op en+editor+action
>>>
>>>
>>> gr. Martin
>>>
>>> Christophe Bouhier wrote:
>>>> Hi,
>>>>
>>>> Martin Taal wrote:
>>>>> Regarding the eclipse-buddypolicy. It should be set to dependent,
>>>>> you have registered.
>>>>> See here, the bold part of the page:
>>>>> http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
>>>>
>>>>
>>>>
>>>>
>>>> Yes, changed it but I also set below in the editor plugin. Is this
>>>> needed?
>>>>
>>>> Eclipse-RegisterBuddy: com.kualasoft.hb
>>>>
>>>>> Do you mean that from the tutorial I don't refer back to the
>>>>> download & install page? This would probably/maybe help. Let me
>>>>> know then I can change this.
>>>> What I mean, is that the exact Hibernate libs are not listed in the
>>>> tutorial, when you download hibernate, you get all kind of stuff,
>>>> which is not needed for the tutorial.
>>>>
>>>>
>>>> Also made more progress, I have now loaded a complex .xsd with many
>>>> references, and I am able to connect to the database. I do have a
>>>> problem that the editor opens read-only. Also I think my setup is
>>>> not correct, as I have the following behaviour.
>>>>
>>>> 1. I create a new model. .mymodel
>>>> 2. I write some "required" fields, to be able to save the model.
>>>> 3. The model is reflected properly in the database. this is all fine.
>>>> 4. The model is read-only, I can't add child/sible to it.
>>>> 5. the file I chose when creating the model is not visible on the
>>>> file system. This kind of makes sense, as the resource is opened
>>>> with the HiberbateResourceFactory. But, how do I re-open my model
>>>> using the editor open/open-uri. I tried with the hibernate protocol
>>>> hibernate://dsname=something.mymodel, but get an error on this.
>>>>
>>>> I guess, what I need to understand is how the filesystem resources
>>>> and hibernate resources can be used in parallel? Or how do I re-open
>>>> my hibernate resource in the editor?
>>>>
>>>> any help is most welcome.
>>>>
>>>> Thank you, Christophe.
>>>
>>>
>
>
Re: The newbie struggle (But still made it). [message #620221 is a reply to message #128494] Sun, 10 August 2008 08:02 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Yes, the hibernate manual also describes some other values which can be relevant in different
situations.

gr. Martin

Christophe Bouhier wrote:
> It's not set at all.
> Is 'update' the right value?
>
>
>
> Martin Taal wrote:
>> Hi Christophe,
>> Regarding updating the db schema, what value did you set for the
>> hbm2ddl hibernate option?
>>
>> gr. Martin
>>
>> Christophe Bouhier wrote:
>>> Yes, the adaptorfactory enhancement did the trick.
>>> I can open with Open URI, and a name ending with .mymodel
>>>
>>> So all working well, except changes are not reflected. I am not
>>> sure why the SQL databse is not update when reloading a changed .xsd.
>>> I am re-generating the model and edit code and no change in the
>>> database.
>>> Is this one of those parameters I need to pass?
>>>
>>> Thanks for all your help. I am close to be fully in production with
>>> teneo.
>>>
>>> Cheers / Christophe
>>>
>>>
>>>
>>> Martin Taal wrote:
>>>> Hi Christophe,
>>>> Does this help for the read-only issue:
>>>> http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg04688.html
>>>>
>>>>
>>>> The registerbuddy is not required in case of buddypolicy dependent.
>>>>
>>>> Regarding your question about the resource. You have to study how
>>>> EMF resources work and how Eclipse editors are opened. I don't
>>>> develop using Eclipse rcp so I can't give you that much information.
>>>> Here is an example of the gmf tutorial:
>>>> http://www.elver.org/hibernate/gmftutorial/tutorial3.html#Op en+editor+action
>>>>
>>>>
>>>> gr. Martin
>>>>
>>>> Christophe Bouhier wrote:
>>>>> Hi,
>>>>>
>>>>> Martin Taal wrote:
>>>>>> Regarding the eclipse-buddypolicy. It should be set to dependent,
>>>>>> you have registered.
>>>>>> See here, the bold part of the page:
>>>>>> http://www.elver.org/jpox/installation.html#Using+the+runtim e+plugin+in+an+EMF+model+plugin
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Yes, changed it but I also set below in the editor plugin. Is this
>>>>> needed?
>>>>>
>>>>> Eclipse-RegisterBuddy: com.kualasoft.hb
>>>>>
>>>>>> Do you mean that from the tutorial I don't refer back to the
>>>>>> download & install page? This would probably/maybe help. Let me
>>>>>> know then I can change this.
>>>>> What I mean, is that the exact Hibernate libs are not listed in the
>>>>> tutorial, when you download hibernate, you get all kind of stuff,
>>>>> which is not needed for the tutorial.
>>>>>
>>>>>
>>>>> Also made more progress, I have now loaded a complex .xsd with many
>>>>> references, and I am able to connect to the database. I do have a
>>>>> problem that the editor opens read-only. Also I think my setup is
>>>>> not correct, as I have the following behaviour.
>>>>>
>>>>> 1. I create a new model. .mymodel
>>>>> 2. I write some "required" fields, to be able to save the model.
>>>>> 3. The model is reflected properly in the database. this is all fine.
>>>>> 4. The model is read-only, I can't add child/sible to it.
>>>>> 5. the file I chose when creating the model is not visible on the
>>>>> file system. This kind of makes sense, as the resource is opened
>>>>> with the HiberbateResourceFactory. But, how do I re-open my model
>>>>> using the editor open/open-uri. I tried with the hibernate protocol
>>>>> hibernate://dsname=something.mymodel, but get an error on this.
>>>>>
>>>>> I guess, what I need to understand is how the filesystem resources
>>>>> and hibernate resources can be used in parallel? Or how do I
>>>>> re-open my hibernate resource in the editor?
>>>>>
>>>>> any help is most welcome.
>>>>>
>>>>> Thank you, Christophe.
>>>>
>>>>
>>
>>


--

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: The newbie struggle (But still made it). [message #620223 is a reply to message #128507] Mon, 11 August 2008 06:40 Go to previous message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Hi Martin,

I am sorry setting:

props.setProperty(Environment.HBM2DDL_AUTO, "update");

doesn't solve the issue.

When I drop the DB and recreate, the changes are applied.
Is there a formal way to migrate a DB to a new schema?


Here is the full code:

final Properties props = new Properties();
props.setProperty(Environment.DRIVER, "com.mysql.jdbc.Driver");
props.setProperty(Environment.USER, "root");
props.setProperty(Environment.URL,
"jdbc:mysql://127.0.0.1:3306/icebreaker");
// props.setProperty(Environment.PASS, "root"); Remove to ommit the
password authentication.
props.setProperty(Environment.HBM2DDL_AUTO, "update"); // Use when
the dabase changed?

props.setProperty(Environment.DIALECT,"org.hibernate.dialect.MySQLInnoDBDialect ");

// Initialize create the HbDataStore
HbDataStore hbds = HbHelper.INSTANCE
.createRegisterDataStore("icebreaker");
hbds.setEPackages(new EPackage[] { IcebreakerPackage.eINSTANCE });
hbds.setProperties(props);
hbds.initialize();

rgds / Christophe

Martin Taal wrote:
> Yes, the hibernate manual also describes some other values which can be
> relevant in different situations.
>
> gr. Martin
Re: The newbie struggle (But still made it). [message #620224 is a reply to message #128534] Mon, 11 August 2008 09:34 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Christophe,
The hbm2ddl update setting adds columns, table and foreign keys. It does not add indexes. So afaics
the setting update should work (it works for me). Can you put on logging and check the log in the
beginning?
See here for logging:
http://www.elver.org/hibernate/troubleshooting.html#runtime

gr. Martin

Christophe Bouhier wrote:
> Hi Martin,
>
> I am sorry setting:
>
> props.setProperty(Environment.HBM2DDL_AUTO, "update");
>
> doesn't solve the issue.
>
> When I drop the DB and recreate, the changes are applied.
> Is there a formal way to migrate a DB to a new schema?
>
>
> Here is the full code:
>
> final Properties props = new Properties();
> props.setProperty(Environment.DRIVER, "com.mysql.jdbc.Driver");
> props.setProperty(Environment.USER, "root");
> props.setProperty(Environment.URL,
> "jdbc:mysql://127.0.0.1:3306/icebreaker");
> // props.setProperty(Environment.PASS, "root"); Remove to
> ommit the password authentication.
> props.setProperty(Environment.HBM2DDL_AUTO, "update"); //
> Use when the dabase changed?
>
> props.setProperty(Environment.DIALECT,"org.hibernate.dialect.MySQLInnoDBDialect ");
>
>
> // Initialize create the HbDataStore
> HbDataStore hbds = HbHelper.INSTANCE
> .createRegisterDataStore("icebreaker");
> hbds.setEPackages(new EPackage[] {
> IcebreakerPackage.eINSTANCE });
> hbds.setProperties(props);
> hbds.initialize();
>
> rgds / Christophe
>
> Martin Taal wrote:
>> Yes, the hibernate manual also describes some other values which can
>> be relevant in different situations.
>>
>> gr. Martin


--

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: The newbie struggle (But still made it). [message #620226 is a reply to message #128546] Mon, 11 August 2008 12:17 Go to previous message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Hi,

Ok, it seems the change I want to make is not reflected, but when
I add a table it indeed works and the new table is added.

The change I was making is a to alter a column to be nullable by adding
minOccurs="0 and this is not reflected.

I guess, I can conclude that alterations to the columns like Index or
null don't work. I presume this is more a Hibernate issue than a teneo
issue.

rgds, Christophe


Martin Taal wrote:
> Hi Christophe,
> The hbm2ddl update setting adds columns, table and foreign keys. It does
> not add indexes. So afaics the setting update should work (it works for
> me). Can you put on logging and check the log in the beginning?
> See here for logging:
> http://www.elver.org/hibernate/troubleshooting.html#runtime
>
> gr. Martin
>
> Christophe Bouhier wrote:
>> Hi Martin,
>>
>> I am sorry setting:
>>
>> props.setProperty(Environment.HBM2DDL_AUTO, "update");
>>
>> doesn't solve the issue.
>>
>> When I drop the DB and recreate, the changes are applied.
>> Is there a formal way to migrate a DB to a new schema?
>>
>>
>> Here is the full code:
>>
>> final Properties props = new Properties();
>> props.setProperty(Environment.DRIVER,
>> "com.mysql.jdbc.Driver");
>> props.setProperty(Environment.USER, "root");
>> props.setProperty(Environment.URL,
>> "jdbc:mysql://127.0.0.1:3306/icebreaker");
>> // props.setProperty(Environment.PASS, "root"); Remove to
>> ommit the password authentication.
>> props.setProperty(Environment.HBM2DDL_AUTO, "update"); //
>> Use when the dabase changed?
>>
>> props.setProperty(Environment.DIALECT,"org.hibernate.dialect.MySQLInnoDBDialect ");
>>
>>
>> // Initialize create the HbDataStore
>> HbDataStore hbds = HbHelper.INSTANCE
>> .createRegisterDataStore("icebreaker");
>> hbds.setEPackages(new EPackage[] {
>> IcebreakerPackage.eINSTANCE });
>> hbds.setProperties(props);
>> hbds.initialize();
>>
>> rgds / Christophe
>>
>> Martin Taal wrote:
>>> Yes, the hibernate manual also describes some other values which can
>>> be relevant in different situations.
>>>
>>> gr. Martin
>
>
Previous Topic:EMOF to Ecore
Next Topic:Re: Text search in Diagram
Goto Forum:
  


Current Time: Thu Mar 28 19:56:07 GMT 2024

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

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

Back to the top