You are not logged in.
Hello,
after upgrading ReportServer from version 3.7 to 4.5 i'm having some trouble connecting to Microsoft SQLServer.
I'using Tomcat 9.0.71 and, of course, Java 11.
I'm using the same jdbc driver i'm using before the upgrade (mssql-jdbc-9.4.0.jre11.jar in /webapps/reportserver/WEB-INF/lib/) and the same url string connection. Ip server, port, username and password are correct.
This is the url string:
jdbc:sqlserver://;serverName=10.11.14.158;port=6443;databaseName=PITECO
When I try to Test Connection to db, into the Administration menu, the test fail after a long timeout.
I'v got the following exception:
net.datenwerke.rs.adminutils.client.datasourcetester.ConnectionTestFailedException: TimeoutException: A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePool@18311e35 -- timeout at awaitAvailable()<br> at net.datenwerke.rs.adminutils.service.datasourcetester.DatasourceTesterServiceImpl.testConnection(DatasourceTesterServiceImpl.java:59)<br> at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl.testConnection(DatasourceTesterRPCServiceImpl.java:52)<br> at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$1778005090.GUICE$TRAMPOLINE(<generated>)<br> at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:74)<br> at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:64)<br> at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)<br> at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:112)<br> at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)<br> at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br> at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)<br> at com.google.inject.internal.InterceptorStackCallback.invoke(InterceptorStackCallback.java:55)<br> at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$1778005090.testConnection(<generated>)<br> at jdk.internal.reflect.GeneratedMethodAccessor833.invoke(Unknown Source)<br> at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br> at java.base/java.lang.reflect.Method.invoke(Method.java:566)<br> at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:587)<br> at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:333)<br> at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$1778005090.GUICE$TRAMPOLINE(<generated>)<br> at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:74)<br> at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:112)<br> at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)<br> at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br> at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)<br> at com.google.inject.internal.InterceptorStackCallback.invoke(InterceptorStackCallback.java:55)<br> at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$1778005090.processCall(<generated>)<br> at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:303)<br> at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$1778005090.GUICE$TRAMPOLINE(<generated>)<br> at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:74)<br> at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:112)<br> at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)<br> at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br> at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)<br> at com.google.inject.internal.InterceptorStackCallback.invoke(InterceptorStackCallback.java:55)<br> at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$1778005090.processCall(<generated>)<br> at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:373)<br> at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)<br> at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)<br> at javax.servlet.http.HttpServlet.service(HttpServlet.java:779)<br> at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$1778005090.GUICE$TRAMPOLINE(<generated>)<br> at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:74)<br> at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:112)<br> at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)<br> at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br> at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)<br> at com.google.inject.internal.InterceptorStackCallback.invoke(InterceptorStackCallback.java:55)<br> at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$1778005090.service(<generated>)<br> at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:290)<br> at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:280)<br> at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:184)<br> at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:89)<br> at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)<br> at com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:94)<br> at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)<br> at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:121)<br> at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:133)<br> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)<br> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)<br> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177)<br> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)<br> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)<br> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)<br> at psiprobe.Tomcat90AgentValve.invoke(Tomcat90AgentValve.java:38)<br> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)<br> at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)<br> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)<br> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)<br> at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)<br> at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)<br> at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891)<br> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784)<br> at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)<br> at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)<br> at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)<br> at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)<br> at java.base/java.lang.Thread.run(Thread.java:829)<br>Caused by: java.lang.RuntimeException: java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.<br> at net.datenwerke.dbpool.DbC3p0PoolServiceImpl$1.get(DbC3p0PoolServiceImpl.java:192)<br> at net.datenwerke.dbpool.DbC3p0PoolServiceImpl$1.get(DbC3p0PoolServiceImpl.java:1)<br> at net.datenwerke.rs.adminutils.service.datasourcetester.DatasourceTesterServiceImpl.testConnection(DatasourceTesterServiceImpl.java:56)<br> ... 74 more<br>Caused by: java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.<br> at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)<br> at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:77)<br> at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:690)<br> at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)<br> at net.datenwerke.dbpool.DbC3p0PoolServiceImpl$1.get(DbC3p0PoolServiceImpl.java:163)<br> ... 76 more<br>Caused by: com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePool@18311e35 -- timeout at awaitAvailable()<br> at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1505)<br> at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:644)<br> at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:554)<br> at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:758)<br> at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:685)<br> ... 78 more<br>
Any ideas?
Thank you in advance,
Stefano
Offline
Hi,
one more clarification...
I'm using the same url string connection and jdbc driver in DBeaver and i'm connecting to db without errors.
Thanks again
Offline
Hi Stefano,
pls take a look here: https://stackoverflow.com/questions/576 … -with-c3p0
You can modify the properties for your specific datasource as explained here: https://reportserver.net/en/guides/conf … tasources/
You have to restart your ReportServer after modifying this file to make sure your changes are being used.
Regards,
Eduardo
Offline
Hi Eduardo,
thanks for you help.
I've checked my datasource configuration parameters, but <checkoutTimeout>60000</checkoutTimeout> is already very hight.
So I suppose that there is another kind of problem with connection to this database (SQLServer 2019).
I'm using mssql-jdbc-9.4.0.jre11.jar driver.
Now I'm goint to execute some other tests (network, firewall, authentication,tsl and so on...).
I've configured several datasources of different type in my ReportServer installation and everyone takes connection in less then a second.
Regards,
Stefano
Offline
Hi Stefano,
pls also try with the newest sql server driver: 12.2.0.jre11
https://mvnrepository.com/artifact/com. … mssql-jdbc
Regards,
Eduardo
Offline
Hi Eduardo,
nothing change also using driver mssql-jdbc-12.2.0-jre11.
I keep investigating.
Regards,
Stefano
Offline
Hi Eduardo,
I found in my tomcat/logs/catalina.out file this stacktrace:
27-Mar-2023 22:58:55.914 INFO [C3P0PooledConnectionPoolManager[identityToken->2sbgz5ava86i3k1uiftas|48c85305]-HelperThread-#0] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [org.bouncycastle.jcajce.provider.asymmetric.rsa.DigestSignatureSpi$SHA256]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [org.bouncycastle.jcajce.provider.asymmetric.rsa.DigestSignatureSpi$SHA256]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1432)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1420)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1259)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1220)
at java.base/java.security.Provider$Service.getImplClass(Provider.java:1920)
at java.base/java.security.Provider$Service.newInstance(Provider.java:1894)
at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at java.base/java.security.Signature.getInstance(Signature.java:280)
at java.base/sun.security.ssl.SignatureScheme.getVerifier(SignatureScheme.java:567)
at java.base/sun.security.ssl.ECDHServerKeyExchange$ECDHServerKeyExchangeMessage.<init>(ECDHServerKeyExchange.java:287)
at java.base/sun.security.ssl.ECDHServerKeyExchange$ECDHServerKeyExchangeConsumer.consume(ECDHServerKeyExchange.java:521)
at java.base/sun.security.ssl.ServerKeyExchange$ServerKeyExchangeConsumer.consume(ServerKeyExchange.java:122)
at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:443)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:421)
at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:183)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1507)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1417)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:456)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:427)
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1824)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2970)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2628)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:2471)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1470)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:915)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:214)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1176)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1163)
at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1908)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
Exception in thread "C3P0PooledConnectionPoolManager[identityToken->2sbgz5ava86i3k1uiftas|48c85305]-HelperThread-#0" java.lang.NoClassDefFoundError: org/bouncycastle/math/ec/FixedPointCombMultiplier
at org.bouncycastle.crypto.generators.ECKeyPairGenerator.createBasePointMultiplier(Unknown Source)
at org.bouncycastle.crypto.generators.ECKeyPairGenerator.generateKeyPair(Unknown Source)
at org.bouncycastle.jcajce.provider.asymmetric.ec.KeyPairGeneratorSpi$EC.generateKeyPair(Unknown Source)
at java.base/sun.security.ssl.ECDHKeyExchange$ECDHEPossession.<init>(ECDHKeyExchange.java:120)
at java.base/sun.security.ssl.NamedGroup$ECDHEScheme.createPossession(NamedGroup.java:456)
at java.base/sun.security.ssl.NamedGroup$NamedGroupSpec.createPossession(NamedGroup.java:392)
at java.base/sun.security.ssl.NamedGroup.createPossession(NamedGroup.java:300)
at java.base/sun.security.ssl.ECDHClientKeyExchange$ECDHEClientKeyExchangeProducer.produce(ECDHClientKeyExchange.java:399)
at java.base/sun.security.ssl.ClientKeyExchange$ClientKeyExchangeProducer.produce(ClientKeyExchange.java:65)
at java.base/sun.security.ssl.SSLHandshake.produce(SSLHandshake.java:436)
at java.base/sun.security.ssl.ServerHelloDone$ServerHelloDoneConsumer.consume(ServerHelloDone.java:182)
at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:443)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:421)
at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:183)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1507)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1417)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:456)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:427)
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1824)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2970)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2628)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:2471)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1470)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:915)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:214)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1176)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1163)
at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1908)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
As you can see, connecting with MSSQL driver (mssql-jdbc-9.4.0.jre11.jar), I get an exception with a bouncycaste class:
java.lang.NoClassDefFoundError: org/bouncycastle/math/ec/FixedPointCombMultiplier
So i download and add bctls-jdk18on-172.jar and bcjmail-jdk18on-172.jar (they are missing) into reportserver/WEB-INF/lib/ and then I restart tomcat. Unluckily this does not solve the problem.
Any other ideas / solutions?
Thanks again,
Regards
Stefano
Offline
Hi Stefano,
can you pls post a screenshot of administration -> system console -> general info
where you are getting this error?
you can use http://imgbb.com for this.
Regards,
Eduardo
Offline
Offline
Hi Eduardo,
in the meantime I also write a very simple test class using Java and the same MSSQL driver (mssql-jdbc-9.4.0.jre11.jar).
This class gets a connection to the db using the same url string I'm using in ReportServer:
jdbc:sqlserver://;serverName=10.11.14.158;port=6443;databaseName=PITECO
then it creates a statement and runs a simple test query.
I'm running this class on the same machine where ReportServer is installed and, of course, using the same JVM (Java 11).
Everything is working fine. I'm not using any tsl / security libs.
So I suspect the something is going wrong in my ReportServer with tsl / ssl / security classes or maybe, after the upgrade, the datasource is not addressing the correct driver? It's just a guess of course...
Regards,
Stefano
Offline
Hi Stefano,
yes, something seems to be wrong with your system's security classes.
I see in your screenshot the following:
Supported SSL Protocols:
Unknown (IOException: stream does not represent a PKCS12 key store)
something seems to not be configured correctly. You can of course google this error message.
I also see in your JVM Args that not all recommended arguments are being passed:
https://reportserver.net/en/tutorials/i … ce/#tomcat
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.net=ALL-UNNAMED"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/jdk.internal.reflect=ALL-UNNAMED"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.lang.invoke=ALL-UNNAMED"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.util=ALL-UNNAMED"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS -Djavax.net.ssl.trustStoreType=JKS"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS -Dfile.encoding=UTF-8"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS -Djava.awt.headless=true"
Pls check this, specially JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS -Djavax.net.ssl.trustStoreType=JKS"
which may solve your problem.
Also, note that the class that is not found in your case:
java.lang.NoClassDefFoundError: org/bouncycastle/math/ec/FixedPointCombMultiplier
can be found here:
bcprov-jdk18on-1.72.jar
which in fact is shipped with reportserver, so you don't have to add any jars. Pls remove all extra jars you added, so you make sure you are only using the official jars shipped with reportserver. Add only your mssql driver jar.
Also, check your URL:
jdbc:sqlserver://;serverName=10.11.14.158;port=6443;databaseName=PITECO
we use this url:
jdbc:sqlserver://IP;databaseName=reportserver;encrypt=false
you can try with this syntax too. Instead of "serverName" directly putting the server name and trying to pass "encrypt=false", since you are not using encryption. Also, pls always try with the newest mssql driver available.
Regards,
Eduardo
Offline
Hi Eduardo,
first of all, many thanks for you precious support.
Following your directions I've reconfigured my JVM / tomcat recommended arguments and removed any extra jar I've uploaded into my reportserver/WEB-INF/lib folder. I've just added my jdbc drivers.
As you can see now my ReportServer configuration seems to be correct:
https://ibb.co/4PPR4WJ
https://ibb.co/SPwX54Q
In my ReportServer installation (before updating) I've been using successfully for about 2 years several datasources of different types (Mysql, Oracle, PostgreSQL, Vertica, MSSQL and DB2/AS400). I'm specifically using 2 MSSQL datasources and, according to Microsoft specifications, they require driver version 9.4.0 (I've tryed version 12.0 and neither of them work).
If I use version 9.4.0 instead, one of the two (TCPOS) works, as you can see below:
https://ibb.co/yNPny2L
https://ibb.co/GRPPtxf
Datasource PITECO still does not work. I've tryed severl different url string connections:
jdbc:sqlserver://;serverName=10.11.14.158;port=6443;databaseName=PITECO
jdbc:sqlserver://10.11.14.158:6443;databaseName=PITECO
jdbc:sqlserver://10.11.14.158;port=6443;databaseName=PITECO
jdbc:sqlserver://10.11.14.158;port=6443;databaseName=PITECO;encrypt=false
jdbc:sqlserver://10.11.14.158:6443;instanceName=PITECO;encrypt=false
jdbc:sqlserver://10.11.14.158;port=6443;databaseName=PITECO;encrypt=false;integratedSecurity=true|false;
and so on...
Every of this url string connection works in my simple Java test class (running from the same machine where ReportServer is installed), but not in ReportServer...
The error in catalina.out is still the same:
03-Apr-2023 10:34:06.539 INFO [C3P0PooledConnectionPoolManager[identityToken->2sbgz5avejx0z5ckkmwt|45653570]-HelperThread-#0] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [org.bouncycastle.jcajce.provider.asymmetric.rsa.DigestSignatureSpi$SHA256]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [org.bouncycastle.jcajce.provider.asymmetric.rsa.DigestSignatureSpi$SHA256]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1432)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1420)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1259)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1220)
at java.base/java.security.Provider$Service.getImplClass(Provider.java:1920)
at java.base/java.security.Provider$Service.newInstance(Provider.java:1894)
at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at java.base/java.security.Signature.getInstance(Signature.java:280)
at java.base/sun.security.ssl.SignatureScheme.getVerifier(SignatureScheme.java:567)
at java.base/sun.security.ssl.ECDHServerKeyExchange$ECDHServerKeyExchangeMessage.<init>(ECDHServerKeyExchange.java:287)
at java.base/sun.security.ssl.ECDHServerKeyExchange$ECDHServerKeyExchangeConsumer.consume(ECDHServerKeyExchange.java:521)
at java.base/sun.security.ssl.ServerKeyExchange$ServerKeyExchangeConsumer.consume(ServerKeyExchange.java:122)
at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:443)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:421)
at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:183)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1507)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1417)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:456)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:427)
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1824)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2970)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2628)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:2471)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1470)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:915)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:214)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1176)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1163)
at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1908)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
Exception in thread "C3P0PooledConnectionPoolManager[identityToken->2sbgz5avejx0z5ckkmwt|45653570]-HelperThread-#0" java.lang.NoClassDefFoundError: org/bouncycastle/math/ec/FixedPointCombMultiplier
at org.bouncycastle.crypto.generators.ECKeyPairGenerator.createBasePointMultiplier(Unknown Source)
at org.bouncycastle.crypto.generators.ECKeyPairGenerator.generateKeyPair(Unknown Source)
at org.bouncycastle.jcajce.provider.asymmetric.ec.KeyPairGeneratorSpi$EC.generateKeyPair(Unknown Source)
at java.base/sun.security.ssl.ECDHKeyExchange$ECDHEPossession.<init>(ECDHKeyExchange.java:120)
at java.base/sun.security.ssl.NamedGroup$ECDHEScheme.createPossession(NamedGroup.java:456)
at java.base/sun.security.ssl.NamedGroup$NamedGroupSpec.createPossession(NamedGroup.java:392)
at java.base/sun.security.ssl.NamedGroup.createPossession(NamedGroup.java:300)
at java.base/sun.security.ssl.ECDHClientKeyExchange$ECDHEClientKeyExchangeProducer.produce(ECDHClientKeyExchange.java:399)
at java.base/sun.security.ssl.ClientKeyExchange$ClientKeyExchangeProducer.produce(ClientKeyExchange.java:65)
at java.base/sun.security.ssl.SSLHandshake.produce(SSLHandshake.java:436)
at java.base/sun.security.ssl.ServerHelloDone$ServerHelloDoneConsumer.consume(ServerHelloDone.java:182)
at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:443)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:421)
at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:183)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1507)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1417)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:456)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:427)
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1824)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2970)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2628)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:2471)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1470)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:915)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:214)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1176)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1163)
at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1908)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
Exception in thread "dwdaemon-MaintenanceServiceImpl-4964" java.lang.NullPointerException
Exception in thread "dwdaemon-MaintenanceServiceImpl-4997" java.lang.NullPointerException
Exception in thread "dwdaemon-MaintenanceServiceImpl-4975" java.lang.NullPointerException
Exception in thread "dwdaemon-MaintenanceServiceImpl-4977" java.lang.NullPointerException
Exception in thread "dwdaemon-MaintenanceServiceImpl-4965" java.lang.NullPointerException
Exception in thread "dwdaemon-MaintenanceServiceImpl-4998" java.lang.NullPointerException
Exception in thread "dwdaemon-MaintenanceServiceImpl-4976" java.lang.NullPointerException
Exception in thread "dwdaemon-MaintenanceServiceImpl-4978" java.lang.NullPointerException
Exception in thread "dwdaemon-MaintenanceServiceImpl-4966" java.lang.NullPointerException
Thanks again,
Regars,
Stefano
Offline
Hi Stefano,
according to Microsoft specifications, they require driver version 9.4.0 (I've tryed version 12.0 and neither of them work).
what specifications do you mean exactly? do you have a link? normally, jdbc drivers are backward compatible, so if it works with 9, it should work with 12. The opposite is not the case of course.
If I use version 9.4.0 instead, one of the two (TCPOS) works, as you can see below:
Ok, strange. The JDBC driver seems to work in one case, in the other not. What is different between these two datasources? can you try exactly the same URL in both cases (with the corresponding IP, etc), so we have exactly the same JDBC URL syntax in both cases?
Every of this url string connection works in my simple Java test class (running from the same machine where ReportServer is installed), but not in ReportServer...
can you try with a groovy script inside reportserver? In this way we can abstract other error sources and you should get the error message directly into your terminal window. You can use something like the following:
jdbctest.groovy
import groovy.sql.Sql
def db = [url:'jdbc:sqlserver://;serverName=10.11.14.158;port=6443;databaseName=PITECO', user:'sa', password:'mypassword', driver:'com.microsoft.sqlserver.jdbc.SQLServerDriver']
def sql = Sql.newInstance(db.url, db.user, db.password, db.driver)
tout.println 'Connected to database'
tout.println ''
sql.eachRow('select * from RS_USER') { row ->
tout.println "$row.username ($row.firstname $row.lastname)"
}
This should help finding the exact problem. If you try this script for 1. your working datasource 2. your not-working datasource using the exact jdbc syntax, you should get the errors in the terminal window. Can you pls post both outputs (for 1. and 2. ?)
You can comment out the "tout.println "$row.username ($row.firstname $row.lastname)" part for only displaying either the error, or the "connected to database" message.
Regards,
Eduardo
Offline
Hi Eduardo,
first of all thanks again for your help.
In the meantime I've upgraded my jdbc driver from version 9.4.0 to 9.4.1.
So I modified your groovy script with my correct database parameters and then I launched into ReportServer terminal and everything works!
So, since also my simple Java test class works fine with several different url connection strings (including or not the bouncycastle bc*.jar in the classpath), I was starting to get very confused...
Then I decide to delete and recreate my Datasource for "PITECO" db and everything starts working also into ReportServer!
Maybe something went wrong during update process? Honestly I don't know...
ps. "TCPOS" db is Microsoft SQL Server version 14.0.x, "PITECO" db is Microsoft SQL Server version 15.0.x.
We use mssql jdbc driver version 9.4.x since the same driver is used in DBeaver software to connect to the same dbs. I notice that the last version on DBeaver now use mssql jdbc driver version 11.2.3 perhaps in the future I will try to upgrade mssql drivers also in ReportServer.
Regards,
Stefano
Offline
Hi Stefano,
I am very happy this is working now!
Have fun with ReportServer :-)
Regards,
Eduardo
Offline