Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] CDOIDUtil.read - Illegal type: OBJECT
[CDO] CDOIDUtil.read - Illegal type: OBJECT [message #1048365] Wed, 24 April 2013 11:07 Go to next message
Per Sterner is currently offline Per SternerFriend
Messages: 77
Registered: October 2011
Member
Hi,

I can't specify when it occurs and I can't provide a unit-test. After doing some modifactions, I finally add an item to a list (which does not contain the item, it's contained somewhere else).

After doing the commit I get the exception:

Caused by: org.eclipse.emf.cdo.common.util.TransportException: java.io.IOException: Illegal type: OBJECT
	at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:526)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.commitTransaction(CDOClientProtocol.java:393)
	at org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:71)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1178)
	... 15 more
Caused by: java.io.IOException: Illegal type: OBJECT
	at org.eclipse.emf.cdo.common.id.CDOIDUtil.read(CDOIDUtil.java:476)
	at org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl.readCDOID(CDODataInputImpl.java:386)
	at org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl.readCDOLockState(CDODataInputImpl.java:346)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CommitTransactionRequest.confirmingNewLockStates(CommitTransactionRequest.java:363)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CommitTransactionRequest.confirming(CommitTransactionRequest.java:292)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CommitTransactionRequest.confirming(CommitTransactionRequest.java:1)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientRequestWithMonitoring.confirming(CDOClientRequestWithMonitoring.java:117)
	at org.eclipse.net4j.signal.RequestWithMonitoring.confirming(RequestWithMonitoring.java:171)
	at org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedInput(RequestWithConfirmation.java:125)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
	at org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(RequestWithConfirmation.java:105)
	at org.eclipse.net4j.signal.RequestWithMonitoring.doExecute(RequestWithMonitoring.java:235)
	at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.java:53)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
	at org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalProtocol.java:431)
	at org.eclipse.net4j.signal.RequestWithConfirmation.doSend(RequestWithConfirmation.java:89)
	at org.eclipse.net4j.signal.RequestWithConfirmation.send(RequestWithConfirmation.java:75)
	at org.eclipse.net4j.signal.RequestWithMonitoring.send(RequestWithMonitoring.java:110)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:518)
	... 18 more



I am using the current trunk of CDO and everything is running in one Java instance.

If I remove the 'add' to the list, there is no exception.

Can somebody give me a clue, what's wrong or how I can debug the problem?

Regards,

Per Sterner
Re: [CDO] CDOIDUtil.read - Illegal type: OBJECT [message #1048396 is a reply to message #1048365] Wed, 24 April 2013 12:05 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Hi Per,

Are you sure that you're using the same CDO version on both clients and server?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Am 24.04.2013 13:07, schrieb Per Sterner:
> Hi,
>
> I can't specify when it occurs and I can't provide a unit-test. After doing some modifactions, I finally add an item
> to a list (which does not contain the item, it's contained somewhere else).
>
> After doing the commit I get the exception:
>
>
> Caused by: org.eclipse.emf.cdo.common.util.TransportException: java.io.IOException: Illegal type: OBJECT
> at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:526)
> at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.commitTransaction(CDOClientProtocol.java:393)
> at
> org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:71)
> at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1178)
> ... 15 more
> Caused by: java.io.IOException: Illegal type: OBJECT
> at org.eclipse.emf.cdo.common.id.CDOIDUtil.read(CDOIDUtil.java:476)
> at org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl.readCDOID(CDODataInputImpl.java:386)
> at org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl.readCDOLockState(CDODataInputImpl.java:346)
> at
> org.eclipse.emf.cdo.internal.net4j.protocol.CommitTransactionRequest.confirmingNewLockStates(CommitTransactionRequest.java:363)
> at org.eclipse.emf.cdo.internal.net4j.protocol.CommitTransactionRequest.confirming(CommitTransactionRequest.java:292)
> at org.eclipse.emf.cdo.internal.net4j.protocol.CommitTransactionRequest.confirming(CommitTransactionRequest.java:1)
> at
> org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientRequestWithMonitoring.confirming(CDOClientRequestWithMonitoring.java:117)
> at org.eclipse.net4j.signal.RequestWithMonitoring.confirming(RequestWithMonitoring.java:171)
> at org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedInput(RequestWithConfirmation.java:125)
> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
> at org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(RequestWithConfirmation.java:105)
> at org.eclipse.net4j.signal.RequestWithMonitoring.doExecute(RequestWithMonitoring.java:235)
> at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.java:53)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
> at org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalProtocol.java:431)
> at org.eclipse.net4j.signal.RequestWithConfirmation.doSend(RequestWithConfirmation.java:89)
> at org.eclipse.net4j.signal.RequestWithConfirmation.send(RequestWithConfirmation.java:75)
> at org.eclipse.net4j.signal.RequestWithMonitoring.send(RequestWithMonitoring.java:110)
> at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:518)
> ... 18 more
>
>
>
> I am using the current trunk of CDO and everything is running in one Java instance.
>
> If I remove the 'add' to the list, there is no exception.
>
> Can somebody give me a clue, what's wrong or how I can debug the problem?
>
> Regards,
>
> Per Sterner
Re: [CDO] CDOIDUtil.read - Illegal type: OBJECT [message #1048471 is a reply to message #1048396] Wed, 24 April 2013 14:11 Go to previous messageGo to next message
Per Sterner is currently offline Per SternerFriend
Messages: 77
Registered: October 2011
Member
Yes, I am really running in one Java-VM (the current CDO and net4j plugins from trunk are in my workspace). I have debugged a lot and it appears, that:

0. transaction.commit(); // I commit my changes
[...]
1. CDODataOutputImpl.writeCDOLockState is called and the lockedObject type is CDOID. It's instance is TransactionCommitContext$DeltaLockWrapper$ForID.
2. CDOUtil.write is called and id.getType(); return OBJECT as type and ordinal is 1

[...] Later on:

3. CommitTransactionRequest.confirmingNewLockStates is called
4. readInt() returns 1
5. in.readCDOLockState() is called
6. CDOIDUtil.read is called. ordinal is 1
6. type is OBJECT and causes the exception

[Updated on: Wed, 24 April 2013 14:13]

Report message to a moderator

Re: [CDO] CDOIDUtil.read - Illegal type: OBJECT [message #1048474 is a reply to message #1048471] Wed, 24 April 2013 14:20 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 756
Registered: July 2009
Senior Member
You should check your run configuration as well, it may have mixed up installed plugins and workspace plugins.

Per Sterner wrote on Wed, 24 April 2013 16:11
Yes, I am really running in one Java-VM (the current CDO and net4j plugins from trunk are in my workspace). I have debugged a lot and it appears, that:

0. transaction.commit(); // I commit my changes
[...]
1. CDODataOutputImpl.writeCDOLockState is called and the lockedObject type is CDOID. It's instance is TransactionCommitContext$DeltaLockWrapper$ForID.
2. CDOUtil.write is called and id.getType(); return OBJECT as type and ordinal is 1

[...] Later on:

3. CommitTransactionRequest.confirmingNewLockStates is called
4. readInt() returns 1
5. in.readCDOLockState() is called
6. CDOIDUtil.read is called. ordinal is 1
6. type is OBJECT and causes the exception

Re: [CDO] CDOIDUtil.read - Illegal type: OBJECT [message #1048481 is a reply to message #1048474] Wed, 24 April 2013 14:30 Go to previous messageGo to next message
Per Sterner is currently offline Per SternerFriend
Messages: 77
Registered: October 2011
Member
Yes, I looked with 'ss'. All bundles are only runing without a specific date-qualifier.

(I will try it against the current updatesite-dropin)

ss net4j

Framework is launched.

id	State       Bundle
43	ACTIVE      org.eclipse.net4j.db.db2_4.1.0.qualifier
55	ACTIVE      org.eclipse.net4j.http.common_4.0.200.qualifier
65	ACTIVE      org.eclipse.net4j.db.mysql_4.2.0.qualifier
76	ACTIVE      org.eclipse.emf.cdo.net4j_4.1.100.qualifier
95	ACTIVE      org.eclipse.net4j.db.postgresql_4.2.0.qualifier
119	ACTIVE      org.eclipse.net4j_4.2.0.qualifier
128	ACTIVE      org.eclipse.net4j.jvm_4.1.100.qualifier
147	ACTIVE      org.eclipse.net4j.db.h2_4.2.0.qualifier
150	ACTIVE      org.eclipse.net4j.tcp_4.1.100.qualifier
209	ACTIVE      org.eclipse.net4j.http.server_4.0.200.qualifier
226	ACTIVE      org.eclipse.emf.cdo.server.net4j_4.1.0.qualifier
238	ACTIVE      org.eclipse.net4j.defs_4.0.100.qualifier
249	ACTIVE      org.eclipse.net4j.util.defs_4.1.0.qualifier
296	ACTIVE      org.eclipse.net4j.db.derby_4.1.0.qualifier
299	ACTIVE      org.eclipse.net4j.util_3.3.0.qualifier
309	ACTIVE      org.eclipse.net4j.http_4.0.200.qualifier
310	ACTIVE      org.eclipse.net4j.db_4.2.0.qualifier

osgi> ss emf.cdo

Framework is launched.

id	State       Bundle
2	ACTIVE      org.eclipse.emf.cdo.server.admin_4.1.100.qualifier
16	ACTIVE      org.eclipse.emf.cdo.security_4.2.0.qualifier
42	ACTIVE      org.eclipse.emf.cdo.defs_4.0.100.qualifier
48	ACTIVE      org.eclipse.emf.cdo.edit_4.2.0.qualifier
69	ACTIVE      org.eclipse.emf.cdo.common.db_3.0.300.qualifier
76	ACTIVE      org.eclipse.emf.cdo.net4j_4.1.100.qualifier
88	ACTIVE      org.eclipse.emf.cdo.server.ocl_4.1.0.qualifier
109	ACTIVE      org.eclipse.emf.cdo.transfer.repository_4.2.0.qualifier
114	ACTIVE      org.eclipse.emf.cdo.admin_4.1.100.qualifier
116	ACTIVE      org.eclipse.emf.cdo.common_4.2.0.qualifier
118	ACTIVE      org.eclipse.emf.cdo.server.db_4.2.0.qualifier
126	ACTIVE      org.eclipse.emf.cdo.workspace_4.1.100.qualifier
154	ACTIVE      org.eclipse.emf.cdo.security.edit_4.2.0.qualifier
172	ACTIVE      org.eclipse.emf.cdo.workspace.efs_4.0.100.qualifier
174	ACTIVE      org.eclipse.emf.cdo_4.2.0.qualifier
197	ACTIVE      org.eclipse.emf.cdo.transfer_4.2.0.qualifier
226	ACTIVE      org.eclipse.emf.cdo.server.net4j_4.1.0.qualifier
233	ACTIVE      org.eclipse.emf.cdo.transfer.workspace_4.2.0.qualifier
288	ACTIVE      org.eclipse.emf.cdo.location_4.0.200.qualifier
306	ACTIVE      org.eclipse.emf.cdo.server_4.2.0.qualifier

[Updated on: Wed, 24 April 2013 14:54]

Report message to a moderator

Re: [CDO] CDOIDUtil.read - Illegal type: OBJECT [message #1048543 is a reply to message #1048471] Wed, 24 April 2013 16:10 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Am 24.04.2013 16:11, schrieb Per Sterner:
> Yes, I am really running in one Java-VM. I have debugged a lot and it appears, that:
>
> 0. transaction.commit(); // I commit my changes
> [...]
> 1. CDODataOutputImpl.writeCDOLockState is called and the lockedObject type is CDOID. It's instance is
> TransactionCommitContext$DeltaLockWrapper$ForID.
I've indeed changed something (a lot) about the IDs:


I suggest that you submit a bugzilla and after the JAX conference I'll look at it. Please attach all the infos you've
given here and that may help to reproduce the problem in a test case.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper



> 2. CDOUtil.write is called and id.getType(); return OBJECT as type and ordinal is 1
>
> [...] Later on:
>
> 3. CommitTransactionRequest.confirmingNewLockStates is called
> 4. readInt() returns 1
> 5. in.readCDOLockState() is called
> 6. CDOIDUtil.read is called. ordinal is 1
> 6. type is OBJECT and causes the exception
>
Re: [CDO] CDOIDUtil.read - Illegal type: OBJECT [message #1048544 is a reply to message #1048543] Wed, 24 April 2013 16:11 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Am 24.04.2013 18:10, schrieb Eike Stepper:
> I've indeed changed something (a lot) about the IDs:
400892: Intern all CDOIDs
https://bugs.eclipse.org/bugs/show_bug.cgi?id=400892
Re: [CDO] CDOIDUtil.read - Illegal type: OBJECT [message #1049096 is a reply to message #1048544] Thu, 25 April 2013 11:01 Go to previous messageGo to next message
Per Sterner is currently offline Per SternerFriend
Messages: 77
Registered: October 2011
Member
I noticed that the Legacy Mode is now the preferred option? (http://wiki.eclipse.org/CDO_Legacy_Mode)

I managed to test against 'emf-cdo-I20130418-0209-Site'. (I had some problems because of EMF v2.7 and the 'MinimalEStoreEObjectImpl' retrofit bundle. My Model-Bundle couldn't resolve the class 'MinimalEStoreEObjectImpl')
After adjusting my old genmodel file to use 'EObject' it works with the retrofit bundle Smile

Finally, the exception occurs..
Re: [CDO] CDOIDUtil.read - Illegal type: OBJECT [message #1051718 is a reply to message #1049096] Mon, 29 April 2013 06:31 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Am 25.04.2013 13:01, schrieb Per Sterner:
> I noticed that the Legacy Mode is now the preferred option? (http://wiki.eclipse.org/CDO_Legacy_Mode)
Hmm, I wouldn't say so. Now there is no explicit legacy *mode* anymore, or you could say it's always on. But that
doesn't mean that all objects should now be legacy objects. It's just that they're always supported and that there's no
way to exclude them by configuration of the CDOView.

If you have the chance to regenerate your model for CDO I strongly recommend to do it!

>
> I managed to test against 'emf-cdo-I20130418-0209-Site'. (I had some problems because of EMF v2.7 and the
> 'MinimalEStoreEObjectImpl' retrofit bundle. My Model-Bundle couldn't resolve the class 'MinimalEStoreEObjectImpl')
Similar problems have been reported already and we think that bugs in PDE cause them. At runtime all seems okay with our
retrofit fragment. Does it make a difference for you whether you deploy the retrofit fragment in binary form to the
target platform or in source form to your workspace?

> After adjusting my old genmodel file to use 'EObject' it works with the retrofit bundle :)
Well, in that case the retrofit fragment is not needed at all because your objects are legacy objects (with all their
disadvantages).

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] CDOIDUtil.read - Illegal type: OBJECT [message #1051954 is a reply to message #1051718] Mon, 29 April 2013 12:22 Go to previous messageGo to next message
Per Sterner is currently offline Per SternerFriend
Messages: 77
Registered: October 2011
Member
> If you have the chance to regenerate your model for CDO I strongly recommend to do it!

Okay, I adjusted my genmodel.

> Similar problems have been reported already and we think that bugs in PDE cause them. At runtime all seems okay with our
retrofit fragment. Does it make a difference for you whether you deploy the retrofit fragment in binary form to the
target platform or in source form to your workspace?

I just tried it and it doesn't work for me in any configuration.

I created some testbundles (not related to anything) and there the same problem occurs. I looked into the section "Plug-In Dependencies" and the fragment doesn't appear there. But if I choose "system.bundle" as host-bundle it appears in the "Plug-In Dependencies" section and it works. But this doesn't really help Confused

> Well, in that case the retrofit fragment is not needed at all because your objects are legacy objects (with all their
disadvantages).

My workaround for now is to manually add the MinimalEStoreEObjectImpl class to the org.eclipse.emf.cdo, so it's directly visible. Otherwise my model bundle isn't compiled.
Re: [CDO] CDOIDUtil.read - Illegal type: OBJECT [message #1051957 is a reply to message #1048543] Mon, 29 April 2013 12:27 Go to previous messageGo to next message
Per Sterner is currently offline Per SternerFriend
Messages: 77
Registered: October 2011
Member
Bugzilla entry: https://bugs.eclipse.org/bugs/show_bug.cgi?id=406531
Re: [CDO] CDOIDUtil.read - Illegal type: OBJECT [message #1052531 is a reply to message #1051954] Tue, 30 April 2013 07:52 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Am 29.04.2013 14:22, schrieb Per Sterner:
>> If you have the chance to regenerate your model for CDO I strongly recommend to do it!
>
> Okay, I adjusted my genmodel.
>
>> Similar problems have been reported already and we think that bugs in PDE cause them. At runtime all seems okay with our
> retrofit fragment. Does it make a difference for you whether you deploy the retrofit fragment in binary form to the
> target platform or in source form to your workspace?
>
> I just tried it and it doesn't work for me in any configuration.
>
> I created some testbundles (not related to anything) and there the same problem occurs. I looked into the section
> "Plug-In Dependencies" and the fragment doesn't appear there. But if I choose "system.bundle" as host-bundle it
> appears in the "Plug-In Dependencies" section and it works. But this doesn't really help :?
>> Well, in that case the retrofit fragment is not needed at all because your objects are legacy objects (with all their
> disadvantages).
>
> My workaround for now is to manually add the MinimalEStoreEObjectImpl class to the org.eclipse.emf.cdo, so it's
> directly visible. Otherwise my model bundle isn't compiled.
I've now explained the problem and possible fixes in https://bugs.eclipse.org/bugs/show_bug.cgi?id=400388#c10

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] CDOIDUtil.read - Illegal type: OBJECT [message #1052594 is a reply to message #1052531] Tue, 30 April 2013 09:23 Go to previous messageGo to next message
Per Sterner is currently offline Per SternerFriend
Messages: 77
Registered: October 2011
Member
Thanks for eclipse-pde-fragment bug/feature/info Sad (I try to use EMF 2.9)
Re: [CDO] CDOIDUtil.read - Illegal type: OBJECT [message #1052604 is a reply to message #1052594] Tue, 30 April 2013 09:38 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Am 30.04.2013 11:23, schrieb Per Sterner:
> Thanks for eclipse-pde-fragment bug/feature/info :( (I try to use EMF 2.9)
Excellent! Your feedback about that is much appreciated here or on the bugzilla.

BTW. Ed is planning to blog about this topic and ask for feedback (probably) on Thursday.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] CDOIDUtil.read - Illegal type: OBJECT [message #1052605 is a reply to message #1052604] Tue, 30 April 2013 09:39 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Am 30.04.2013 11:38, schrieb Eike Stepper:
> Am 30.04.2013 11:23, schrieb Per Sterner:
>> Thanks for eclipse-pde-fragment bug/feature/info :( (I try to use EMF 2.9)
> Excellent! Your feedback about that is much appreciated here or on the bugzilla.
If you plan to report here I suggest to open a new thread with a catchier title ;-)

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Previous Topic:e4mf
Next Topic:Other/Custom names for objects in EMF-Plugin
Goto Forum:
  


Current Time: Thu Nov 27 03:20:44 GMT 2014

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

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