I have a SOAP based webservice being implemented in Netbeans.I have some issues on the server side and its giving me Error 500, the internal error, since I can't debug it automatically its telling me to check out logs but my catalina.out is full of this code:
Aug 20, 2011 11:01:32 PM org.apache.catalina.realm.CombinedRealm startInternal
SEVERE: Failed to start "org.apache.catalina.realm.UserDatabaseRealm/1.0" realm
org.apache.catalina.LifecycleException: No UserDatabase component found under key UserDatabase
at org.apache.catalina.realm.UserDatabaseRealm.startInternal(UserDatabaseRealm.java:264)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.realm.CombinedRealm.startInternal(CombinedRealm.java:201)
at org.apache.catalina.realm.LockOutRealm.startInternal(LockOutRealm.java:120)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1026)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
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:303)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
Aug 20, 2011 11:01:32 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive soap.war
Aug 20, 2011 11:01:33 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager
Aug 20, 2011 11:01:34 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Aug 20, 2011 11:01:35 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Aug 20, 2011 11:01:35 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory host-manager
Aug 20, 2011 11:01:36 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Aug 20, 2011 11:01:37 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory axis
- Unable to find config file. Creating new servlet engine config file: /WEB-INF/server-config.wsdd
Aug 20, 2011 11:01:39 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Aug 20, 2011 11:01:39 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler开发者_StackOverflow中文版 ["ajp-bio-8009"]
Aug 20, 2011 11:01:39 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7851 ms
basically its full of the same code and only shows up when i startup or shutdown my Tomcat nothing useful which could lead me to as to why its giving me Error 500. Could somebody please tell me what could possibly be causing
org.apache.catalina.realm.CombinedRealm startInterna
Thanks alot in advance.
This is the part of server.xml which i changed to give it values according to my DB its password etc.
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="NeuroJDBC" auth="Container"
type="javax.sql.Datasource"
driverClassName="com.mysql.jdbc.Driver"
password="alpbra"
maxIdle="2"
maxWait="5000"
removeAbandoned="true"
removedTimeout="60"
username="root"
url="jdbc:mysql://localhost:3306/NeuroDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
In my case Tomcat was failing to restart and thrown same message. But problem was in POM.xml I mentioned JAVA version as 1.8 and code was compiled on JDK 1.8. But in server JDK installed was 1.7. Changing version and creating war file compiled on JDK1.7 fixed my problem. Hope this may help someone
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.7</java.version>
</properties>
see this link http://tomcat.apache.org/tomcat-5.5-doc/config/realm.html (or realm docs for your tomcat version if you're not using tomcat 5). From the stacktrace it seems you have a configuration problem around realm.
Error in stacktrace: No UserDatabase component found under key UserDatabase
In your $CATALINA_HOME/conf/server.xml can you try changing
<Resource name="NeuroJDBC" auth="Container"
to
<Resource name="UserDatabase" auth="Container"
精彩评论