You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by she <sh...@gmail.com> on 2012/07/04 07:31:04 UTC

Error

Dear sir,

I am working with Netbeans 6.7.1 + tomcat 6.0.18 having 
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. 


init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
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:224)
        at 
org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment
.java:132)
        at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:103)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor156.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        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:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:
41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at 
org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:278)
        at 
org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:497)
        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:394)
        at 
org.netbeans.modules.tomcat5.TomcatManager.modules(TomcatManager.java:622)
        at 
org.netbeans.modules.tomcat5.TomcatManager.getAvailableModules(TomcatManager.jav
a:433)
        at 
org.netbeans.modules.j2ee.deployment.impl.TargetServer.getAvailableTMIDsMap(Targ
etServer.java:393)
        at 
org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedRef
erences(TargetServer.java:349)
        at 
org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedRef
erences(TargetServer.java:298)
        at 
org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedRef
erences(TargetServer.java:295)
        at 
org.netbeans.modules.j2ee.deployment.impl.TargetServer.processLastTargetModules(
TargetServer.java:417)
        at 
org.netbeans.modules.j2ee.deployment.impl.TargetServer.init(TargetServer.java:16
3)
        at 
org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:
556)
        at 
org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment
.java:189)
        ... 17 more
Caused by: org.netbeans.modules.tomcat5.AuthorizationException
        at 
org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:395)
        ... 27 more



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error

Posted by Albert Kam <mo...@gmail.com>.
First your should find the location of your tomcat-users.xml first,
which is normally located here :
${TOMCAT_HOME}\conf\tomcat-users.xml

If you are using tomcat bundled with Netbeans, the ${TOMCAT_HOME}
should be somewhere in
<personal user folder>\.netbeans\<nb-version>\apache-tomcat-<version>_base\conf

You should see something like this in the tomcat-users.xml :
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>

Now, you should modify the file : add the manager role, and assign it
to a new user named 'she', for example ..
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <role rolename="manager"/>
  <user username="she" password="she" roles="manager"/>
  <user username="tomcat" password="tomcat" roles="tomcat,manager"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>

When running it, and the authentication popup appears, you type "she"
for both the user and password

That should do it ..



On Wed, Jul 4, 2012 at 12:37 PM, Supun Malinga <su...@wso2.com> wrote:
> Hi,
>
> Following would be helpful.
> http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Configuring_Manager_Application_Access
>
> thanks,
>
> On Wed, Jul 4, 2012 at 11:01 AM, she <sh...@gmail.com> wrote:
>
>> Dear sir,
>>
>> I am working with Netbeans 6.7.1 + tomcat 6.0.18 having
>> 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.
>>
>>
>> init:
>> deps-module-jar:
>> deps-ear-jar:
>> deps-jar:
>> library-inclusion-in-archive:
>> library-inclusion-in-manifest:
>> compile:
>> compile-jsps:
>> 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:224)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment
>> .java:132)
>>         at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:103)
>>         at
>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>>         at sun.reflect.GeneratedMethodAccessor156.invoke(Unknown Source)
>>         at
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
>> a:25)
>>         at java.lang.reflect.Method.invoke(Method.java:597)
>>         at
>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>>         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:1337)
>>         at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>>         at
>>
>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:
>> 41)
>>         at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
>>         at
>> org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:278)
>>         at
>> org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:497)
>>         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:394)
>>         at
>> org.netbeans.modules.tomcat5.TomcatManager.modules(TomcatManager.java:622)
>>         at
>>
>> org.netbeans.modules.tomcat5.TomcatManager.getAvailableModules(TomcatManager.jav
>> a:433)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.impl.TargetServer.getAvailableTMIDsMap(Targ
>> etServer.java:393)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedRef
>> erences(TargetServer.java:349)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedRef
>> erences(TargetServer.java:298)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedRef
>> erences(TargetServer.java:295)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.impl.TargetServer.processLastTargetModules(
>> TargetServer.java:417)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.impl.TargetServer.init(TargetServer.java:16
>> 3)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:
>> 556)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment
>> .java:189)
>>         ... 17 more
>> Caused by: org.netbeans.modules.tomcat5.AuthorizationException
>>         at
>>
>> org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:395)
>>         ... 27 more
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
> --
> Supun Malinga,



-- 
Do not pursue the past. Do not lose yourself in the future.
The past no longer is. The future has not yet come.
Looking deeply at life as it is in the very here and now,
the practitioner dwells in stability and freedom.
(Thich Nhat Hanh)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error

Posted by Supun Malinga <su...@wso2.com>.
Hi,

Following would be helpful.
http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Configuring_Manager_Application_Access

thanks,

On Wed, Jul 4, 2012 at 11:01 AM, she <sh...@gmail.com> wrote:

> Dear sir,
>
> I am working with Netbeans 6.7.1 + tomcat 6.0.18 having
> 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.
>
>
> init:
> deps-module-jar:
> deps-ear-jar:
> deps-jar:
> library-inclusion-in-archive:
> library-inclusion-in-manifest:
> compile:
> compile-jsps:
> 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:224)
>         at
>
> org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment
> .java:132)
>         at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:103)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>         at sun.reflect.GeneratedMethodAccessor156.invoke(Unknown Source)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
> a:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>         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:1337)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>         at
>
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:
> 41)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
>         at
> org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:278)
>         at
> org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:497)
>         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:394)
>         at
> org.netbeans.modules.tomcat5.TomcatManager.modules(TomcatManager.java:622)
>         at
>
> org.netbeans.modules.tomcat5.TomcatManager.getAvailableModules(TomcatManager.jav
> a:433)
>         at
>
> org.netbeans.modules.j2ee.deployment.impl.TargetServer.getAvailableTMIDsMap(Targ
> etServer.java:393)
>         at
>
> org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedRef
> erences(TargetServer.java:349)
>         at
>
> org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedRef
> erences(TargetServer.java:298)
>         at
>
> org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedRef
> erences(TargetServer.java:295)
>         at
>
> org.netbeans.modules.j2ee.deployment.impl.TargetServer.processLastTargetModules(
> TargetServer.java:417)
>         at
>
> org.netbeans.modules.j2ee.deployment.impl.TargetServer.init(TargetServer.java:16
> 3)
>         at
>
> org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:
> 556)
>         at
>
> org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment
> .java:189)
>         ... 17 more
> Caused by: org.netbeans.modules.tomcat5.AuthorizationException
>         at
>
> org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:395)
>         ... 27 more
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Supun Malinga,

Re: Error

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

She,

On 7/4/12 1:31 AM, she wrote:
> I am working with Netbeans 6.7.1 + tomcat 6.0.18

Upgrade Tomcat: that version is hideously outdated. While you're at
it, upgrade from SSL 2.0 at the same time.

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

What <Realm> are you using? It is fairly typical to use Tomcat's
MemoryRealm for this sort of thing. If so, what does your MemoryRealm
configuration in conf/server.xml look like? How about your
conf/tomcat-users.xml file? Finally, what about your manager's
context.xml file?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/05bQACgkQ9CaO5/Lv0PDfOgCgrbjms8FQ1H1uDeo/x/2lwubn
2JIAn2/EEyXhbkAdwJJTrtjIPvlCRj4j
=8igF
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org