Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » [Teneo - JPOX] Enhanced classes
[Teneo - JPOX] Enhanced classes [message #86032] |
Tue, 12 June 2007 04:17  |
Eclipse User |
|
|
|
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 #86078 is a reply to message #86063] |
Tue, 12 June 2007 05:08   |
Eclipse User |
|
|
|
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 #86200 is a reply to message #86154] |
Wed, 13 June 2007 07:28  |
Eclipse User |
|
|
|
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 04:34  |
Eclipse User |
|
|
|
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 04:47  |
Eclipse User |
|
|
|
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 05:08  |
Eclipse User |
|
|
|
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 16:31  |
Eclipse User |
|
|
|
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 05:00  |
Eclipse User |
|
|
|
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 07:28  |
Eclipse User |
|
|
|
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
|
|
|
Goto Forum:
Current Time: Fri May 09 21:36:07 EDT 2025
Powered by FUDForum. Page generated in 0.06502 seconds
|