2015-08-30 78 views
0

我工作的一個SVN項目。儘管該項目運行在其他電腦上。它不在我的電腦中。我使用eclipse來構建和運行我的應用程序。春天Maven項目豆初始化失敗的錯誤

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'arbapiService' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.anet.api.arb.ARBAPIServiceImpl]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/sun/xml/stream/buffer/AbstractCreatorProcessor 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1037) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:983) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) 
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296) 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) 
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293) 
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) 
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628) 
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) 
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) 
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) 
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) 
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) 
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701) 
    at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204) 
    at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199) 
    at java.util.concurrent.FutureTask.run(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
    at java.lang.Thread.run(Unknown Source) 
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.anet.api.arb.ARBAPIServiceImpl]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/sun/xml/stream/buffer/AbstractCreatorProcessor 
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163) 
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1030) 
    ... 20 more 
Caused by: java.lang.NoClassDefFoundError: com/sun/xml/stream/buffer/AbstractCreatorProcessor 
    at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:359) 
    at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:321) 
    at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:230) 
    at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:212) 
    at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:208) 
    at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:112) 
    at javax.xml.ws.Service.<init>(Unknown Source) 
    at net.authorize.services.Service.<init>(Service.java:53) 
    at net.authorize.common.ClientFactory.getServiceClient(ClientFactory.java:57) 
    at net.authorize.services.client.AnetServiceClientFactory.getServiceClient(AnetServiceClientFactory.java:26) 
    at com.anet.api.arb.ARBAPIServiceImpl.<init>(ARBAPIServiceImpl.java:55) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) 
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) 
    at java.lang.reflect.Constructor.newInstance(Unknown Source) 
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148) 
    ... 22 more 
Caused by: java.lang.ClassNotFoundException: com.sun.xml.stream.buffer.AbstractCreatorProcessor 
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676) 
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521) 
    ... 38 more 
Aug 30, 2015 8:14:37 PM org.apache.catalina.core.StandardContext listenerStart 
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'arbapiService' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.anet.api.arb.ARBAPIServiceImpl]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/sun/xml/stream/buffer/AbstractCreatorProcessor 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1037) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:983) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) 
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296) 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) 
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293) 
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) 
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628) 
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) 
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) 
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) 
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) 
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) 
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701) 
    at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204) 
    at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199) 
    at java.util.concurrent.FutureTask.run(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
    at java.lang.Thread.run(Unknown Source) 
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.anet.api.arb.ARBAPIServiceImpl]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/sun/xml/stream/buffer/AbstractCreatorProcessor 
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163) 
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1030) 
    ... 20 more 
Caused by: java.lang.NoClassDefFoundError: com/sun/xml/stream/buffer/AbstractCreatorProcessor 

看看我的錯誤日誌。 API存在,但不知何故它顯示異常。

+0

你也有你的pom.xml中的org.jvnet.staxex.stax-ex.jar依賴關係嗎? – smoggers

回答

1

它,因爲你的tomcat缺乏對網絡的服務一定罐子。從here下載jar並將這些庫添加到tomcat/lib文件夾中。這將工作像魅力:)

-1

如果使用JRE Oracle以外發生這種情況。 (例如openjdk)。

因此,請確保您使用的Oracle JDK和路徑設置是否正確。您可以使用java -version進行檢查。

+0

我正在使用oracle jre。其他應用程序運行良好 –