zrwsmd opened a new issue, #24484:
URL: https://github.com/apache/shardingsphere/issues/24484

   when I use shardingjdbc integrate  with springboot3 and use graalvm generate 
a executable file,an error occured,how to solve it ,thanks a lot,it seems that 
groovy grammar is not supported by higher jdk version, i use jdk17 and 
springboot 3.0.2:
          
   
   
        org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name 'shardingDataSource': Instantiation of supplied bean failed
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1236)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1210)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1157)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:561)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:961)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:915)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:584)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
 ~[native-test.exe:3.0.2]
        at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) 
~[native-test.exe:3.0.2]
        at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432)
 ~[native-test.exe:3.0.2]
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:308) 
~[native-test.exe:3.0.2]
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) 
~[native-test.exe:3.0.2]
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1291) 
~[native-test.exe:3.0.2]
        at com.yt.server.DemoApplication.main(DemoApplication.java:14) 
~[native-test.exe:na]
   Caused by: java.lang.ExceptionInInitializerError: null
        at 
org.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:88) 
~[native-test.exe:3.0.0]
        at 
groovy.lang.GroovyObjectSupport.getDefaultMetaClass(GroovyObjectSupport.java:47)
 ~[native-test.exe:3.0.0]
        at groovy.lang.GroovyObjectSupport.<init>(GroovyObjectSupport.java:32) 
~[native-test.exe:3.0.0]
        at groovy.lang.Binding.<init>(Binding.java:33) ~[native-test.exe:3.0.0]
        at groovy.lang.GroovyShell.<init>(GroovyShell.java:63) 
~[native-test.exe:3.0.0]
        at 
org.apache.shardingsphere.underlying.common.config.inline.InlineExpressionParser.<clinit>(InlineExpressionParser.java:47)
 ~[native-test.exe:4.1.1]
        at 
org.apache.shardingsphere.core.rule.TableRule.<init>(TableRule.java:103) 
~[na:na]
        at 
org.apache.shardingsphere.core.rule.ShardingRule.lambda$createTableRules$0(ShardingRule.java:91)
 ~[native-test.exe:4.1.1]
        at 
[email protected]/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
 ~[na:na]
        at 
[email protected]/java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1242)
 ~[native-test.exe:na]
        at 
[email protected]/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
 ~[native-test.exe:na]
        at 
[email protected]/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
 ~[native-test.exe:na]
        at 
[email protected]/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
 ~[native-test.exe:na]
        at 
[email protected]/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
 ~[native-test.exe:na]
        at 
[email protected]/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
 ~[native-test.exe:na]
        at 
org.apache.shardingsphere.core.rule.ShardingRule.createTableRules(ShardingRule.java:91)
 ~[native-test.exe:4.1.1]
        at 
org.apache.shardingsphere.core.rule.ShardingRule.<init>(ShardingRule.java:79) 
~[native-test.exe:4.1.1]
        at 
org.apache.shardingsphere.shardingjdbc.api.ShardingDataSourceFactory.createDataSource(ShardingDataSourceFactory.java:48)
 ~[na:na]
        at 
com.yt.server.aot.ShardingJdbcConfig.shardingDataSource(ShardingJdbcConfig.java:98)
 ~[native-test.exe:na]
        at 
com.yt.server.aot.ShardingJdbcConfig$$SpringCGLIB$$0.CGLIB$shardingDataSource$3(<generated>)
 ~[native-test.exe:na]
        at 
com.yt.server.aot.ShardingJdbcConfig$$SpringCGLIB$$2.invoke(<generated>) 
~[native-test.exe:na]
        at 
org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258) 
~[native-test.exe:6.0.4]
        at 
org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
 ~[na:na]
        at 
com.yt.server.aot.ShardingJdbcConfig$$SpringCGLIB$$0.shardingDataSource(<generated>)
 ~[native-test.exe:na]
        at 
com.yt.server.aot.ShardingJdbcConfig__BeanDefinitions.lambda$getShardingDataSourceInstanceSupplier$1(ShardingJdbcConfig__BeanDefinitions.java:44)
 ~[na:na]
        at 
org.springframework.util.function.ThrowingFunction.apply(ThrowingFunction.java:63)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.util.function.ThrowingFunction.apply(ThrowingFunction.java:51)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.beans.factory.aot.BeanInstanceSupplier.lambda$withGenerator$0(BeanInstanceSupplier.java:173)
 ~[na:na]
        at 
org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:68)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:54)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.beans.factory.aot.BeanInstanceSupplier.lambda$get$2(BeanInstanceSupplier.java:208)
 ~[na:na]
        at 
org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:59)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:47)
 ~[native-test.exe:6.0.4]
        at 
org.springframework.beans.factory.aot.BeanInstanceSupplier.invokeBeanSupplier(BeanInstanceSupplier.java:220)
 ~[na:na]
        at 
org.springframework.beans.factory.aot.BeanInstanceSupplier.get(BeanInstanceSupplier.java:208)
 ~[na:na]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1225)
 ~[native-test.exe:6.0.4]
        ... 18 common frames omitted
   Caused by: java.lang.NullPointerException: null
        at 
org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:114)
 ~[native-test.exe:3.0.0]
        at 
org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:86)
 ~[native-test.exe:3.0.0]
        at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36) 
~[native-test.exe:3.0.0]
        ... 54 common frames omitted
        
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to