Re: Tomcat can't find Java Beans

2010-05-07 Thread Luís de Sousa
This is really bad. I just reloaded the application and it started
running properly, Tomcat can now find the bean... I hadn't created the
tomcat6 user yet.

I believe yesterday, in the midst of all those back and forth e-mails,
I must have fixed something, possibly related to permissions. The way
I installed Tomcat all resources are owned by the root and something
might have been inaccessible.

I'm sorry for taking your time like this and inadvertently creating
such an amount of mail traffic.

Thanks once more,

Luís

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



Re: Tomcat can't find Java Beans

2010-05-07 Thread Luís de Sousa
2010/5/6 Luís de Sousa :
> On Thu, May 6, 2010 at 5:55 PM, Caldarale, Charles R
>  wrote:
>>
>> http://wiki.apache.org/tomcat/HowTo#How_to_run_Tomcat_without_root_privileges.3F
>>

Hi again,

I already have Tomcat listening on port 8080. From what I understand I
still have to do run the foo.c program. But frankly I don't understand
what it does, but all my system's users (root and me) are alredy in
the tomcat6 usergroup.

Can someone detail this a bit more please?

Thank you,

Luís

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



Re: Tomcat can't find Java Beans

2010-05-06 Thread Luís de Sousa
On Thu, May 6, 2010 at 5:55 PM, Caldarale, Charles R
 wrote:
>
> http://wiki.apache.org/tomcat/HowTo#How_to_run_Tomcat_without_root_privileges.3F
>

Chuck thanks for the link. I have to go now, let you know tomorrow how it went.

Luís

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



Re: Tomcat can't find Java Beans

2010-05-06 Thread Luís de Sousa
On Thu, May 6, 2010 at 5:33 PM, Pid  wrote:
>
> So you've got a mix of ownerships there.
>
> You installed Tomcat as 'root', but are now running it as 'tomcat6'?
> Make sure the whole tomcat installation is owned by the tomcat6 user, if
> that's what you're using to start Tomcat.

Ok, I don't have such user in my system. I installed Tomcat with the
good old "sudo apt-get install", all configs where made automatically
by synaptic (or whomever).

> N.B. Starting Tomcat under the root user is bad.

That's exactly what I'm doing. Can you please suggest how should I set
permissions on Tomcat's files? Create the tomcat user or assign it to
mine? Is there a guide I could follow?

> You can delete the default_root directory that Martin suggested you
> create, and also the matching xml file above, which will stop the error.

Ok. Thanks for your patience.

Luís

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



Re: Tomcat can't find Java Beans

2010-05-06 Thread Luís de Sousa
On Thu, May 6, 2010 at 5:17 PM, Pid  wrote:
> On 06/05/2010 17:12, Caldarale, Charles R wrote:
>
> I'd like to know what's in the conf/Catalina/localhost directory too please.
>

Here it goes then.

Luís

l...@kohntarkosz:~/tomcat/conf/Catalina$ ls -la
total 12
drwxrwxr-x 3 root tomcat6 4096 2010-01-07 17:11 .
drwxr-xr-x 4 root root4096 2010-04-23 15:31 ..
drwxrwxr-x 2 root tomcat6 4096 2010-05-06 08:12 localhost
l...@kohntarkosz:~/tomcat/conf/Catalina$ cd localhost
l...@kohntarkosz:~/tomcat/conf/Catalina/localhost$ ls -la
total 32
drwxrwxr-x 2 roottomcat6 4096 2010-05-06 08:12 .
drwxrwxr-x 3 roottomcat6 4096 2010-01-07 17:11 ..
-rw-r--r-- 1 rootroot  51 2010-04-21 17:30 default_root.xml
-rw-r--r-- 1 rootroot 922 2009-10-26 07:19 docs.xml
-rw-r--r-- 1 rootroot  78 2009-10-26 07:19 examples.xml
-rw-r--r-- 1 rootroot 958 2009-10-26 07:19 host-manager.xml
-rw-r--r-- 1 rootroot 948 2009-10-26 07:19 manager.xml
-rw-r--r-- 1 tomcat6 tomcat6   51 2010-01-07 17:12 ROOT.xml

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



Re: Tomcat can't find Java Beans

2010-05-06 Thread Luís de Sousa
On Thu, May 6, 2010 at 5:12 PM, Caldarale, Charles R
 wrote:
>
> Martin who?  If it was Martin Gainty, be very wary - this is another example 
> of needing to take all of his suggestions with large chunks of salt.  There 
> doesn't seem to be any point in having this directory.  Any suggestions 
> received off-list should be treated with suspicion, since the sender isn't 
> willing to make them public.

It was him. Message understood.

> This thread has gone on for a bit, so can you refresh our memories about what 
> URL you are using, and show us the WEB-INF/web.xml for the webapp of interest 
> - as well as fixing the name of the bean to conform to the spec, as Pid 
> already noted.

I'm using this address:

http://localhost:8080/test/greeter.html

Which correctly loads the greeter.html file, the exception pops up
when I click the submit button.

Since the tutorial didn't instruct to that end I didn't create an
web.xml file. I have now created one (listed below) but the the effect
is none.

Thanks,

Luís


http://java.sun.com/xml/ns/javaee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>


30



greeter.html



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



Re: Tomcat can't find Java Beans

2010-05-06 Thread Luís de Sousa
On Thu, May 6, 2010 at 4:48 PM, Pid  wrote:
>
> So what's in your tomcat/webapps directory currently?
>

This:

l...@kohntarkosz:~/tomcat/webapps$ ls -la
total 28
drwxrwxr-x 7 lads tomcat6 4096 2010-05-06 16:53 .
drwxr-xr-x 3 root root4096 2010-01-07 17:11 ..
drwxr-xr-x 2 lads lads4096 2010-05-06 16:09 default_root
drwxrwxr-x 5 lads root4096 2010-05-05 16:45 JSPTut
drwxr-xr-x 4 lads lads4096 2010-05-06 10:41 onjava
drwxrwxr-x 4 lads root4096 2010-05-06 16:51 ROOT
drwxr-xr-x 3 lads lads4096 2010-05-06 16:51 test

. default_root -> what Martin sugested to create
. JSPTut -> a JSP tutorial app
. onjava -> a Beans tutorial from O'Rilley that doesn't run either
. ROOT -> default Tomcat root
. test -> contains the greeter example files I posted above

Luís

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



Re: Tomcat can't find Java Beans

2010-05-06 Thread Luís de Sousa
On Thu, May 6, 2010 at 4:26 PM, Pid  wrote:
>
> Can you remove all of the comments from your server.xml and post it here?
>

Sure,





  
  
  


  

  

  





  

  
  


  


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



Re: Tomcat can't find Java Beans

2010-05-06 Thread Luís de Sousa
2010/5/6 Pid :
>
> The list strips attachments.  Otherwise I wouldn't have need to ask for it.
>

Oops. Here they go then, sorry for the trouble...


 catalina.2010-05-06.log

06-May-2010 08:04:17 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
06-May-2010 08:04:17 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 260 ms
06-May-2010 08:04:17 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
06-May-2010 08:04:17 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
06-May-2010 08:04:17 org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base
/media/Hhai/users/lads/Trabalho/Java/HelloWeb/build/web does not exist
or is not a readable directory
at 
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
at 
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4048)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4217)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at 
org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:123)
at 
org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:145)
at java.security.AccessController.doPrivileged(Native Method)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:769)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
at 
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
at 
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1258)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:516)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at 
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)
06-May-2010 08:04:17 org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
06-May-2010 08:04:17 org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
06-May-2010 08:04:17 org.apache.catalina.core.StandardContext start
SEVERE: Context [/HelloWeb] startup failed due to previous errors
06-May-2010 08:04:17 org.apache.catalina.core.StandardContext stop
INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/HelloWeb]
has not been started
06-May-2010 08:04:17 org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base
/var/lib/tomcat6/webapps/default_root does not exist or is not a
readable directory
at 
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
at 
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4048)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4217)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at 
org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:123)
at 
org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:145)
at java.security.AccessControl

Re: Tomcat can't find Java Beans

2010-05-06 Thread Luís de Sousa
On Thu, May 6, 2010 at 3:14 PM, Pid  wrote:
>>
>> org.apache.jasper.JasperException: /greeter.jsp(5,10) The value for
>
> Now the contents of the greeter.JSP, please?
>

Hi again, that was in the link:

http://www.roseindia.net/ejb/introduction/javabean.shtml

///
/ greeterbean.java

package ourbeans;

public  class greeterbean

{

public greeterbean()   {}

public String  greetme(String s)

{

return   "How are you?"+s;

}

}

///
/ greeter.htm





   

   

   



 

 

///
/ greeter.jsp



 

  

  <%

 String   s =
request.getParameter("text1");

 String   a = greeter1.greetme(s);

 out.println(a);

   %>

  

 

///

Thanks,

Luís

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



Re: Tomcat can't find Java Beans

2010-05-06 Thread Luís de Sousa
On Thu, May 6, 2010 at 3:11 PM, Pid  wrote:
>
> Please post the exact error message and stack trace from the logs.
>

Hi Pid, please look at the attachments.

Thanks,

Luís

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



Re: Tomcat can't find Java Beans

2010-05-06 Thread Luís de Sousa
Sorry, here goes the example exception.

Luís

org.apache.jasper.JasperException: /greeter.jsp(5,10) The value for
the useBean class attribute ourbeans.greeterbean is invalid.

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)

org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1272)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1178)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2411)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2417)
org.apache.jasper.compiler.Node$Root.accept(Node.java:495)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
org.apache.jasper.compiler.Generator.generate(Generator.java:3426)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:216)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301)

org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)


2010/5/6 Luís de Sousa :
> Hello everyone,
>
> Tomcat 6.0.20 on Ubuntu 9.10. I'm trying to deploy simple web
> applications that either use beans or servlets. I'm now down to very
> simple examples like this one:
>
> http://www.roseindia.net/ejb/introduction/javabean.shtml
>
> This is basically a html file, a jsp file that deals with a post and a
> java bean. I'm compiling the java files and copying the resulting
> .class into WEB-INF/classes, using the directory structure to match
> the package names.
>
> Invariably, when the bean is called Tomcat returns an error saying the
> bean is invalid (see example below). It seems that Tomcat isn't
> finding the .class files; do I need to configure something for Tomcat
> to find the beans? I though that for Tomcat 5 and beyond that wasn't
> needed.
>
> Thanks for your help,
>
> Luís
>

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



Tomcat can't find Java Beans

2010-05-06 Thread Luís de Sousa
Hello everyone,

Tomcat 6.0.20 on Ubuntu 9.10. I'm trying to deploy simple web
applications that either use beans or servlets. I'm now down to very
simple examples like this one:

http://www.roseindia.net/ejb/introduction/javabean.shtml

This is basically a html file, a jsp file that deals with a post and a
java bean. I'm compiling the java files and copying the resulting
.class into WEB-INF/classes, using the directory structure to match
the package names.

Invariably, when the bean is called Tomcat returns an error saying the
bean is invalid (see example below). It seems that Tomcat isn't
finding the .class files; do I need to configure something for Tomcat
to find the beans? I though that for Tomcat 5 and beyond that wasn't
needed.

Thanks for your help,

Luís

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



Re: Failed to deploy application

2010-05-04 Thread Luís de Sousa
Hello again,

Today I was able to get an application deployed with auto-deploy, by
simply copying the directory into webapps.

I still can't deploy an application at another disk location using the
GUI or the URL call, same error:

FAIL - Failed to deploy application at context path /JSPTut2

Thank you,

Luís

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



Re: Failed to deploy application

2010-05-03 Thread Luís de Sousa
On Mon, May 3, 2010 at 3:43 PM, Caldarale, Charles R
 wrote:
>
> Let's stop here and go back to the basics: can you access *anything* on this 
> Tomcat?  A "server not found" message indicates that Tomcat may not be 
> running, or there's something blocking the port.

Hi Chuck,

I can access Tomcat's welcome page and the manager GUI. It is up and running.

Thanks,

Luís

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



Re: Failed to deploy application

2010-05-03 Thread Luís de Sousa
Hi Konstantin,

I initially tried to access the application without deploying and got
the server not found message. I then tried deploying it with the GUI
and was also unsuccessful. I then dug out of some old notes the
command that had the tag and tried it, receiving the FAIL message. I
though this was the proper way to submit the subject to the list.

btw, I'm now trying this with a simple Hello World html file.

Thank you,

Luís

On Mon, May 3, 2010 at 3:25 PM, Konstantin Kolinko
>
> Do you try to automate something?
> Or you just do not know about GUI application,
>
> http://localhost:8080/manager/html
>
>
> Do you have autoDeploy turned off for your Host? Because if it is on
> (the default), then your "JSPTut" is already deployed automatically if
> it is in Tomcat's webapps folder.
>
> Best regards,
> Konstantin Kolinko
>

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



Re: Failed to deploy application

2010-05-03 Thread Luís de Sousa
Hello,

Trying with this command:

http://localhost:8080/manager/deploy?path=/JSPTut&war=file:/var/lib/tomcat6/webapps/JSPTut

The result is the same:

FAIL - Failed to deploy application at context path /JSPTut

Thank you,

Luís

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



Re: Failed to deploy application

2010-05-03 Thread Luís de Sousa
On Mon, May 3, 2010 at 1:09 PM, Jie Sheng Chua  wrote:
> Hi Luís de Sousa,
>
> Could you provide your
> OS:
> Tomcat Version:
> JDK:

Hi, sorry for not including this info,

OS: Ubuntu 9.10
Tomcat: Apache Tomcat/6.0.20
JDK: OpenJDK Runtime Environment (IcedTea6 1.6.1) (6b16-1.6.1-3ubuntu3)

Out of desperation I already granted execute and read to permission to
all on the application directory (and all its contents).

Thank you,

Luís

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



Failed to deploy application

2010-05-03 Thread Luís de Sousa
Hello,

I'm trying to deploy an application that is located under the webapps
directory. I'm using the http call:

http://localhost:8080/manager/deploy?path=/var/lib/tomcat6/webapps/JSPTut&tag=JSPTut

And I'm getting this answer back:

FAIL - Failed to deploy application at context path
/var/lib/tomcat6/webapps/JSPTut

Reading documentation in the web I found references to a possible
missing web.xml file but such isn't the case. I've also browsed the
log files but can't find any occurrence for today.

What may be the problem?

Thank you,

Luís

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



Re: Can't login to Tomcat manager pages

2010-04-22 Thread Luís de Sousa
On Thu, Apr 22, 2010 at 2:49 PM, André Warnier  wrote:
> What do you see when running "ps -ef | grep tomcat" ?

Hi André,

I see loadsa stuff I don't understand :)

Luís

$ ps -ef | grep tomcat
root  2129 1  0 08:07 ?00:00:00 /usr/bin/jsvc -user
tomcat6 -cp 
/usr/share/java/commons-daemon.jar:/usr/share/tomcat6/bin/bootstrap.jar
-outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat6.pid
-Djava.awt.headless=true -Xmx128M
-Djava.endorsed.dirs=/usr/share/tomcat6/endorsed
-Dcatalina.base=/var/lib/tomcat6 -Dcatalina.home=/usr/share/tomcat6
-Djava.io.tmpdir=/tmp/tomcat6-temp -Djava.security.manager
-Djava.security.policy=/var/lib/tomcat6/work/catalina.policy
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=/var/lib/tomcat6/conf/logging.properties
org.apache.catalina.startup.Bootstrap
root  2131  2129  0 08:07 ?00:00:00 /usr/bin/jsvc -user
tomcat6 -cp 
/usr/share/java/commons-daemon.jar:/usr/share/tomcat6/bin/bootstrap.jar
-outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat6.pid
-Djava.awt.headless=true -Xmx128M
-Djava.endorsed.dirs=/usr/share/tomcat6/endorsed
-Dcatalina.base=/var/lib/tomcat6 -Dcatalina.home=/usr/share/tomcat6
-Djava.io.tmpdir=/tmp/tomcat6-temp -Djava.security.manager
-Djava.security.policy=/var/lib/tomcat6/work/catalina.policy
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=/var/lib/tomcat6/conf/logging.properties
org.apache.catalina.startup.Bootstrap
tomcat6   2132  2129  0 08:07 ?00:00:12 /usr/bin/jsvc -user
tomcat6 -cp 
/usr/share/java/commons-daemon.jar:/usr/share/tomcat6/bin/bootstrap.jar
-outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat6.pid
-Djava.awt.headless=true -Xmx128M
-Djava.endorsed.dirs=/usr/share/tomcat6/endorsed
-Dcatalina.base=/var/lib/tomcat6 -Dcatalina.home=/usr/share/tomcat6
-Djava.io.tmpdir=/tmp/tomcat6-temp -Djava.security.manager
-Djava.security.policy=/var/lib/tomcat6/work/catalina.policy
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=/var/lib/tomcat6/conf/logging.properties
org.apache.catalina.startup.Bootstrap
root  8600 1  0 14:01 pts/100:00:13 /usr/bin/java
-Djava.util.logging.config.file=/usr/share/tomcat6/conf/logging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.endorsed.dirs=/usr/share/tomcat6/endorsed -classpath
:/usr/share/tomcat6/bin/bootstrap.jar
-Dcatalina.base=/usr/share/tomcat6 -Dcatalina.home=/usr/share/tomcat6
-Djava.io.tmpdir=/usr/share/tomcat6/temp
org.apache.catalina.startup.Bootstrap start
lads  9328  3055  0 14:52 pts/100:00:00 grep tomcat

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



Re: Can't login to Tomcat manager pages

2010-04-22 Thread Luís de Sousa
On Thu, Apr 22, 2010 at 2:18 PM, David Smith  wrote:
> Here's my system's tomcat-user.xml as listed w/ ls -l:
>
> -rw-r-  1  root  tomcat6  1202  2010-04-22  08:15
> /etc/tomcat6/tomcat-users.xml
>
> As you can see, user and group permissions are set, but the "other"
> permissions are all blank.  This is the way it should be since it
> contains password information.
>
> --David

That way I can't access the manager pages. Only when I added the read
permissions to all Tomcat was able to validate the password.

What's wrong?

Luís

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



Re: Can't login to Tomcat manager pages

2010-04-22 Thread Luís de Sousa
On Thu, Apr 22, 2010 at 1:29 PM, David Smith 
> I have a Ubuntu 9.10 system and did exactly what you've posted above.
> It works like a charm.  Have you altered anything else?  Change
> permission inadvertently on tomcat-users.xml?  Mine is read/write by
> root, read-only by tomcat6.

Well David you figured it. By some reason the tomcat-users.xml had
blank permissions for the 'all' group. I have no idea how it ended up
that way, and doubt I'd do such thing out of my own will. Go figure.

I think I'll run a test install on another machine to see if this is
set by default.

Thanks to all for your help,

Luís

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



Re: Can't login to Tomcat manager pages

2010-04-22 Thread Luís de Sousa
Hello everyone, thank you for the answers.

I started by looking for the web.xml file, it is together with
tomcat-users.xml in the CATALINA_HOME/conf directory (/etc/tomcat6). I
don't have a manager directory under /var/lib/tomcat6/webapps so I
checked if the tomcat6-admin package is installed:

$ dpkg -l '*tomcat*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name  Version   Description
+++-=-=-==
ii  libtomcat6-java   6.0.20-2ubuntu2.1 Servlet and JSP engine -- core libraries
ii  tomcat6   6.0.20-2ubuntu2.1 Servlet and JSP engine
ii  tomcat6-admin 6.0.20-2ubuntu2.1 Servlet and JSP engine --
admin web applications
ii  tomcat6-common6.0.20-2ubuntu2.1 Servlet and JSP engine -- common files
ii  tomcat6-docs  6.0.20-2ubuntu2.1 Servlet and JSP engine --
example web applications
ii  tomcat6-examples  6.0.20-2ubuntu2.1 Servlet and JSP engine --
example web applications
ii  tomcat6-user  6.0.20-2ubuntu2.1 Servlet and JSP engine --
tools to create user ins

It seems to be.

I then performed a shutdown and startup. Unlike yesterday, today I'm
getting a "Connection refused" exception when shutting down, but the
startup goes ok. The command line log is below, in attach go the
Tomcat logs for today.

Thank you,

Luís

-

$ cd /usr/share/tomcat6/bin
$ sudo ./shutdown.sh
Using CATALINA_BASE:   /usr/share/tomcat6
Using CATALINA_HOME:   /usr/share/tomcat6
Using CATALINA_TMPDIR: /usr/share/tomcat6/temp
Using JRE_HOME:   /usr
22-Apr-2010 10:51:39 org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at 
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
at 
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
at 
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
at java.net.Socket.connect(Socket.java:546)
at java.net.Socket.connect(Socket.java:495)
at java.net.Socket.(Socket.java:392)
at java.net.Socket.(Socket.java:206)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:422)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:337)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
$ sudo ./startup.sh
Using CATALINA_BASE:   /usr/share/tomcat6
Using CATALINA_HOME:   /usr/share/tomcat6
Using CATALINA_TMPDIR: /usr/share/tomcat6/temp
Using JRE_HOME:   /usr
22-Apr-2010 10:51:46 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
22-Apr-2010 10:51:46 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
22-Apr-2010 10:51:51 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
22-Apr-2010 10:51:46 org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use:8080
	at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:509)
	at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
	at org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
	at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
	at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:535)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:555)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
22-Apr-2010 10:51:46 org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use:8080
	at org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
	at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
	at org.apache.catalina.core.Stand

Can't login to Tomcat manager pages

2010-04-21 Thread Luís de Sousa
Dear all,

Tomcat 6.0.20 on Ubuntu 9.10. I can't login to the manager pages
(http://localhost:8080/manager/html). I set a new user and a few roles
in the /etc/tomcat6/tomcat-users.xml file, restarted Tomcat but can't
possibly login.

I browsed through a number of threads with similar issues but couldn't
solve it so far. Note that I uncommented the users section in the
file, it is reproduced below.

Thanks for you time,

Luís

--





  
  
  
  



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