Tomcat 6 を使用してローカルホストで単純な Web アプリケーションに取り組んでおり、Tomcat へのデプロイに問題はありませんが、WebLogic Server にデプロイしようとすると、次のエラーが発生します。
[HTTP:101216]Servlet: "mdc-dispatcher" failed to preload on startup in Web application: "admin_UI.war".
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource
[/WEB-INF/mdc-dispatcher-servlet.xml]; nested exception is java.lang.NoSuchMethodError:
org/springframework/beans/MutablePropertyValues.add(Ljava/lang/String;Ljava/lang/Object;)Lorg/springframework/beans/MutablePropertyValues; at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420) at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342) at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310) at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) at
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) at
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93) at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123) at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423) at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355) at
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402) at
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316) at
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282) at
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:128) at javax.servlet.GenericServlet.init(GenericServlet.java:242) at
weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283) at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at
weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64) at
weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58) at
weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48) at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539) at
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985) at
weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959) at
weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878) at
weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154) at
weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:485)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427) at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at
weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at
weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:201) at
weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249) at
weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427) at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at
weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at
weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28) at
weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:637) at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at
weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205) at
weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43) at
weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161) at
weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79) at
weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569) at
weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150) at
weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116) at
weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:140) at
weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323) at
weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844) at
weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253) at
weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440) at
weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:164) at
weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195) at
weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13) at
weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69) at
weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528) at
weblogic.work.ExecuteThread.run(ExecuteThread.java:176) Caused by: java.lang.NoSuchMethodError:
org/springframework/beans/MutablePropertyValues.add(Ljava/lang/String;Ljava/lang/Object;)Lorg/springframework/beans/MutablePropertyValues; at
org.springframework.web.servlet.config.AnnotationDrivenBeanDefinitionParser.parse(AnnotationDrivenBeanDefinitionParser.java:101) at
org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69) at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297) at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287) at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135) at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92) at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507) at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398) at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342) at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310) at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) at
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) at
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92) at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123) at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422) at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352) at
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402) at
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316) at
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282) at
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126) at javax.servlet.GenericServlet.init(GenericServlet.java:241) at
weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283) at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at
weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64) at
weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58) at
weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48) at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539) at
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985) at
weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959) at
weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878) at
weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3153) at
weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425) at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at
weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at
weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200) at
weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247) at
weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425) at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at
weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at
weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27) at
weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:636) at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at
weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205) at
weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43) at
weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161) at
weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79) at
weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569) at
weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150) at
weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116) at
weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:140) at
weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323) at
weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844) at
weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253) at
weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440) at
weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163) at
weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195) at
weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13) at
weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68) at
weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528) at
weblogic.work.ExecuteThread.execute(ExecuteThread.java:207) ... 1 more
Stackoverflow (こちらを参照) または Google で見つけたものはすべて、春のバージョンが 3.0 未満であるという問題を指摘しているようですが、私は 3.0.4 を使用しています。
これは私のpomファイルです:
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.fid.mdc</groupId>
<artifactId>admin_UI</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>admin_UI Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<springVersion>3.0.4.RELEASE</springVersion>
</properties>
<dependencies>
<!-- JUnit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- ORACLE JDBC driver, need install yourself -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.6.3.Final</version>
</dependency>
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
<!-- Spring framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${springVersion}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${springVersion}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${springVersion}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${springVersion}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${springVersion}</version>
</dependency>
<!-- for compile only, your container should have this -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<!-- Servlet -->
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- Commons-logging & log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.12</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>
<build>
<finalName>admin_UI</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<webappDirectory>/sample/servlet/container/deploy/directory</webappDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
エクスポートされた戦争のライブラリの内容は次のとおりです。
今日まで WebLogic を使用したことがないので、基本的なことを見落としていた場合はご容赦ください。
ヘルプやアドバイスをいただければ幸いです