Error in CDO (DBException) [message #426415] |
Sun, 04 January 2009 21:29  |
Eclipse User |
|
|
|
Hello,
i use CDO 2.0m4 with derby DB on Eclipse 3.5m4. Now i try to
upload/download some resources. And i get everytime this error:
[ERROR] Rollback in DBStore: org.eclipse.net4j.db.DBException: SQL
Exception: An attempt was made to get a data value of type 'VARCHAR'
from a data value of type
'org.eclipse.emf.cdo.internal.common.revision.CDOListImpl'.
Can somebody say what this exactly mean? I get often errors with cdo
2.0m4 has this version lots of errors or is derby not good to use for
the server?
Greetings
|
|
|
|
|
|
Re: Error in CDO (DBException) [message #426453 is a reply to message #426452] |
Tue, 06 January 2009 11:56  |
Eclipse User |
|
|
|
I tried it also in cdo 1.0.4 but there i get the following error:
SQL Exception: Lexical error at line 1, column 137. Encountered: "\\"
(92), after : "".
The nsURI is http:///rmof/rmof.ecore . Is this a bug?
Jörg schrieb:
> Hello,
>
> i try to upload this model. Grounded on the rmof.ecore structure.
> This is the code i use for
>
> // Enable logging and tracing
> OMPlatform.INSTANCE.setDebugging(true);
> OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
> OMPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOL E);
>
> // Prepare container
> IManagedContainer container = ContainerUtil.createContainer();
> Net4jUtil.prepareContainer(container); // Register Net4j factories
> TCPUtil.prepareContainer(container); // Register TCP factories
> CDOUtil.prepareContainer(container, false); // Register CDO
> factories
> // container.activate();
>
> // Create connector
> connector = TCPUtil.getConnector(container, "localhost:2036");
>
> // Create configuration
> CDOSessionConfiguration configuration =
> CDOUtil.createSessionConfiguration();
> configuration.setConnector(connector);
> configuration.setRepositoryName("repo1");
>
> // Open session
> session = configuration.openSession();
> session.getPackageRegistry().putEPackage(RmofPackage.eINSTAN CE);
>
> // Open transaction
> CDOTransaction transaction = session.openTransaction();
>
> // Get or create resource
> String res = "/layer0";
> // transaction.createResource(res);
> CDOResource resource = transaction.getOrCreateResource(res);
>
> //Adding the content
> //...
> resourcecopy.getContents().add(EcoreUtil.copy((EObject)
> entry.getValue()));
>
>
> // Work with the resource and commit the transaction
> transaction.commit();
> logger.debug("CDO commit");
>
> session.close();
> LifecycleUtil.deactivate(connector);
>
>
> Thanks for your help.
> Greetings
>
> Stefan Winkler schrieb:
>> Hi,
>>> i use CDO 2.0m4 with derby DB on Eclipse 3.5m4. Now i try to
>>> upload/download some resources. And i get everytime this error:
>>>
>>> [ERROR] Rollback in DBStore: org.eclipse.net4j.db.DBException: SQL
>>> Exception: An attempt was made to get a data value of type 'VARCHAR'
>>> from a data value of type
>>> 'org.eclipse.emf.cdo.internal.common.revision.CDOListImpl'.
>>>
>>> Can somebody say what this exactly mean? I get often errors with cdo
>>> 2.0m4 has this version lots of errors or is derby not good to use for
>>> the server?
>> Can you be a bit more specific on what you are trying to write? Maybe
>> describe your model and what values you set before committing?
>>
>> Cheers,
>> Stefan
>
|
|
|
Powered by
FUDForum. Page generated in 0.04602 seconds