Skip to content

Detected Oracle driver stuck during Statement initialization Caused by: java.sql.SQLRecoverableException: Closed Connection #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Gepar opened this issue Apr 17, 2022 · 2 comments · Fixed by #105

Comments

@Gepar
Copy link

Gepar commented Apr 17, 2022

I have local configuration: oracle container (19.3) + maven container and it works fine.
Here is output:

INFO] --- utplsql-maven-plugin:3.1.4:test (run-plsql-test-packages) @ debtcollect ---
[INFO] utPLSQL Version = v3.1.10.3349
[INFO] Invoking TestRunner with: /opt/debtcollect/target
[INFO] TestRunner initialized
[INFO] Running on utPLSQL v3.1.10.3349
[INFO] Initializing reporters
[INFO] Running tests
[INFO] Running tests finished.
[info] Writing report UT_COVERAGE_SONAR_REPORTER to /opt/debtcollect/target/coverage-sonar-report.xml
[info] Writing report UT_COVERAGE_HTML_REPORTER to /opt/debtcollect/target/coverage-report.html
[info] Writing report UT_SONAR_TEST_REPORTER to /opt/debtcollect/target/sonar-test-report.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.462 s
[INFO] Finished at: 2022-04-17T15:38:41Z
[INFO] ------------------------------------------------------------------------

And I have test oracle instance in my company (19.6) + my local maven and i've got strange error with connection.
Here is output:

[INFO] --- utplsql-maven-plugin:3.1.4:test (run-plsql-test-packages) @ debtcollect ---
[INFO] utPLSQL Version = v3.1.10.3349
[INFO] Invoking TestRunner with: /Users/ivan/Documents/Work/sandbox/debt/target
[INFO] TestRunner initialized
[INFO] Running on utPLSQL v3.1.10.3349
[INFO] Initializing reporters
[ERROR] Detected Oracle driver stuck during Statement initialization
[ERROR] Unexpected error opening file ouput
org.apache.maven.plugin.MojoExecutionException: Unexpected error opening file ouput
at org.utplsql.maven.plugin.reporter.ReporterWriter.writeReports (ReporterWriter.java:101)
at org.utplsql.maven.plugin.reporter.ReporterWriter.writeReporters (ReporterWriter.java:63)
at org.utplsql.maven.plugin.UtPLSQLMojo.execute (UtPLSQLMojo.java:196)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.sql.SQLRecoverableException: Closed Connection
at oracle.jdbc.driver.PhysicalConnection.prepareCall (PhysicalConnection.java:1935)
at oracle.jdbc.driver.PhysicalConnection.prepareCall (PhysicalConnection.java:1911)
at oracle.jdbc.driver.PhysicalConnection.prepareCall (PhysicalConnection.java:1877)
at org.utplsql.api.outputBuffer.OutputBufferProvider.hasOutput (OutputBufferProvider.java:62)
at org.utplsql.api.outputBuffer.OutputBufferProvider.getCompatibleOutputBuffer (OutputBufferProvider.java:33)
at org.utplsql.maven.plugin.reporter.ReporterWriter.writeReports (ReporterWriter.java:74)
at org.utplsql.maven.plugin.reporter.ReporterWriter.writeReporters (ReporterWriter.java:63)
at org.utplsql.maven.plugin.UtPLSQLMojo.execute (UtPLSQLMojo.java:196)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.796 s
[INFO] Finished at: 2022-04-17T18:35:11+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.utplsql:utplsql-maven-plugin:3.1.4:test (run-plsql-test-packages) on project debtcollect: Oracle driver stuck during creating the TestRunner statement. Retry.: TimeoutException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

The driver is the same, the uptplsql version is the same, the oracle version is almost the same (major = 19.0, minor is little different).
With the same oracle driver and mvn liquibase plugin i create tables and procedures on both servers, i've got this error only when try to run tests.
Oracle JDBC version is 19.3.0.0, also tried 21.3.0.0 but no changes.
Command ut.run on server works well of course on both servers.
If it's important: connection to company server is over VPN.
If it's important2: server is far away and first connection is kinda slow so local server connection is 100ms, remote server connection is 5-7 seconds.

@Gepar
Copy link
Author

Gepar commented Apr 17, 2022

Seems problem with connection timeout to server, when i changed org.utplsql.api.TestRunner this line:
testRunnerStatement = future.get(2, TimeUnit.SECONDS);
From 2 to 22 the problem is gone.
But now it seems that problem with API, not with maven plugin itself.
I can recreate issue in the API project or can leave it here, don't know how to do it better now.

@jgebal
Copy link
Member

jgebal commented Apr 17, 2022

I'll move this issue to API. We should increase the default timeout

@jgebal jgebal transferred this issue from utPLSQL/utPLSQL-maven-plugin Apr 17, 2022
@pesse pesse closed this as completed in #105 Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants