我正在尝试为我的项目导入一些gradle依赖项。但是,特定包正在生成NoClassDefFound异常。如果我没有理解错的话,发生这种情况是因为包是在编译时找到的,而不是在运行时找到的。我在下面包含了我的分级构建以及生成的错误。我曾尝试手动将所需的jar添加到WAR库文件中,但没有成功。
我尝试手动将所需的jar添加到WAR库文件中,但没有成功。
repositories {
mavenCentral()
}
dependencies {
providedCompile group: 'javax.faces', name: 'javax.faces-api', version: '2.2'
runtime group: 'org.glassfish', name: 'javax.faces', version: '2.2.18'
runtime group: 'com.liferay.faces', name: 'com.liferay.faces.bridge.ext', version: '5.0.3'
runtime group: 'com.liferay.faces', name: 'com.liferay.faces.bridge.impl', version: '4.1.2'
compileOnly group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1'
compileOnly group: 'com.sun.syndication', name: 'com.springsource.com.sun.syndication', version: '1.0.0'
compileOnly group: 'javax.validation', name: 'validation-api', version: '2.0.1.Final'
compileOnly group: 'org.springframework.security', name: 'spring-security-cas-client', version: '3.0.8.RELEASE'
compileOnly group: 'javax.el', name: 'javax.el-api', version: '3.0.1-b06'
compileOnly group: 'javax', name: 'javaee-api', version: '8.0.1'
compile group: 'log4j', name: 'log4j', version: '1.2.14'
compile group: 'org.richfaces', name: 'richfaces', version: '4.5.17.Final'
compile group: 'org.springframework', name: 'spring-tx', version: '5.1.6.RELEASE'
compile group: 'org.springframework.security', name: 'spring-security-core', version: '5.1.5.RELEASE'
compile group: 'org.springframework.security', name: 'spring-security-web', version: '5.1.5.RELEASE'
compile group: 'org.springframework.security.oauth', name: 'spring-security-oauth2', version: '2.3.5.RELEASE'
compile group: 'org.springframework', name: 'org.springframework.web.servlet', version: '3.2.2.RELEASE'
compile group: 'javax.validation', name: 'validation-api', version: '2.0.1.Final'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.8.1'
compile group: 'org.springframework', name: 'spring-test', version: '4.0.5.RELEASE'
compile group: 'org.testng', name: 'testng', version: '6.14.3'
compile group: 'javax.persistence', name: 'javax.persistence-api', version: '2.2'
compile group: 'org.hibernate', name: 'hibernate-core', version: '4.0.0.CR1'
compile group: 'javax.xml.parsers', name: 'jaxp-api', version: '1.4.5'
compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.1'
compile group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '2.1'
compile group: 'xerces', name: 'xercesImpl', version: '2.12.0'
}
Catastrophic initialization failure! Shutting down portlet WAB due to: java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.bind.DatatypeConverterImpl
java.lang.RuntimeException: java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.bind.DatatypeConverterImpl
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292)
at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletContextListenerExceptionAdapter._initializeContext(ServletContextListenerExceptionAdapter.java:119)
at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletContextListenerExceptionAdapter.contextInitialized(ServletContextListenerExceptionAdapter.java:99)
at jdk.internal.reflect.GeneratedMethodAccessor465.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.http.servlet.internal.registration.ListenerRegistration$EventListenerInvocationHandler.invoke(ListenerRegistration.java:145)
at com.sun.proxy.$Proxy688.contextInitialized(Unknown Source)
at org.eclipse.equinox.http.servlet.internal.context.ContextController.doAddListenerRegistration(ContextController.java:350)
at org.eclipse.equinox.http.servlet.internal.context.ContextController.addListenerRegistration(ContextController.java:303)
at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.addingService(ContextListenerTrackerCustomizer.java:67)
at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.addingService(ContextListenerTrackerCustomizer.java:1)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:903)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:487)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1004)
at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.initListeners(WabBundleProcessor.java:571)
at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.init(WabBundleProcessor.java:217)
at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer._initWabBundle(WebBundleDeployer.java:186)
at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStart(WebBundleDeployer.java:106)
at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.start(WabFactory.java:175)
at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:488)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:230)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:137)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:129)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:191)
at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
at org.eclipse.osgi.container.Module.start(Module.java:467)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
at org.eclipse.osgi.container.ModuleContainer.start(ModuleContainer.java:777)
at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:768)
at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:538)
at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:484)
at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:1028)
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1409)
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.bind.DatatypeConverterImpl
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$3.run(JAXBContextImpl.java:295)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$3.run(JAXBContextImpl.java:294)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:293)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:146)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1169)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:147)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:288)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:277)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:400)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:721)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:662)
at javax.xml.bind.JAXB$Cache.<init>(JAXB.java:127)
at javax.xml.bind.JAXB.getContext(JAXB.java:154)
at javax.xml.bind.JAXB.unmarshal(JAXB.java:183)
at org.richfaces.javascript.ClientServiceConfigParser.parse(ClientServiceConfigParser.java:81)
at org.richfaces.javascript.ClientServiceConfigParser.parseConfig(ClientServiceConfigParser.java:70)
at org.richfaces.application.ValidatorModule.createClientScriptService(ValidatorModule.java:65)
at org.richfaces.application.ValidatorModule.configure(ValidatorModule.java:60)
at org.richfaces.application.ServicesFactoryImpl.init(ServicesFactoryImpl.java:60)
at org.richfaces.application.InitializationListener.createFactory(InitializationListener.java:110)
at org.richfaces.application.InitializationListener.onStart(InitializationListener.java:69)
at org.richfaces.application.InitializationListener.processEvent(InitializationListener.java:167)
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2169)
at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2142)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:301)
at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:739)
at com.sun.faces.config.ConfigManager.publishPostConfigEvent(ConfigManager.java:704)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:270)
... 54 more
2019-04-16 12:20:16.699 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][AutoDeployDir:261] Processing portlet.war
2019-04-16 12:20:27.087 INFO [fileinstall-C:/Users/Argiris/Desktop/Liferay7.1/liferay-ce-portal-7.1.2-ga3/osgi/war][BundleStartStopLogger:42] STOPPED portlet_1.0.0 [1012]
2019-04-16 12:20:29.899 INFO [fileinstall-C:/Users/Argiris/Desktop/Liferay7.1/liferay-ce-portal-7.1.2-ga3/osgi/war][BaseAutoDeployListener:43] Copying portlets for C:\Users\Argiris\Desktop\Liferay7.1\liferay-ce-portal-7.1.2-ga3\tomcat-9.0.10\temp\20190416122027087VBYVASCO\portlet.war
2019-04-16 12:20:32.023 INFO [fileinstall-C:/Users/Argiris/Desktop/Liferay7.1/liferay-ce-portal-7.1.2-ga3/osgi/war][BaseDeployer:877] Deploying portlet.war
2019-04-16 12:21:04.566 INFO [fileinstall-C:/Users/Argiris/Desktop/Liferay7.1/liferay-ce-portal-7.1.2-ga3/osgi/war][BaseAutoDeployListener:50] Portlets for C:\Users\Argiris\Desktop\Liferay7.1\liferay-ce-portal-7.1.2-ga3\tomcat-9.0.10\temp\20190416122027087VBYVASCO\portlet.war copied successfully
2019-04-16 12:21:29.627 INFO [Refresh Thread: Equinox Container: 4507fbcc-c97b-4c9a-83d0-cc94415a5052][BundleStartStopLogger:39] STARTED portlet_1.0.0 [1012]
2019-04-16 12:22:06.848 ERROR [Refresh Thread: Equinox Container: 4507fbcc-c97b-4c9a-83d0-cc94415a5052][com_liferay_portal_osgi_web_wab_extender:97] Catastrophic initialization failure! Shutting down portlet WAB due to: java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.bind.DatatypeConverterImpl
java.lang.RuntimeException: java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.bind.DatatypeConverterImpl
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292)
at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletContextListenerExceptionAdapter._initializeContext(ServletContextListenerExceptionAdapter.java:119)
at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletContextListenerExceptionAdapter.contextInitialized(ServletContextListenerExceptionAdapter.java:99)
at jdk.internal.reflect.GeneratedMethodAccessor465.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.http.servlet.internal.registration.ListenerRegistration$EventListenerInvocationHandler.invoke(ListenerRegistration.java:145)
at com.sun.proxy.$Proxy688.contextInitialized(Unknown Source)
at org.eclipse.equinox.http.servlet.internal.context.ContextController.doAddListenerRegistration(ContextController.java:350)
at org.eclipse.equinox.http.servlet.internal.context.ContextController.addListenerRegistration(ContextController.java:303)
at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.addingService(ContextListenerTrackerCustomizer.java:67)
at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.addingService(ContextListenerTrackerCustomizer.java:1)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:903)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:487)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1004)
at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.initListeners(WabBundleProcessor.java:571)
at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.init(WabBundleProcessor.java:217)
at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer._initWabBundle(WebBundleDeployer.java:186)
at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStart(WebBundleDeployer.java:106)
at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.start(WabFactory.java:175)
at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:488)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:230)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:137)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:129)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:191)
at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
at org.eclipse.osgi.container.Module.start(Module.java:467)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
at org.eclipse.osgi.container.ModuleContainer.start(ModuleContainer.java:777)
at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:768)
at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:538)
at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:484)
at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:1028)
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1409)
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.bind.DatatypeConverterImpl
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$3.run(JAXBContextImpl.java:295)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$3.run(JAXBContextImpl.java:294)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:293)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:146)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1169)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:147)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:211)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:372)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
at javax.xml.bind.JAXB$Cache.<init>(JAXB.java:87)
at javax.xml.bind.JAXB.getContext(JAXB.java:114)
at javax.xml.bind.JAXB.unmarshal(JAXB.java:143)
at org.richfaces.javascript.ClientServiceConfigParser.parse(ClientServiceConfigParser.java:81)
at org.richfaces.javascript.ClientServiceConfigParser.parseConfig(ClientServiceConfigParser.java:70)
at org.richfaces.application.ValidatorModule.createClientScriptService(ValidatorModule.java:65)
at org.richfaces.application.ValidatorModule.configure(ValidatorModule.java:60)
at org.richfaces.application.ServicesFactoryImpl.init(ServicesFactoryImpl.java:60)
at org.richfaces.application.InitializationListener.createFactory(InitializationListener.java:110)
at org.richfaces.application.InitializationListener.onStart(InitializationListener.java:69)
at org.richfaces.application.InitializationListener.processEvent(InitializationListener.java:167)
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2169)
at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2142)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:301)
at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:739)
at com.sun.faces.config.ConfigManager.publishPostConfigEvent(ConfigManager.java:704)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:270)
... 54 more
NoClassDefoundError:无法初始化类com.sun.xml.bind.DataTypeConverterImpl
表示无法加载DataTypeConverterImpl
。这个类存在于Java8中,在Java9中不推荐使用,在Java11中不再可用。
根据这个答案,您希望将JAXB依赖项更新到2.3.0或更新版本。您目前使用的是2008年发布的2.1,它不适合与模块化的JVM一起运行(Java 9中的post Jigsaw)。
我有一个带有多个模块的gradle(Android)库,有些模块依赖于其他模块(与这里的答案非常相似)https://stackoverflow.com/a/41761846/906362) 这对开发很有用,因为我可以对任何模块进行更改,并看到它们反映在其他模块上。但是要将构建发布到,我需要依赖项作为它们的在线版本。比如: 因此,当它被添加到项目中时,它正确地引用了在上找到的版本,而不是在使用时添
至少,这是我目前关于构建失败原因的理论。有人使用了最新的spring、gradle和querydsl吗? 更新:我删除了ewerk插件并简化了我的build.gradle文件,所以现在一切都可以正常构建了。我正在更新以帮助其他可能需要此功能的人:
我正在尝试自定义gradle以构建从groovy文件中获取flyway属性
我有一个Spring Boot服务,其中包含一些用于并行异步调用的代码,如下所示: CompletableFuture future1=accountManager。getResult(url1); CompletableFuture future2=accountManager。getResult(url2); 复杂的Future.allOf(未来1,未来2)。 字符串result1=futur
如果应该调试由gradle运行的应用程序,则添加参数 但有一个例外:
我有一个基于java和kotlin的多模块gradle项目。我正在尝试设置声纳分析。我在根项目中配置了sonar,并用CircleCI进行了分析。sonarcloud中的结果仅适用于其中一个子项目。 我的项目结构如下: 项目A/构建。格拉德尔 项目B/构建。格拉德尔 ProjectC/build。格拉德尔 建造。格拉德尔 这是我的根构建。格雷德尔。