[CDO] more detailed logs when CDOSession is null... [message #1385547] |
Mon, 09 June 2014 05:09  |
Eclipse User |
|
|
|
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 #1385573 is a reply to message #1385557] |
Mon, 09 June 2014 11:33  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.08005 seconds