雖然盯着Tomcat的,我收到以下錯誤:錯誤:DB找不到名稱
SEVERE: Exception looking up UserDatabase under key UserDatabase
javax.naming.NameNotFoundException: Name UserDatabase is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.java:253)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1049)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Jul 6, 2012 4:32:25 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException: No UserDatabase component found under key UserDatabase
at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.java:261)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1049)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
我用同樣的分貝配置之前在server.xml中和Tomcat工作正常,但自從最近2天我更換服務器並安裝新副本後,它拋出了此錯誤。是
server.xml中定義的GlobalNamingResources如下:
<GlobalNamingResources>
<Resource name="jdbc/abcdOracle" auth="Container"
type="javax.sql.DataSource"
maxActive="100" initialSize="5" maxWait="2000"
username="xxxxxx" password="xxxxxx"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@xxxxxx.xxxxxx.net:1523:ABCDE"
validationQuery="select sysdate from dual"
validationInterval="30000"
testWhileIdle="true" testOnBorrow="true" testOnReturn="false"
removeAbandoned="true" logAbandoned="true"
removeAbandonedTimeout="60" />
</GlobalNamingResources>
任何人有任何提示如何解決這個問題。 謝謝。
還是一樣的錯誤.....沒有快捷方式的任何具體解決方案... – user1417746 2012-07-06 21:00:15
分享整個'server.xml'文件。 – 2012-07-06 21:04:55