Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Could not activate TCPClientConnector on CDO Hibernate
[CDO] Could not activate TCPClientConnector on CDO Hibernate [message #924162] Wed, 26 September 2012 15:12 Go to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 17
Registered: September 2011
Junior Member
Hello.

I am trying to connect to a CDO 4.1 Hibernate Server. I am using this code to create the CDOSession:

CDONet4jSessionConfiguration sc = CDONet4jUtil.createNet4jSessionConfiguration();
IManagedContainer container = IPluginContainer.INSTANCE;
Net4jUtil.prepareContainer(container); // Register Net4j factories
TCPUtil.prepareContainer(container); // Register TCP factories
CDONet4jUtil.prepareContainer(container); // Register CDO factories
sc.setConnector(Net4jUtil.getConnector(container, "tcp://" + CONNECTION_ADDRESS));
sc.setRepositoryName(REPO_NAME);
CDONet4jSession session = sc.openNet4jSession();


It works with a regular CDO Server, but fails with CDO Hibernate, throwing the following Exception:

Exception in thread "main" org.eclipse.net4j.util.lifecycle.LifecycleException: Could not activate TCPClientConnector[localhost:2.036]
	at org.eclipse.net4j.util.container.ManagedContainer.activateElement(ManagedContainer.java:327)
	at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:297)
	at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:273)
	at org.eclipse.net4j.Net4jUtil.getConnector(Net4jUtil.java:79)
	at org.eclipse.net4j.Net4jUtil.getConnector(Net4jUtil.java:96)
	at org.eclipse.net4j.Net4jUtil.getConnector(Net4jUtil.java:115)
	at es.modelum.test.cdo.CDOTest.getSession(CDOTest.java:570)
	at es.modelum.test.cdo.CDOTest.testSave(CDOTest.java:135)
	at es.modelum.test.cdo.CDOTest.main(CDOTest.java:104)


I have already checked that the server is indeed at localhost:2036 and the repository name is correct. The database is MySQL and the cdo-server.xml file seems right, because the server starts and creates the tables in the database. Acceptor declaration in the config file is:

<acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
</acceptor>


I would appreciate some help, please.

Thanks in advance,

Javier.

[Updated on: Wed, 26 September 2012 15:25]

Report message to a moderator

Re: [CDO] Could not activate TCPClientConnector [message #924764 is a reply to message #924162] Thu, 27 September 2012 05:31 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Javier,

Your client-side code looks okay to me and, as you say that it works with one server configuration but not another one,
I tend to think that your other server is not set up properly. Hard to tell more without infos about that server setup.

Cheers
/Eike

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


Am 26.09.2012 17:12, schrieb Missing name Mising name:
> Hello.
>
> I am trying to connect to a CDO 4.1 Hibernate Server. I am using this code to create the CDOSession:
>
>
> CDONet4jSessionConfiguration sc = CDONet4jUtil.createNet4jSessionConfiguration();
> IManagedContainer container = IPluginContainer.INSTANCE;
> Net4jUtil.prepareContainer(container); // Register Net4j factories
> TCPUtil.prepareContainer(container); // Register TCP factories
> CDONet4jUtil.prepareContainer(container); // Register CDO factories
> sc.setConnector(Net4jUtil.getConnector(container, "tcp://" + CONNECTION_ADDRESS));
> sc.setRepositoryName(REPO_NAME);
> CDONet4jSession session = sc.openNet4jSession();
> session.getPackageRegistry().put(CorePackage.eNS_URI, CorePackage.eINSTANCE);
> session.getPackageRegistry().put(DOMPackage.eNS_URI, DOMPackage.eINSTANCE);
> session.getPackageRegistry().put(PrimitiveTypesPackage.eNS_URI, PrimitiveTypesPackage.eINSTANCE);
>
>
> It works with a regular CDO Server, but fails with CDO Hibernate, throwing the following Exception:
>
>
> Exception in thread "main" org.eclipse.net4j.util.lifecycle.LifecycleException: Could not activate
> TCPClientConnector[localhost:2.036]
> at org.eclipse.net4j.util.container.ManagedContainer.activateElement(ManagedContainer.java:327)
> at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:297)
> at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:273)
> at org.eclipse.net4j.Net4jUtil.getConnector(Net4jUtil.java:79)
> at org.eclipse.net4j.Net4jUtil.getConnector(Net4jUtil.java:96)
> at org.eclipse.net4j.Net4jUtil.getConnector(Net4jUtil.java:115)
> at es.modelum.test.cdo.CDOTest.getSession(CDOTest.java:570)
> at es.modelum.test.cdo.CDOTest.testSave(CDOTest.java:135)
> at es.modelum.test.cdo.CDOTest.main(CDOTest.java:104)
>
>
> I have already check that the server is indeed at localhost:2036 and the repository name is correct.
>
> I would appreciate some help, please.
>
> Thanks in advance,
>
> Javier.


Previous Topic:How to set EMF Model validation preferences through pluginCustomization ini file
Next Topic:Cross-domain references
Goto Forum:
  


Current Time: Fri Apr 19 06:27:18 GMT 2024

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

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

Back to the top