Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 运行我的spring应用程序时出错_Java_Spring_Maven_Spring Mvc - Fatal编程技术网

Java 运行我的spring应用程序时出错

Java 运行我的spring应用程序时出错,java,spring,maven,spring-mvc,Java,Spring,Maven,Spring Mvc,下面是日志。当我添加以下maven依赖项时,我的Spring应用程序开始显示错误。现在,它没有开始 <dependency> <groupId>org.jvnet.staxex</groupId> <artifactId>stax-ex</artifactId> <version>1.7.7</version> </dependency> <dependency&g

下面是日志。当我添加以下maven依赖项时,我的Spring应用程序开始显示错误。现在,它没有开始

<dependency>
    <groupId>org.jvnet.staxex</groupId>
    <artifactId>stax-ex</artifactId>
    <version>1.7.7</version>
</dependency>   
<dependency>
    <groupId>com.sun.xml.stream.buffer</groupId>
    <artifactId>streambuffer</artifactId>
    <version>1.4</version>
</dependency>
<dependency>
    <groupId>com.sun.xml.ws</groupId>
    <artifactId>policy</artifactId>
    <version>2.2.2</version>
</dependency>
<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
    <version>2.2.3</version>
</dependency>
<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-impl</artifactId>
    <version>2.0.1</version>
</dependency>
它导致了以下错误:

    Aug 31, 2015 12:50:57 AM 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.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider com.sun.xml.ws.spi.ProviderImpl could not be instantiated
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5003)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5517)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
        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.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider com.sun.xml.ws.spi.ProviderImpl could not be instantiated
        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)
        ... 22 more
    Caused by: java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider com.sun.xml.ws.spi.ProviderImpl could not be instantiated
        at java.util.ServiceLoader.fail(Unknown Source)
        at java.util.ServiceLoader.access$100(Unknown Source)
        at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
        at java.util.ServiceLoader$1.next(Unknown Source)
        at javax.xml.ws.spi.Provider.getProviderUsingServiceLoader(Unknown Source)
        at javax.xml.ws.spi.Provider.provider(Unknown Source)
        at javax.xml.ws.Service.<init>(Unknown Source)
        at net.authorize.services.Service.<init>(Service.java:53)
        v2.runtime.reflect.Lister.getImplClass(Lister.java:116)
        at com.sun.xml.bind.v2.runtime.reflect.Lister.create(Lister.java:102)
        at com.sun.xml.bind.v2.runtime.property.ArrayProperty.<init>(ArrayProperty.java:26)
        at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.<init>(ArrayERProperty.java:45)
        at com.sun.xml.bind.v2.runtime.property.ArrayReferenceNodeProperty.<init>(ArrayReferenceNodeProperty.java:44)
        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 com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:88)
        at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java:142)
        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:407)
        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:426)
        at com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.<init>(SingleElementNodeProperty.java:64)
        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)

我发现这可能是这些LIB的版本相关问题。如何解决这个问题?我正在使用ApacheTomcat 7和spring 3以及maven 3

可能重复的no bro我正在使用的是apache而不是jboss@hagrawal,错误与eitherOk不同。。请给我一些时间,对您的问题进行一些调查。同时,正如您所猜测的,再次验证所有必需的JAR是否都已就位,并且最重要的是,它们位于运行时引用的类路径中。是的,它们位于运行时中。。我在用maven。。好的,谢谢