Sorry to waste your time, Bill. I got it sorted - user error. The test case I 
picked had a JSP calling the method directly .. long story.

Thanks,
Eric Stein

-----Original Message-----
From: Stein, Eric 
Sent: Wednesday, May 01, 2013 10:43 AM
To: resteasy-users@lists.sourceforge.net
Subject: RE: [Resteasy-users] ExceptionMapper not catching an exception

Ah, that I can do.

org.hibernate.HibernateException: Uhoh, better get Macco!
at 
com.mycompany.myproduct.tenant.api.Dashboard.getApplication(Dashboard.java:72)
at 
org.apache.jsp.site.dashboard.viewDashboard_jsp._jspService(viewDashboard_jsp.java:98)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at 
org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
at 
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
at java.lang.Thread.run(Thread.java:662)

-----Original Message-----
From: Bill Burke [mailto:bbu...@redhat.com]
Sent: Wednesday, May 01, 2013 10:37 AM
To: resteasy-users@lists.sourceforge.net
Subject: Re: [Resteasy-users] ExceptionMapper not catching an exception

I need a stack track of the exception thrown when you have an error. 
Not the boot log.

On 5/1/2013 10:20 AM, Stein, Eric wrote:
> Bill,
>    Thanks for taking a swing at this!
>
> Nope. This is through JBoss, so I set standalone.xml's logging to be:
>              <logger category="org.jboss.resteasy">
>                  <level name="ALL"/>
>              </logger>
>
> No stack trace at all. This is all the resteasy log messages I'm getting:
>
> 09:36:09,613 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Deploying
> javax.ws.rs.core.Application: class
> com.mycompany.myproject.services.rest.RestApplication
> 09:36:09,842 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.tenant.api.Notification from Application 
> javax.ws.rs.core.Application
> 09:36:09,843 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.tenant.api.Dashboard from Application 
> javax.ws.rs.core.Application
> 09:36:09,844 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.tenant.api.EntityType from Application 
> javax.ws.rs.core.Application
> 09:36:09,845 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.tenant.api.AuditLog from Application 
> javax.ws.rs.core.Application
> 09:36:09,846 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.tenant.api.Token from Application 
> javax.ws.rs.core.Application
> 09:36:09,847 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.admin.api.Notifications from Application 
> javax.ws.rs.core.Application
> 09:36:09,847 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.tenant.api.ReportView from Application 
> javax.ws.rs.core.Application
> 09:36:09,848 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.config.api.AuditLog from Application 
> javax.ws.rs.core.Application
> 09:36:09,849 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.config.api.MailTemplateDef from Application 
> javax.ws.rs.core.Application
> 09:36:09,850 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.admin.api.LicenseType from Application 
> javax.ws.rs.core.Application
> 09:36:09,851 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.config.api.AdhocQuery from Application 
> javax.ws.rs.core.Application
> 09:36:09,852 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.admin.api.Reports from Application 
> javax.ws.rs.core.Application
> 09:36:09,853 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.config.api.Environment from Application 
> javax.ws.rs.core.Application
> 09:36:09,854 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.admin.api.Tenant from Application 
> javax.ws.rs.core.Application
> 09:36:09,855 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.tenant.api.EntityRecord from Application 
> javax.ws.rs.core.Application
> 09:36:09,856 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.admin.api.AuditLog from Application 
> javax.ws.rs.core.Application
> 09:36:09,857 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.config.api.FieldGroupDef from Application 
> javax.ws.rs.core.Application
> 09:36:09,858 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.admin.api.Repository from Application 
> javax.ws.rs.core.Application
> 09:36:09,859 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.config.api.ValidationDef from Application 
> javax.ws.rs.core.Application
> 09:36:09,859 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.config.api.EntityDef from Application 
> javax.ws.rs.core.Application
> 09:36:09,860 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.tenant.api.PortletView from Application 
> javax.ws.rs.core.Application
> 09:36:09,861 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.tenant.api.Utility from Application 
> javax.ws.rs.core.Application
> 09:36:09,862 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.admin.api.Diagnostic from Application 
> javax.ws.rs.core.Application
> 09:36:09,863 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.admin.api.User from Application 
> javax.ws.rs.core.Application
> 09:36:09,864 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.config.api.PortletDef from Application 
> javax.ws.rs.core.Application
> 09:36:09,865 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.config.api.SecurityGroup from Application 
> javax.ws.rs.core.Application
> 09:36:09,866 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.admin.api.Statistic from Application 
> javax.ws.rs.core.Application
> 09:36:09,867 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.config.api.User from Application 
> javax.ws.rs.core.Application
> 09:36:09,868 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.config.api.License from Application 
> javax.ws.rs.core.Application
> 09:36:09,869 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.config.api.PageDef from Application 
> javax.ws.rs.core.Application
> 09:36:09,870 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.tenant.api.Report from Application 
> javax.ws.rs.core.Application
> 09:36:09,870 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.config.api.DatasourceDef from Application 
> javax.ws.rs.core.Application
> 09:36:09,871 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.admin.api.LicenseGenerator from Application 
> javax.ws.rs.core.Application
> 09:36:09,872 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.admin.api.ClientUser from Application 
> javax.ws.rs.core.Application
> 09:36:09,873 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.tenant.api.ReportRequest from Application 
> javax.ws.rs.core.Application
> 09:36:09,874 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.config.api.WorkflowDef from Application 
> javax.ws.rs.core.Application
> 09:36:09,875 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.admin.api.Settings from Application 
> javax.ws.rs.core.Application
> 09:36:09,876 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.tenant.api.EntityView from Application 
> javax.ws.rs.core.Application
> 09:36:09,877 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.admin.api.Services from Application 
> javax.ws.rs.core.Application
> 09:36:09,878 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.admin.api.Grants from Application 
> javax.ws.rs.core.Application
> 09:36:09,879 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.admin.api.LDAPService from Application 
> javax.ws.rs.core.Application
> 09:36:09,879 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.config.api.Property from Application 
> javax.ws.rs.core.Application
> 09:36:09,880 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.config.api.TenantGrant from Application 
> javax.ws.rs.core.Application
> 09:36:09,881 INFO  [org.jboss.resteasy.spi.ResteasyDeployment]
> (http-localhost-127.0.0.1-8080-1) Adding singleton resource 
> com.mycompany.myproject.tenant.api.Notes from Application 
> javax.ws.rs.core.Application
> 09:36:10,140 DEBUG [org.jboss.resteasy.core.SynchronousDispatcher]
> (http-localhost-127.0.0.1-8080-2) PathInfo: 
> /tenant/utility/announcement
> 09:36:10,140 DEBUG [org.jboss.resteasy.core.SynchronousDispatcher]
> (http-localhost-127.0.0.1-8080-6) PathInfo: /tenant/record/list
> 09:36:10,140 DEBUG [org.jboss.resteasy.core.SynchronousDispatcher]
> (http-localhost-127.0.0.1-8080-1) PathInfo: /tenant/notification/list
>
> -----Original Message-----
> From: Bill Burke [mailto:bbu...@redhat.com]
> Sent: Wednesday, May 01, 2013 10:08 AM
> To: resteasy-users@lists.sourceforge.net
> Subject: Re: [Resteasy-users] ExceptionMapper not catching an 
> exception
>
> Do you receive any stack trace at all?  This might help me narrow things down 
> further.
>
> On 5/1/2013 9:45 AM, Stein, Eric wrote:
>> Hi,
>>
>>     Im trying to trap an exception with an ExceptionMapper, but it 
>> seems to not be triggering. I have the mapper defined as a provider:
>>
>> @Provider
>>
>> *public**final**class*HibernateExceptionMapper
>>
>> *implements*ExceptionMapper<HibernateException> {
>>
>> The mapper is returned from my Application.java's getSingletons() 
>> call, but it's not showing up in the list of "added resources". That 
>> is, in the log file, there is no line telling me that the singleton 
>> resource was added from my Application. Also, the mapper is not 
>> catching exceptions thrown from my endpoints. Other resources
>> (endpoints) are all being logged and working correctly.
>>
>> Can anybody give me some insight as to what might be wrong?
>>
>> Thanks,
>>
>> Eric Stein
>>
>>
>>
>> ---------------------------------------------------------------------
>> -
>> -------- Introducing AppDynamics Lite, a free troubleshooting tool 
>> for Java/.NET Get 100% visibility into your production application - 
>> at no cost.
>> Code-level diagnostics for performance bottlenecks with <2% overhead 
>> Download for free and get started troubleshooting in minutes.
>> http://p.sf.net/sfu/appdyn_d2d_ap1
>>
>>
>>
>> _______________________________________________
>> Resteasy-users mailing list
>> Resteasy-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>>
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
> ----------------------------------------------------------------------
> -------- Introducing AppDynamics Lite, a free troubleshooting tool for 
> Java/.NET Get 100% visibility into your production application - at no cost.
> Code-level diagnostics for performance bottlenecks with <2% overhead Download 
> for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap1
> _______________________________________________
> Resteasy-users mailing list
> Resteasy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>
> ----------------------------------------------------------------------
> -------- Introducing AppDynamics Lite, a free troubleshooting tool for 
> Java/.NET Get 100% visibility into your production application - at no 
> cost.
> Code-level diagnostics for performance bottlenecks with <2% overhead 
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap1
> _______________________________________________
> Resteasy-users mailing list
> Resteasy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>

--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 
100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead Download 
for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to