Skip to main content



      Home
Home » Modeling » EMF » [CDO] more detailed logs when CDOSession is null...
[CDO] more detailed logs when CDOSession is null... [message #1385547] Mon, 09 June 2014 05:09 Go to next message
Eclipse UserFriend
Sometimes i have an error similar like this:

java.lang.NullPointerException
...my code...

when I debugging it, it is a problem with CDOSession, cdoSession is null...

Exist any possibility to launch more detailed logs for cdo, I want to know why cdosession is null...


regards
Arek
Re: [CDO] more detailed logs when CDOSession is null... [message #1385551 is a reply to message #1385547] Mon, 09 June 2014 05:57 Go to previous messageGo to next message
Eclipse UserFriend
Am 09.06.2014 11:10, schrieb Arek Kowal:
> Sometimes i have an error similar like this:
>
> java.lang.NullPointerException
> ..my code...
>
> when I debugging it, it is a problem with CDOSession, cdoSession is null...
I quickly checked that nowhere in CDO's code we have a variable/field called "cdoSession". Our naming convention implies
"session". So it must be your own code, which you didn't include in the stack trace. So I can't possibly comment on it.


>
> Exist any possibility to launch more detailed logs for cdo, I want to know why cdosession is null...
CDO uses Eclipse's tracing framework even in standalone runs. You can influence it either through the Tracing page in
your launch configs or via a .options file in your separate deployment.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] more detailed logs when CDOSession is null... [message #1385557 is a reply to message #1385551] Mon, 09 June 2014 07:06 Go to previous messageGo to next message
Eclipse UserFriend
thank you, but I haven't information from cdo code in logs... it is surprising for me, you catch all exceptions in your code (without any stack trace or something like that Wink ) ?

my code:

cdoSession = STH.openSession();


public CDOSession openSession()
{
CDOSession session = configuration.openNet4jSession();

for (EPackage ePackage : getEPackages()) {
session.getPackageRegistry().putEPackage(ePackage);
}

return session;
}

private void init()
{
...

OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
OMPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOLE);

IManagedContainer container = ContainerUtil.createContainer();
Net4jUtil.prepareContainer(container);
TCPUtil.prepareContainer(container);
CDONet4jUtil.prepareContainer(container);
container.activate();

IConnector connector = TCPUtil.getConnector(container, servedrAddress));

configuration = CDONet4jUtil.createNet4jSessionConfiguration();
configuration.setConnector(connector);
configuration.setRepositoryName(repoName);
}
etc.

[Updated on: Mon, 09 June 2014 07:39] by Moderator

Re: [CDO] more detailed logs when CDOSession is null... [message #1385573 is a reply to message #1385557] Mon, 09 June 2014 11:33 Go to previous message
Eclipse UserFriend
Am 09.06.2014 13:06, schrieb Arek Kowal:
> thank you, but I haven't information from cdo code in logs...
Please read https://wiki.eclipse.org/FAQ_for_CDO_and_Net4j#How_can_I_enable_tracing.3F and add the following:

OMPlatform.INSTANCE.setDebugging(true);

Severe exceptions don't require that, though, as they're always logged and not just traced conditionally.

> it is surprising for me, you catch all exception in your code (without any stack trace or something like that ;) ) ?
That's totally new to me. Can you please point me to the code that swallows an exception?

>
> my code:
>
> public CDOSession openSession()
> {
> CDOSession session = configuration.openNet4jSession();
> for (EPackage ePackage : getEPackages()) {
> session.getPackageRegistry().putEPackage(ePackage);
> }
> return session;
> }
>
> private void init()
> { ...
> OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
> OMPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOLE);
>
> IManagedContainer container = ContainerUtil.createContainer();
> Net4jUtil.prepareContainer(container);
> TCPUtil.prepareContainer(container);
> CDONet4jUtil.prepareContainer(container);
> container.activate();
>
> IConnector connector = TCPUtil.getConnector(container, servedrAddress));
>
> configuration = CDONet4jUtil.createNet4jSessionConfiguration();
> configuration.setConnector(connector);
> configuration.setRepositoryName(repoName);
> }
> etc.
Where is the code that refers to this variable/field "cdoSession"?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Previous Topic:[CDO] Critical issues with CDO Workspaces
Next Topic:missing emf icons for product export
Goto Forum:
  


Current Time: Mon Jul 07 08:24:46 EDT 2025

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

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

Back to the top