mira esta FAQ:
http://www.forosdelweb.com/showpost....97&postcount=9
cuando digo relanzar, me refiero que no haces nada con el error, simplemente lo lanzas.... ej: puedes poner esto en el main()
public static void main(String[] arg)
throws Exception{
}
con esa instruccion, si se ocaciona un error, simplemente lo lanzas, y entonces se imprimira en pantalla, algo como esto:
Código:
oracle.toplink.exceptions.DescriptorException.nullPointerWhileGettingValueThruInstanceVariableAccessor(DescriptorException.java:1204)
at oracle.toplink.internal.descriptors.InstanceVariableAttributeAccessor.getAttributeValueFromObject(InstanceVariableAttributeAccessor.java:64)
at oracle.toplink.mappings.DatabaseMapping.getAttributeValueFromObject(DatabaseMapping.java:352)
at oracle.toplink.mappings.foundation.AbstractDirectMapping.buildExpression(AbstractDirectMapping.java:156)
at oracle.toplink.internal.descriptors.ObjectBuilder.buildExpressionFromExample(ObjectBuilder.java:315)
at oracle.toplink.internal.queryframework.QueryByExampleMechanism.buildSelectionCriteria(QueryByExampleMechanism.java:66)
at oracle.toplink.queryframework.DatabaseQuery.buildSelectionCriteria(DatabaseQuery.java:283)
at oracle.toplink.queryframework.ObjectLevelReadQuery.prePrepare(ObjectLevelReadQuery.java:1491)
at oracle.toplink.queryframework.ReadObjectQuery.prePrepare(ReadObjectQuery.java:556)
at oracle.toplink.queryframework.ObjectLevelReadQuery.checkPrePrepare(ObjectLevelReadQuery.java:569)
at oracle.toplink.queryframework.ObjectLevelReadQuery.checkEarlyReturn(ObjectLevelReadQuery.java:498)
at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:544)
at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:768)
at oracle.toplink.queryframework.ReadObjectQuery.execute(ReadObjectQuery.java:370)
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:2062)
at oracle.toplink.publicinterface.Session.executeQuery(Session.java:981)
at oracle.toplink.publicinterface.Session.executeQuery(Session.java:938)
at com.cumquatit.demo.service.dao.wachtbestand.toplink.ToplinkSignaleringInWachtbestandDAO.findSignaleringBySomeId(ToplinkSignaleringInWachtbestandDAO.java:45)
at com.cumquatit.demo.service.dao.wachtbestand.toplink.ToplinkSignaleringInWachtbestandDAOTest.testFindSignaleringBySomeId(ToplinkSignaleringInWachtbestandDAOTest.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.jav
en cambio, si en lugar de lanzarlas las capturas, puedes mandar algun mensaje, te recuperas del error, y tu aplicacion seguira corriendo.