|
Re: [CDO] SQLException when loading cross CDO models [message #423828 is a reply to message #423825] |
Tue, 07 October 2008 16:26 |
|
Hi Steven,
From the stack trace I get the impression that you are not using the
latest sources, right? (MappingStrategy.readResourceInfo() does not
exist anymore)
Since Ganymede we have resolved approximately 100 Bugzillas, some also
in the maintenance branch, but most of them in HEAD.
Can you please tell which version exactly you are using? And is it
possible that you also try your use case with the HEAD sources or a late
2.0 I-build?
Btw. the Bugzilla you mentioned is an EMFT Compare bug. I don't see any
relation with CDO.
Generally (in both CDO streams) inter-resource cross references are
supported.
Cheers
/Eike
Stephen McCants schrieb:
> Hello,
>
> I have two CDO models and they are different models (different kinds
> of objects in them, not just different instances of the same model).
> Model One has a non-containment reference to an object in Model Two.
> I can save and load Model One without problem, but if I try to access
> the node that has the reference to an object in Model Two I get this
> exception:
>
> [ERROR] java.sql.SQLException: Invalid character string format for
> type long.
> org.eclipse.net4j.db.DBException: java.sql.SQLException: Invalid
> character string format for type long.
> at
> org.eclipse.emf.cdo.server.internal.db.MappingStrategy.readR esourceInfo(MappingStrategy.java:330)
>
> at
> org.eclipse.emf.cdo.server.internal.db.MappingStrategy.readR esourcePath(MappingStrategy.java:284)
>
> at
> org.eclipse.emf.cdo.server.internal.db.DBStoreReader.readRes ourcePath(DBStoreReader.java:283)
>
> at
> org.eclipse.emf.cdo.internal.server.ResourceManager.loadPath (ResourceManager.java:98)
>
> at
> org.eclipse.emf.cdo.internal.server.ResourceManager.getResou rcePath(ResourceManager.java:68)
>
> at
> org.eclipse.emf.cdo.internal.server.protocol.ResourcePathInd ication.indicating(ResourcePathIndication.java:52)
>
> at
> org.eclipse.net4j.signal.IndicationWithResponse.execute(Indi cationWithResponse.java:46)
>
> at
> org.eclipse.emf.cdo.internal.server.protocol.CDOReadIndicati on.execute(CDOReadIndication.java:38)
>
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:143)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:124)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Threa dPoolExecutor.java:665)
>
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:690)
>
> at java.lang.Thread.run(Thread.java:810)
> Caused by: java.sql.SQLException: Invalid character string format for
> type long.
> at
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLExcepti on(Unknown
> Source)
> at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unkno wn
> Source)
> at
> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQL Exception(Unknown
> Source)
> at
> org.apache.derby.impl.jdbc.EmbedResultSet.noStateChangeExcep tion(Unknown
> Source)
> at org.apache.derby.impl.jdbc.EmbedResultSet.getLong(Unknown Source)
> at
> org.eclipse.emf.cdo.server.internal.db.MappingStrategy.readR esourceInfo(MappingStrategy.java:325)
>
> ... 12 more
> Caused by: ERROR 22018: Invalid character string format for type long.
> at
> org.apache.derby.iapi.error.StandardException.newException(U nknown
> Source)
> at org.apache.derby.iapi.types.SQLChar.getLong(Unknown Source)
> ... 14 more
>
> However, it all works correctly, if I load the referenced object in
> Model Two (by means of an editor for Model Two) before I access the
> node in Model One with the reference.
>
> It seems the problem is that CDO doesn't correctly load object across
> models unless the object has already been loaded by some other means.
>
> Is there something I can do to ensure that Model One will correctly
> load the referenced object in Model Two even if Model Two hasn't been
> "preloaded"?
>
> Also, should I open a bug report on this problem? Or is this the same
> as https://bugs.eclipse.org/bugs/show_bug.cgi?id=244000 ?
>
> Thanks for your help!
>
> Sincerely,
> Stephen McCants
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Powered by
FUDForum. Page generated in 0.02928 seconds