Genereate reports from REST java in jboss 7 throwing errors

0

Hi,

Im trying to integrate jasper community edition in my application, i have jboss 7 server and i am using java 8.

OperationResult<InputStream> result = session.reportingService()
                  .report("SOME REPORT PATH")
                  .prepareForRun(ReportOutputFormat.HTML, 1)
                  .parameter("year", "2018")
                   .run();

when i try to run the above code, it is getting executed in Tomcat 8 and i am able to see my reports also,

but, somhow the same is not working in jboss 7,

i am currently using "jrs-rest-java-client-6.2.2-jar-with-dependencies.jar"

Following are the errors im geting in jboss console

[stderr] (default task-2) java.lang.RuntimeException: java.lang.RuntimeException: RESTEASY003940: Unable to instantiate MessageBodyReader
[stderr] (default task-2)     at org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuiltin.java:41)
[stderr] (default task-2)     at org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder.getProviderFactory(ResteasyClientBuilder.java:334)
[stderr] (default task-2)     at org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder.build(ResteasyClientBuilder.java:367)
[stderr] (default task-2)     at org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder.build(ResteasyClientBuilder.java:35)
[stderr] (default task-2)     at com.jaspersoft.jasperserver.jaxrs.client.core.SessionStorage.init(SessionStorage.java:106)
[stderr] (default task-2)     at com.jaspersoft.jasperserver.jaxrs.client.core.SessionStorage.<init>(SessionStorage.java:77)
[stderr] (default task-2)     at com.jaspersoft.jasperserver.jaxrs.client.core.JasperserverRestClient.authenticate(JasperserverRestClient.java:75)
[stderr] (default task-2)     at com.jaspersoft.jasperserver.jaxrs.client.core.JasperserverRestClient.authenticate(JasperserverRestClient.java:50)
[stderr] (default task-2)     at com.jasper.controller.JasperController.jaspertest(JasperController.java:33)
[stderr] (default task-2)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[stderr] (default task-2)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[stderr] (default task-2)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[stderr] (default task-2)     at java.lang.reflect.Method.invoke(Unknown Source)
[stderr] (default task-2)     at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
[stderr] (default task-2)     at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
[stderr] (default task-2)     at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
[stderr] (default task-2)     at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
[stderr] (default task-2)     at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
[stderr] (default task-2)     at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
[stderr] (default task-2)     at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
[stderr] (default task-2)     at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
[stderr] (default task-2)     at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
[stderr] (default task-2)     at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
[stderr] (default task-2)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
[stderr] (default task-2)     at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
[stderr] (default task-2)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
[stderr] (default task-2)     at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
[stderr] (default task-2)     at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
[stderr] (default task-2)     at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
[stderr] (default task-2)     at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
[stderr] (default task-2)     at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[stderr] (default task-2)     at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
[stderr] (default task-2)     at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
[stderr] (default task-2)     at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[stderr] (default task-2)     at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
[stderr] (default task-2)     at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
[stderr] (default task-2)     at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
[stderr] (default task-2)     at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
[stderr] (default task-2)     at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
[stderr] (default task-2)     at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
[stderr] (default task-2)     at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[stderr] (default task-2)     at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
[stderr] (default task-2)     at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[stderr] (default task-2)     at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
[stderr] (default task-2)     at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[stderr] (default task-2)     at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
[stderr] (default task-2)     at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
[stderr] (default task-2)     at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
[stderr] (default task-2)     at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
[stderr] (default task-2)     at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
[stderr] (default task-2)     at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
[stderr] (default task-2)     at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
[stderr] (default task-2)     at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
[stderr] (default task-2)     at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
[stderr] (default task-2)     at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
[stderr] (default task-2)     at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
[stderr] (default task-2)     at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
[stderr] (default task-2)     at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
[stderr] (default task-2)     at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
[stderr] (default task-2)     at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
[stderr] (default task-2)     at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)
[stderr] (default task-2)     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[stderr] (default task-2)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[stderr] (default task-2)     at java.lang.Thread.run(Unknown Source)
 
[stderr] (default task-2) Caused by: java.lang.RuntimeException: RESTEASY003940: Unable to instantiate MessageBodyReader
 
[stderr] (default task-2)     at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1465)
[stderr] (default task-2)     at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1396)
[stderr] (default task-2)     at org.jboss.resteasy.plugins.providers.RegisterBuiltin.registerProviders(RegisterBuiltin.java:77)
[stderr] (default task-2)     at org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuiltin.java:37)
[stderr] (default task-2)     ... 63 more
 
[stderr] (default task-2) Caused by: java.lang.RuntimeException: RESTEASY003325: Failed to construct public com.owlike.genson.ext.jaxrs.GensonJsonConverter(javax.ws.rs.ext.Providers)
 
[stderr] (default task-2)     at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:162)
[stderr] (default task-2)     at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2298)
[stderr] (default task-2)     at org.jboss.resteasy.spi.ResteasyProviderFactory.addMessageBodyReader(ResteasyProviderFactory.java:809)
[stderr] (default task-2)     at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1460)
[stderr] (default task-2)     ... 66 more
 
[stderr] (default task-2) Caused by: org.jboss.resteasy.spi.LoggableFailure: RESTEASY003880: Unable to find contextual data of type: javax.ws.rs.ext.Providers
 
[stderr] (default task-2)     at org.jboss.resteasy.core.ContextParameterInjector$GenericDelegatingProxy.invoke(ContextParameterInjector.java:62)
[stderr] (default task-2)     at com.sun.proxy.$Proxy45.getContextResolver(Unknown Source)
[stderr] (default task-2)     at com.owlike.genson.ext.jaxrs.GensonJsonConverter.<init>(GensonJsonConverter.java:59)
[stderr] (default task-2)     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[stderr] (default task-2)     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
[stderr] (default task-2)     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
[stderr] (default task-2)     at java.lang.reflect.Constructor.newInstance(Unknown Source)
[stderr] (default task-2)     at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:150)
[stderr] (default task-2)     ... 69 more

Anybody know whats wrong?? Thnaks in advance

amithbsrao's picture
Joined: May 17 2018 - 5:33am
Last seen: 10 months 1 week ago

0 Answers:

No answers yet
Feedback
randomness