在 NetbeansIDE 6.0 中运行 jsp 时出现部署错误
Deployment error:
Access to Tomcat server has not been authorized. Set the correct username and password with the "manager" role in the Tomcat customizer in the Server Manager.
See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:163)
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: java.lang.IllegalStateException: Access to Tomcat server has not been authorized. Set the correct username and password with the "manager" role in the Tomcat customizer in the Server Manager.
at org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:390)
at org.netbeans.modules.tomcat5.TomcatManager.modules(TomcatManager.java:623)
at org.netbeans.modules.tomcat5.TomcatManager.getAvailableModules(TomcatManager.java:434)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.getAvailableTMIDsMap(TargetServer.java:319)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedReferences(TargetServer.java:275)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedReferences(TargetServer.java:224)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedReferences(TargetServer.java:221)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.processLastTargetModules(TargetServer.java:343)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.init(TargetServer.java:131)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:468)
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:148)
... 16 more
Caused by: org.netbeans.modules.tomcat5.AuthorizationException
at org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:391)
... 26 more
BUILD FAILED (total time: 20 seconds)
Deployment error:
Access to Tomcat server has not been authorized. Set the correct username and password with the "manager" role in the Tomcat customizer in the Server Manager.
See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:163)
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: java.lang.IllegalStateException: Access to Tomcat server has not been authorized. Set the correct username and password with the "manager" role in the Tomcat customizer in the Server Manager.
at org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:390)
at org.netbeans.modules.tomcat5.TomcatManager.modules(TomcatManager.java:623)
at org.netbeans.modules.tomcat5.TomcatManager.getAvailableModules(TomcatManager.java:434)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.getAvailableTMIDsMap(TargetServer.java:319)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedReferences(TargetServer.java:275)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedReferences(TargetServer.java:224)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedReferences(TargetServer.java:221)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.processLastTargetModules(TargetServer.java:343)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.init(TargetServer.java:131)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:468)
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:148)
... 16 more
Caused by: org.netbeans.modules.tomcat5.AuthorizationException
at org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:391)
... 26 more
BUILD FAILED (total time: 20 seconds)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
编辑 /conf/tomcat-users.xml 并使用您选择的用户名 manager 和密码(manager、tomcat 或其他)添加角色管理器。
如果 Eclipse 要求您输入管理员用户名和密码来进行部署,那么在设置后一定要输入它。
Edit the /conf/tomcat-users.xml and add role manager with username manager and password of your choice (manager, tomcat, or whatever).
If Eclipse requires you to enter the admin username and password to deploy, then by all means enter it once you have it set.
检查“Catalina Base”目录的tomcat-users.xml。
右键单击 Apache Tomcat 6.xx(在服务器下)并查找连接选项卡。
应该有一条叫做卡特琳娜基地的道路。浏览到它并记下凭据集;默认用户名:ide 和密码:tomcat-users。
包括:
确保在该服务器对话框中设置相同的凭据。关闭它,你就可以开始了!
希望这有帮助!
Check the tomcat-users.xml of the "Catalina Base" directory.
Right-click Apache Tomcat 6.xx (under Servers) and look for the connection tab.
There should be a path called Catalina Base. Browse to it and note the credentials set; default is username: ide and password: tomcat-users.
Including:
Make sure you set the same credentials in that Servers dialog. Close it and you are ready to ryme!
Hope this helps!
我更改了 /conf/tomcat-users.xml 时遇到的相同服务器错误
第 1 步:
更改 tomcat-users.xml
我添加了两个角色 manager-script 和 admin。
您可以在配置管理器中找到角色的进一步参考
第 2 步:
添加角色后,第 2 步会将这些凭据添加到 Netbeans 服务器配置中。
选择您的 tomcat 并右键单击以查看属性。
现在选择连接选项卡。输入“用户名”为“me”,“密码”为“pass”,如下图。
The same server error I had for which I changed the /conf/tomcat-users.xml
STEP 1:
Changing tomcat-users.xml
I added two roles manager-script and admin.
You can find the further reference of the roles at Configure Manager
STEP 2:
After adding the role step 2 will be adding those credentials to Netbeans server configuration.
Select your tomcat and Right click to see Properties.
Now select Connection Tab. Enter the "username" as me and "password" as pass, as shown below.