Quantcast

Netbeans 6.0.1: Access to Tomcat server has not been authorized.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Netbeans 6.0.1: Access to Tomcat server has not been authorized.

esharris
I tried installing Netbeans 6.0.1 with the Tomcat 6.0.14. Within this IDE, I
couldn't run the base Web application project. I kept getting a message saying ...

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.

I followed the directions on these links ...

http://wiki.netbeans.org/NbWebAppDeploy
http://wiki.netbeans.org/AddExternalTomcat

... to fix the problem. No matter how much I tinker with tomcat-users.xml, I still get the same error message. How should I proceed?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Netbeans 6.0.1: Access to Tomcat server has not been authorized.

craigmcc
On Tue, Mar 25, 2008 at 6:37 PM, esharris <[hidden email]> wrote:

>
>  I tried installing Netbeans 6.0.1 with the Tomcat 6.0.14. Within this IDE, I
>  couldn't run the base Web application project. I kept getting a message
>  saying ...
>
>  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.
>
>  I followed the directions on these links ...
>
>  http://wiki.netbeans.org/NbWebAppDeploy
>  http://wiki.netbeans.org/AddExternalTomcat
>
>  ... to fix the problem. No matter how much I tinker with tomcat-users.xml, I
>  still get the same error message. How should I proceed?
>

I don't know if this is what is happening to you, but I'm embarassed
to admit that it has bitten me ... twice :-).  Starting with Tomcat 6,
the default version of tomcat-users.xml has XML comment characters
("<!--" and "-->") around the example entries.  Therefore, anything
you modify inside the comment characters will be totally ignored.

Try checking your tomcat-users.xml file for comment characters, and
get rid of them.

Craig McClanahan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Netbeans 6.0.1: Access to Tomcat server has not been authorized.

esharris
craigmcc wrote
[snip]
I don't know if this is what is happening to you, but I'm embarassed
to admit that it has bitten me ... twice :-).  Starting with Tomcat 6,
the default version of tomcat-users.xml has XML comment characters
("") around the example entries.  Therefore, anything
you modify inside the comment characters will be totally ignored.

Try checking your tomcat-users.xml file for comment characters, and
get rid of them.

Craig McClanahan
This is the content of my C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.14\conf\tomcat-users.xml file.

<?xml version='1.0' encoding='utf-8'?>
    <tomcat-users>
        <role rolename="manager"/>
        <role rolename="standard"/>
        <user username="admin" password="pwd" roles="standard,manager"/>
     </tomcat-users>

In Netbeans, I select Tools->Server. Under the connection tab, I set the Username to admin and password to pwd.

The message is ...

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.GeneratedMethodAccessor61.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: 1 second)


You shouldn't be embarrassed; the comments sholdn't be there.

Ugh.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Netbeans 6.0.1: Access to Tomcat server has not been authorized.

Javier Ortiz-2
Thats the key. The file you are looking for is in C:\documents and settings\<user>\.netbeans\<apache folder>\conf\tomcat-users.xml file. The IDE uses that as catalina home.

On Wed, Mar 26, 2008 at 5:41 AM, esharris <[hidden email]> wrote:


craigmcc wrote:
>
> [snip]
> I don't know if this is what is happening to you, but I'm embarassed
> to admit that it has bitten me ... twice :-).  Starting with Tomcat 6,
> the default version of tomcat-users.xml has XML comment characters
> ("<!--" and "-->") around the example entries.  Therefore, anything
> you modify inside the comment characters will be totally ignored.
>
> Try checking your tomcat-users.xml file for comment characters, and
> get rid of them.
>
> Craig McClanahan
>
>

This is the content of my C:\Program Files\Apache Software Foundation\Apache
Tomcat 6.0.14\conf\tomcat-users.xml file.

<?xml version='1.0' encoding='utf-8'?>
   <tomcat-users>
       <role rolename="manager"/>
       <role rolename="standard"/>
       <user username="admin" password="pwd" roles="standard,manager"/>
    </tomcat-users>

In Netbeans, I select Tools->Server. Under the connection tab, I set the
Username to admin and password to pwd.

The message is ...

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.GeneratedMethodAccessor61.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: 1 second)


You shouldn't be embarrassed; the comments sholdn't be there.

Ugh.

--
View this message in context: http://www.nabble.com/Netbeans-6.0.1%3A-Access-to-Tomcat-server-has-not-been-authorized.-tp16293753p16298040.html
Sent from the Netbeans - Users mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Netbeans 6.0.1: Access to Tomcat server has not been authorized.

esharris
That fixed it. Thanks.

<quote author="&quot;Javier A. Ortiz Bultrón&quot;">
Thats the key. The file you are looking for is in C:\documents and
settings\<user>\.netbeans\<apache folder>\conf\tomcat-users.xml file. The
IDE uses that as catalina home.

[snip]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Netbeans 6.0.1: Access to Tomcat server has not been authorized.

udhayam
But im using netbeans 6.5
i cant found any tomcat or apache folder in .netbeans folder...???.


<quote author="esharris">
That fixed it. Thanks.

"Javier A. Ortiz Bultrón" wrote
Thats the key. The file you are looking for is in C:\documents and
settings\<user>\.netbeans\<apache folder>\conf\tomcat-users.xml file. The
IDE uses that as catalina home.

[snip]
Loading...