[Resteasy-users] java.lang.NoSuchMethodError: javax.validation.Configuration.getBootstrapConfiguration()Ljavax/validation/BootstrapConfiguration
HI, all. This is a NOSuchMethodError occurred with resteasy 3.0.2, 3.0.5, my local web server was tomcat 7.9, jdk: oracle jdk 7. The scraps of web.xml: servlet servlet-nameResteasy/servlet-name servlet-class org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher /servlet-class /servlet servlet-mapping servlet-nameResteasy/servlet-name url-pattern/rest/*/url-pattern /servlet-mapping context-param param-nameresteasy.servlet.mapping.prefix/param-name param-value/rest/param-value /context-param context-param param-nameresteasy.scan.resources/param-name param-valuetrue/param-value /context-param The detail of exception stack was: SEVERE: Exception starting filter org.jboss.resteasy.plugins.server.servlet. Filter30Dispatcher java.lang.NoSuchMethodError: javax.validation.Configuration.getBootstrapConfiguration()Ljavax/validation/ BootstrapConfiguration; at org.jboss.resteasy.plugins.validation.ValidatorContextResolver.getContext(Va lidatorContextResolver.java:73) at org.jboss.resteasy.plugins.validation.ValidatorContextResolver.getContext(Va lidatorContextResolver.java:30) at org.jboss.resteasy.spi.ResteasyProviderFactory$1.getContext(ResteasyProvider Factory.java:2154) at org.jboss.resteasy.core.ResourceMethodInvoker.init(ResourceMethodInvoker.j ava:115) at org.jboss.resteasy.core.ResourceMethodRegistry.processMethod(ResourceMethodR egistry.java:280) at org.jboss.resteasy.core.ResourceMethodRegistry.register(ResourceMethodRegist ry.java:251) at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMe thodRegistry.java:221) at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMe thodRegistry.java:193) at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMe thodRegistry.java:179) at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMe thodRegistry.java:156) at org.jboss.resteasy.core.ResourceMethodRegistry.addPerRequestResource(Resourc eMethodRegistry.java:75) at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.ja va:400) at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:241) at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher. init(ServletContainerDispatcher.java:112) at org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.init(FilterDispat cher.java:42) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilte rConfig.java:281) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter Config.java:262) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterCon fig.java:107) at org.apache.catalina.core.StandardContext.filterStart(StandardContext. java:4746) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java: 5399) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase. java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase. java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor. java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6 15) at java.lang.Thread.run(Thread.java:722) 八月 13, 2013 3:24:04 下午 org.apache.catalina.core.StandardContext startInternal SEVERE: Error filterStart Who could help me ? any advice will be appropriated. Best Regards. Rixin Liu -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with 2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users
Re: [Resteasy-users] java.lang.NoSuchMethodError: javax.validation.Configuration.getBootstrapConfiguration()Ljavax/validation/BootstrapConfiguration
remove the validation jars from your deployment: *validator*.jar On 8/13/2013 3:25 AM, 刘日新 wrote: HI, all. This is a NOSuchMethodError occurred with resteasy 3.0.2, 3.0.5, my local web server was tomcat 7.9, jdk: oracle jdk 7. The scraps of web.xml: servlet servlet-name_Resteasy_/servlet-name servlet-class org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher /servlet-class /servlet servlet-mapping servlet-name_Resteasy_/servlet-name url-pattern/rest/*/url-pattern /servlet-mapping context-param param-nameresteasy.servlet.mapping.prefix/param-name param-value/rest/param-value /context-param context-param param-nameresteasy.scan.resources/param-name param-valuetrue/param-value /context-param The detail of exception stack was: SEVERE: Exception starting filter org.jboss.resteasy.plugins.server.servlet.Filter30Dispatcher java.lang.NoSuchMethodError: javax.validation.Configuration.getBootstrapConfiguration()Ljavax/validation/BootstrapConfiguration; at org.jboss.resteasy.plugins.validation.ValidatorContextResolver.getContext(_ValidatorContextResolver.java:73_) at org.jboss.resteasy.plugins.validation.ValidatorContextResolver.getContext(_ValidatorContextResolver.java:30_) at org.jboss.resteasy.spi.ResteasyProviderFactory$1.getContext(_ResteasyProviderFactory.java:2154_) at org.jboss.resteasy.core.ResourceMethodInvoker.init(_ResourceMethodInvoker.java:115_) at org.jboss.resteasy.core.ResourceMethodRegistry.processMethod(_ResourceMethodRegistry.java:280_) at org.jboss.resteasy.core.ResourceMethodRegistry.register(_ResourceMethodRegistry.java:251_) at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(_ResourceMethodRegistry.java:221_) at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(_ResourceMethodRegistry.java:193_) at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(_ResourceMethodRegistry.java:179_) at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(_ResourceMethodRegistry.java:156_) at org.jboss.resteasy.core.ResourceMethodRegistry.addPerRequestResource(_ResourceMethodRegistry.java:75_) at org.jboss.resteasy.spi.ResteasyDeployment.registration(_ResteasyDeployment.java:400_) at org.jboss.resteasy.spi.ResteasyDeployment.start(_ResteasyDeployment.java:241_) at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(_ServletContainerDispatcher.java:112_) at org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.init(_FilterDispatcher.java:42_) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(_ApplicationFilterConfig.java:281_) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(_ApplicationFilterConfig.java:262_) at org.apache.catalina.core.ApplicationFilterConfig.init(_ApplicationFilterConfig.java:107_) at org.apache.catalina.core.StandardContext.filterStart(_StandardContext.java:4746_) at org.apache.catalina.core.StandardContext.startInternal(_StandardContext.java:5399_) at org.apache.catalina.util.LifecycleBase.start(_LifecycleBase.java:150_) at org.apache.catalina.core.ContainerBase$StartChild.call(_ContainerBase.java:1559_) at org.apache.catalina.core.ContainerBase$StartChild.call(_ContainerBase.java:1549_) at java.util.concurrent.FutureTask$Sync.innerRun(_FutureTask.java:334_) at java.util.concurrent.FutureTask.run(_FutureTask.java:166_) at java.util.concurrent.ThreadPoolExecutor.runWorker(_ThreadPoolExecutor.java:1145_) at java.util.concurrent.ThreadPoolExecutor$Worker.run(_ThreadPoolExecutor.java:615_) at java.lang.Thread.run(_Thread.java:722_) 八月13, 2013 3:24:04 下午org.apache.catalina.core.StandardContext startInternal SEVERE: Error filterStart Who could help me ? any advice will be appropriated. Best Regards. Rixin Liu -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with 2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk ___ 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 -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with 2% overhead. Download for free and get started troubleshooting in minutes.
[Resteasy-users] NoClassDefFoundError: Unable to load builtin provider: org.jboss.resteasy.security.smime.MultipartSignedReader
In WildFly 8.0.0.Alpha4 I upgraded to RESTEasy 3.0.3 and get the following warning. Any hint is appreciated. WARN [org.jboss.resteasy.plugins.providers.RegisterBuiltin] NoClassDefFoundError: Unable to load builtin provider: org.jboss.resteasy.security.smime.MultipartSignedReader -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with 2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk ___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users
[Resteasy-users] Why is GenericEntity an abstract class?
When I need an instance of GenericEntity I've to create an object of an anonymous class derived from GenericEntity. Therefore, I'm wondering why GenericEntity isn't a concrete class? Any hint is appreciated. Regards, Juergen -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with 2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk ___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users
Re: [Resteasy-users] Unit Testing Exception Mappers
Hi Actually I found the registerProvider factory to do what I wanted. Regards, Adam On Fri, Aug 9, 2013 at 11:14 AM, Bill Burke bbu...@redhat.com wrote: Create a a ResteasyDeployment, add necessary components to it, call start() get the dispatch, create the mocks. On 8/9/2013 10:51 AM, Adam Hotz wrote: Hi I'm using RestEasy to implement a web service. I was previously using the resteasy mock objects to mock requests and also to test my custom exception mappers. I was testing the mappers by adding them to a mock dispatcher as suggested by the answer to this stack overflow question: http://stackoverflow.com/questions/5866695/resteasy-server-mock-exceptionmapper-not-found i.e |dispatcher.getProviderFactory().addExceptionMapper(SomeExceptionMapper.class);| However a recent patch ( https://github.com/resteasy/Resteasy/commit/16721d16b235ea7a6918ae8bdecb04b73bd59204 ) has changed the access modifier of addExceptionMapper from public to protected, which means that I can no longer do this. Is there a recommended alternative for including ExceptionMappers in my Unit Tests? Regards, Adam Hotz -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with 2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk ___ 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 -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with 2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk ___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with 2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users
Re: [Resteasy-users] Why is GenericEntity an abstract class?
THe sole purpose of GenericEntity (and GenericType) is Java type erasure. Take this example: ListCustomer list = ...; return Response.ok(list).build(); With this, Resteasy has no clue about the generic type of list. All it knows is that it is a java.util.List. Java just doesn't let you derive the generic type at runtime. GenericEntity/Type is a hack. Generic type information of extended superclasses *IS* stored and remembered by the java runtime. So this anonymous class is using this trick to obtain generic type information. Follow now? On 8/13/2013 10:55 AM, Juergen Zimmermann wrote: When I need an instance of GenericEntity I've to create an object of an anonymous class derived from GenericEntity. Therefore, I'm wondering why GenericEntity isn't a concrete class? Any hint is appreciated. Regards, Juergen -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with 2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk ___ 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 -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with 2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk ___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users
Re: [Resteasy-users] Why is GenericEntity an abstract class?
Got it. Thank you very much, Bill! -Ursprüngliche Nachricht- Von: Bill Burke [mailto:bbu...@redhat.com] Gesendet: Dienstag, 13. August 2013 17:07 An: resteasy-users@lists.sourceforge.net Betreff: Re: [Resteasy-users] Why is GenericEntity an abstract class? THe sole purpose of GenericEntity (and GenericType) is Java type erasure. Take this example: ListCustomer list = ...; return Response.ok(list).build(); With this, Resteasy has no clue about the generic type of list. All it knows is that it is a java.util.List. Java just doesn't let you derive the generic type at runtime. GenericEntity/Type is a hack. Generic type information of extended superclasses *IS* stored and remembered by the java runtime. So this anonymous class is using this trick to obtain generic type information. Follow now? On 8/13/2013 10:55 AM, Juergen Zimmermann wrote: When I need an instance of GenericEntity I've to create an object of an anonymous class derived from GenericEntity. Therefore, I'm wondering why GenericEntity isn't a concrete class? Any hint is appreciated. Regards, Juergen -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with 2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.c lktrk ___ 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 -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with 2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk ___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with 2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk ___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users