Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » CDO and Derby
CDO and Derby [message #40779] Mon, 24 July 2006 13:15 Go to next message
Eclipse UserFriend
I have now tested cdo and derby:

In the cvs version of cdo the server.properties is set to use of derby.
Where are hte derby db files saved? or how are they named, so that I can
search them?

I also get the following error if I use the Client1 launch configuration.

Can anyone help me?
Re: CDO and Derby [message #40809 is a reply to message #40779] Mon, 24 July 2006 13:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Chris,

The Derby DB files are usually created under the working directory.

I can't see the error you speak of. But most of the times you have to
adjust the working directory and add any required plugins.

Cheers
/Eike


Chris Lenz schrieb:
> I have now tested cdo and derby:
>
> In the cvs version of cdo the server.properties is set to use of derby.
> Where are hte derby db files saved? or how are they named, so that I can
> search them?
>
> I also get the following error if I use the Client1 launch configuration.
>
> Can anyone help me?
>
Re: CDO and Derby [message #40839 is a reply to message #40809] Mon, 24 July 2006 13:25 Go to previous messageGo to next message
Eclipse UserFriend
--No Derbyfiles are created ?

Have forgotten to add the exception:

--> TEST: Create an EMF ResourceSet and associate it with a CDO
ResourceManager
[INFO] common.client.connector: Connected socketChannel:
java.nio.channels.SocketChannel[connected local=/127.0.0.1:1989
remote=localhost/127.0.0.1:2036]
[ERROR] common.client.packageManager: Error while processing
ServiceEvent START
java.lang.RuntimeException:
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
processing instruction target matching "[xX][mM][lL]" is not allowed.
at
org.eclipse.emf.cdo.client.impl.PackageManagerImpl.getMappin gProvider(PackageManagerImpl.java:174)
at
org.eclipse.emf.cdo.client.impl.PackageManagerImpl.addPackag e(PackageManagerImpl.java:104)
at
org.eclipse.emf.cdo.client.impl.PackageManagerImpl.processMa ppings(PackageManagerImpl.java:319)
at
org.eclipse.emf.cdo.client.impl.PackageManagerImpl.validate( PackageManagerImpl.java:329)
at
org.eclipse.net4j.spring.impl.ServiceImpl$ServiceStateMachin e$Transition_Start.process(ServiceImpl.java:950)
at
org.eclipse.net4j.spring.impl.ServiceImpl$ServiceStateMachin e$Transition_Start.process(ServiceImpl.java:1)
at org.eclipse.net4j.util.fsm.StateMachine.process(StateMachine .java:133)
at
org.eclipse.net4j.spring.impl.ServiceImpl.processServiceEven t(ServiceImpl.java:812)
at org.eclipse.net4j.spring.impl.ServiceImpl.start(ServiceImpl. java:204)
at
org.eclipse.net4j.spring.impl.ServiceImpl.afterPropertiesSet (ServiceImpl.java:225)
at
org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.invokeInitMethods(AbstractAutowireCapableBe anFactory.java:1091)
at
org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.createBean(AbstractAutowireCapableBeanFacto ry.java:396)
at
org.springframework.beans.factory.support.AbstractBeanFactor y.getBean(AbstractBeanFactory.java:233)
at
org.springframework.beans.factory.support.AbstractBeanFactor y.getBean(AbstractBeanFactory.java:145)
at
org.springframework.beans.factory.support.DefaultListableBea nFactory.getBeansOfType(DefaultListableBeanFactory.java:211)
at
org.springframework.context.support.AbstractApplicationConte xt.getBeansOfType(AbstractApplicationContext.java:596)
at
org.springframework.context.support.AbstractApplicationConte xt.registerListeners(AbstractApplicationContext.java:478)
at
org.springframework.context.support.AbstractApplicationConte xt.refresh(AbstractApplicationContext.java:310)
at
org.eclipse.net4j.spring.impl.ContainerImpl.<init>(ContainerImpl.java:55)
at
org.eclipse.net4j.spring.impl.ContainerImpl.<init>(ContainerImpl.java:70)
at
org.eclipse.emf.cdo.examples.client.internal.ExampleClientPl ugin.getClientContainer(ExampleClientPlugin.java:146)
at
org.eclipse.emf.cdo.examples.client.internal.ExampleClientPl ugin.createResourceManager(ExampleClientPlugin.java:164)
at
org.eclipse.emf.cdo.examples.library.ui.internal.actions.Cre ateResourceAction.createResource(CreateResourceAction.java:7 8)
at
org.eclipse.emf.cdo.examples.library.ui.internal.actions.Cre ateResourceAction.run(CreateResourceAction.java:64)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:254)
at
org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPl uginAction.java:229)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
The processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:179)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1089)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:895)
at
org.eclipse.emf.cdo.client.impl.XMLMappingProviderImpl.loadM appingModel(XMLMappingProviderImpl.java:77)
at
org.eclipse.emf.cdo.client.impl.XMLMappingProviderImpl.<init >(XMLMappingProviderImpl.java:41)
at
org.eclipse.emf.cdo.client.impl.PackageManagerImpl.getMappin gProvider(PackageManagerImpl.java:158)
... 50 more
Caused by: org.xml.sax.SAXParseException: The processing instruction
target matching "[xX][mM][lL]" is not allowed.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper. createSAXParseException(Unknown
Source)
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper. fatalError(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.rep ortError(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.rep ortError(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFat alError(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIDat a(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanPIData(Unknown
Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(Un known
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDispatcher.dispatch(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
... 56 more
--> TEST: Create a new CDO Resource
org.eclipse.net4j.core.UnknownProtocolException: Protocol cdo is not
registered with client
at
org.eclipse.net4j.core.impl.AbstractConnector.findProtocol(A bstractConnector.java:289)
at
org.eclipse.net4j.core.impl.AbstractConnector.addChannel(Abs tractConnector.java:122)
at
org.eclipse.emf.cdo.client.impl.ResourceManagerImpl.getChann el(ResourceManagerImpl.java:210)
at
org.eclipse.emf.cdo.client.impl.CDOResourceFactoryImpl.creat eResourceFromPath(CDOResourceFactoryImpl.java:128)
at
org.eclipse.emf.cdo.client.impl.CDOResourceFactoryImpl.creat eResource(CDOResourceFactoryImpl.java:71)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.createRe source(ResourceSetImpl.java:410)
at
org.eclipse.emf.cdo.examples.library.ui.internal.actions.Cre ateResourceAction.createResource(CreateResourceAction.java:8 2)
at
org.eclipse.emf.cdo.examples.library.ui.internal.actions.Cre ateResourceAction.run(CreateResourceAction.java:64)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:254)
at
org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPl uginAction.java:229)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)

Eike Stepper schrieb:
> Chris,
>
> The Derby DB files are usually created under the working directory.
>
> I can't see the error you speak of. But most of the times you have to
> adjust the working directory and add any required plugins.
>
> Cheers
> /Eike
>
>
> Chris Lenz schrieb:
>> I have now tested cdo and derby:
>>
>> In the cvs version of cdo the server.properties is set to use of derby.
>> Where are hte derby db files saved? or how are they named, so that I can
>> search them?
>>
>> I also get the following error if I use the Client1 launch configuration.
>>
>> Can anyone help me?
>>
Re: CDO and Derby [message #40870 is a reply to message #40839] Mon, 24 July 2006 13:29 Go to previous messageGo to next message
Eclipse UserFriend
OK your right:

Working directory was in both cases Desktop, so this could not work.

Thanx for fast answer!


Have you seen my bugrequest in Bugzilla?
Re: CDO and Derby [message #40901 is a reply to message #40870] Tue, 25 July 2006 01:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Chris Lenz schrieb:
> OK your right:
>
> Working directory was in both cases Desktop, so this could not work.
>
> Thanx for fast answer!
>
So the exception does not occur anymore?

>
> Have you seen my bugrequest in Bugzilla?
>
Yes, I've seen it ;-)

I like the idea to have a query facility for CDO.
But I fear that a server-side OCL is far beyond what I can do.
I could start with SQL as a query language and maybe I can make that
part extensible on the server side...

The other point in your request seems to be about sharing EObjects
between ResourceSets.
That's indeed one of the features I'm thinking about for the next release.
The main reason for that is the fact that only ever one transaction is
possible per ResourceSet.
The only way to conduct several transactions on the same Resources is to
create a ResourceSet for each transaction.
And in general that's only feasible if the creation of a ResourceSet is
very cheap (at least if the contents are already at the client).

My favorite solution to the problem is to move the whole state of all
EObjects into EStores.
There I can implement the sharing and the transactional bevahiour.
There it's even easier to implement a transparent object versioning (as
requested by other users).

In fact that would make CDO even less invasive to the underlying Ecore
model.
It would no longer be necessary to make all model classes inherit from
CDOPersistent and use modified JET templates.
To CDO'ish a model it would be sufficient to slightly modify the Genmodel:
Feature Delegation = Reflective
Root Extends Class = org.eclipse.emf.cdo.client.impl.CDOPersistent

In addition this would make it possible (or at least easier) to provide
a feature based lazy loading.
Or something like fetch groups...

But I'm sure that all this will take a while. At the moment I'm
investigating ways to:
a) Replace the Spring Framework by proper OSGi Services
b) Optionally replace Net4j by proper Web Services (I'm currently
playing with Hessian)
c) Provide distributed write-through caches for large deployments
d) Provide shared sessions (see above)
e) Provide time travel sessions

Cheers
/Eike
Re: CDO and Derby [message #40962 is a reply to message #40901] Wed, 26 July 2006 02:44 Go to previous messageGo to next message
Eclipse UserFriend
Sorry have been ill for one day :-(;

yes exception does not occur any more.

Question:
Is it possible to change the structure of an emf (datastructure) and
also change the structure of the database.
Chris


Eike Stepper schrieb:
> Chris Lenz schrieb:
>> OK your right:
>>
>> Working directory was in both cases Desktop, so this could not work.
>>
>> Thanx for fast answer!
>>
> So the exception does not occur anymore?
>
>>
>> Have you seen my bugrequest in Bugzilla?
>>
> Yes, I've seen it ;-)
>
> I like the idea to have a query facility for CDO.
> But I fear that a server-side OCL is far beyond what I can do.
> I could start with SQL as a query language and maybe I can make that
> part extensible on the server side...
>
> The other point in your request seems to be about sharing EObjects
> between ResourceSets.
> That's indeed one of the features I'm thinking about for the next release.
> The main reason for that is the fact that only ever one transaction is
> possible per ResourceSet.
> The only way to conduct several transactions on the same Resources is to
> create a ResourceSet for each transaction.
> And in general that's only feasible if the creation of a ResourceSet is
> very cheap (at least if the contents are already at the client).
>
> My favorite solution to the problem is to move the whole state of all
> EObjects into EStores.
> There I can implement the sharing and the transactional bevahiour.
> There it's even easier to implement a transparent object versioning (as
> requested by other users).
>
> In fact that would make CDO even less invasive to the underlying Ecore
> model.
> It would no longer be necessary to make all model classes inherit from
> CDOPersistent and use modified JET templates.
> To CDO'ish a model it would be sufficient to slightly modify the Genmodel:
> Feature Delegation = Reflective
> Root Extends Class = org.eclipse.emf.cdo.client.impl.CDOPersistent
>
> In addition this would make it possible (or at least easier) to provide
> a feature based lazy loading.
> Or something like fetch groups...
>
> But I'm sure that all this will take a while. At the moment I'm
> investigating ways to:
> a) Replace the Spring Framework by proper OSGi Services
> b) Optionally replace Net4j by proper Web Services (I'm currently
> playing with Hessian)
> c) Provide distributed write-through caches for large deployments
> d) Provide shared sessions (see above)
> e) Provide time travel sessions
>
> Cheers
> /Eike
>
Re: CDO and Derby - Model Save Exception (BadSqlGrammarException) [message #41116 is a reply to message #40779] Wed, 26 July 2006 03:46 Go to previous messageGo to next message
Eclipse UserFriend
But If I now save my Organizational Model to CDO(Derby) I get the
following exception? Do you have an IDE
----------------------
Initializing container cdo (net4j)
HIT ENTER FOR SHUTDOWN!!!
[INFO] net4j.slave-1: Connected socketChannel:
java.nio.channels.SocketChannel[connected local=/127.0.0.1:2036
remote=/127.0.0.1:2356]
Exception in thread "pool-1-thread-2"
org.springframework.jdbc.BadSqlGrammarException:
PreparedStatementCallback; bad SQL grammar [INSERT IGNORE INTO USER VALUES(?,
?)]; nested exception is SQL Exception: Syntax error: Encountered "USER"
at line 1, column 13.
ERROR 42X01: Syntax error: Encountered "USER" at line 1, column 13.
at org.apache.derby.iapi.error.StandardException.newException(U nknown
Source)
at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement( Unknown
Source)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknow n Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionCont ext.prepareInternalStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown
Source)
at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unk nown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
Source)
at
org.springframework.jdbc.core.JdbcTemplate$SimplePreparedSta tementCreator.createPreparedStatement(JdbcTemplate.java:1134 )
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTempl ate.java:470)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:691)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:753)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:757)
at org.eclipse.emf.cdo.server.impl.MapperImpl.sql(MapperImpl.ja va:665)
at
org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttachAttributes(CommitTransactionIndica tion.java:585)
at
org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttach(CommitTransactionIndication.java: 178)
at
org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.access$1(CommitTransactionIndication.java:155)
at
org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion$1.doInTransactionWithoutResult(CommitTransactionIndicati on.java:79)
at
org.springframework.transaction.support.TransactionCallbackW ithoutResult.doInTransaction(TransactionCallbackWithoutResul t.java:33)
at
org.springframework.transaction.support.TransactionTemplate. execute(TransactionTemplate.java:114)
at
org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.indicate(CommitTransactionIndication.java:74)
at
org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.processSi gnal(ChannelImpl.java:853)
at
org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.run(Chann elImpl.java:789)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
-----------------------------
Re: CDO and Derby - Model Save Exception (BadSqlGrammarException) [message #41178 is a reply to message #41116] Wed, 26 July 2006 04:24 Go to previous messageGo to next message
Eclipse UserFriend
Chris Lenz schrieb:
> But If I now save my Organizational Model to CDO(Derby) I get the
> following exception? Do you have an IDE
> ----------------------
> Initializing container cdo (net4j)
> HIT ENTER FOR SHUTDOWN!!!
> [INFO] net4j.slave-1: Connected socketChannel:
> java.nio.channels.SocketChannel[connected local=/127.0.0.1:2036
> remote=/127.0.0.1:2356]
> Exception in thread "pool-1-thread-2"
> org.springframework.jdbc.BadSqlGrammarException:
> PreparedStatementCallback; bad SQL grammar [INSERT IGNORE INTO USER VALUES(?,
> ?)]; nested exception is SQL Exception: Syntax error: Encountered "USER"
> at line 1, column 13.
> ERROR 42X01: Syntax error: Encountered "USER" at line 1, column 13.
> at org.apache.derby.iapi.error.StandardException.newException(U nknown
> Source)
> at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement( Unknown
> Source)
> at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknow n Source)
> at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
> at
> org.apache.derby.impl.sql.conn.GenericLanguageConnectionCont ext.prepareInternalStatement(Unknown
> Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown
> Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown
> Source)
> at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unk nown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
> Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
> Source)
> at
> org.springframework.jdbc.core.JdbcTemplate$SimplePreparedSta tementCreator.createPreparedStatement(JdbcTemplate.java:1134 )
> at
> org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTempl ate.java:470)
> at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:691)
> at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:753)
> at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:757)
> at org.eclipse.emf.cdo.server.impl.MapperImpl.sql(MapperImpl.ja va:665)
> at
> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttachAttributes(CommitTransactionIndica tion.java:585)
> at
> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttach(CommitTransactionIndication.java: 178)
> at
> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.access$1(CommitTransactionIndication.java:155)
> at
> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion$1.doInTransactionWithoutResult(CommitTransactionIndicati on.java:79)
> at
> org.springframework.transaction.support.TransactionCallbackW ithoutResult.doInTransaction(TransactionCallbackWithoutResul t.java:33)
> at
> org.springframework.transaction.support.TransactionTemplate. execute(TransactionTemplate.java:114)
> at
> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.indicate(CommitTransactionIndication.java:74)
> at
> org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.processSi gnal(ChannelImpl.java:853)
> at
> org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.run(Chann elImpl.java:789)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> -----------------------------
>
on mysql it is still working
Re: CDO and Derby - Model Save Exception (BadSqlGrammarException) [message #41334 is a reply to message #41178] Wed, 26 July 2006 09:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Chris,

I assume, that on Mysql "USER" is not a reserved word, on Derby it seems
to be.
Maybe the Derby SQL statements can be enriched with quotes. You can have
a look into org.eclipse.emf.cdo.dbgen.derby (.mysql respectively).

You could avoid suspicious identifiers in your model.
Or you can modify the generated mapping file and rename the table or column.

Cheers
/Eike


Chris Lenz schrieb:
> Chris Lenz schrieb:
>
>> But If I now save my Organizational Model to CDO(Derby) I get the
>> following exception? Do you have an IDE
>> ----------------------
>> Initializing container cdo (net4j)
>> HIT ENTER FOR SHUTDOWN!!!
>> [INFO] net4j.slave-1: Connected socketChannel:
>> java.nio.channels.SocketChannel[connected local=/127.0.0.1:2036
>> remote=/127.0.0.1:2356]
>> Exception in thread "pool-1-thread-2"
>> org.springframework.jdbc.BadSqlGrammarException:
>> PreparedStatementCallback; bad SQL grammar [INSERT IGNORE INTO USER VALUES(?,
>> ?)]; nested exception is SQL Exception: Syntax error: Encountered "USER"
>> at line 1, column 13.
>> ERROR 42X01: Syntax error: Encountered "USER" at line 1, column 13.
>> at org.apache.derby.iapi.error.StandardException.newException(U nknown
>> Source)
>> at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement( Unknown
>> Source)
>> at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknow n Source)
>> at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
>> at
>> org.apache.derby.impl.sql.conn.GenericLanguageConnectionCont ext.prepareInternalStatement(Unknown
>> Source)
>> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
>> at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown
>> Source)
>> at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown
>> Source)
>> at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unk nown Source)
>> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
>> Source)
>> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
>> Source)
>> at
>> org.springframework.jdbc.core.JdbcTemplate$SimplePreparedSta tementCreator.createPreparedStatement(JdbcTemplate.java:1134 )
>> at
>> org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTempl ate.java:470)
>> at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:691)
>> at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:753)
>> at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:757)
>> at org.eclipse.emf.cdo.server.impl.MapperImpl.sql(MapperImpl.ja va:665)
>> at
>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttachAttributes(CommitTransactionIndica tion.java:585)
>> at
>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttach(CommitTransactionIndication.java: 178)
>> at
>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.access$1(CommitTransactionIndication.java:155)
>> at
>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion$1.doInTransactionWithoutResult(CommitTransactionIndicati on.java:79)
>> at
>> org.springframework.transaction.support.TransactionCallbackW ithoutResult.doInTransaction(TransactionCallbackWithoutResul t.java:33)
>> at
>> org.springframework.transaction.support.TransactionTemplate. execute(TransactionTemplate.java:114)
>> at
>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.indicate(CommitTransactionIndication.java:74)
>> at
>> org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.processSi gnal(ChannelImpl.java:853)
>> at
>> org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.run(Chann elImpl.java:789)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn Source)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>> at java.lang.Thread.run(Unknown Source)
>> -----------------------------
>>
>>
> on mysql it is still working
>
Re: CDO and Derby [message #41395 is a reply to message #40962] Wed, 26 July 2006 10:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Chris,

I'm not sure what you want to achieve.
CDO can't automatically adapt its repository to new Ecore models.

Other users have successfully copied whole CDOResources into another
repository.
I could imagine, that you can load a resource with its old model,
manually copy/adjust and then save into a new resource.

Cheers
/Eike


Chris Lenz schrieb:
> Sorry have been ill for one day :-(;
>
> yes exception does not occur any more.
>
> Question:
> Is it possible to change the structure of an emf (datastructure) and
> also change the structure of the database.
> Chris
>
>
> Eike Stepper schrieb:
>
>> Chris Lenz schrieb:
>>
>>> OK your right:
>>>
>>> Working directory was in both cases Desktop, so this could not work.
>>>
>>> Thanx for fast answer!
>>>
>>>
>> So the exception does not occur anymore?
>>
>>
>>> Have you seen my bugrequest in Bugzilla?
>>>
>>>
>> Yes, I've seen it ;-)
>>
>> I like the idea to have a query facility for CDO.
>> But I fear that a server-side OCL is far beyond what I can do.
>> I could start with SQL as a query language and maybe I can make that
>> part extensible on the server side...
>>
>> The other point in your request seems to be about sharing EObjects
>> between ResourceSets.
>> That's indeed one of the features I'm thinking about for the next release.
>> The main reason for that is the fact that only ever one transaction is
>> possible per ResourceSet.
>> The only way to conduct several transactions on the same Resources is to
>> create a ResourceSet for each transaction.
>> And in general that's only feasible if the creation of a ResourceSet is
>> very cheap (at least if the contents are already at the client).
>>
>> My favorite solution to the problem is to move the whole state of all
>> EObjects into EStores.
>> There I can implement the sharing and the transactional bevahiour.
>> There it's even easier to implement a transparent object versioning (as
>> requested by other users).
>>
>> In fact that would make CDO even less invasive to the underlying Ecore
>> model.
>> It would no longer be necessary to make all model classes inherit from
>> CDOPersistent and use modified JET templates.
>> To CDO'ish a model it would be sufficient to slightly modify the Genmodel:
>> Feature Delegation = Reflective
>> Root Extends Class = org.eclipse.emf.cdo.client.impl.CDOPersistent
>>
>> In addition this would make it possible (or at least easier) to provide
>> a feature based lazy loading.
>> Or something like fetch groups...
>>
>> But I'm sure that all this will take a while. At the moment I'm
>> investigating ways to:
>> a) Replace the Spring Framework by proper OSGi Services
>> b) Optionally replace Net4j by proper Web Services (I'm currently
>> playing with Hessian)
>> c) Provide distributed write-through caches for large deployments
>> d) Provide shared sessions (see above)
>> e) Provide time travel sessions
>>
>> Cheers
>> /Eike
>>
>>
Re: CDO and Derby - Model Save Exception (BadSqlGrammarException) [message #41576 is a reply to message #41334] Thu, 27 July 2006 03:05 Go to previous messageGo to next message
Eclipse UserFriend
If I change something in the code, i it possible to check it in.
How does this work.
Chris
Eike Stepper schrieb:
> Chris,
>
> I assume, that on Mysql "USER" is not a reserved word, on Derby it seems
> to be.
> Maybe the Derby SQL statements can be enriched with quotes. You can have
> a look into org.eclipse.emf.cdo.dbgen.derby (.mysql respectively).
>
> You could avoid suspicious identifiers in your model.
> Or you can modify the generated mapping file and rename the table or
> column.
>
> Cheers
> /Eike
>
>
> Chris Lenz schrieb:
>> Chris Lenz schrieb:
>>
>>> But If I now save my Organizational Model to CDO(Derby) I get the
>>> following exception? Do you have an IDE
>>> ----------------------
>>> Initializing container cdo (net4j)
>>> HIT ENTER FOR SHUTDOWN!!!
>>> [INFO] net4j.slave-1: Connected socketChannel:
>>> java.nio.channels.SocketChannel[connected local=/127.0.0.1:2036
>>> remote=/127.0.0.1:2356]
>>> Exception in thread "pool-1-thread-2"
>>> org.springframework.jdbc.BadSqlGrammarException:
>>> PreparedStatementCallback; bad SQL grammar [INSERT IGNORE INTO USER VALUES(?,
>>> ?)]; nested exception is SQL Exception: Syntax error: Encountered "USER"
>>> at line 1, column 13.
>>> ERROR 42X01: Syntax error: Encountered "USER" at line 1, column 13.
>>> at
>>> org.apache.derby.iapi.error.StandardException.newException(U nknown
>>> Source)
>>> at
>>> org.apache.derby.impl.sql.compile.ParserImpl.parseStatement( Unknown
>>> Source)
>>> at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknow n
>>> Source)
>>> at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown
>>> Source)
>>> at
>>> org.apache.derby.impl.sql.conn.GenericLanguageConnectionCont ext.prepareInternalStatement(Unknown
>>>
>>> Source)
>>> at
>>> org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
>>> at
>>> org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown
>>> Source)
>>> at
>>> org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown
>>> Source)
>>> at
>>> org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unk nown Source)
>>> at
>>> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
>>> Source)
>>> at
>>> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
>>> Source)
>>> at
>>> org.springframework.jdbc.core.JdbcTemplate$SimplePreparedSta tementCreator.createPreparedStatement(JdbcTemplate.java:1134 )
>>>
>>> at
>>> org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTempl ate.java:470)
>>>
>>> at
>>> org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:691)
>>> at
>>> org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:753)
>>> at
>>> org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:757)
>>> at
>>> org.eclipse.emf.cdo.server.impl.MapperImpl.sql(MapperImpl.ja va:665)
>>> at
>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttachAttributes(CommitTransactionIndica tion.java:585)
>>>
>>> at
>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttach(CommitTransactionIndication.java: 178)
>>>
>>> at
>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.access$1(CommitTransactionIndication.java:155)
>>>
>>> at
>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion$1.doInTransactionWithoutResult(CommitTransactionIndicati on.java:79)
>>>
>>> at
>>> org.springframework.transaction.support.TransactionCallbackW ithoutResult.doInTransaction(TransactionCallbackWithoutResul t.java:33)
>>>
>>> at
>>> org.springframework.transaction.support.TransactionTemplate. execute(TransactionTemplate.java:114)
>>>
>>> at
>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.indicate(CommitTransactionIndication.java:74)
>>>
>>> at
>>> org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.processSi gnal(ChannelImpl.java:853)
>>>
>>> at
>>> org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.run(Chann elImpl.java:789)
>>>
>>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn
>>> Source)
>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
>>> Source)
>>> at java.lang.Thread.run(Unknown Source)
>>> -----------------------------
>>>
>>>
>> on mysql it is still working
>>
Re: CDO and Derby - Model Save Exception (BadSqlGrammarException) [message #41634 is a reply to message #41576] Thu, 27 July 2006 08:24 Go to previous message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Chris,

You can attach a patch to a newsgroup message or to a bugzilla.
I will review it and apply it if appropriate.

Cheers
/Eike


Chris Lenz schrieb:
> If I change something in the code, i it possible to check it in.
> How does this work.
> Chris
> Eike Stepper schrieb:
>
>> Chris,
>>
>> I assume, that on Mysql "USER" is not a reserved word, on Derby it seems
>> to be.
>> Maybe the Derby SQL statements can be enriched with quotes. You can have
>> a look into org.eclipse.emf.cdo.dbgen.derby (.mysql respectively).
>>
>> You could avoid suspicious identifiers in your model.
>> Or you can modify the generated mapping file and rename the table or
>> column.
>>
>> Cheers
>> /Eike
>>
>>
>> Chris Lenz schrieb:
>>
>>> Chris Lenz schrieb:
>>>
>>>
>>>> But If I now save my Organizational Model to CDO(Derby) I get the
>>>> following exception? Do you have an IDE
>>>> ----------------------
>>>> Initializing container cdo (net4j)
>>>> HIT ENTER FOR SHUTDOWN!!!
>>>> [INFO] net4j.slave-1: Connected socketChannel:
>>>> java.nio.channels.SocketChannel[connected local=/127.0.0.1:2036
>>>> remote=/127.0.0.1:2356]
>>>> Exception in thread "pool-1-thread-2"
>>>> org.springframework.jdbc.BadSqlGrammarException:
>>>> PreparedStatementCallback; bad SQL grammar [INSERT IGNORE INTO USER VALUES(?,
>>>> ?)]; nested exception is SQL Exception: Syntax error: Encountered "USER"
>>>> at line 1, column 13.
>>>> ERROR 42X01: Syntax error: Encountered "USER" at line 1, column 13.
>>>> at
>>>> org.apache.derby.iapi.error.StandardException.newException(U nknown
>>>> Source)
>>>> at
>>>> org.apache.derby.impl.sql.compile.ParserImpl.parseStatement( Unknown
>>>> Source)
>>>> at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknow n
>>>> Source)
>>>> at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown
>>>> Source)
>>>> at
>>>> org.apache.derby.impl.sql.conn.GenericLanguageConnectionCont ext.prepareInternalStatement(Unknown
>>>>
>>>> Source)
>>>> at
>>>> org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
>>>> at
>>>> org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown
>>>> Source)
>>>> at
>>>> org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown
>>>> Source)
>>>> at
>>>> org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unk nown Source)
>>>> at
>>>> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
>>>> Source)
>>>> at
>>>> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
>>>> Source)
>>>> at
>>>> org.springframework.jdbc.core.JdbcTemplate$SimplePreparedSta tementCreator.createPreparedStatement(JdbcTemplate.java:1134 )
>>>>
>>>> at
>>>> org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTempl ate.java:470)
>>>>
>>>> at
>>>> org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:691)
>>>> at
>>>> org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:753)
>>>> at
>>>> org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:757)
>>>> at
>>>> org.eclipse.emf.cdo.server.impl.MapperImpl.sql(MapperImpl.ja va:665)
>>>> at
>>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttachAttributes(CommitTransactionIndica tion.java:585)
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttach(CommitTransactionIndication.java: 178)
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.access$1(CommitTransactionIndication.java:155)
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion$1.doInTransactionWithoutResult(CommitTransactionIndicati on.java:79)
>>>>
>>>> at
>>>> org.springframework.transaction.support.TransactionCallbackW ithoutResult.doInTransaction(TransactionCallbackWithoutResul t.java:33)
>>>>
>>>> at
>>>> org.springframework.transaction.support.TransactionTemplate. execute(TransactionTemplate.java:114)
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.indicate(CommitTransactionIndication.java:74)
>>>>
>>>> at
>>>> org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.processSi gnal(ChannelImpl.java:853)
>>>>
>>>> at
>>>> org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.run(Chann elImpl.java:789)
>>>>
>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn
>>>> Source)
>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
>>>> Source)
>>>> at java.lang.Thread.run(Unknown Source)
>>>> -----------------------------
>>>>
>>>>
>>>>
>>> on mysql it is still working
>>>
>>>
Re: CDO and Derby [message #583054 is a reply to message #40779] Mon, 24 July 2006 13:19 Go to previous message
Eclipse UserFriend
Chris,

The Derby DB files are usually created under the working directory.

I can't see the error you speak of. But most of the times you have to
adjust the working directory and add any required plugins.

Cheers
/Eike


Chris Lenz schrieb:
> I have now tested cdo and derby:
>
> In the cvs version of cdo the server.properties is set to use of derby.
> Where are hte derby db files saved? or how are they named, so that I can
> search them?
>
> I also get the following error if I use the Client1 launch configuration.
>
> Can anyone help me?
>
Re: CDO and Derby [message #583069 is a reply to message #40809] Mon, 24 July 2006 13:25 Go to previous message
Eclipse UserFriend
--No Derbyfiles are created ?

Have forgotten to add the exception:

--> TEST: Create an EMF ResourceSet and associate it with a CDO
ResourceManager
[INFO] common.client.connector: Connected socketChannel:
java.nio.channels.SocketChannel[connected local=/127.0.0.1:1989
remote=localhost/127.0.0.1:2036]
[ERROR] common.client.packageManager: Error while processing
ServiceEvent START
java.lang.RuntimeException:
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
processing instruction target matching "[xX][mM][lL]" is not allowed.
at
org.eclipse.emf.cdo.client.impl.PackageManagerImpl.getMappin gProvider(PackageManagerImpl.java:174)
at
org.eclipse.emf.cdo.client.impl.PackageManagerImpl.addPackag e(PackageManagerImpl.java:104)
at
org.eclipse.emf.cdo.client.impl.PackageManagerImpl.processMa ppings(PackageManagerImpl.java:319)
at
org.eclipse.emf.cdo.client.impl.PackageManagerImpl.validate( PackageManagerImpl.java:329)
at
org.eclipse.net4j.spring.impl.ServiceImpl$ServiceStateMachin e$Transition_Start.process(ServiceImpl.java:950)
at
org.eclipse.net4j.spring.impl.ServiceImpl$ServiceStateMachin e$Transition_Start.process(ServiceImpl.java:1)
at org.eclipse.net4j.util.fsm.StateMachine.process(StateMachine .java:133)
at
org.eclipse.net4j.spring.impl.ServiceImpl.processServiceEven t(ServiceImpl.java:812)
at org.eclipse.net4j.spring.impl.ServiceImpl.start(ServiceImpl. java:204)
at
org.eclipse.net4j.spring.impl.ServiceImpl.afterPropertiesSet (ServiceImpl.java:225)
at
org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.invokeInitMethods(AbstractAutowireCapableBe anFactory.java:1091)
at
org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.createBean(AbstractAutowireCapableBeanFacto ry.java:396)
at
org.springframework.beans.factory.support.AbstractBeanFactor y.getBean(AbstractBeanFactory.java:233)
at
org.springframework.beans.factory.support.AbstractBeanFactor y.getBean(AbstractBeanFactory.java:145)
at
org.springframework.beans.factory.support.DefaultListableBea nFactory.getBeansOfType(DefaultListableBeanFactory.java:211)
at
org.springframework.context.support.AbstractApplicationConte xt.getBeansOfType(AbstractApplicationContext.java:596)
at
org.springframework.context.support.AbstractApplicationConte xt.registerListeners(AbstractApplicationContext.java:478)
at
org.springframework.context.support.AbstractApplicationConte xt.refresh(AbstractApplicationContext.java:310)
at
org.eclipse.net4j.spring.impl.ContainerImpl.<init>(ContainerImpl.java:55)
at
org.eclipse.net4j.spring.impl.ContainerImpl.<init>(ContainerImpl.java:70)
at
org.eclipse.emf.cdo.examples.client.internal.ExampleClientPl ugin.getClientContainer(ExampleClientPlugin.java:146)
at
org.eclipse.emf.cdo.examples.client.internal.ExampleClientPl ugin.createResourceManager(ExampleClientPlugin.java:164)
at
org.eclipse.emf.cdo.examples.library.ui.internal.actions.Cre ateResourceAction.createResource(CreateResourceAction.java:7 8)
at
org.eclipse.emf.cdo.examples.library.ui.internal.actions.Cre ateResourceAction.run(CreateResourceAction.java:64)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:254)
at
org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPl uginAction.java:229)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
The processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:179)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1089)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:895)
at
org.eclipse.emf.cdo.client.impl.XMLMappingProviderImpl.loadM appingModel(XMLMappingProviderImpl.java:77)
at
org.eclipse.emf.cdo.client.impl.XMLMappingProviderImpl.<init >(XMLMappingProviderImpl.java:41)
at
org.eclipse.emf.cdo.client.impl.PackageManagerImpl.getMappin gProvider(PackageManagerImpl.java:158)
... 50 more
Caused by: org.xml.sax.SAXParseException: The processing instruction
target matching "[xX][mM][lL]" is not allowed.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper. createSAXParseException(Unknown
Source)
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper. fatalError(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.rep ortError(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.rep ortError(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFat alError(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIDat a(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanPIData(Unknown
Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(Un known
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDispatcher.dispatch(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
... 56 more
--> TEST: Create a new CDO Resource
org.eclipse.net4j.core.UnknownProtocolException: Protocol cdo is not
registered with client
at
org.eclipse.net4j.core.impl.AbstractConnector.findProtocol(A bstractConnector.java:289)
at
org.eclipse.net4j.core.impl.AbstractConnector.addChannel(Abs tractConnector.java:122)
at
org.eclipse.emf.cdo.client.impl.ResourceManagerImpl.getChann el(ResourceManagerImpl.java:210)
at
org.eclipse.emf.cdo.client.impl.CDOResourceFactoryImpl.creat eResourceFromPath(CDOResourceFactoryImpl.java:128)
at
org.eclipse.emf.cdo.client.impl.CDOResourceFactoryImpl.creat eResource(CDOResourceFactoryImpl.java:71)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.createRe source(ResourceSetImpl.java:410)
at
org.eclipse.emf.cdo.examples.library.ui.internal.actions.Cre ateResourceAction.createResource(CreateResourceAction.java:8 2)
at
org.eclipse.emf.cdo.examples.library.ui.internal.actions.Cre ateResourceAction.run(CreateResourceAction.java:64)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:254)
at
org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPl uginAction.java:229)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)

Eike Stepper schrieb:
> Chris,
>
> The Derby DB files are usually created under the working directory.
>
> I can't see the error you speak of. But most of the times you have to
> adjust the working directory and add any required plugins.
>
> Cheers
> /Eike
>
>
> Chris Lenz schrieb:
>> I have now tested cdo and derby:
>>
>> In the cvs version of cdo the server.properties is set to use of derby.
>> Where are hte derby db files saved? or how are they named, so that I can
>> search them?
>>
>> I also get the following error if I use the Client1 launch configuration.
>>
>> Can anyone help me?
>>
Re: CDO and Derby [message #583081 is a reply to message #40839] Mon, 24 July 2006 13:29 Go to previous message
Eclipse UserFriend
OK your right:

Working directory was in both cases Desktop, so this could not work.

Thanx for fast answer!


Have you seen my bugrequest in Bugzilla?
Re: CDO and Derby [message #583104 is a reply to message #40870] Tue, 25 July 2006 01:12 Go to previous message
Eclipse UserFriend
Chris Lenz schrieb:
> OK your right:
>
> Working directory was in both cases Desktop, so this could not work.
>
> Thanx for fast answer!
>
So the exception does not occur anymore?

>
> Have you seen my bugrequest in Bugzilla?
>
Yes, I've seen it ;-)

I like the idea to have a query facility for CDO.
But I fear that a server-side OCL is far beyond what I can do.
I could start with SQL as a query language and maybe I can make that
part extensible on the server side...

The other point in your request seems to be about sharing EObjects
between ResourceSets.
That's indeed one of the features I'm thinking about for the next release.
The main reason for that is the fact that only ever one transaction is
possible per ResourceSet.
The only way to conduct several transactions on the same Resources is to
create a ResourceSet for each transaction.
And in general that's only feasible if the creation of a ResourceSet is
very cheap (at least if the contents are already at the client).

My favorite solution to the problem is to move the whole state of all
EObjects into EStores.
There I can implement the sharing and the transactional bevahiour.
There it's even easier to implement a transparent object versioning (as
requested by other users).

In fact that would make CDO even less invasive to the underlying Ecore
model.
It would no longer be necessary to make all model classes inherit from
CDOPersistent and use modified JET templates.
To CDO'ish a model it would be sufficient to slightly modify the Genmodel:
Feature Delegation = Reflective
Root Extends Class = org.eclipse.emf.cdo.client.impl.CDOPersistent

In addition this would make it possible (or at least easier) to provide
a feature based lazy loading.
Or something like fetch groups...

But I'm sure that all this will take a while. At the moment I'm
investigating ways to:
a) Replace the Spring Framework by proper OSGi Services
b) Optionally replace Net4j by proper Web Services (I'm currently
playing with Hessian)
c) Provide distributed write-through caches for large deployments
d) Provide shared sessions (see above)
e) Provide time travel sessions

Cheers
/Eike
Re: CDO and Derby [message #583138 is a reply to message #40901] Wed, 26 July 2006 02:44 Go to previous message
Eclipse UserFriend
Sorry have been ill for one day :-(;

yes exception does not occur any more.

Question:
Is it possible to change the structure of an emf (datastructure) and
also change the structure of the database.
Chris


Eike Stepper schrieb:
> Chris Lenz schrieb:
>> OK your right:
>>
>> Working directory was in both cases Desktop, so this could not work.
>>
>> Thanx for fast answer!
>>
> So the exception does not occur anymore?
>
>>
>> Have you seen my bugrequest in Bugzilla?
>>
> Yes, I've seen it ;-)
>
> I like the idea to have a query facility for CDO.
> But I fear that a server-side OCL is far beyond what I can do.
> I could start with SQL as a query language and maybe I can make that
> part extensible on the server side...
>
> The other point in your request seems to be about sharing EObjects
> between ResourceSets.
> That's indeed one of the features I'm thinking about for the next release.
> The main reason for that is the fact that only ever one transaction is
> possible per ResourceSet.
> The only way to conduct several transactions on the same Resources is to
> create a ResourceSet for each transaction.
> And in general that's only feasible if the creation of a ResourceSet is
> very cheap (at least if the contents are already at the client).
>
> My favorite solution to the problem is to move the whole state of all
> EObjects into EStores.
> There I can implement the sharing and the transactional bevahiour.
> There it's even easier to implement a transparent object versioning (as
> requested by other users).
>
> In fact that would make CDO even less invasive to the underlying Ecore
> model.
> It would no longer be necessary to make all model classes inherit from
> CDOPersistent and use modified JET templates.
> To CDO'ish a model it would be sufficient to slightly modify the Genmodel:
> Feature Delegation = Reflective
> Root Extends Class = org.eclipse.emf.cdo.client.impl.CDOPersistent
>
> In addition this would make it possible (or at least easier) to provide
> a feature based lazy loading.
> Or something like fetch groups...
>
> But I'm sure that all this will take a while. At the moment I'm
> investigating ways to:
> a) Replace the Spring Framework by proper OSGi Services
> b) Optionally replace Net4j by proper Web Services (I'm currently
> playing with Hessian)
> c) Provide distributed write-through caches for large deployments
> d) Provide shared sessions (see above)
> e) Provide time travel sessions
>
> Cheers
> /Eike
>
Re: CDO and Derby - Model Save Exception (BadSqlGrammarException) [message #583195 is a reply to message #40779] Wed, 26 July 2006 03:46 Go to previous message
Eclipse UserFriend
But If I now save my Organizational Model to CDO(Derby) I get the
following exception? Do you have an IDE
----------------------
Initializing container cdo (net4j)
HIT ENTER FOR SHUTDOWN!!!
[INFO] net4j.slave-1: Connected socketChannel:
java.nio.channels.SocketChannel[connected local=/127.0.0.1:2036
remote=/127.0.0.1:2356]
Exception in thread "pool-1-thread-2"
org.springframework.jdbc.BadSqlGrammarException:
PreparedStatementCallback; bad SQL grammar [INSERT IGNORE INTO USER VALUES(?,
?)]; nested exception is SQL Exception: Syntax error: Encountered "USER"
at line 1, column 13.
ERROR 42X01: Syntax error: Encountered "USER" at line 1, column 13.
at org.apache.derby.iapi.error.StandardException.newException(U nknown
Source)
at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement( Unknown
Source)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknow n Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionCont ext.prepareInternalStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown
Source)
at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unk nown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
Source)
at
org.springframework.jdbc.core.JdbcTemplate$SimplePreparedSta tementCreator.createPreparedStatement(JdbcTemplate.java:1134 )
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTempl ate.java:470)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:691)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:753)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:757)
at org.eclipse.emf.cdo.server.impl.MapperImpl.sql(MapperImpl.ja va:665)
at
org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttachAttributes(CommitTransactionIndica tion.java:585)
at
org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttach(CommitTransactionIndication.java: 178)
at
org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.access$1(CommitTransactionIndication.java:155)
at
org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion$1.doInTransactionWithoutResult(CommitTransactionIndicati on.java:79)
at
org.springframework.transaction.support.TransactionCallbackW ithoutResult.doInTransaction(TransactionCallbackWithoutResul t.java:33)
at
org.springframework.transaction.support.TransactionTemplate. execute(TransactionTemplate.java:114)
at
org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.indicate(CommitTransactionIndication.java:74)
at
org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.processSi gnal(ChannelImpl.java:853)
at
org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.run(Chann elImpl.java:789)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
-----------------------------
Re: CDO and Derby - Model Save Exception (BadSqlGrammarException) [message #583235 is a reply to message #41116] Wed, 26 July 2006 04:24 Go to previous message
Eclipse UserFriend
Chris Lenz schrieb:
> But If I now save my Organizational Model to CDO(Derby) I get the
> following exception? Do you have an IDE
> ----------------------
> Initializing container cdo (net4j)
> HIT ENTER FOR SHUTDOWN!!!
> [INFO] net4j.slave-1: Connected socketChannel:
> java.nio.channels.SocketChannel[connected local=/127.0.0.1:2036
> remote=/127.0.0.1:2356]
> Exception in thread "pool-1-thread-2"
> org.springframework.jdbc.BadSqlGrammarException:
> PreparedStatementCallback; bad SQL grammar [INSERT IGNORE INTO USER VALUES(?,
> ?)]; nested exception is SQL Exception: Syntax error: Encountered "USER"
> at line 1, column 13.
> ERROR 42X01: Syntax error: Encountered "USER" at line 1, column 13.
> at org.apache.derby.iapi.error.StandardException.newException(U nknown
> Source)
> at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement( Unknown
> Source)
> at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknow n Source)
> at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
> at
> org.apache.derby.impl.sql.conn.GenericLanguageConnectionCont ext.prepareInternalStatement(Unknown
> Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown
> Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown
> Source)
> at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unk nown Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
> Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
> Source)
> at
> org.springframework.jdbc.core.JdbcTemplate$SimplePreparedSta tementCreator.createPreparedStatement(JdbcTemplate.java:1134 )
> at
> org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTempl ate.java:470)
> at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:691)
> at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:753)
> at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:757)
> at org.eclipse.emf.cdo.server.impl.MapperImpl.sql(MapperImpl.ja va:665)
> at
> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttachAttributes(CommitTransactionIndica tion.java:585)
> at
> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttach(CommitTransactionIndication.java: 178)
> at
> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.access$1(CommitTransactionIndication.java:155)
> at
> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion$1.doInTransactionWithoutResult(CommitTransactionIndicati on.java:79)
> at
> org.springframework.transaction.support.TransactionCallbackW ithoutResult.doInTransaction(TransactionCallbackWithoutResul t.java:33)
> at
> org.springframework.transaction.support.TransactionTemplate. execute(TransactionTemplate.java:114)
> at
> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.indicate(CommitTransactionIndication.java:74)
> at
> org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.processSi gnal(ChannelImpl.java:853)
> at
> org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.run(Chann elImpl.java:789)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> -----------------------------
>
on mysql it is still working
Re: CDO and Derby - Model Save Exception (BadSqlGrammarException) [message #583319 is a reply to message #41178] Wed, 26 July 2006 09:56 Go to previous message
Eclipse UserFriend
Chris,

I assume, that on Mysql "USER" is not a reserved word, on Derby it seems
to be.
Maybe the Derby SQL statements can be enriched with quotes. You can have
a look into org.eclipse.emf.cdo.dbgen.derby (.mysql respectively).

You could avoid suspicious identifiers in your model.
Or you can modify the generated mapping file and rename the table or column.

Cheers
/Eike


Chris Lenz schrieb:
> Chris Lenz schrieb:
>
>> But If I now save my Organizational Model to CDO(Derby) I get the
>> following exception? Do you have an IDE
>> ----------------------
>> Initializing container cdo (net4j)
>> HIT ENTER FOR SHUTDOWN!!!
>> [INFO] net4j.slave-1: Connected socketChannel:
>> java.nio.channels.SocketChannel[connected local=/127.0.0.1:2036
>> remote=/127.0.0.1:2356]
>> Exception in thread "pool-1-thread-2"
>> org.springframework.jdbc.BadSqlGrammarException:
>> PreparedStatementCallback; bad SQL grammar [INSERT IGNORE INTO USER VALUES(?,
>> ?)]; nested exception is SQL Exception: Syntax error: Encountered "USER"
>> at line 1, column 13.
>> ERROR 42X01: Syntax error: Encountered "USER" at line 1, column 13.
>> at org.apache.derby.iapi.error.StandardException.newException(U nknown
>> Source)
>> at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement( Unknown
>> Source)
>> at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknow n Source)
>> at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
>> at
>> org.apache.derby.impl.sql.conn.GenericLanguageConnectionCont ext.prepareInternalStatement(Unknown
>> Source)
>> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
>> at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown
>> Source)
>> at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown
>> Source)
>> at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unk nown Source)
>> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
>> Source)
>> at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
>> Source)
>> at
>> org.springframework.jdbc.core.JdbcTemplate$SimplePreparedSta tementCreator.createPreparedStatement(JdbcTemplate.java:1134 )
>> at
>> org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTempl ate.java:470)
>> at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:691)
>> at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:753)
>> at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:757)
>> at org.eclipse.emf.cdo.server.impl.MapperImpl.sql(MapperImpl.ja va:665)
>> at
>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttachAttributes(CommitTransactionIndica tion.java:585)
>> at
>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttach(CommitTransactionIndication.java: 178)
>> at
>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.access$1(CommitTransactionIndication.java:155)
>> at
>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion$1.doInTransactionWithoutResult(CommitTransactionIndicati on.java:79)
>> at
>> org.springframework.transaction.support.TransactionCallbackW ithoutResult.doInTransaction(TransactionCallbackWithoutResul t.java:33)
>> at
>> org.springframework.transaction.support.TransactionTemplate. execute(TransactionTemplate.java:114)
>> at
>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.indicate(CommitTransactionIndication.java:74)
>> at
>> org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.processSi gnal(ChannelImpl.java:853)
>> at
>> org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.run(Chann elImpl.java:789)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn Source)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>> at java.lang.Thread.run(Unknown Source)
>> -----------------------------
>>
>>
> on mysql it is still working
>
Re: CDO and Derby [message #583354 is a reply to message #40962] Wed, 26 July 2006 10:01 Go to previous message
Eclipse UserFriend
Chris,

I'm not sure what you want to achieve.
CDO can't automatically adapt its repository to new Ecore models.

Other users have successfully copied whole CDOResources into another
repository.
I could imagine, that you can load a resource with its old model,
manually copy/adjust and then save into a new resource.

Cheers
/Eike


Chris Lenz schrieb:
> Sorry have been ill for one day :-(;
>
> yes exception does not occur any more.
>
> Question:
> Is it possible to change the structure of an emf (datastructure) and
> also change the structure of the database.
> Chris
>
>
> Eike Stepper schrieb:
>
>> Chris Lenz schrieb:
>>
>>> OK your right:
>>>
>>> Working directory was in both cases Desktop, so this could not work.
>>>
>>> Thanx for fast answer!
>>>
>>>
>> So the exception does not occur anymore?
>>
>>
>>> Have you seen my bugrequest in Bugzilla?
>>>
>>>
>> Yes, I've seen it ;-)
>>
>> I like the idea to have a query facility for CDO.
>> But I fear that a server-side OCL is far beyond what I can do.
>> I could start with SQL as a query language and maybe I can make that
>> part extensible on the server side...
>>
>> The other point in your request seems to be about sharing EObjects
>> between ResourceSets.
>> That's indeed one of the features I'm thinking about for the next release.
>> The main reason for that is the fact that only ever one transaction is
>> possible per ResourceSet.
>> The only way to conduct several transactions on the same Resources is to
>> create a ResourceSet for each transaction.
>> And in general that's only feasible if the creation of a ResourceSet is
>> very cheap (at least if the contents are already at the client).
>>
>> My favorite solution to the problem is to move the whole state of all
>> EObjects into EStores.
>> There I can implement the sharing and the transactional bevahiour.
>> There it's even easier to implement a transparent object versioning (as
>> requested by other users).
>>
>> In fact that would make CDO even less invasive to the underlying Ecore
>> model.
>> It would no longer be necessary to make all model classes inherit from
>> CDOPersistent and use modified JET templates.
>> To CDO'ish a model it would be sufficient to slightly modify the Genmodel:
>> Feature Delegation = Reflective
>> Root Extends Class = org.eclipse.emf.cdo.client.impl.CDOPersistent
>>
>> In addition this would make it possible (or at least easier) to provide
>> a feature based lazy loading.
>> Or something like fetch groups...
>>
>> But I'm sure that all this will take a while. At the moment I'm
>> investigating ways to:
>> a) Replace the Spring Framework by proper OSGi Services
>> b) Optionally replace Net4j by proper Web Services (I'm currently
>> playing with Hessian)
>> c) Provide distributed write-through caches for large deployments
>> d) Provide shared sessions (see above)
>> e) Provide time travel sessions
>>
>> Cheers
>> /Eike
>>
>>
Re: CDO and Derby - Model Save Exception (BadSqlGrammarException) [message #583466 is a reply to message #41334] Thu, 27 July 2006 03:05 Go to previous message
Eclipse UserFriend
If I change something in the code, i it possible to check it in.
How does this work.
Chris
Eike Stepper schrieb:
> Chris,
>
> I assume, that on Mysql "USER" is not a reserved word, on Derby it seems
> to be.
> Maybe the Derby SQL statements can be enriched with quotes. You can have
> a look into org.eclipse.emf.cdo.dbgen.derby (.mysql respectively).
>
> You could avoid suspicious identifiers in your model.
> Or you can modify the generated mapping file and rename the table or
> column.
>
> Cheers
> /Eike
>
>
> Chris Lenz schrieb:
>> Chris Lenz schrieb:
>>
>>> But If I now save my Organizational Model to CDO(Derby) I get the
>>> following exception? Do you have an IDE
>>> ----------------------
>>> Initializing container cdo (net4j)
>>> HIT ENTER FOR SHUTDOWN!!!
>>> [INFO] net4j.slave-1: Connected socketChannel:
>>> java.nio.channels.SocketChannel[connected local=/127.0.0.1:2036
>>> remote=/127.0.0.1:2356]
>>> Exception in thread "pool-1-thread-2"
>>> org.springframework.jdbc.BadSqlGrammarException:
>>> PreparedStatementCallback; bad SQL grammar [INSERT IGNORE INTO USER VALUES(?,
>>> ?)]; nested exception is SQL Exception: Syntax error: Encountered "USER"
>>> at line 1, column 13.
>>> ERROR 42X01: Syntax error: Encountered "USER" at line 1, column 13.
>>> at
>>> org.apache.derby.iapi.error.StandardException.newException(U nknown
>>> Source)
>>> at
>>> org.apache.derby.impl.sql.compile.ParserImpl.parseStatement( Unknown
>>> Source)
>>> at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknow n
>>> Source)
>>> at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown
>>> Source)
>>> at
>>> org.apache.derby.impl.sql.conn.GenericLanguageConnectionCont ext.prepareInternalStatement(Unknown
>>>
>>> Source)
>>> at
>>> org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
>>> at
>>> org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown
>>> Source)
>>> at
>>> org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown
>>> Source)
>>> at
>>> org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unk nown Source)
>>> at
>>> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
>>> Source)
>>> at
>>> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
>>> Source)
>>> at
>>> org.springframework.jdbc.core.JdbcTemplate$SimplePreparedSta tementCreator.createPreparedStatement(JdbcTemplate.java:1134 )
>>>
>>> at
>>> org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTempl ate.java:470)
>>>
>>> at
>>> org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:691)
>>> at
>>> org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:753)
>>> at
>>> org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:757)
>>> at
>>> org.eclipse.emf.cdo.server.impl.MapperImpl.sql(MapperImpl.ja va:665)
>>> at
>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttachAttributes(CommitTransactionIndica tion.java:585)
>>>
>>> at
>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttach(CommitTransactionIndication.java: 178)
>>>
>>> at
>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.access$1(CommitTransactionIndication.java:155)
>>>
>>> at
>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion$1.doInTransactionWithoutResult(CommitTransactionIndicati on.java:79)
>>>
>>> at
>>> org.springframework.transaction.support.TransactionCallbackW ithoutResult.doInTransaction(TransactionCallbackWithoutResul t.java:33)
>>>
>>> at
>>> org.springframework.transaction.support.TransactionTemplate. execute(TransactionTemplate.java:114)
>>>
>>> at
>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.indicate(CommitTransactionIndication.java:74)
>>>
>>> at
>>> org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.processSi gnal(ChannelImpl.java:853)
>>>
>>> at
>>> org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.run(Chann elImpl.java:789)
>>>
>>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn
>>> Source)
>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
>>> Source)
>>> at java.lang.Thread.run(Unknown Source)
>>> -----------------------------
>>>
>>>
>> on mysql it is still working
>>
Re: CDO and Derby - Model Save Exception (BadSqlGrammarException) [message #583494 is a reply to message #41576] Thu, 27 July 2006 08:24 Go to previous message
Eclipse UserFriend
Chris,

You can attach a patch to a newsgroup message or to a bugzilla.
I will review it and apply it if appropriate.

Cheers
/Eike


Chris Lenz schrieb:
> If I change something in the code, i it possible to check it in.
> How does this work.
> Chris
> Eike Stepper schrieb:
>
>> Chris,
>>
>> I assume, that on Mysql "USER" is not a reserved word, on Derby it seems
>> to be.
>> Maybe the Derby SQL statements can be enriched with quotes. You can have
>> a look into org.eclipse.emf.cdo.dbgen.derby (.mysql respectively).
>>
>> You could avoid suspicious identifiers in your model.
>> Or you can modify the generated mapping file and rename the table or
>> column.
>>
>> Cheers
>> /Eike
>>
>>
>> Chris Lenz schrieb:
>>
>>> Chris Lenz schrieb:
>>>
>>>
>>>> But If I now save my Organizational Model to CDO(Derby) I get the
>>>> following exception? Do you have an IDE
>>>> ----------------------
>>>> Initializing container cdo (net4j)
>>>> HIT ENTER FOR SHUTDOWN!!!
>>>> [INFO] net4j.slave-1: Connected socketChannel:
>>>> java.nio.channels.SocketChannel[connected local=/127.0.0.1:2036
>>>> remote=/127.0.0.1:2356]
>>>> Exception in thread "pool-1-thread-2"
>>>> org.springframework.jdbc.BadSqlGrammarException:
>>>> PreparedStatementCallback; bad SQL grammar [INSERT IGNORE INTO USER VALUES(?,
>>>> ?)]; nested exception is SQL Exception: Syntax error: Encountered "USER"
>>>> at line 1, column 13.
>>>> ERROR 42X01: Syntax error: Encountered "USER" at line 1, column 13.
>>>> at
>>>> org.apache.derby.iapi.error.StandardException.newException(U nknown
>>>> Source)
>>>> at
>>>> org.apache.derby.impl.sql.compile.ParserImpl.parseStatement( Unknown
>>>> Source)
>>>> at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknow n
>>>> Source)
>>>> at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown
>>>> Source)
>>>> at
>>>> org.apache.derby.impl.sql.conn.GenericLanguageConnectionCont ext.prepareInternalStatement(Unknown
>>>>
>>>> Source)
>>>> at
>>>> org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
>>>> at
>>>> org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown
>>>> Source)
>>>> at
>>>> org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown
>>>> Source)
>>>> at
>>>> org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unk nown Source)
>>>> at
>>>> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
>>>> Source)
>>>> at
>>>> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement( Unknown
>>>> Source)
>>>> at
>>>> org.springframework.jdbc.core.JdbcTemplate$SimplePreparedSta tementCreator.createPreparedStatement(JdbcTemplate.java:1134 )
>>>>
>>>> at
>>>> org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTempl ate.java:470)
>>>>
>>>> at
>>>> org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:691)
>>>> at
>>>> org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:753)
>>>> at
>>>> org.springframework.jdbc.core.JdbcTemplate.update(JdbcTempla te.java:757)
>>>> at
>>>> org.eclipse.emf.cdo.server.impl.MapperImpl.sql(MapperImpl.ja va:665)
>>>> at
>>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttachAttributes(CommitTransactionIndica tion.java:585)
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.receiveObjectsToAttach(CommitTransactionIndication.java: 178)
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.access$1(CommitTransactionIndication.java:155)
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion$1.doInTransactionWithoutResult(CommitTransactionIndicati on.java:79)
>>>>
>>>> at
>>>> org.springframework.transaction.support.TransactionCallbackW ithoutResult.doInTransaction(TransactionCallbackWithoutResul t.java:33)
>>>>
>>>> at
>>>> org.springframework.transaction.support.TransactionTemplate. execute(TransactionTemplate.java:114)
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.server.protocol.CommitTransactionIndicat ion.indicate(CommitTransactionIndication.java:74)
>>>>
>>>> at
>>>> org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.processSi gnal(ChannelImpl.java:853)
>>>>
>>>> at
>>>> org.eclipse.net4j.core.impl.ChannelImpl$SignalTask.run(Chann elImpl.java:789)
>>>>
>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn
>>>> Source)
>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
>>>> Source)
>>>> at java.lang.Thread.run(Unknown Source)
>>>> -----------------------------
>>>>
>>>>
>>>>
>>> on mysql it is still working
>>>
>>>
Previous Topic:CDO Open Resource Q
Next Topic:"OCL Error" posting lost in space?
Goto Forum:
  


Current Time: Wed May 14 02:46:25 EDT 2025

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

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

Back to the top