Catalina.out中的错误“org.apache.catalina.realm.CombinedRealm startInterna”

时间:2011-08-20 21:11:47

标签: java web-services netbeans logging catalina.out

我在Netbeans中实现了一个基于SOAP的Web服务。我在服务器端遇到了一些问题,它给了我错误500,内部错误,因为我无法自动调试它告诉我检查日志但是我的catalina.out充满了这段代码:

     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 ["ajp-bio-8009"]
        Aug 20, 2011 11:01:39 PM org.apache.catalina.startup.Catalina start
        INFO: Server startup in 7851 ms

基本上它充满了相同的代码,只有当我启动或关闭我的Tomcat没有任何有用的东西时才显示出来,这可能导致我为什么它给我错误500.有人请告诉我可能导致什么

      org.apache.catalina.realm.CombinedRealm startInterna

提前多多谢谢。

这是server.xml的一部分,我根据我的数据库密码等更改了它的值。

                 <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>

2 个答案:

答案 0 :(得分:1)

在我的情况下,Tomcat无法重新启动并引发了相同的消息。但是问题出在POM.xml中,我提到JAVA版本是1.8,并且代码是在JDK 1.8上编译的。但是在服务器上安装的JDK是1.7。更改版本并创建在JDK1.7上编译的war文件解决了我的问题。 希望这可以帮助某人

<properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.7</java.version>
</properties>

答案 1 :(得分:0)

如果您没有使用tomcat 5,请参阅此链接http://tomcat.apache.org/tomcat-5.5-doc/config/realm.html(或tomcat版本的领域文档)。从堆栈跟踪看来,你有一个围绕领域的配置问题。

stacktrace中的错误:在UserDatabase

下找不到UserDatabase组件

在$ CATALINA_HOME / conf / server.xml中,您可以尝试更改

<Resource name="NeuroJDBC" auth="Container"

<Resource name="UserDatabase" auth="Container"