Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Unable to login with security enabled([CDO] Unable to login with security enabled)
[CDO] Unable to login with security enabled [message #1711595] Sat, 17 October 2015 21:49
Greg Babcock is currently offline Greg BabcockFriend
Messages: 39
Registered: October 2012
Member
I have enabled security for the CDO Server and have created a user and a session for that user with the CDO workbench. When I try to create a session from my application I get the following exception:

Caused by: org.eclipse.net4j.util.lifecycle.LifecycleException: Could not activate TCPClientConnector[localhost:2,036]
at org.eclipse.net4j.util.container.ManagedContainer.activateElement(ManagedContainer.java:355)
at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:325)
at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:301)
at org.eclipse.net4j.tcp.TCPUtil.getConnector(TCPUtil.java:65)
at com.peacemkr.config.app.emf.DomainImpl.openSession(DomainImpl.java:170)
at com.peacemkr.config.app.emf.DomainImpl.getSession(DomainImpl.java:71)

My understanding from Tom Schindl's tutorial is that adding a credentials provider before creating a session was all that had to be done before creating a session. Did I miss something?

This is the code I am using to create the session.

private CDONet4jSession openSession(String repoName) {
PasswordCredentialsProvider credentialsProvider = new PasswordCredentialsProvider("user", "password");
IPluginContainer.INSTANCE.addPostProcessor(new ConnectorCredentialsInjector("localhost:2036",credentialsProvider));

final IConnector connector =TCPUtil.getConnector(IPluginContainer.INSTANCE, "localhost:2036");

CDONet4jSessionConfiguration config = CDONet4jUtil
.createNet4jSessionConfiguration();
config.setConnector(connector);
config.setRepositoryName(repoName);

CDONet4jSession session = config.openNet4jSession();

session.addListener(new LifecycleEventAdapter() {
@Override
protected void onDeactivated(ILifecycle lifecycle) {
connector.close();
System.out.println("CDO Session Deactivated");
}
});
return session;
}

Thank You,

Greg Babcock
Previous Topic:[CDO] query on a view other than latest
Next Topic:problem when instantiating in emf
Goto Forum:
  


Current Time: Wed Oct 23 13:07:32 GMT 2019

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

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

Back to the top