运行脚本时,我遇到了此错误:
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/istack/Pool
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1126)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:135)
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 javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:247)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:234)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:441)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:641)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:584)
at org.wso2.carbon.datasource.utils.DataSourceUtils.loadJAXBConfiguration(DataSourceUtils.java:344)
at org.wso2.carbon.datasource.core.DataSourceManager.initDataSource(DataSourceManager.java:159)
at org.wso2.carbon.datasource.core.DataSourceManager.initDataSources(DataSourceManager.java:137)
at org.wso2.carbon.datasource.core.DataSourceManager.initDataSources(DataSourceManager.java:109)
at org.wso2.carbon.privacy.forgetme.sql.instructions.DatasourceProcessorConfigReader.readProcessorConfig(DatasourceProcessorConfigReader.java:45)
at org.wso2.carbon.privacy.forgetme.sql.instructions.DatasourceProcessorConfigReader.readProcessorConfig(DatasourceProcessorConfigReader.java:32)
at org.wso2.carbon.privacy.forgetme.ConfigReader.loadExtensions(ConfigReader.java:213)
at org.wso2.carbon.privacy.forgetme.ConfigReader.readSystemConfig(ConfigReader.java:112)
at org.wso2.carbon.privacy.forgetme.ForgetMeTool.process(ForgetMeTool.java:201)
at org.wso2.carbon.privacy.forgetme.ForgetMeTool.main(ForgetMeTool.java:141)
jaxb-core和jaxb-impl jars已正确添加到项目中。
最佳答案
jaxb-core取决于istack-commons-runtime,可以在jaxb-core的pom中找到它。 (https://mvnrepository.com/artifact/com.sun.istack/istack-commons-runtime)