db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Gallardo" <agalla...@agsoftware.dnsalias.com>
Subject Re: [VOTE] Design bug fixed - check in?
Date Sat, 29 Nov 2003 09:44:00 GMT
Armin Waibel dijo:
> Hi Antonio,
>
> did you tried to modify OjbStroreManager#getJDOClass(Class c)
> method, seems this method catch an exception thrown by jdori
> and maybe it is helpful to see the stack trace of the original exception.

I did it and looks like here is the error:

  JDOModel m = DOModelFactoryImpl.getInstance().getJDOModel(null);
  rc = m.getJDOClass(c.getName());

It seems like the JDO cannot load the JDOmodel, because in the exception
is a NPE caused while trying to load a XML Resource:

**********************************************
Caused by: java.lang.NullPointerException
at com.sun.jdori.common.model.jdo.JDOModelImpl.loadXMLResource(Unknown
Source)
at com.sun.jdori.common.model.jdo.JDOModelImpl.lookupXMLMetadata(Unknown
Source)
at com.sun.jdori.common.model.jdo.JDOModelImpl.getJDOClass(Unknown Source)
at com.sun.jdori.common.model.jdo.JDOModelImpl.getJDOClass(Unknown Source)
at
org.apache.ojb.jdori.sql.OjbStoreManager.getJDOClass(OjbStoreManager.java:251)

**********************************************

But, interesting enough is that the insert works! Also I retrieve from
other tables and there is no other problem. As I pointed before, the
problem is that the retrieved object is not persistent at all! But why?

Please help!

Best Regards,

Antonio Gallardo

PS: The full reported error is:

Original Exception:
org.apache.ojb.jdori.sql.OjbStoreFatalInternalException:
org.apache.ojb.jdori.sql.OjbStoreManager.fetch
NestedThrowables:
javax.jdo.JDOFatalInternalException: Not a JDO class: test.Area
NestedThrowables:
java.lang.NullPointerException
at org.apache.ojb.jdori.sql.OjbStoreManager.fetch(OjbStoreManager.java:241)
at com.sun.jdori.common.state.StateManagerImpl.fetch(Unknown Source)
at com.sun.jdori.common.state.StateManagerImpl.loadField(Unknown Source)
at com.sun.jdori.common.state.StateManagerImpl.prepareSetField1(Unknown
Source)
at com.sun.jdori.common.state.StateManagerImpl.prepareSetField(Unknown
Source)
at com.sun.jdori.common.state.StateManagerImpl.setStringField(Unknown Source)
at test.Area.jdoSetare_nombre(Unknown Source)
at test.Area.setAre_nombre(Unknown Source)
at test.forms.area.AreaHandler.setList(AreaHandler.java:171)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
....
Caused by: javax.jdo.JDOFatalInternalException: Not a JDO class: test.Area
NestedThrowables:
java.lang.NullPointerException
at
org.apache.ojb.jdori.sql.OjbStoreManager.getJDOClass(OjbStoreManager.java:255)
at org.apache.ojb.jdori.sql.OjbStoreManager.fetch(OjbStoreManager.java:227)
... 73 more
Caused by: java.lang.NullPointerException
at com.sun.jdori.common.model.jdo.JDOModelImpl.loadXMLResource(Unknown
Source)
at com.sun.jdori.common.model.jdo.JDOModelImpl.lookupXMLMetadata(Unknown
Source)
at com.sun.jdori.common.model.jdo.JDOModelImpl.getJDOClass(Unknown Source)
at com.sun.jdori.common.model.jdo.JDOModelImpl.getJDOClass(Unknown Source)
at
org.apache.ojb.jdori.sql.OjbStoreManager.getJDOClass(OjbStoreManager.java:251)
... 74 more
NestedThrowablesStackTrace:
javax.jdo.JDOFatalInternalException: Not a JDO class: test.Area
NestedThrowables:
java.lang.NullPointerException
at
org.apache.ojb.jdori.sql.OjbStoreManager.getJDOClass(OjbStoreManager.java:255)
at org.apache.ojb.jdori.sql.OjbStoreManager.fetch(OjbStoreManager.java:227)
at com.sun.jdori.common.state.StateManagerImpl.fetch(Unknown Source)
at com.sun.jdori.common.state.StateManagerImpl.loadField(Unknown Source)
at com.sun.jdori.common.state.StateManagerImpl.prepareSetField1(Unknown
Source)
at com.sun.jdori.common.state.StateManagerImpl.prepareSetField(Unknown
Source)
at com.sun.jdori.common.state.StateManagerImpl.setStringField(Unknown Source)
at test.Area.jdoSetare_nombre(Unknown Source)
at test.Area.setAre_nombre(Unknown Source)


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message