Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo - JPOX] Enhanced classes
[Teneo - JPOX] Enhanced classes [message #86032] Tue, 12 June 2007 08:17 Go to next message
Eclipse UserFriend
Originally posted by: fc_supercanard.yahoo.fr

Hello,

I have made a model generation from xml schema and enhanced classes
using JPOX. Everything is working well when classes are in a separate
jar file, but when I put enhanced classes in the WebSphere Application
Server plug-in com.ibm.ws.webui_6.1.0.jar, an exception is thrown:

"ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the
service methods of the servlet: IdMap. Exception thrown:
javax.jdo.JDOUserException: Found Meta-Data for class
package.impl.DocumentRootImpl but this class is not enhanced!! Please
enhance the class before running JPOX."

It does not recognize that classes are really enhanced.

Please advise me what to do?
Re: [Teneo - JPOX] Enhanced classes [message #86048 is a reply to message #86032] Tue, 12 June 2007 08:34 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi,
I am not sure how you put the enhanced classes in the plugin. What I remember is that when you build
a plugin that the enhancement step is not done automatically. But I am not sure on this area. You
can ask this on the jpox newsgroup:
http://www.jpox.org/servlet/forum/index

gr. Martin

french.cancan wrote:
> Hello,
>
> I have made a model generation from xml schema and enhanced classes
> using JPOX. Everything is working well when classes are in a separate
> jar file, but when I put enhanced classes in the WebSphere Application
> Server plug-in com.ibm.ws.webui_6.1.0.jar, an exception is thrown:
>
> "ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the
> service methods of the servlet: IdMap. Exception thrown:
> javax.jdo.JDOUserException: Found Meta-Data for class
> package.impl.DocumentRootImpl but this class is not enhanced!! Please
> enhance the class before running JPOX."
>
> It does not recognize that classes are really enhanced.
>
> Please advise me what to do?


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo - JPOX] Enhanced classes [message #86063 is a reply to message #86048] Tue, 12 June 2007 08:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fc_supercanard.yahoo.fr

Hi Martin,

I have put the enhanced classes in the plug-in archive with a simple
copy-paste. I don't know how to build a plug-in with JPOX enhanced classes.

Unfortunately, the http://www.jpox.org/servlet/forum/index newsgroup is
down for a long time (gives "Invalid Session" message) so I don't know
how to solve the problem...


Martin Taal wrote:
> Hi,
> I am not sure how you put the enhanced classes in the plugin. What I
> remember is that when you build a plugin that the enhancement step is
> not done automatically. But I am not sure on this area. You can ask this
> on the jpox newsgroup:
> http://www.jpox.org/servlet/forum/index
>
> gr. Martin
>
> french.cancan wrote:
>> Hello,
>>
>> I have made a model generation from xml schema and enhanced classes
>> using JPOX. Everything is working well when classes are in a separate
>> jar file, but when I put enhanced classes in the WebSphere Application
>> Server plug-in com.ibm.ws.webui_6.1.0.jar, an exception is thrown:
>>
>> "ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the
>> service methods of the servlet: IdMap. Exception thrown:
>> javax.jdo.JDOUserException: Found Meta-Data for class
>> package.impl.DocumentRootImpl but this class is not enhanced!! Please
>> enhance the class before running JPOX."
>>
>> It does not recognize that classes are really enhanced.
>>
>> Please advise me what to do?
>
>
Re: [Teneo - JPOX] Enhanced classes [message #86078 is a reply to message #86063] Tue, 12 June 2007 09:08 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi,
Just copying should work. Can you open the class file (present in the plugin) in eclipse, normally
it shows the method signatures which are present in the classfile, there should be a lot of methods
with jdo in their name.

One other thing to check is where your plugin loads the classes from, maybe your classes are present
twice (in another jar or plugin, you never know), see for example here:
http://blogs.sanmathi.org/ashwin/2007/02/09/dude-wheres-my-c lass/

Btw, the jpox forum works fine for me (at least I can see many recent posts).

gr. Martin

french.cancan wrote:
> Hi Martin,
>
> I have put the enhanced classes in the plug-in archive with a simple
> copy-paste. I don't know how to build a plug-in with JPOX enhanced classes.
>
> Unfortunately, the http://www.jpox.org/servlet/forum/index newsgroup is
> down for a long time (gives "Invalid Session" message) so I don't know
> how to solve the problem...
>
>
> Martin Taal wrote:
>> Hi,
>> I am not sure how you put the enhanced classes in the plugin. What I
>> remember is that when you build a plugin that the enhancement step is
>> not done automatically. But I am not sure on this area. You can ask
>> this on the jpox newsgroup:
>> http://www.jpox.org/servlet/forum/index
>>
>> gr. Martin
>>
>> french.cancan wrote:
>>> Hello,
>>>
>>> I have made a model generation from xml schema and enhanced classes
>>> using JPOX. Everything is working well when classes are in a separate
>>> jar file, but when I put enhanced classes in the WebSphere
>>> Application Server plug-in com.ibm.ws.webui_6.1.0.jar, an exception
>>> is thrown:
>>>
>>> "ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the
>>> service methods of the servlet: IdMap. Exception thrown:
>>> javax.jdo.JDOUserException: Found Meta-Data for class
>>> package.impl.DocumentRootImpl but this class is not enhanced!! Please
>>> enhance the class before running JPOX."
>>>
>>> It does not recognize that classes are really enhanced.
>>>
>>> Please advise me what to do?
>>
>>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo - JPOX] Enhanced classes [message #86108 is a reply to message #86078] Tue, 12 June 2007 20:31 Go to previous messageGo to next message
Julia is currently offline JuliaFriend
Messages: 85
Registered: July 2009
Member
If you are using websphere, you need to run osgiCfgInit.bat to refresh the
cache when you modify something in the plugins directory. Then start the
server.

You also might need to modify the Manifest file in
com.ibm.ws.webui_6.1.0.jar to import any of the teneo/jpox packages.
Re: [Teneo - JPOX] Enhanced classes [message #86154 is a reply to message #86108] Wed, 13 June 2007 09:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fc_supercanard.yahoo.fr

Julia wrote:
> If you are using websphere, you need to run osgiCfgInit.bat to refresh
> the cache when you modify something in the plugins directory. Then start
> the server.
>
> You also might need to modify the Manifest file in
> com.ibm.ws.webui_6.1.0.jar to import any of the teneo/jpox packages.
>


I made all the verifications that Martin told me to do and everything
was ok (the classes are enhanced and the plug-in loads them from the
right position).
Then I modified the Manifest file in com.ibm.ws.webui_6.1.0.jar in order
to import.

The result of this step is that another exception is thrown when I want
to start my portlet.

ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the
service methods of the servlet: IdMap. Exception thrown :
java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.initialize(J9VMInternals.java:205)
at idmap.ResourceSetImplEx.createResource(ResourceSetImplEx.jav a:52)


And the row which is concerned in the file ResourceSetImplEx.java is
this one :

JpoxDataStore jpoxDataStore =
JpoxHelper.INSTANCE.createRegisterDataStore(pmfName);
Re: [Teneo - JPOX] Enhanced classes [message #86200 is a reply to message #86154] Wed, 13 June 2007 11:28 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
I have never encountered this exception with the J9VMInternals. Apparently something goes wrong in a
static initializer. The jpoxhelper class has a static initializer which does this:

>> Source <<
log.info("Registering a jpox resource factory for all uri's with jpox as the protocol/extension");
log.info("Registering a jpox resource factory for all uri's with ejdo as the protocol/extension");
log.info("Registering a jpox resource dao factory for all uri's with jpoxdao as the
protocol/extension");

Resource.Factory.Registry.INSTANCE.getProtocolToFactoryMap() .put( "jpox", new JPOXResourceFactory());
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "jpox", new JPOXResourceFactory());

// support old way
Resource.Factory.Registry.INSTANCE.getProtocolToFactoryMap() .put( "jpoxdao", new JPOXResourceFactory());
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "jpoxdao", new JPOXResourceFactory());
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put(JpoxConstants.EJDO_EXTENSION,
new JPOXResourceFactory());
System.setProperty("org.jpox.cache.level1.type", "org.eclipse.emf.teneo.jpox.cache.EMFWeakRefCache");
>> Source <<

Are you sure that all the required emf jars in the classpath?

Is this the complete stacktrace (I mean are other nested exceptions also being displayed)?

gr. Martin

french.cancan wrote:
> Julia wrote:
>> If you are using websphere, you need to run osgiCfgInit.bat to refresh
>> the cache when you modify something in the plugins directory. Then
>> start the server.
>>
>> You also might need to modify the Manifest file in
>> com.ibm.ws.webui_6.1.0.jar to import any of the teneo/jpox packages.
>>
>
>
> I made all the verifications that Martin told me to do and everything
> was ok (the classes are enhanced and the plug-in loads them from the
> right position).
> Then I modified the Manifest file in com.ibm.ws.webui_6.1.0.jar in order
> to import.
>
> The result of this step is that another exception is thrown when I want
> to start my portlet.
>
> ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the
> service methods of the servlet: IdMap. Exception thrown :
> java.lang.ExceptionInInitializerError
> at java.lang.J9VMInternals.initialize(J9VMInternals.java:205)
> at idmap.ResourceSetImplEx.createResource(ResourceSetImplEx.jav a:52)
>
>
> And the row which is concerned in the file ResourceSetImplEx.java is
> this one :
>
> JpoxDataStore jpoxDataStore =
> JpoxHelper.INSTANCE.createRegisterDataStore(pmfName);


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo - JPOX] Enhanced classes [message #606903 is a reply to message #86032] Tue, 12 June 2007 08:34 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi,
I am not sure how you put the enhanced classes in the plugin. What I remember is that when you build
a plugin that the enhancement step is not done automatically. But I am not sure on this area. You
can ask this on the jpox newsgroup:
http://www.jpox.org/servlet/forum/index

gr. Martin

french.cancan wrote:
> Hello,
>
> I have made a model generation from xml schema and enhanced classes
> using JPOX. Everything is working well when classes are in a separate
> jar file, but when I put enhanced classes in the WebSphere Application
> Server plug-in com.ibm.ws.webui_6.1.0.jar, an exception is thrown:
>
> "ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the
> service methods of the servlet: IdMap. Exception thrown:
> javax.jdo.JDOUserException: Found Meta-Data for class
> package.impl.DocumentRootImpl but this class is not enhanced!! Please
> enhance the class before running JPOX."
>
> It does not recognize that classes are really enhanced.
>
> Please advise me what to do?


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo - JPOX] Enhanced classes [message #606904 is a reply to message #86048] Tue, 12 June 2007 08:47 Go to previous message
Eclipse UserFriend
Originally posted by: fc_supercanard.yahoo.fr

Hi Martin,

I have put the enhanced classes in the plug-in archive with a simple
copy-paste. I don't know how to build a plug-in with JPOX enhanced classes.

Unfortunately, the http://www.jpox.org/servlet/forum/index newsgroup is
down for a long time (gives "Invalid Session" message) so I don't know
how to solve the problem...


Martin Taal wrote:
> Hi,
> I am not sure how you put the enhanced classes in the plugin. What I
> remember is that when you build a plugin that the enhancement step is
> not done automatically. But I am not sure on this area. You can ask this
> on the jpox newsgroup:
> http://www.jpox.org/servlet/forum/index
>
> gr. Martin
>
> french.cancan wrote:
>> Hello,
>>
>> I have made a model generation from xml schema and enhanced classes
>> using JPOX. Everything is working well when classes are in a separate
>> jar file, but when I put enhanced classes in the WebSphere Application
>> Server plug-in com.ibm.ws.webui_6.1.0.jar, an exception is thrown:
>>
>> "ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the
>> service methods of the servlet: IdMap. Exception thrown:
>> javax.jdo.JDOUserException: Found Meta-Data for class
>> package.impl.DocumentRootImpl but this class is not enhanced!! Please
>> enhance the class before running JPOX."
>>
>> It does not recognize that classes are really enhanced.
>>
>> Please advise me what to do?
>
>
Re: [Teneo - JPOX] Enhanced classes [message #606907 is a reply to message #86063] Tue, 12 June 2007 09:08 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi,
Just copying should work. Can you open the class file (present in the plugin) in eclipse, normally
it shows the method signatures which are present in the classfile, there should be a lot of methods
with jdo in their name.

One other thing to check is where your plugin loads the classes from, maybe your classes are present
twice (in another jar or plugin, you never know), see for example here:
http://blogs.sanmathi.org/ashwin/2007/02/09/dude-wheres-my-c lass/

Btw, the jpox forum works fine for me (at least I can see many recent posts).

gr. Martin

french.cancan wrote:
> Hi Martin,
>
> I have put the enhanced classes in the plug-in archive with a simple
> copy-paste. I don't know how to build a plug-in with JPOX enhanced classes.
>
> Unfortunately, the http://www.jpox.org/servlet/forum/index newsgroup is
> down for a long time (gives "Invalid Session" message) so I don't know
> how to solve the problem...
>
>
> Martin Taal wrote:
>> Hi,
>> I am not sure how you put the enhanced classes in the plugin. What I
>> remember is that when you build a plugin that the enhancement step is
>> not done automatically. But I am not sure on this area. You can ask
>> this on the jpox newsgroup:
>> http://www.jpox.org/servlet/forum/index
>>
>> gr. Martin
>>
>> french.cancan wrote:
>>> Hello,
>>>
>>> I have made a model generation from xml schema and enhanced classes
>>> using JPOX. Everything is working well when classes are in a separate
>>> jar file, but when I put enhanced classes in the WebSphere
>>> Application Server plug-in com.ibm.ws.webui_6.1.0.jar, an exception
>>> is thrown:
>>>
>>> "ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the
>>> service methods of the servlet: IdMap. Exception thrown:
>>> javax.jdo.JDOUserException: Found Meta-Data for class
>>> package.impl.DocumentRootImpl but this class is not enhanced!! Please
>>> enhance the class before running JPOX."
>>>
>>> It does not recognize that classes are really enhanced.
>>>
>>> Please advise me what to do?
>>
>>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo - JPOX] Enhanced classes [message #606913 is a reply to message #86078] Tue, 12 June 2007 20:31 Go to previous message
Julia is currently offline JuliaFriend
Messages: 85
Registered: July 2009
Member
If you are using websphere, you need to run osgiCfgInit.bat to refresh the
cache when you modify something in the plugins directory. Then start the
server.

You also might need to modify the Manifest file in
com.ibm.ws.webui_6.1.0.jar to import any of the teneo/jpox packages.
Re: [Teneo - JPOX] Enhanced classes [message #606923 is a reply to message #86108] Wed, 13 June 2007 09:00 Go to previous message
Eclipse UserFriend
Originally posted by: fc_supercanard.yahoo.fr

Julia wrote:
> If you are using websphere, you need to run osgiCfgInit.bat to refresh
> the cache when you modify something in the plugins directory. Then start
> the server.
>
> You also might need to modify the Manifest file in
> com.ibm.ws.webui_6.1.0.jar to import any of the teneo/jpox packages.
>


I made all the verifications that Martin told me to do and everything
was ok (the classes are enhanced and the plug-in loads them from the
right position).
Then I modified the Manifest file in com.ibm.ws.webui_6.1.0.jar in order
to import.

The result of this step is that another exception is thrown when I want
to start my portlet.

ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the
service methods of the servlet: IdMap. Exception thrown :
java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.initialize(J9VMInternals.java:205)
at idmap.ResourceSetImplEx.createResource(ResourceSetImplEx.jav a:52)


And the row which is concerned in the file ResourceSetImplEx.java is
this one :

JpoxDataStore jpoxDataStore =
JpoxHelper.INSTANCE.createRegisterDataStore(pmfName);
Re: [Teneo - JPOX] Enhanced classes [message #606932 is a reply to message #86154] Wed, 13 June 2007 11:28 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
I have never encountered this exception with the J9VMInternals. Apparently something goes wrong in a
static initializer. The jpoxhelper class has a static initializer which does this:

>> Source <<
log.info("Registering a jpox resource factory for all uri's with jpox as the protocol/extension");
log.info("Registering a jpox resource factory for all uri's with ejdo as the protocol/extension");
log.info("Registering a jpox resource dao factory for all uri's with jpoxdao as the
protocol/extension");

Resource.Factory.Registry.INSTANCE.getProtocolToFactoryMap() .put( "jpox", new JPOXResourceFactory());
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "jpox", new JPOXResourceFactory());

// support old way
Resource.Factory.Registry.INSTANCE.getProtocolToFactoryMap() .put( "jpoxdao", new JPOXResourceFactory());
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "jpoxdao", new JPOXResourceFactory());
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put(JpoxConstants.EJDO_EXTENSION,
new JPOXResourceFactory());
System.setProperty("org.jpox.cache.level1.type", "org.eclipse.emf.teneo.jpox.cache.EMFWeakRefCache");
>> Source <<

Are you sure that all the required emf jars in the classpath?

Is this the complete stacktrace (I mean are other nested exceptions also being displayed)?

gr. Martin

french.cancan wrote:
> Julia wrote:
>> If you are using websphere, you need to run osgiCfgInit.bat to refresh
>> the cache when you modify something in the plugins directory. Then
>> start the server.
>>
>> You also might need to modify the Manifest file in
>> com.ibm.ws.webui_6.1.0.jar to import any of the teneo/jpox packages.
>>
>
>
> I made all the verifications that Martin told me to do and everything
> was ok (the classes are enhanced and the plug-in loads them from the
> right position).
> Then I modified the Manifest file in com.ibm.ws.webui_6.1.0.jar in order
> to import.
>
> The result of this step is that another exception is thrown when I want
> to start my portlet.
>
> ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the
> service methods of the servlet: IdMap. Exception thrown :
> java.lang.ExceptionInInitializerError
> at java.lang.J9VMInternals.initialize(J9VMInternals.java:205)
> at idmap.ResourceSetImplEx.createResource(ResourceSetImplEx.jav a:52)
>
>
> And the row which is concerned in the file ResourceSetImplEx.java is
> this one :
>
> JpoxDataStore jpoxDataStore =
> JpoxHelper.INSTANCE.createRegisterDataStore(pmfName);


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
Previous Topic:[Teneo] Replacing persisted elements of an object heirarchy..
Next Topic:Issue with JPA Annotations
Goto Forum:
  


Current Time: Wed Apr 24 23:46:09 GMT 2024

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

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

Back to the top