-
Notifications
You must be signed in to change notification settings - Fork 112
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
JDBC driver org.apache.derby.jdbc.ClientDriver could not be loaded #627
Comments
It sounds classpath related. The static configuration for JakartaEE Full Platform ts.jte.jdk11 has This doesn't explain the failure as that jar does exist as per:
|
I see similar issue in other tests too : Platform TCK : ejb30/assembly : |
Derby 10.15.2.0 requires derbyshared.jar and derbytools.jar to be added along with derbyclient.jar. The JDBC driver is present in derbytools.jar. |
I can confirm that this fixes the JPA tests. Thanks much for the tip!! I will check the same for other failing suites also. |
I could see this fixed tests in jpa, jstl, security tck tests with this change #630 .
The above exception is "JDBC driver org.apache.derby.jdbc.EmbeddedDriver could not be loaded" . I was able to resolve this issue by adding derbyshared.jar and derbytools.jar along with derby.jar and derbyclient.jar. But I encounter below exception /root/jakartaeetck/bin/xml/initdb.xml:528: java.sql.SQLNonTransientConnectionException: java.net.ConnectException : Error connecting to server localhost on port 1,527 with message Connection refused (Connection refused) logs : #630 (review) are there any other known changes required for derby db config ? |
Can you check the derby.log to see why it did not start. |
I dont see any errors in vi derby.log except |
Hi,
One thing I encountered on my local system, but not on the Jenkins instance
(and it's specific docker image for the GF build), is that Derby runs with
a security manager. This causes it to check a policy file with connection
permissions, which on its turn activates a search for
the java.net.DefaultInterface, which again on its turn does a reverse DNS
lookup for all network interfaces on the system.
Locally this causes a timeout in the ./asadmin start-database command, but
since it starts Derby asynchronously in the background, Derby continues to
start. It just takes (a lot) more time.
There's an option in Derby to disable the security manager, but it needs to
be passed from the asadmin process to Derby then, so needs some coding.
You could check if this is indeed the case on the server you're trying by
simply starting Derby separately using ./asadmin start-database and seeing
if it takes too long or not.
Kind regards,
Arjan
…On Tue, Mar 2, 2021 at 10:29 AM Alwin Joseph ***@***.***> wrote:
derby.log
<https://github.com/eclipse-ee4j/jakartaee-tck/files/6067551/derby.log>
I dont see any errors in vi derby.log except
Database Class Loader started - derby.database.classpath=''
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#627 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXFOTTBSSECCUTETU55B43TBSVXPANCNFSM4YIEMGIQ>
.
|
From last nights Full Platform TCK TCK run ./root/run_cts.log in https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck/job/master/1275/artifact/ejb30_lite_tx-results.tar.gz:
|
looks like we also need to add add derbyshared.jar + derbytools.jar to:
An example that is correct is https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/install/securityapi/bin/ts.jte.jdk11#L467 |
email sent to GlassFish + TCK mailing list asking for a volunteer. Please comment here on the issue if you are volunteering to fix this. as per my previous comment. Thanks! Also, I assigned to myself until we have a volunteer. |
Hi Scott, I would like to help. Could you assign this to me ? |
@suhridk you are assigned now, can you create the pull request now? Be sure to sign the commit with your github account that is associated with your Eclipse account that you signed the ECA with. When you commit, be sure to use -s to sign it: |
It also looks like GlassFish needs to add
I started change to remove the security manager from Derby via https://github.com/scottmarlow/jakartaee-tck/tree/start_database in case that helps avoid the timeout issue mentioned. |
@scottmarlow If it is not asadmin command, then it should be the classpath for embedded driver that is set in ts.jte |
I built your branch via https://ci.eclipse.org/jakartaee-tck/job/build-glassfish-scott/1/ which I am trying via https://ci.eclipse.org/jakartaee-tck/job/9.1/job/eftl-standalonetck-build-run-910/32/. Otherwise, I'll try the ts.jte change you mentioned:
|
…ddedDriver could not be loaded Fix derbyEmbedded.classpath to include derbyshared.jar and derbytools.jar Signed-off-by: hussainnm <hussain.nm@cognizant.com>
#627 Class Not Found: JDBC driver org.apache.derby.jdbc.EmbeddedDriver could not be loaded
…ntDriver could not be loaded Fix derby.classes.ri to include derbyshared.jar and derbytools.jar Signed-off-by: hussainnm <hussain.nm@cognizant.com>
…ntDriver could not be loaded Fix derby.classes.ri to include derbyshared.jar and derbytools.jar Signed-off-by: hussainnm <hussain.nm@cognizant.com>
#627 Class Not Found: JDBC driver org.apache.derby.jdbc.ClientDriver could not be loaded
I think This property is used in javaee_ri.xml to set which is later used to set the classpath to start the derby server |
Fix derby.classpath.ri to include derbyshared.jar and derbytools.jar Signed-off-by: hussainnm <hussain.nm@cognizant.com>
Fix derby.classpath to include derbyshared.jar and derbytools.jar. Missed a $ for pathsep in derby.classpath.ri Add a new permission to security.policy for derby 10.15 Signed-off-by: hussainnm <hussain.nm@cognizant.com>
I found the root cause to be a permission issue which is preventing the database from starting. I have raised a PR in glassfish to add the required permission which will resolve the Connection Refused error. This permission needs to be added to https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/install/jpa/bin/security.policy. I will raise a PR here for the same. |
Describe the bug
ant -f initdb.xml fails with below error for jpa tck (also for security TCK)
BUILD FAILED
/home/jenkins/agent/workspace/jakartaee-tck_master/persistence-tck/bin/initdb.xml:46: The following error occurred while executing this line:
/home/jenkins/agent/workspace/jakartaee-tck_master/persistence-tck/bin/initdb.xml:78: The following error occurred while executing this line:
/home/jenkins/agent/workspace/jakartaee-tck_master/persistence-tck/bin/initdb.xml:51: The following error occurred while executing this line:
/home/jenkins/agent/workspace/jakartaee-tck_master/persistence-tck/bin/initdb.xml:65: Class Not Found: JDBC driver org.apache.derby.jdbc.ClientDriver could not be loaded
Complete test run logs : https://ci.eclipse.org/jakartaee-tck/blue/rest/organizations/jenkins/pipelines/jakartaee-tck/branches/master/runs/1243/nodes/72/steps/271/log/?start=0
To Reproduce
Download https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee9-eftl/staged-910/jakarta-persistence-tck-3.0.0.zip
Run jpa tck using docker/jpatck.sh
Additional context
Derby Information --------
[/home/jenkins/agent/workspace/jakartaee-tck_master/glassfish6/javadb/lib/derby.jar] 10.15.2.0 - (1873585)
[/home/jenkins/agent/workspace/jakartaee-tck_master/glassfish6/javadb/lib/derbytools.jar] 10.15.2.0 - (1873585)
[/home/jenkins/agent/workspace/jakartaee-tck_master/glassfish6/javadb/lib/derbynet.jar] 10.15.2.0 - (1873585)
[/home/jenkins/agent/workspace/jakartaee-tck_master/glassfish6/javadb/lib/derbyclient.jar] 10.15.2.0 - (1873585)
[/home/jenkins/agent/workspace/jakartaee-tck_master/glassfish6/javadb/lib/derbyshared.jar] 10.15.2.0 - (1873585)
The text was updated successfully, but these errors were encountered: