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

Migrate JAXB Runtime from com.sun.xml.bind:jaxb-impl:2.3.0 to org.glassfish.jaxb:jaxb-runtime:2.3.1 #29012

Closed
linghengqian opened this issue Nov 12, 2023 · 0 comments · Fixed by #29013
Assignees
Labels
type: dependencies Pull requests that update a dependency file

Comments

@linghengqian
Copy link
Member

Feature Request

For English only, other languages will not be accepted.

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

Please answer these questions before submitting your issue. Thanks!

Is your feature request related to a problem?

Describe the feature you would like.

Error Log
[1/8] Initializing...                                                                                   (24.4s @ 1.11GB)
 Java version: 17.0.9+9, vendor version: GraalVM CE 17.0.9+9.1
 Graal compiler: optimization level: 2, target machine: x86-64-v3
 C compiler: gcc (linux, x86_64, 11.4.0)
 Garbage collector: Serial GC (max heap size: 80% of RAM)
 2 user-specific feature(s)
 - com.oracle.svm.polyglot.groovy.GroovyIndyInterfaceFeature
 - org.graalvm.junit.platform.JUnitPlatformFeature
[junit-platform-native] Running in 'test listener' mode using files matching pattern [junit-platform-unique-ids*] found in folder [/home/linghengqian/TwinklingLiftWorks/git/public/shardingsphere/infra/nativetest/target/test-ids] and its subfolders.
[2/8] Performing analysis...  [[INFO] 
11月 12, 2023 12:27:32 下午 com.sun.xml.bind.v2.runtime.reflect.opt.Injector <clinit>sphere/proxy/bootstrap/target/classes/META-INF/jandex.idx
严重: null
java.security.PrivilegedActionException: java.lang.NoSuchMethodException: sun.misc.Unsafe.defineClass(java.lang.String,[B,int,int,java.lang.ClassLoader,java.security.ProtectionDomain)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:573)
        at com.sun.xml.bind.v2.runtime.reflect.opt.Injector.<clinit>(Injector.java:197)
        at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
        at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1155)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationSupport.ensureClassInitialized(ClassInitializationSupport.java:168)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ProvenSafeClassInitializationSupport.computeInitKindAndMaybeInitializeClass(ProvenSafeClassInitializationSupport.java:348)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ProvenSafeClassInitializationSupport.computeInitKindAndMaybeInitializeClass(ProvenSafeClassInitializationSupport.java:76)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationSupport.shouldInitializeAtRuntime(ClassInitializationSupport.java:144)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.SVMHost.isInitialized(SVMHost.java:317)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.isInitialized(AnalysisType.java:894)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.maybeEagerlyInitialize(BytecodeParser.java:4334)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1662)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1655)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5331)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3406)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.iterateBytecodesForBlock(SharedGraphBuilderPhase.java:712)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.handleBytecodeBlock(BytecodeParser.java:3366)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3208)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1134)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.build(SharedGraphBuilderPhase.java:152)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:1026)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:97)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:114)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:434)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.AnalysisParsedGraph.parseBytecode(AnalysisParsedGraph.java:146)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisMethod.parseGraph(AnalysisMethod.java:819)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisMethod.ensureGraphParsedHelper(AnalysisMethod.java:784)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisMethod.ensureGraphParsed(AnalysisMethod.java:767)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.phases.InlineBeforeAnalysisGraphDecoder.lookupEncodedGraph(InlineBeforeAnalysisGraphDecoder.java:120)
        at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.doInline(PEGraphDecoder.java:1190)
        at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.tryInline(PEGraphDecoder.java:1173)
        at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.trySimplifyInvoke(PEGraphDecoder.java:1028)
        at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.handleInvoke(PEGraphDecoder.java:982)
        at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.GraphDecoder.processNextNode(GraphDecoder.java:871)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.phases.InlineBeforeAnalysisGraphDecoder.processNextNode(InlineBeforeAnalysisGraphDecoder.java:186)
        at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.GraphDecoder.decode(GraphDecoder.java:600)
        at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.decode(PEGraphDecoder.java:854)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.phases.InlineBeforeAnalysis.decodeGraph(InlineBeforeAnalysis.java:77)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:193)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:583)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.createFlowsGraph(MethodTypeFlow.java:165)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureFlowsGraphCreated(MethodTypeFlow.java:152)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.getOrCreateMethodFlowsGraphInfo(MethodTypeFlow.java:110)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.typestate.DefaultStaticInvokeTypeFlow.lambda$update$0(DefaultStaticInvokeTypeFlow.java:67)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.LightImmutableCollection.forEach(LightImmutableCollection.java:90)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.typestate.DefaultStaticInvokeTypeFlow.update(DefaultStaticInvokeTypeFlow.java:66)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.PointsToAnalysis$1.run(PointsToAnalysis.java:474)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:187)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:171)
        at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.NoSuchMethodException: sun.misc.Unsafe.defineClass(java.lang.String,[B,int,int,java.lang.ClassLoader,java.security.ProtectionDomain)
        at java.base/java.lang.Class.getMethod(Class.java:2227)
        at com.sun.xml.bind.v2.runtime.reflect.opt.Injector$3.run(Injector.java:201)
        at com.sun.xml.bind.v2.runtime.reflect.opt.Injector$3.run(Injector.java:197)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
        ... 57 more

[2/8] Performing analysis...  [*******]                                                                (116.7s @ 2.48GB)
  28,922 (81.02%) of 35,696 types reachable
  49,291 (57.36%) of 85,933 fields reachable
 148,651 (58.24%) of 255,245 methods reachable
   7,765 types,   997 fields, and 6,919 methods registered for reflection
      68 types,    82 fields, and    57 methods registered for JNI access
       4 native libraries: dl, pthread, rt, z
[3/8] Building universe...                                                                              (15.3s @ 2.92GB)
[4/8] Parsing methods...      [***]                                                                      (8.7s @ 2.07GB)
[5/8] Inlining methods...     [****]                                                                     (4.9s @ 2.39GB)
[6/8] Compiling methods...    [********]                                                                (67.8s @ 2.46GB)
[7/8] Layouting methods...    [****]                                                                    (12.8s @ 2.42GB)
[8/8] Creating image...       [****]                                                                    (11.9s @ 3.21GB)
  73.52MB (54.01%) for code area:    94,541 compilation units
  57.26MB (42.06%) for image heap:  573,953 objects and 279 resources
   5.36MB ( 3.93%) for other data
 136.13MB in total
------------------------------------------------------------------------------------------------------------------------
Top 10 origins of code area:                                Top 10 object types in image heap:
  13.33MB calcite-core-1.35.0.jar                             15.99MB byte[] for code metadata
  13.17MB java.base                                            7.39MB byte[] for java.lang.String
   5.79MB h2-2.2.224.jar                                       7.12MB java.lang.Class
   5.66MB java.xml                                             5.77MB java.lang.String
   5.28MB groovy-4.0.10.jar                                    4.51MB byte[] for general heap data
   3.89MB org.apache.shardingsphere.sql.parser.autogen         2.43MB com.oracle.svm.core.hub.DynamicHubCompanion
   2.96MB java.desktop                                         2.12MB byte[] for embedded resources
   1.91MB jackson-databind-2.14.0.jar                          1.73MB byte[] for reflection metadata
   1.54MB avatica-core-1.23.0.jar                              1.22MB java.lang.String[]
   1.43MB janino-3.1.9.jar                                     1.04MB c.o.svm.core.hub.DynamicHub$ReflectionMetadata
  17.86MB for 728 more packages                                7.55MB for 5161 more object types
------------------------------------------------------------------------------------------------------------------------
Recommendations:
 AWT:  Use the tracing agent to collect metadata for AWT.
 HEAP: Set max heap for improved and more predictable memory usage.
 CPU:  Enable more CPU features with '-march=native' for improved performance.
------------------------------------------------------------------------------------------------------------------------
                       33.0s (12.4% of total time) in 162 GCs | Peak RSS: 5.27GB | CPU load: 4.35
------------------------------------------------------------------------------------------------------------------------
Produced artifacts:
 /home/linghengqian/TwinklingLiftWorks/git/public/shardingsphere/infra/nativetest/target/libawt.so (jdk_library)
 /home/linghengqian/TwinklingLiftWorks/git/public/shardingsphere/infra/nativetest/target/libawt_headless.so (jdk_library)
 /home/linghengqian/TwinklingLiftWorks/git/public/shardingsphere/infra/nativetest/target/libawt_xawt.so (jdk_library)
 /home/linghengqian/TwinklingLiftWorks/git/public/shardingsphere/infra/nativetest/target/libfontmanager.so (jdk_library)
 /home/linghengqian/TwinklingLiftWorks/git/public/shardingsphere/infra/nativetest/target/libjava.so (jdk_library_shim)
 /home/linghengqian/TwinklingLiftWorks/git/public/shardingsphere/infra/nativetest/target/libjavajpeg.so (jdk_library)
 /home/linghengqian/TwinklingLiftWorks/git/public/shardingsphere/infra/nativetest/target/libjvm.so (jdk_library_shim)
 /home/linghengqian/TwinklingLiftWorks/git/public/shardingsphere/infra/nativetest/target/liblcms.so (jdk_library)
 /home/linghengqian/TwinklingLiftWorks/git/public/shardingsphere/infra/nativetest/target/native-tests (executable)
========================================================================================================================
Finished generating 'native-tests' in 4m 24s.
[INFO] Executing: /home/linghengqian/TwinklingLiftWorks/git/public/shardingsphere/infra/nativetest/target/native-tests --xml-output-dir /home/linghengqian/TwinklingLiftWorks/git/public/shardingsphere/infra/nativetest/target/native-test-reports -Djunit.platform.listeners.uid.tracking.output.dir=/home/linghengqian/TwinklingLiftWorks/git/public/shardingsphere/infra/nativetest/target/test-ids
JUnit Platform on Native Image - report
----------------------------------------

org.apache.shardingsphere.infra.nativetest.jdbc.features.ShardingTest > testShardingInLocalTransactions() FAILED

org.apache.shardingsphere.infra.nativetest.jdbc.features.ReadWriteSplittingTest > testReadWriteSplittingInLocalTransactions() FAILED

org.apache.shardingsphere.infra.nativetest.jdbc.features.EncryptTest > testEncryptInLocalTransactions() FAILED

org.apache.shardingsphere.infra.nativetest.jdbc.features.MaskTest > testMaskInLocalTransactions() FAILED

org.apache.shardingsphere.infra.nativetest.jdbc.features.ShadowTest > testShadowInLocalTransactions() FAILED


Failures (5):
  JUnit Jupiter:ShardingTest:testShardingInLocalTransactions()
    MethodSource [className = 'org.apache.shardingsphere.infra.nativetest.jdbc.features.ShardingTest', methodName = 'testShardingInLocalTransactions', methodParameterTypes = '']
    => java.lang.UnsupportedOperationException
       org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.resources.NativeImageResourcePath.toFile(NativeImageResourcePath.java:421)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader$1.visitFile(JDBCRepositorySQLLoader.java:121)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader$1.visitFile(JDBCRepositorySQLLoader.java:115)
       [email protected]/java.nio.file.Files.walkFileTree(Files.java:2811)
       [email protected]/java.nio.file.Files.walkFileTree(Files.java:2882)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader.loadFromDirectoryLegacy(JDBCRepositorySQLLoader.java:115)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader.loadFromDirectory(JDBCRepositorySQLLoader.java:108)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader.load(JDBCRepositorySQLLoader.java:76)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.JDBCRepository.init(JDBCRepository.java:59)
       org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader.findService(TypedSPILoader.java:61)
       [...]
  JUnit Jupiter:ReadWriteSplittingTest:testReadWriteSplittingInLocalTransactions()
    MethodSource [className = 'org.apache.shardingsphere.infra.nativetest.jdbc.features.ReadWriteSplittingTest', methodName = 'testReadWriteSplittingInLocalTransactions', methodParameterTypes = '']
    => java.lang.UnsupportedOperationException
       org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.resources.NativeImageResourcePath.toFile(NativeImageResourcePath.java:421)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader$1.visitFile(JDBCRepositorySQLLoader.java:121)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader$1.visitFile(JDBCRepositorySQLLoader.java:115)
       [email protected]/java.nio.file.Files.walkFileTree(Files.java:2811)
       [email protected]/java.nio.file.Files.walkFileTree(Files.java:2882)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader.loadFromDirectoryLegacy(JDBCRepositorySQLLoader.java:115)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader.loadFromDirectory(JDBCRepositorySQLLoader.java:108)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader.load(JDBCRepositorySQLLoader.java:76)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.JDBCRepository.init(JDBCRepository.java:59)
       org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader.findService(TypedSPILoader.java:61)
       [...]
  JUnit Jupiter:EncryptTest:testEncryptInLocalTransactions()
    MethodSource [className = 'org.apache.shardingsphere.infra.nativetest.jdbc.features.EncryptTest', methodName = 'testEncryptInLocalTransactions', methodParameterTypes = '']
    => java.lang.UnsupportedOperationException
       org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.resources.NativeImageResourcePath.toFile(NativeImageResourcePath.java:421)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader$1.visitFile(JDBCRepositorySQLLoader.java:121)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader$1.visitFile(JDBCRepositorySQLLoader.java:115)
       [email protected]/java.nio.file.Files.walkFileTree(Files.java:2811)
       [email protected]/java.nio.file.Files.walkFileTree(Files.java:2882)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader.loadFromDirectoryLegacy(JDBCRepositorySQLLoader.java:115)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader.loadFromDirectory(JDBCRepositorySQLLoader.java:108)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader.load(JDBCRepositorySQLLoader.java:76)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.JDBCRepository.init(JDBCRepository.java:59)
       org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader.findService(TypedSPILoader.java:61)
       [...]
  JUnit Jupiter:MaskTest:testMaskInLocalTransactions()
    MethodSource [className = 'org.apache.shardingsphere.infra.nativetest.jdbc.features.MaskTest', methodName = 'testMaskInLocalTransactions', methodParameterTypes = '']
    => java.lang.UnsupportedOperationException
       org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.resources.NativeImageResourcePath.toFile(NativeImageResourcePath.java:421)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader$1.visitFile(JDBCRepositorySQLLoader.java:121)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader$1.visitFile(JDBCRepositorySQLLoader.java:115)
       [email protected]/java.nio.file.Files.walkFileTree(Files.java:2811)
       [email protected]/java.nio.file.Files.walkFileTree(Files.java:2882)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader.loadFromDirectoryLegacy(JDBCRepositorySQLLoader.java:115)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader.loadFromDirectory(JDBCRepositorySQLLoader.java:108)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader.load(JDBCRepositorySQLLoader.java:76)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.JDBCRepository.init(JDBCRepository.java:59)
       org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader.findService(TypedSPILoader.java:61)
       [...]
  JUnit Jupiter:ShadowTest:testShadowInLocalTransactions()
    MethodSource [className = 'org.apache.shardingsphere.infra.nativetest.jdbc.features.ShadowTest', methodName = 'testShadowInLocalTransactions', methodParameterTypes = '']
    => java.lang.UnsupportedOperationException
       org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.resources.NativeImageResourcePath.toFile(NativeImageResourcePath.java:421)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader$1.visitFile(JDBCRepositorySQLLoader.java:121)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader$1.visitFile(JDBCRepositorySQLLoader.java:115)
       [email protected]/java.nio.file.Files.walkFileTree(Files.java:2811)
       [email protected]/java.nio.file.Files.walkFileTree(Files.java:2882)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader.loadFromDirectoryLegacy(JDBCRepositorySQLLoader.java:115)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader.loadFromDirectory(JDBCRepositorySQLLoader.java:108)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader.load(JDBCRepositorySQLLoader.java:76)
       org.apache.shardingsphere.mode.repository.standalone.jdbc.JDBCRepository.init(JDBCRepository.java:59)
       org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader.findService(TypedSPILoader.java:61)
       [...]

Test run finished after 34 ms
[         6 containers found      ]
[         0 containers skipped    ]
[         6 containers started    ]
[         0 containers aborted    ]
[         6 containers successful ]
[         0 containers failed     ]
[         5 tests found           ]
[         0 tests skipped         ]
[         5 tests started         ]
[         0 tests aborted         ]
[         0 tests successful      ]
[         5 tests failed          ]
  • This is not reproducible in ordinary JDK17 downstream releases, and only occurs under GraalVM Native Image in GraalVM CE 23.0.2 for JDK 17.0.9. It states that com.sun.xml.bind.v2.runtime.reflect.opt.Injector.<clinit> is calling an internal function sun.misc.Unsafe.defineClass(java.lang.String,[B,int,int,java.lang.ClassLoader,java.security.ProtectionDomain) that does not exist in JDK 17. In other words the corresponding Class failed during introspection.
严重: null
java.security.PrivilegedActionException: java.lang.NoSuchMethodException: sun.misc.Unsafe.defineClass(java.lang.String,[B,int,int,java.lang.ClassLoader,java.security.ProtectionDomain)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:573)
        at com.sun.xml.bind.v2.runtime.reflect.opt.Injector.<clinit>(Injector.java:197)
        at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
        at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1155)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationSupport.ensureClassInitialized(ClassInitializationSupport.java:168)
  • Due to some experimentation, I'm leaning toward this being an issue with older versions of com.sun.xml.bind:jaxb-impl. But because Transition from Java EE to Jakarta EE #26041 still needs to wait for Spring Boot 2.x to end the OSS life cycle, we can only seek solutions on the runtime implementation of lower versions of JAXB in Java EE 8. This API involves https://bugs.openjdk.org/browse/JDK-8193033 .

  • When I migrate from com.sun.xml.bind:jaxb-core:2.3.0 and com.sun.xml.bind:jaxb-impl:2.3.0 to org.glassfish.jaxb:jaxb-runtime :2.3.1, this Error Log disappears and the related PR moves to the next stage.

  • To summarize, I'm looking to migrate the JAXB Runtime from com.sun.xml.bind:jaxb-impl:2.3.0 to org.glassfish.jaxb:jaxb-runtime:2.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: dependencies Pull requests that update a dependency file
Projects
None yet
1 participant