大家好,感謝您的幫助。在tomcat 7中部署war文件時出現錯誤
我有一個war文件,我想用tomcat 7進行部署。這個war文件名爲ROOT.war,位於$ TOMCAT_HOME/webapps下。我還有$ TOMCAT_HOME/conf下的2個xml文件(server.xml & web.xml)。我收到以下錯誤,當我運行下面的命令碼:catalina.sh運行
2011年7月13日下午二點16分23秒org.apache.catalina.core.StandardContext filterStart 嚴重:異常開始過濾LogFilter java.lang.IllegalArgumentException:需要屬性'dataSource' at org.springframework.jdbc.support.JdbcAccessor.afterPropertiesSet(JdbcAccessor.java:134) at org.springframework.jdbc.core.JdbcTemplate。(JdbcTemplate.java:141 ) at org.springframework.jdbc.core.simple.SimpleJdbcTemplate。(SimpleJdbcTemplate.java:61) at com.osi.ospoint.web.filter.LogFilter.init(LogFilter.java:92) at org.apac he.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:273) 在org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254) 在org.apache.catalina.core.ApplicationFilterConfig.setFilterDef( ApplicationFilterConfig.java:372) at org.apache.catalina.core.ApplicationFilterConfig。(ApplicationFilterConfig.java:98) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4562) at org.apache .catalina.core.StandardContext $ 2.call(StandardContext.java:5240) at org.apache.catalina.core.StandardContext $ 2.call(StandardContext.java:5235) at java.util.concurrent.FutureTask $ Sync.innerRun (FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.ja va:138) at java.util.concurrent.ThreadPoolExecutor $ Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:908) at java.lang。 Thread.run(Thread.java:662) Jul 13,2011 2:16:23 PM org.apache.catalina.core.StandardContext startInternal SEVERE:錯誤filterStart 2011年7月13日下午2時16分23秒org.apache .catalina.core.StandardContext startInternal 重度:上下文[]啓動失敗,因爲先前的錯誤,我摘錄的server.xml的
<?xml version='1.0' encoding='utf-8'?>
<Server port="8000" shutdown="shutdown">
<!-- firewall friendly jconsole remote access via service:jmx:rmi://<hostname>:802/jndi/rmi://<hostname>:8015/jmxrmi using credentials defined in the jmx files -->
<Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener" rmiRegistryPortPlatform="8015" rmiServerPortPlatform="8020" />
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<!-- define a datasource that is used for the web app deployed here -->
<!-- we decided to move this into the server.xml not in context.xml for reduction of config files -->
<Service name="some-service">
<Executor name="some-thread-pool" namePrefix="some-thread-pool-" maxThreads="150" minSpareThreads="10" maxIdleTime="10000"/>
<Connector address="127.0.0.1" port="8005" protocol="AJP/1.3" redirectPort="8443" executor="some-thread-pool"/>
<Connector address="127.0.0.1" port="8080" protocol="HTTP/1.1"connectionTimeout="20000" redirectPort="8443" executor="some-thread-pool"/>
<!-- jvmRoute attribute on Engine tag not needed if apache is configured to provide this -->
<Engine name="some-engine" defaultHost="some-host">
<!-- <Host name="study-development-host" appBase="webapps" unpackWARs="true" autoDeploy="true"/> -->
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"/>
<Context docBase="ROOT" path="/ROOT" />
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Manager pathname="" />
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
<!-- <property name="dataSource"></property> -->
</Engine>
</Service>
上面的錯誤消息指向LogFilter,但引發異常,因爲屬性dataSource沒有被定義/存在於任何地方。我不明白這應該是什麼意思。男孩,任何幫助,將不勝感激。
布蘭妮