Skip to content
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

ShardingSphere build fails on OpenJDK 22 #30552

Closed
linghengqian opened this issue Mar 19, 2024 · 2 comments · Fixed by #30778
Closed

ShardingSphere build fails on OpenJDK 22 #30552

linghengqian opened this issue Mar 19, 2024 · 2 comments · Fixed by #30778

Comments

@linghengqian
Copy link
Member

Bug Report

For English only, other languages will not accept.

Before report a bug, make sure you have:

Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Which version of ShardingSphere did you use?

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

  • ShardingSphere-JDBC

Expected behavior

  • ShardingSphere build succeeds on OpenJDK 22.

Actual behavior

  • ShardingSphere build fails on OpenJDK 22.
[ERROR] Failures: 
[ERROR]   AgentBuilderFactoryTest.assertAdviceConstructor:79 
Expected: is <[on constructor, foo constructor, bar constructor]>
     but: was <[on constructor]>
[ERROR]   AgentBuilderFactoryTest.assertAdviceInstanceMethod:86 
Expected: is <[foo before instance method, bar before instance method, on instance method, foo after instance method, bar after instance method]>
     but: was <[on instance method]>
[ERROR]   AgentBuilderFactoryTest.assertAdviceInstanceMethodWhenExceptionThrown:96 
Expected: is <[foo before instance method, bar before instance method, foo throw instance method exception, bar throw instance method exception, foo after instance method, bar after instance method]>
     but: was <[]>
[ERROR]   AgentBuilderFactoryTest.assertAdviceStaticMethod:104 
Expected: is <[foo before static method, bar before static method, on static method, foo after static method, bar after static method]>
     but: was <[on static method]>
[ERROR]   AgentBuilderFactoryTest.assertAdviceStaticMethodWhenExceptionThrown:114 
Expected: is <[foo before static method, bar before static method, foo throw static method exception, bar throw static method exception, foo after static method, bar after static method]>
     but: was <[]>
[ERROR] Errors: 
[ERROR]   PluginLifecycleServiceManagerTest.assertInitPluginLifecycleServiceWithMockHandler:53 Mockito 
Mockito cannot mock this class: interface java.net.URLStreamHandlerFactory.

If you're not sure why you're getting this error, please open an issue on GitHub.


Java               : 22
JVM vendor name    : Oracle Corporation
JVM vendor version : 22+36-2370
JVM name           : OpenJDK 64-Bit Server VM
JVM version        : 22+36-2370
JVM info           : mixed mode, sharing
OS name            : Linux
OS version         : 5.15.146.1-microsoft-standard-WSL2


You are seeing this disclaimer because Mockito is configured to create inlined mocks.
You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc.

Underlying exception : org.mockito.exceptions.base.MockitoException: Could not modify all classes [interface java.net.URLStreamHandlerFactory]
[INFO] 
[ERROR] Tests run: 26, Failures: 5, Errors: 1, Skipped: 0
[INFO] 

Reason analyze (If you can)

  • Null.

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

sdk install java 22-open
sdk use java 22-open

git clone [email protected]:apache/shardingsphere.git
cd ./shardingsphere/
./mvnw clean install -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e

Example codes for reproduce this issue (such as a github link).

  • Null.
@linghengqian
Copy link
Member Author

linghengqian commented Mar 19, 2024

@linghengqian
Copy link
Member Author

linghengqian commented Apr 4, 2024

  • It looks like most of the obstacles have been cleared. I'm working on the current issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant