Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [teneo-jpox] jdoDatastore initialize failed on with mulitple ecores
[teneo-jpox] jdoDatastore initialize failed on with mulitple ecores [message #82258] Mon, 07 May 2007 08:01 Go to next message
Julia is currently offline JuliaFriend
Messages: 85
Registered: July 2009
Member
Hi Martin,

I have a xsd that references another xsd eg.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
targetNamespace=" http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-porta l-portletentities.xsd"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="0.9.3.0"
xml:lang="en"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"

xmlns:portletentities=" http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-porta l-portletentities.xsd"

xmlns:base=" http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-porta l-base.xsd"

xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xlink="http://www.w3.org/1999/xlink">
<xs:import
namespace=" http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-porta l-base.xsd"
schemaLocation="ibm-portal-base.xsd"/>

I am successful in generating the enhanced classes.

But when I tried to generate the tables in the database using the
jdoDatastore.initialize command it failed with this:

13951 [main] ERROR JPOX.RDBMS.Schema - An exception was thrown while
adding/validating class(es) : null
java.lang.NullPointerException
at
org.jpox.store.rdbms.table.AbstractTable.addDatastoreField(A bstractTable.java:223)
at
org.jpox.store.rdbms.table.ClassTable.runSpecifiedCallbacks( ClassTable.java:1045)
at org.jpox.store.rdbms.table.ClassTable.runCallBacks(ClassTabl e.java:891)
at
org.jpox.store.rdbms.table.ClassTable.addFieldMetaData(Class Table.java:578)
at org.jpox.store.rdbms.table.ClassTable.manageClass(ClassTable .java:397)
at
org.jpox.store.rdbms.table.ClassTable.initializeForClass(Cla ssTable.java:831)
at org.jpox.store.rdbms.table.ClassTable.initialize(ClassTable. java:269)
at
org.jpox.store.rdbms.RDBMSManager$ClassAdder.initializeClass Tables(RDBMSManager.java:2950)
at
org.jpox.store.rdbms.RDBMSManager$ClassAdder.addClassTablesA ndValidate(RDBMSManager.java:3311)
at
org.jpox.store.rdbms.RDBMSManager$ClassAdder.run(RDBMSManage r.java:2554)
at
org.jpox.store.rdbms.RDBMSManager$MgmtTransaction.execute(RD BMSManager.java:2406)
at org.jpox.store.rdbms.RDBMSManager.addClasses(RDBMSManager.ja va:821)
at
org.eclipse.emf.teneo.jpox.JpoxDataStore.createSchema(JpoxDa taStore.java:468)
at
org.eclipse.emf.teneo.jpox.JpoxDataStore.initialize(JpoxData Store.java:196)

I have been successful in generating the schema for ibm-portal-base.xsd as
a standalone and as part of this schema ibm-portal-portletentities.xsd.
But it rollback when it tries to create the schema for portletentities.
The part it seems to rollback on seems to be related to section in
portletentities.xsd where it refers to base.xsd.

Am I missing a step?

Julia
Re: [teneo-jpox] jdoDatastore initialize failed on with mulitple ecores [message #82274 is a reply to message #82258] Mon, 07 May 2007 08:15 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
When generating the jdo for the ibm-portal-portletentities.xsd (or ecore) you also need to select
the base.xsd (or ecore), if you first select on the portletentities xsd and then on the base xsd
then the jdo file will be generated in the java package of the first one.

Then when setting up the datastore you need to pass all the epackages (also from base.xsd) to the
setEPackages method.

gr. Martin

Julia wrote:
> Hi Martin,
>
> I have a xsd that references another xsd eg.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema
> targetNamespace=" http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-porta l-portletentities.xsd"
> elementFormDefault="qualified"
> attributeFormDefault="unqualified" version="0.9.3.0"
> xml:lang="en"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
>
> xmlns:portletentities=" http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-porta l-portletentities.xsd"
>
> xmlns:base=" http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-porta l-base.xsd"
>
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:xlink="http://www.w3.org/1999/xlink">
> <xs:import
> namespace=" http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-porta l-base.xsd"
> schemaLocation="ibm-portal-base.xsd"/>
>
> I am successful in generating the enhanced classes.
>
> But when I tried to generate the tables in the database using the
> jdoDatastore.initialize command it failed with this:
>
> 13951 [main] ERROR JPOX.RDBMS.Schema - An exception was thrown while
> adding/validating class(es) : null
> java.lang.NullPointerException
> at
> org.jpox.store.rdbms.table.AbstractTable.addDatastoreField(A bstractTable.java:223)
>
> at
> org.jpox.store.rdbms.table.ClassTable.runSpecifiedCallbacks( ClassTable.java:1045)
>
> at
> org.jpox.store.rdbms.table.ClassTable.runCallBacks(ClassTabl e.java:891)
> at
> org.jpox.store.rdbms.table.ClassTable.addFieldMetaData(Class Table.java:578)
> at
> org.jpox.store.rdbms.table.ClassTable.manageClass(ClassTable .java:397)
> at
> org.jpox.store.rdbms.table.ClassTable.initializeForClass(Cla ssTable.java:831)
>
> at
> org.jpox.store.rdbms.table.ClassTable.initialize(ClassTable. java:269)
> at
> org.jpox.store.rdbms.RDBMSManager$ClassAdder.initializeClass Tables(RDBMSManager.java:2950)
>
> at
> org.jpox.store.rdbms.RDBMSManager$ClassAdder.addClassTablesA ndValidate(RDBMSManager.java:3311)
>
> at
> org.jpox.store.rdbms.RDBMSManager$ClassAdder.run(RDBMSManage r.java:2554)
> at
> org.jpox.store.rdbms.RDBMSManager$MgmtTransaction.execute(RD BMSManager.java:2406)
>
> at org.jpox.store.rdbms.RDBMSManager.addClasses(RDBMSManager.ja va:821)
> at
> org.eclipse.emf.teneo.jpox.JpoxDataStore.createSchema(JpoxDa taStore.java:468)
>
> at
> org.eclipse.emf.teneo.jpox.JpoxDataStore.initialize(JpoxData Store.java:196)
>
> I have been successful in generating the schema for ibm-portal-base.xsd
> as a standalone and as part of this schema
> ibm-portal-portletentities.xsd. But it rollback when it tries to create
> the schema for portletentities. The part it seems to rollback on seems
> to be related to section in portletentities.xsd where it refers to
> base.xsd.
>
> Am I missing a step?
>
> Julia
>


--

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] jdoDatastore initialize failed on with mulitple ecores [message #82289 is a reply to message #82274] Mon, 07 May 2007 15:51 Go to previous messageGo to next message
Julia is currently offline JuliaFriend
Messages: 85
Registered: July 2009
Member
Hi Martin,

Yes I did do that and highlighted both ecore files to create the meatadata
package.jdo file. Still got the NPE.

In an attempt to further see if there was some other problem with the xsd
files, I combined the 2 separate xsd files into one - portletentities.xsd.
This eliminated the import statement.

It still give me the null ptr exception.

It appears to fail on one element that reference other elements within the
xsd but 4 level deep eg <elementA> -> <elementB, max unbounded> ->
<elementC, max unbounded> -> <elementD,max unbounded> -> String.

There doesn't appear to have any problems 3 level deep (ie no elementB or
elementA).

Is there something else I need to do?
Re: [teneo-jpox] jdoDatastore initialize failed on with mulitple ecores [message #82303 is a reply to message #82289] Mon, 07 May 2007 17:18 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
Can you send me the xsd's/ecores involved? Then I can try myself to see where/how it fails.

gr. Martin

Julia wrote:
> Hi Martin,
>
> Yes I did do that and highlighted both ecore files to create the
> meatadata package.jdo file. Still got the NPE.
>
> In an attempt to further see if there was some other problem with the
> xsd files, I combined the 2 separate xsd files into one -
> portletentities.xsd. This eliminated the import statement.
>
> It still give me the null ptr exception.
>
> It appears to fail on one element that reference other elements within
> the xsd but 4 level deep eg <elementA> -> <elementB, max unbounded> ->
> <elementC, max unbounded> -> <elementD,max unbounded> -> String.
>
> There doesn't appear to have any problems 3 level deep (ie no elementB
> or elementA).
>
> Is there something else I need 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] jdoDatastore initialize failed on with mulitple ecores [message #82469 is a reply to message #82303] Mon, 07 May 2007 21:51 Go to previous messageGo to next message
Julia is currently offline JuliaFriend
Messages: 85
Registered: July 2009
Member
Hi Martin,

I sent my files via the elver address. Hopefully you will get it.

Julia
Re: [teneo-jpox] jdoDatastore initialize failed on with mulitple ecores [message #82657 is a reply to message #82469] Wed, 09 May 2007 05:12 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
I spent some time debugging this but I can not determine why jpox has this npe. As far as I can see
this is a jpox issue which needs to be posted at the jpox forum. So I suggest you post the issue there.
When you post you need to post the log output and the package.jdo. Also they will probably ask for a
testcase.
Just initialization of jpox already fails so you don't need to write a testcase which actually
creates and reads data, also you don't need Teneo for this part, just initialization of jpox using
the model classes is enough.

gr. Martin

Julia wrote:
> Hi Martin,
>
> I sent my files via the elver address. Hopefully you will get it.
>
> Julia
>


--

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] jdoDatastore initialize failed on with mulitple ecores [message #605329 is a reply to message #82258] Mon, 07 May 2007 08:15 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
When generating the jdo for the ibm-portal-portletentities.xsd (or ecore) you also need to select
the base.xsd (or ecore), if you first select on the portletentities xsd and then on the base xsd
then the jdo file will be generated in the java package of the first one.

Then when setting up the datastore you need to pass all the epackages (also from base.xsd) to the
setEPackages method.

gr. Martin

Julia wrote:
> Hi Martin,
>
> I have a xsd that references another xsd eg.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema
> targetNamespace=" http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-porta l-portletentities.xsd"
> elementFormDefault="qualified"
> attributeFormDefault="unqualified" version="0.9.3.0"
> xml:lang="en"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
>
> xmlns:portletentities=" http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-porta l-portletentities.xsd"
>
> xmlns:base=" http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-porta l-base.xsd"
>
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:xlink="http://www.w3.org/1999/xlink">
> <xs:import
> namespace=" http://www.ibm.com/websphere/appserver/schemas/6.0/ibm-porta l-base.xsd"
> schemaLocation="ibm-portal-base.xsd"/>
>
> I am successful in generating the enhanced classes.
>
> But when I tried to generate the tables in the database using the
> jdoDatastore.initialize command it failed with this:
>
> 13951 [main] ERROR JPOX.RDBMS.Schema - An exception was thrown while
> adding/validating class(es) : null
> java.lang.NullPointerException
> at
> org.jpox.store.rdbms.table.AbstractTable.addDatastoreField(A bstractTable.java:223)
>
> at
> org.jpox.store.rdbms.table.ClassTable.runSpecifiedCallbacks( ClassTable.java:1045)
>
> at
> org.jpox.store.rdbms.table.ClassTable.runCallBacks(ClassTabl e.java:891)
> at
> org.jpox.store.rdbms.table.ClassTable.addFieldMetaData(Class Table.java:578)
> at
> org.jpox.store.rdbms.table.ClassTable.manageClass(ClassTable .java:397)
> at
> org.jpox.store.rdbms.table.ClassTable.initializeForClass(Cla ssTable.java:831)
>
> at
> org.jpox.store.rdbms.table.ClassTable.initialize(ClassTable. java:269)
> at
> org.jpox.store.rdbms.RDBMSManager$ClassAdder.initializeClass Tables(RDBMSManager.java:2950)
>
> at
> org.jpox.store.rdbms.RDBMSManager$ClassAdder.addClassTablesA ndValidate(RDBMSManager.java:3311)
>
> at
> org.jpox.store.rdbms.RDBMSManager$ClassAdder.run(RDBMSManage r.java:2554)
> at
> org.jpox.store.rdbms.RDBMSManager$MgmtTransaction.execute(RD BMSManager.java:2406)
>
> at org.jpox.store.rdbms.RDBMSManager.addClasses(RDBMSManager.ja va:821)
> at
> org.eclipse.emf.teneo.jpox.JpoxDataStore.createSchema(JpoxDa taStore.java:468)
>
> at
> org.eclipse.emf.teneo.jpox.JpoxDataStore.initialize(JpoxData Store.java:196)
>
> I have been successful in generating the schema for ibm-portal-base.xsd
> as a standalone and as part of this schema
> ibm-portal-portletentities.xsd. But it rollback when it tries to create
> the schema for portletentities. The part it seems to rollback on seems
> to be related to section in portletentities.xsd where it refers to
> base.xsd.
>
> Am I missing a step?
>
> Julia
>


--

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] jdoDatastore initialize failed on with mulitple ecores [message #605335 is a reply to message #82274] Mon, 07 May 2007 15:51 Go to previous message
Julia is currently offline JuliaFriend
Messages: 85
Registered: July 2009
Member
Hi Martin,

Yes I did do that and highlighted both ecore files to create the meatadata
package.jdo file. Still got the NPE.

In an attempt to further see if there was some other problem with the xsd
files, I combined the 2 separate xsd files into one - portletentities.xsd.
This eliminated the import statement.

It still give me the null ptr exception.

It appears to fail on one element that reference other elements within the
xsd but 4 level deep eg <elementA> -> <elementB, max unbounded> ->
<elementC, max unbounded> -> <elementD,max unbounded> -> String.

There doesn't appear to have any problems 3 level deep (ie no elementB or
elementA).

Is there something else I need to do?
Re: [teneo-jpox] jdoDatastore initialize failed on with mulitple ecores [message #605339 is a reply to message #82289] Mon, 07 May 2007 17:18 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
Can you send me the xsd's/ecores involved? Then I can try myself to see where/how it fails.

gr. Martin

Julia wrote:
> Hi Martin,
>
> Yes I did do that and highlighted both ecore files to create the
> meatadata package.jdo file. Still got the NPE.
>
> In an attempt to further see if there was some other problem with the
> xsd files, I combined the 2 separate xsd files into one -
> portletentities.xsd. This eliminated the import statement.
>
> It still give me the null ptr exception.
>
> It appears to fail on one element that reference other elements within
> the xsd but 4 level deep eg <elementA> -> <elementB, max unbounded> ->
> <elementC, max unbounded> -> <elementD,max unbounded> -> String.
>
> There doesn't appear to have any problems 3 level deep (ie no elementB
> or elementA).
>
> Is there something else I need 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] jdoDatastore initialize failed on with mulitple ecores [message #606621 is a reply to message #82303] Mon, 07 May 2007 21:51 Go to previous message
Julia is currently offline JuliaFriend
Messages: 85
Registered: July 2009
Member
Hi Martin,

I sent my files via the elver address. Hopefully you will get it.

Julia
Re: [teneo-jpox] jdoDatastore initialize failed on with mulitple ecores [message #606635 is a reply to message #82469] Wed, 09 May 2007 05:12 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Julia,
I spent some time debugging this but I can not determine why jpox has this npe. As far as I can see
this is a jpox issue which needs to be posted at the jpox forum. So I suggest you post the issue there.
When you post you need to post the log output and the package.jdo. Also they will probably ask for a
testcase.
Just initialization of jpox already fails so you don't need to write a testcase which actually
creates and reads data, also you don't need Teneo for this part, just initialization of jpox using
the model classes is enough.

gr. Martin

Julia wrote:
> Hi Martin,
>
> I sent my files via the elver address. Hopefully you will get it.
>
> Julia
>


--

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:CDO for Eclipse 3.3?
Next Topic:[Teneo] dataStore.initialize() fails (four .ecore)
Goto Forum:
  


Current Time: Thu Jan 21 16:08:06 GMT 2021

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

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

Back to the top