Tomcat Security/Service question..

2007-11-29 Thread Joe Siebenmann
Hi All,

Basically, I have a Tomcat Service that has a Service User
with a User name and Password, and it's in the Administrator's
Group.

Using WMI, one of the Servlets can connect to a remote machine
and do WMI quires.

Here is the problem..  When I start the Service, that uses tomcat5.exe,
it can connect okay, but the WMI query fails, but when I CD into
Webserver\bin and do a catalina run then everything works great,
it connects and any query works perfectly!

I realize that there are a ton of Windows Security issues involved
with connecting to a remote machine, and doing any query using WMI, and
I'm already investigating that, but when the exact same code, running
on the Service has problems, but using catalina run magically
works, tells me that something else is going on..

I'm running around in circles looking at Access Tokens, Security
Descriptors, etc. and not getting anywhere.

Why does everything work when I use catalina run?
It has to be more than it's using my user credentials when I
do 'catalina run'..  The Service User is in the Administrator's
Group.

If anyone has any insight on why this is happening, and if there
is some way to make everything work using the tomcat5.exe Service,
I'd really appreciate hearing from you.


Thanks,

Joe Siebenmann  


  

Get easy, one-click access to your favorites. 
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Marking servlet ... as unavailable

2007-03-05 Thread Joe Siebenmann


I could be wrong, but it appeared that when the Servlet was flagged
as unavailable, that THAT would cause a series of other problems
which the stackTrace() showed, not what actually caused it to
be flagged as unavailable.

If you're right, that it was flagged outside of Tomcat, than there
isn't anything more to show about the problem, but this:

Mar 4, 2007 12:11:22 PM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet ClientWMIClassesServlet as unavailable

seemed to say that catalina flagged it, at least that's what I
thought..

I tried switching from compiling with jikes to going back to
javac, deleting and reinstalling Java and several other things.
It wasn't an easy thing to
fix.  Whatever it didn't like is commented out, and I still
have to resolve that.


Thanks,

Joe Siebenmann

--

Your logs stated:

SEVERE: Allocate exception for servlet ClientWMIClassesServlet
java.lang.VerifyError: (class: com/jps/NetMgt/ClientWMIClassesServlet, method: 
doGet signature: 
(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V)
 Incompatible argument to function
 at java.lang.Class.getDeclaredConstructors0(Native Method)
 at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
 at java.lang.Class.getConstructor0(Class.java:2671)
 at java.lang.Class.newInstance0(Class.java:321)
 at java.lang.Class.newInstance(Class.java:303)


I am not sure what additionnal informations you would like tomcat to
provide. This error occured while creating an instance of servlet. This
exception comes from the inside of java.lang over which tomcat has no
control. Apart from the exception message it showed you in stdout,
tomcat has no more informations to provide you with.

Side note,
Subclasses of |LinkageError| indicate that a class has some dependency
on another class; however, the latter class has incompatibly changed
after the compilation of the former class.

It could be in your case your compiler got crazy, your .class got
truncated or altered during transfert. Probably just a clean and rebuild
is enough to solve it.



Mar 4, 2007 12:11:22 PM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet ClientWMIClassesServlet as unavailable
Mar 4, 2007 12:11:22 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Allocate exception for servlet ClientWMIClassesServlet
java.lang.VerifyError: (class: com/jps/NetMgt/ClientWMIClassesServlet, method: 
doGet signature: 
(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V)
 Incompatible argument to function
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1055)
at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:641)
at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.jps.NetMgt.ClientWMIServlet.doGet(Unknown Source)
at com.jps.NetMgt.ClientWMIServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527

Marking servlet ... as unavailable

2007-03-04 Thread Joe Siebenmann

Hi All,

I've hit this problem and my development has come to a
screeching halt. :-\

I'm using Tomcat 5.5.17 with a JDK/JRE of 1.5.0_11
on a Windows XP Pro SP2 system.

In my Servlets I use:

RequestDispatcher dispatcher =
getServletContext().getRequestDispatcher(/servlet/BlahServlet);
if ( dispatcher != null )
dispatcher.forward(req, res);

to transfer control from one Servlet to the next, and after
several of these it finally gets this Exception when it gets
to the doGet() of the next Servlet:


Mar 4, 2007 9:19:04 AM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet ClientWMIClassesServlet as unavailable
Mar 4, 2007 9:19:04 AM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Allocate exception for servlet ClientWMIClassesServlet
java.lang.VerifyError: (class: com/jps/NetMgt/ClientWMIClassesServlet, method: 
doGet signature: 
(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V)
 Incompatible argument to function
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1055)
at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:641)
at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.jps.NetMgt.ClientWMIServlet.doGet(Unknown Source)
at com.jps.NetMgt.ClientWMIServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)


There aren't any typos, and I've already deleted every JDK and JRE
on my system and only reinstalled JDK 1.5.0_11, so that there
would be no possible problems of the compile JVM being different
than the JVM Tomcat was running, or any CLASSPATH issues, but
I keep getting the Exception.  I've also carefully gone over
setclasspath.bat, catalina.bat and service.bat files making sure
the paths to Java and JRE, and the CLASSPATHs are correct.

I also made sure that the final RequestDispatcher dispatcher
Object, was valid before I did the forward(). 

Why is the Servlet being Marked as unavailable???

If anyone has ideas on what I can try to fix this
I'd really appreciate hearing it.


Thanks,

Joe Siebenmann
  




___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Marking servlet ... as unavailable

2007-03-04 Thread Joe Siebenmann

Hi All,

I was at least able to get the Servlet that was unavailable
to finally show up.  This has been one of the most frustrating
things I've come across.. :-\

I figured that something was happening in the Servlet before
the Servlet that was being flagged as unavailable, so I
commented out most of the code in that Servlet, and stripped
it down to a bare minimum.  The Servlet that was formally
unavailable finally showed up. :-)

So at least I can keep on developing, and later I'll
have to go back and slowly add back piece by piece until it
hits whatever it didn't like to flag it as unavailable.

It would be nice if there was some better information available
as to what it didn't like for it to flag it as unavailable.
Nothing of any value was in any of the log files.


Thanks,

Joe Siebenmann




 --- On Sun 03/04, Joe Siebenmann  [EMAIL PROTECTED]  wrote:
From: Joe Siebenmann [mailto: [EMAIL PROTECTED]
To: users@tomcat.apache.org
Date: Sun,  4 Mar 2007 09:58:49 -0500 (EST)
Subject: Marking servlet ... as unavailable

Hi All,I've hit this problem and my development has come to ascreeching halt. 
:-\I'm using Tomcat 5.5.17 with a JDK/JRE of 1.5.0_11on a Windows XP Pro SP2 
system.In my Servlets I use:RequestDispatcher dispatcher =
getServletContext().getRequestDispatcher(/servlet/BlahServlet);if ( 
dispatcher != null )dispatcher.forward(req, res);to transfer control from 
one Servlet to the next, and afterseveral of these it finally gets this 
Exception when it getsto the doGet() of the next Servlet:Mar 4, 2007 9:19:04 AM 
org.apache.catalina.core.ApplicationContext logINFO: Marking servlet 
ClientWMIClassesServlet as unavailableMar 4, 2007 9:19:04 AM 
org.apache.catalina.core.ApplicationDispatcher invokeSEVERE: Allocate exception 
for servlet ClientWMIClassesServletjava.lang.VerifyError: (class: 
com/jps/NetMgt/ClientWMIClassesServlet, method: doGet signature: 
(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V)
 Incompatible argument to function   at 
java.lang.Class.getDeclaredConstructors0(Native Method) at 
java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)  at 
java.lang.Class.getConstructor0(Class.java:2671) at 
java.lang.Class.newInstance0(Class.java:321) at 
java.lang.Class.newInstance(Class.java:303)  at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1055) 
 at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)  at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:641)
at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
 at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
   at com.jps.NetMgt.ClientWMIServlet.doGet(Unknown Source)at 
com.jps.NetMgt.ClientWMIServlet.doPost(Unknown Source)   at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)   
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)   
 at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)  at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)   at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
  at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:595)There aren't any typos, and I've 
already deleted every JDK and JREon my system and only reinstalled JDK 
1.5.0_11, so that therewould be no possible problems of the compile JVM being 
differentthan the JVM Tomcat was running, or any CLASSPATH issues, butI keep 
getting the Exception.  I've also carefully gone oversetclasspath.bat, 
catalina.bat and service.bat files making surethe paths to Java and JRE, and 
the CLASSPATHs are correct.I also made sure that the final RequestDispatcher 
dispatcherObject, was valid before I did the forward(). Why is the Servlet 
being

Can you turn off certain log files?

2006-12-21 Thread Joe Siebenmann

Hi All,

I've looked at logging.html and conf/logging.properties and
I still can't figure out if it's possible to turn off certain
log files that get produced.

I've tried changing:

#1catalina.org.apache.juli.FileHandler.level = FINE
1catalina.org.apache.juli.FileHandler.level = SEVERE

But it doesn't affect anything.

The problem is that I'm getting 0-length log files for
stderr_ and sometimes jakarta_service_
and I'd like to be able to turn those off and only have the
.log files for stdout_

Or turn up, or down the level so much that they don't appear..

Is this even possible?

I'd rather not have the logs directory get filled-up with
empty log files.


Thanks,


Joe S.






___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



service.bat --User and --Password???

2006-12-02 Thread Joe Siebenmann

Hi All,

I'm trying to setup Tomcat's service.bat so that it can run the service under a 
user account, in Windows.

I've already looked at Windows service HOW-TO, and it seems to say
that you can only use --User and --Password when the --StartMode is
java or exe, but the problem is that default service.bat is setup
to use jvm. I'm using Tomcat as a webserver for my application,
so I think I need it to use jvm.

It seems like I can't use the service.bat settings to get it to
work right..

Do I need to use JavaService to get everything setup right so that
can be run as a service AND be able to run under a user account??

What about using procrun?

I need to be able to programmatically set it up, so I can't use
any GUI.


Thanks,

Joe S. 




___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



service.bat --User and --Password???

2006-12-02 Thread Joe Siebenmann

Yes, I know that you can do that, but everything has to be
done programmatically, so you CAN'T do that..

When the installer for my application, which uses Tomcat, runs
everything has to be setup without the user doing anything.


Thanks,

Joe S. 




___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Capturing JNI DLL printf()s to Tomcat logfile

2006-01-23 Thread Joe Siebenmann
Hi All,

I want to be able to capture the printf()s in my
JNI DLL to a logfile in Tomcat.

I'm using jakarta-tomcat-5.5.9 and Java 1.5 on Windows XP.

I'd rather use something that's built-into Tomcat..
Commons Logging or the JDK logging.  Something simple
if there is such a thing..

If I have to go with Log4j to do it, that's okay.  There HAS
to be some kind of way to do this.. :-\


Thanks,

Joe Siebenmann


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to capture printf() stdout to stdout_nnn.log?

2006-01-19 Thread Joe Siebenmann
Hi All,

My System.out.println() gets logged to Tomcat's log file fine.

I want to be able to capture the printf()s in the DLL of my
JNI to the same, or another, log file.

If I start Tomcat from the command line using 'startup.bat'
the printf()s show-up on the console output.  My question is
how can I get this to get logged to a log file when I run
Tomcat normally?  I start the Apache Tomcat Service.

I'd rather not have to go through all that using log4j stuff
unless it's really needed.  Can't it be done with the normal
Commons Logging, or what's built-into Tomcat?

I've found bits and pieces on how to do this, but nothing
that's clear.

I'm using Tomcat-5.5.9 with Java 1.5, on Windows XP.


Thanks,

Joe Siebenmann


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]