Ошибка при создании bean-компонента с именем 'serviceController': не удалось внедрить зависимостей с автопроводкой; - PullRequest
0 голосов
/ 25 февраля 2019

Я клонировал хранилище.Хранилище работает нормально во всех системах.Но когда я пытаюсь запустить webApp, он дает инъекцию проволочной зависимости не удалось.Ниже приведены настройки.

Pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<!--<parent> <groupId>com.visa.cdisi.test</groupId> <artifactId>applepay-reg-parent</artifactId> 
    <version>1.0</version> <relativePath>../ApplePayRegistrationBuild/pom.xml</relativePath> 
    </parent> -->
<modelVersion>4.0.0</modelVersion>
<groupId>com.visa.data.tranhist</groupId>
<artifactId>applepay-reg_svc</artifactId>
<version>1.0-SNAPSHOT</version>
<name>CDISI_ApplePay_Registration</name>
<properties>
    <hbase_version>2.0.2.3.1.0.0-78</hbase_version>
    <hadoop_version>3.1.1.3.1.0.0-78</hadoop_version>
    <htrace_version_apache>3.2.0-incubating</htrace_version_apache>
    <htrace_version_cloudera>3.0.4</htrace_version_cloudera>
    <zookeeper_version>3.4.6.3.1.0.0-78</zookeeper_version>
    <!-- <zookeeper_version>3.4.5</zookeeper_version> -->
    <htrace4_version_apache>4-4.0.1-incubating</htrace4_version_apache>
    <io_netty>4.0.29.Final</io_netty>
    <metric_core>2.2.0</metric_core>
</properties>
<packaging>war</packaging>
<dependencies>
    <dependency>
        <groupId>com.visa.data.tranhist</groupId>
        <artifactId>tranhist-svc-common</artifactId>
        <version>1.0</version>
    </dependency>
    <dependency>
        <groupId>com.visa.cdisi.common</groupId>
        <artifactId>CDISICommon</artifactId>
        <version>18.1</version>
        <!--<scope>system</scope> <systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/CDISICommon-1.0.jar</systemPath> -->
    </dependency>
    <dependency>
        <groupId>aopalliance</groupId>
        <artifactId>aopalliance</artifactId>
        <version>1.0</version>
    </dependency>
    <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.9</version>
    </dependency>
    <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>3.2.1</version>
    </dependency>
    <!-- 0.1? 1.0 -->

    <dependency>
        <groupId>commons-configuration</groupId>
        <artifactId>commons-configuration</artifactId>
        <version>1.6</version>
    </dependency>
    <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.4</version>
    </dependency>
    <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.6</version>
    </dependency>
    <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.2</version>
    </dependency>
    <!-- NOT MATCH -->
    <dependency>

        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>12.0.1</version>
    </dependency>
    <!-- hadoop jars -->
<dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-auth</artifactId>
        <version>${hadoop_version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-common</artifactId>
        <version>${hadoop_version}</version>
    </dependency>

    <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-client</artifactId>
        <version>${hbase_version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-common</artifactId>
        <version>${hbase_version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-hadoop2-compat</artifactId>
        <version>${hbase_version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-protocol</artifactId>
        <version>${hbase_version}</version>
    </dependency>

    <dependency>
        <groupId>org.apache.zookeeper</groupId>
        <artifactId>zookeeper</artifactId>
        <version>${zookeeper_version}</version>
    </dependency>
    <!-- <dependency>
        <groupId>org.htrace</groupId>
        <artifactId>htrace-core</artifactId>
        <version>${htrace_version_cloudera}</version>
    </dependency>
  <dependency>
        <groupId>org.apache.htrace</groupId>
        <artifactId>htrace-core4</artifactId>
        <version>${htrace4_version_apache}</version>
        <scope>system</scope>
        <systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/htrace-core${htrace4_version_apache}.jar</systemPath>
    </dependency> -->
    <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-all</artifactId>
        <version>${io_netty}</version>
        <!-- <scope>system</scope>
        <systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/netty-all-${io_netty}.jar</systemPath> -->
    </dependency>

    <dependency>
        <groupId>com.yammer.metrics</groupId>
        <artifactId>metrics-core</artifactId>
        <version>${metric_core}</version>
        <!-- <scope>system</scope>
        <systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/metrics-core-${metric_core}.jar</systemPath> -->
    </dependency>

    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-core-asl</artifactId>
        <version>1.8.8</version>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-mapper-asl</artifactId>
        <version>1.8.8</version>
    </dependency>
    <!-- visa artifatory does not have it -->
    <dependency>
        <groupId>org.json</groupId>
        <artifactId>json</artifactId>
        <version>20140107</version>
        <scope>system</scope>
        <systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/json-20140107.jar</systemPath>
    </dependency>
    <dependency>
        <groupId>javax.transaction</groupId>
        <artifactId>jta</artifactId>
        <version>1.1</version>
    </dependency>
    <dependency>
        <groupId>kxml2</groupId>
        <artifactId>kxml2</artifactId>
        <version>2.3.0</version>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.16</version>
    </dependency>
    <!-- visa artifatory does not have it -->
    <!-- <dependency> <groupId>io.netty</groupId> <artifactId>netty</artifactId> 
        <version>3.6.6.Final</version> <scope>system</scope> <systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/netty-3.6.6.Final.jar</systemPath> 
        </dependency> -->
    <!-- spring jars -->

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aop</artifactId>
        <version>4.0.0.RELEASE</version>
    </dependency>
    <!-- dependency> <groupId>org.springframework</groupId> <artifactId>spring-asm</artifactId> 
        <version>4.0.0.RELEASE</version> </dependency -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aspects</artifactId>
        <version>4.0.0.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-beans</artifactId>
        <version>4.0.0.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context-support</artifactId>
        <version>4.0.0.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>4.0.0.RELEASE</version>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>4.0.0.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-expression</artifactId>
        <version>4.0.0.RELEASE</version>
    </dependency>
    <!-- <dependency> <groupId>org.springframework</groupId> <artifactId>spring-instrument-tomcat</artifactId> 
        <version>3.0.5.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> 
        <artifactId>spring-instrument</artifactId> <version>3.0.5.RELEASE</version> 
        </dependency> -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>
        <version>4.0.0.RELEASE</version>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jms</artifactId>
        <version>3.0.5.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>4.0.0.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-oxm</artifactId>
        <version>4.0.0.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>4.0.0.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-tx</artifactId>
        <version>4.0.0.RELEASE</version>
    </dependency>
    <!-- mis match -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>4.0.0.RELEASE</version>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>4.0.0.RELEASE</version>
    </dependency>

    <!-- Micrometer Integration -->
    <dependency>
        <groupId>io.micrometer</groupId>
        <artifactId>micrometer-registry-influx</artifactId>
        <version>1.0.1</version>
    </dependency>

    <dependency>
        <groupId>com.google.protobuf</groupId>
        <artifactId>protobuf-java</artifactId>
        <version>2.5.0</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.5</version>
    </dependency>
    <!-- visa artifatory does not have it -->
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.7.5</version>
        <scope>system</scope>
        <systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/slf4j-log4j12-1.7.5.jar</systemPath>
    </dependency>
    <!-- mismatch name -->

    <dependency>
        <groupId>com.atomikos</groupId>
        <artifactId>transactions-jta</artifactId>
        <version>3.9.3</version>
        <scope>system</scope>
        <systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/transactions-osgi-3.9.3.jar</systemPath>
    </dependency>

    <dependency>
        <groupId>com.thoughtworks.xstream</groupId>
        <artifactId>xstream</artifactId>
        <version>1.4.1</version>
    </dependency>
    <dependency>
        <groupId>org.quartz-scheduler</groupId>
        <artifactId>quartz</artifactId>
        <version>1.8.6</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.0.1</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.geronimo.specs</groupId>
        <artifactId>geronimo-jms_1.1_spec</artifactId>
        <version>1.1.1</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-core</artifactId>
        <version>1.3</version>
    </dependency>
    <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib-nodep</artifactId>
        <version>2.2.2</version>
    </dependency>
    <dependency>
        <groupId>org.javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>3.18.1-GA</version>
    </dependency>
    <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>1.10.19</version>
    </dependency>
    <dependency>
        <groupId>org.objenesis</groupId>
        <artifactId>objenesis</artifactId>
        <version>2.4</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.10</version>
    </dependency>
</dependencies>

<build>
    <!--<finalName>${project.artifactId}-${project.version}-${maven.build.timestamp} 
        </finalName> -->
    <testSourceDirectory>src/test/java</testSourceDirectory>
    <resources>
        <resource>
            <directory>src/main/webapp</directory>
            <excludes>
                <exclude>**/*.java</exclude>
            </excludes>
        </resource>
        <resource>
            <directory>src/main/resources</directory>
            <excludes>
                <exclude>**/*.java</exclude>
            </excludes>
        </resource>

        <!-- <resource> <directory>src/main/webapp</directory> <filtering>true</filtering> 
            </resource> -->

    </resources>

    <!--<filters> <filter>${basedir}/target/filter.properties</filter> </filters> -->




    <plugins>
        <!--<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> 
            <executions> <execution> <phase>generate-resources</phase> <goals> <goal>run</goal> 
            </goals> <configuration> <tasks> <mkdir dir="${project.build.directory}"/> 
            <tstamp> <format property="last.updated" pattern="yyyy-MM-dd hh:mm:ss"/> 
            </tstamp> <echo file="${basedir}/target/filter.properties" message="build.time=${last.updated}"/> 
            </tasks> </configuration> </execution> </executions> </plugin> -->

        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>


        <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.4</version>
            <configuration>
                <webXml>src\main\webapp\WEB-INF\web.xml</webXml>
                <!-- <useDefaultManifestFile>true</useDefaultManifestFile> -->
                <archive>
                    <manifestEntries>
                        <Specification-Title>${project.name}</Specification-Title>
                        <Specification-Version>${project.version}</Specification-Version>
                        <Implementation-Version>${build.number}</Implementation-Version>
                        <Build-Time>${maven.build.timestamp}</Build-Time>
                    </manifestEntries>
                </archive>

            </configuration>
        </plugin>
        <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.7.9</version>
            <executions>
                <execution>
                    <id>jacoco-initialize</id>
                    <goals>
                        <goal>prepare-agent</goal>
                    </goals>
                </execution>
                <execution>
                    <id>jacoco-site</id>
                    <phase>package</phase>
                    <goals>
                        <goal>report</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>



    </plugins>
</build>
<profiles>
    <profile>
        <id>jenkins</id>
        <activation>
            <property>
                <name>env.BUILD_NUMBER</name>
            </property>
        </activation>
        <build>
            <pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${jacoco-maven-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>pre-unit-test</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>report</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </pluginManagement>
        </build>
        <reporting>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>${findbugs-maven-plugin.version}</version>
                    <configuration>
                        <findbugsXmlOutput>true</findbugsXmlOutput>
                        <xmlOutput>true</xmlOutput>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <configuration>
                        <failsOnError>false</failsOnError>
                        <includeResources>false</includeResources>
                        <includeTestResources>false</includeTestResources>
                    </configuration>
                    <reportSets>
                        <reportSet>
                            <reports>
                                <report>checkstyle-aggregate</report>
                            </reports>
                        </reportSet>
                    </reportSets>
                </plugin>
            </plugins>
        </reporting>
    </profile>
    <profile>
        <id>sonar-dp</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <properties>
            <sonar.host.url>http://code.dp.visa.com</sonar.host.url>
            <sonar.login>e3f4fd30ef422b7faed0b8c375a8d7c451ea3c13</sonar.login>
            <sonar.projectName> cdisi.applepayRegistration </sonar.projectName>
            <sonar.exclusions>src/main/java/com/visa/applepay/domain/*,src/main/java/com/visa/applepay/registration/util/ServiceConstants</sonar.exclusions>
        </properties>
    </profile>
    <profile>
        <id>sonar-dev</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <properties>
            <sonar.host.url>http://sl73jnksapd001/sonarqube-dpd/</sonar.host.url>
            <sonar.login>58286b69ecab775b52f213cb0bc460cff46de901</sonar.login>
        </properties>
    </profile>
    <profile>
        <id>sonar-local</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <properties>
            <sonar.host.url>http://localhost:9000/</sonar.host.url>
        </properties>
    </profile>
</profiles>
<!-- <properties> <maven.build.timestamp.format>yyyy-MM-dd-HH-mm-SS</maven.build.timestamp.format> 
    </properties> -->
<distributionManagement>
    <snapshotRepository>
        <id>artifactory.trusted.visa.com</id>
        <name>lta_tran_hist-snapshots</name>
        <url>http://artifactory.trusted.visa.com:8080/lta_tran_hist-snapshots</url>
    </snapshotRepository>
</distributionManagement>

Ошибка:

SEVERE: StandardWrapper.Throwable
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.visa.applepay.registration.IMyService com.visa.applepay.registration.ServiceController.myService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.visa.applepay.registration.IMyService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditService' defined in ServletContext resource [/WEB-INF/ApplePayRegSrv-servlet.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/jms/ObjectMessage
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditService' defined in ServletContext resource [/WEB-INF/ApplePayRegSrv-servlet.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/jms/ObjectMessage
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myService' defined in ServletContext resource [/WEB-INF/ApplePayRegSrv-servlet.xml]: Cannot create inner bean 'com.visa.applepay.registration.MyService#64cbde3c' of type [com.visa.applepay.registration.MyService] while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.visa.applepay.registration.MyService#64cbde3c' defined in ServletContext resource [/WEB-INF/ApplePayRegSrv-servlet.xml]: Cannot resolve reference to bean 'auditService' while setting bean property 'auditService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditService' defined in ServletContext resource [/WEB-INF/ApplePayRegSrv-servlet.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/jms/ObjectMessage
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:292)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1185)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:700)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
    at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:643)
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:606)
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:657)
    at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:525)
    at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:466)
    at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
    at javax.servlet.GenericServlet.init(GenericServlet.java:158)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1230)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1174)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1066)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5409)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5707)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1018)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:994)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1900)
    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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:619)
    at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:566)
    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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
    at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
    at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
    at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
    at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
    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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:361)
    at sun.rmi.transport.Transport$1.run(Transport.java:200)
    at sun.rmi.transport.Transport$1.run(Transport.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Я также пытался добавить <context:component scan>, но это нене работаетЯ не могу понять, в чем может быть проблема, поскольку я только что клонировал работающее веб-приложение.Любая помощь приветствуется.

1 Ответ

0 голосов
/ 25 февраля 2019
<dependency>
    <groupId>org.apache.geronimo.specs</groupId>
    <artifactId>geronimo-jms_1.1_spec</artifactId>
    <version>1.1.1</version>
    <scope>provided</scope>
</dependency>

Вы заявляете, что среда, в которой выполняется приложение, отвечает за предоставление JMS API.Но теперь у вас есть:

Вложенное исключение - это java.lang.NoClassDefFoundError: javax / jms / ObjectMessage

Так что, очевидно, ваша рабочая среда (т.е. Tomcat) не являетсянастроен хорошо, чтобы обеспечить функцию JMS еще.

Скорее всего, когда ваше приложение работает нормально, оно развертывается на сервере приложений JavaEE, который по умолчанию будет поддерживать JMS.Однако теперь вы развертываете приложение на Tomcat, который не предоставляет JMS "из коробки".

Итак, вы должны сначала настроить Tomcat для поддержки JMS (например, обратитесь к this ) или используйте сервер приложений, такой как TomEE , который уже поддерживает JMS "из коробки".

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...