The newbie struggle (But still made it). [message #620168] |
Fri, 01 August 2008 12:20 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.05139 seconds