Reputation: 1596
I would like to do something like here: http://statistics.netbeans.org/analytics/detail.do?id=204003 for my application
Where netbeans team automatically know if the report they gets is some new bug or if it has duplicates.
Suppose I have exception as below.
Caused by: javax.ejb.EJBException
at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:3894)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3794)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3596)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1379)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:205)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:83)
at com.sun.proxy.$Proxy99.getProjectsBySearchCriteria(Unknown Source)
^
here is $Proxy99 I told about
at my.project.crm.web.controllers.contacts.ContactDetailsController.updateUndeletedProjectCollection(ContactDetailsController.java:2666)
at my.project.crm.web.controllers.contacts.ContactDetailsController.init(ContactDetailsController.java:489)
... 83 more
Caused by: java.lang.NullPointerException
at my.project.utils.security.UserRights.(UserRights.java:182)
at my.project.utils.security.AbstractSecurity.(AbstractSecurity.java:26)
at my.project.utils.security.ProjectSecurity.(ProjectSecurity.java:138)
at my.project.crm.enterprise.facades.projects.ProjectFacadeImpl.getProjectsBySearchCriteria(ProjectFacadeImpl.java:637)
at sun.reflect.GeneratedMethodAccessor6373.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1011)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:175)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2920)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4011)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:197)
... 87 more
I guess I could make some kind of signature with these few steps:
This way I get some kind of signature of bug in my application
Is there some easier way to do it?
Upvotes: 2
Views: 957
Reputation: 7863
I don't know if this question can have a single correct answer but here are some thoughts about your points:
Finally I'd say take a look at the Java API for Throwable
and Exception
, espacially getStackTrace()
. I'm not into it myself but maybe you can use it to edit and compare your stacktrace without having to do complex string magic.
Upvotes: 3