-
Notifications
You must be signed in to change notification settings - Fork 144
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
ClassNotFoundException: org.apache.derby.client.am.SqlException #24120
Comments
@ivargrimstad It seems the built-in derby driver is incompatible. |
I am not sure it is an EclipseLink bug or introduced in the GlassFish EclipseLink integration. |
Still failed in M10 |
Hi @hantsy , can you please instruct how to execute the test? I tried it but it seems that the cargo plugin isn't used when I run |
Try this https://github.com/hantsy/jakartaee10-sandbox/blob/master/.github/workflows/jpa.yml#L32 please. The |
@hantsy diff --git a/jpa/pom.xml b/jpa/pom.xml
index 54e9335..ef0fc89 100644
--- a/jpa/pom.xml
+++ b/jpa/pom.xml
@@ -210,6 +210,11 @@ under the License.
<version>${arquillian-glassfish-jakarta.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derbyclient</artifactId>
+ <version>10.15.2.0</version>
+ </dependency>
</dependencies>
<build>
<testResources> and you'll transit to
|
So I guess, @pzygielo , the issue is that Derby doesn't support the |
IMO there is no issue in GF reported here, and this should be closed. |
@pzygielo The GlassFish includes derby distribution. This error was occurred since GlassFish M9. In before experience, when using the default Datasource, we do not need to add a Jdbc driver. @OndroMih Although it is part of JPA 3.1, EclipseLink should provide it for all supported databases. If it is not a EclipseLink-Glassfish integration bug, it should be an issue from EclipseLink. |
With M8 I'm getting the same
Please define before. |
@hantsy , what @pzygielo means it that the The actual issue is that the |
GF 7.0.0-M10 uses the latest 4.0.0 EL: Line 109 in a44106a
|
@OndroMih In this JPQLFunctionTest, the tests does not work as CLIENT mode, so the test itself is like a CDI bean in test war archive deployed in the target server. It dose not require a Derby client dependency in tests at all when using the default Datasource, it is similar to a simple Jakarta application which used the default DataSource and deployed to the GF/WildFly, no extra drivers required at all. Unless GF itself lacks a Derbeyclient. But the test class also includes other tests which are successful, so it is not an issue of Derby driver, maybe an incompatible version between GF built-in and EclipseLink used for test against Derby, or Eclipselink used the DerbyClient but GF used a slim version when creating the default DataSource. Thanks for your help. |
For Derby you can write function in Java, just FYI. https://db.apache.org/derby/docs/10.16/ref/rrefcreatefunctionstatement.html |
And the test completes fine on the server-side. It's the problem with reporting the outcome in maven process.
No extra drivers required here as well. But this test is using more parts, not only GF and Derby. And the client-side CP is not prepared correctly for the exceptional flow.
No.
No.
Hope that clarifies the case. The issue in EL has been re-opened, so maybe there will be new version with the fix. If you want to track this dependency update in GF, please file new issue for that. |
Still failed in 7.0.0 GA. |
|
Before Java EE 7, all datasources/drivers are registered in the admin console or admin command line provided application server. The application server can not recognized the drivers dependency in Java EE projects. And since Java EE 7, it allows developers to add drivers to project dependencies, and register custom datasources via annotations. When using the built-in datasource in GlassFish, the default datasource should be ready for developers. Please note, in JPA config, we use Datasource directly, not the drivers. |
First - EL has to be released with the fix. It's hard to upgrade earlier. |
It is.
The problem described is with dependencies on the client-side, that became visible due to SQL with This will not be resolved in GF in any way. Client shall be updated to get the exception about the |
Environment Details
The example project to reproduce, check JPQLFunctionsTest.
Testing the functions introduced in JPA 3.1 using jpql literal query, failed.
The text was updated successfully, but these errors were encountered: