gpt4 book ai didi

java - Catalina.out 中的错误 "org.apache.catalina.realm.CombinedRealm startInterna"

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:15:46 28 4
gpt4 key购买 nike

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

最佳答案

在我的例子中,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>

关于java - Catalina.out 中的错误 "org.apache.catalina.realm.CombinedRealm startInterna",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7134708/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com