cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Durchholz, Joachim" <Joachim.Durchh...@hennig-fahrzeugteile.de>
Subject RE: logging first steps
Date Wed, 15 Feb 2012 14:30:23 GMT
Your application seems to crash on the first commit attempt: 

> 15.02.2012 14:16:55 eu.ngong.ehour.tracking.impl.Run run
> SCHWERWIEGEND: unexpected exception: class org.apache.cayenne.CayenneRuntimeException
[v.3.1M3 Sep 12 2011 19:59:45] Commit Exception Exception in thread "main" eu.ngong.ehour.tracking.TrackingException:
> unexpected exception: class org.apache.cayenne.CayenneRuntimeException
> [v.3.1M3 Sep 12 2011 19:59:45] Commit Exception
> 	at eu.ngong.ehour.tracking.impl.Run.run(Run.java:114)
> 	at eu.ngong.ehour.tracking.Main.main(Main.java:15)

The culprit is probably on eu.ngong.ehour.tracking.impl.Run.run(Run.java:114).
The exception trace seems incomplete, I'm not seeing the trace of the CayenneRuntimeException.
If you have code like

try {
  ...
} catch (Exception e) {
  throw TrackingException ("Unexpected exception: " + e);
}

this is the kind of unhelpful trace your're getting. You should probably do

try {
  ...
} catch (Exception e) {
  throw TrackingException ("Unexpected exception", e);
}

Then your TrackingException will be "chained" with the original exception, and you'll get
a trace for your exception, a line of "caused by:", and the full trace of the CayenneRuntimeException,
which would then allow people to take a look where this originated from inside Cayenne and
give hints what could be wrong.

(This is probably unrelated to the logging problems you're experiencing.)

Mime
View raw message