jyri.heinonen Posted December 12, 2018 Share Posted December 12, 2018 We have been trying JRS 7.1 (with integrated Tomcat and PSQL) with Dremio (https://www.dremio.com) via JDBC but hit constantly problems with it. The last issue is the one we just can't get around and we were wondering if anybody has seen anything similar.When trying test connection when setting JDBC datasource fro Dremio, the test fails with connection failed error in catalina.out:2018-12-12 11:21:09,156 ERROR GenericExceptionMapper,http-nio-8081-exec-2:51 - Unexpected error occursjava.lang.NullPointerException at com.jaspersoft.jasperserver.remote.connection.jdbc.JdbcConnector.testConnection(JdbcConnector.java:86) at com.jaspersoft.jasperserver.remote.connection.jdbc.ClientJdbcConnector.testConnection(ClientJdbcConnector.java:49) at com.jaspersoft.jasperserver.remote.connection.jdbc.JdbcContextStrategy.createContext(JdbcContextStrategy.java:51) at com.jaspersoft.jasperserver.remote.connection.jdbc.JdbcContextStrategy.createContext(JdbcContextStrategy.java:40) at com.jaspersoft.jasperserver.remote.connection.ContextsManager.createConnection(ContextsManager.java:94) at com.jaspersoft.jasperserver.jaxrs.connection.ConnectionsJaxrsService.createConnection(ConnectionsJaxrsService.java:100) at com.jaspersoft.jasperserver.jaxrs.connection.ConnectionsJaxrsService$$FastClassBySpringCGLIB$$b9db4938.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:701) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:51) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:51) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:633) at com.jaspersoft.jasperserver.jaxrs.connection.ConnectionsJaxrsService$$EnhancerBySpringCGLIB$$d3a77c29.createConnection(<generated>) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) ...and so forth.The only change done to JRS config was setting defaultAutoCommit property to True, as Dremio's JDBC driver does nto work with default False setting.The same NullPointerException happens also when trying to use JNDI. However, the driver work fine with Studio, so somehow this point either to issue either in Tomcat or in JRS. Any idea how to go on from here? Link to comment Share on other sites More sharing options...
vchiem Posted December 14, 2018 Share Posted December 14, 2018 Not sure where you copied the driver file to but check that you copied it to these locations on the server:jasperserver-proWEB-INFlib<tomcat>libIf the test button worked in Studio, compare the URL connection string and ensure the same driver is copied to the server. Link to comment Share on other sites More sharing options...
jyri.heinonen Posted December 17, 2018 Author Share Posted December 17, 2018 The driver was copied to both directories and wee also used the GUI option to deploy driver. JRS clearly found the driver, as it gave the exception defined by the driver when using with defaultAutoCommit = False. Link to comment Share on other sites More sharing options...
jhmjesus Posted September 13, 2019 Share Posted September 13, 2019 I´m using the jasperserver 7.2.0.Edit applicationContext.xml and find "jdbcDataSourceServiceFactory" bean declaration.Add dremio class driver item named "com.dremio.jdbc.Driver" in the "autoCommitUnsupportedDrivers" property values: <property name="autoCommitUnsupportedDrivers"> <set> <value>com.simba.cassandra.jdbc4.Driver</value> <value>com.simba.impala.jdbc4.Driver</value> <value>com.simba.spark.jdbc4.Driver</value> <value>com.simba.googlebigquery.jdbc41.Driver</value> <value>com.dremio.jdbc.Driver</value> </set> </property>[/code]Restart the tomcat. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now