kimmking opened a new issue #4547: YamlConfigurationExampleMain can't running with maven-exec in Example. URL: https://github.com/apache/incubator-shardingsphere/issues/4547 When we launch YamlConfigurationExampleMain in command line : ``` cd \examples\sharding-jdbc-example\orchestration-example\orchestration-raw-jdbc-example mvn exec:java -Dexec.mainClass="org.apache.shardingsphere.example.orchestration.raw.jdbc.YamlConfigurationExampleMain" -Dexec.classpathScope=runtime -Dexec.cleanupDaemonThreads=false ``` Error occurs : ``` [INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ orchestration-raw-jdbc-example --- [WARNING] java.lang.NullPointerException at org.apache.shardingsphere.example.orchestration.raw.jdbc.YamlConfigurationExampleMain.getFile (YamlConfigurationExampleMain.java:79) at org.apache.shardingsphere.example.orchestration.raw.jdbc.YamlConfigurationExampleMain.getDataSource (YamlConfigurationExampleMain.java:66) at org.apache.shardingsphere.example.orchestration.raw.jdbc.YamlConfigurationExampleMain.main (YamlConfigurationExampleMain.java:53) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:282) at java.lang.Thread.run (Thread.java:748) ``` Cause Thread.currentThread().getClass() belong to super classloader in ``` return new File(Thread.currentThread().getClass().getResource(fileName).getFile()); ``` It should be instead of current bootstrap class.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
