Re: Problems with Tomcat as service on Windows Server 2003

2009-02-12 Thread André Warnier

monesseldeur wrote:

Thank you both for the very comprehensible explanation.

So I followed the steps awarnier suggested:

(0) stopped banging the head and had a good cup of coffee =)


That was probably the most important part of the solution.


So it's clear now the problem is starting the GUI-applications, and the
program I use to print the pdf-files has a GUI (SumatraPdf). I'm using this
alternative as Adobe Acrobat is opening windows each time it's printing a
file, even from the commandline. 


Can I set the 'Interact with desktop' in another place? Or does someone has
a solution to the problem with the GUI?

Not as far as I know.  Get another program, one which really has a 
command-line mode without GUI.
Maybe the program you use has one. You need to consult the 
documentation, and see if there is some command-line switch to run 
headless or Gui-less or something like that.
There should be tons of programs on the web to print PDFs, I am sure one 
of them would fit your needs.



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



Re: Filter versus Valve

2009-02-12 Thread Kees de Kooter
Could you post the code of your valve and your filter?

Please also not that a Valve is a tomcat specific thing i.e. not
portable to other app servers. A Filter is part of the servlet spec
and portable.


On Thu, Feb 12, 2009 at 06:13, Jake Vang vangj...@googlemail.com wrote:
 I've been looking for a way to modify my request header. I found that
 implementing javax.servlet.Filter is the way to go. However, I noticed that
 once after I got my Filter implementation working, my Valve is no longer
 reached (I created my own Valve subclassing
 org.apache.catalina.valves.ValveBase). I've determined this because I've
 placed breakpoints in the Filter.doFilter(...) method and Valve.invoke(...)
 methods, and only the breakpoint in the Filter class implementation is
 caught.

 My context XML for my web application is:

 ?xml version=1.0 encoding=UTF-8?
 Context path=/my-valve
docBase=C:\my-valve\dist
reloadable=true
Valve className=vang.jake.tomcat.valve.ModifyHeaderValve /
 /Context

 My web.xml for my web application is:

 filter
filter-namesimpleFilter/filter-name
filter-classvang.jake.servlet.filter.SimpleFilter/filter-class
/filter
filter-mapping
filter-namesimpleFilter/filter-name
url-pattern/*/url-pattern
/filter-mapping

 Could someone clarify if the use of one (filter) precludes the use of the
 other (valve)? If so, why? If not, why is my valve never reached?

 Thanks.


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



Re: Apache/mod_jk serves random files from tomcat

2009-02-12 Thread Yuval Perlov
I actually upgraded from mod_jk 1.2.26 to 27 to try and make the  
problem go away.

I see the mixup in the file sizes so thought a trace was not necessary.
The mixup occurs only in tomcat originated data - the static stuff  
coming from httpd stays fine.
Moreover, in the past I had it setup so the static stuff came from  
tomcat as well. This naturally resulted in significantly more hits  
between apache and tomcat which made the problem appear much faster  
(hence my theory that some resource is being depleted over time).


Yuval


On Feb 11, 2009, at 3:44 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yuval,

On 2/11/2009 1:56 AM, Yuval Perlov wrote:

What leads me to believe this is unrelated to my application code is
that restarting apache makes the problem go away.


So, when your site goes crazy, a simple httpd-bounce does the trick? No
Tomcat restart or anything required? Existing users and sessions are all
preserved and pretty much the problem just magically goes away?

Crazy.

I see that you are using httpd 2.2.10. Have you tried downgrading to
2.0.x to see if that helps? I've heard some folks having trouble with
mod_jk 1.2.27, so you might try downgrading to 1.2.26 unless something
vital is in the .27 release that you need.

Those are easier fixes than switching to proxy_http or removing httpd
altogether.

If you watch the network traffic with a TCP sniffer like wireshark, does
it look like request A results in response B instead of (expected)
response A? When the server goes crazy, can you start sending TRACE
requests to see if those get mixed-up? Does all traffic get jumbled, or
just the stuff bound for Tomcat?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmS1lgACgkQ9CaO5/Lv0PBNTwCghqlzDnFDppy0WmgHGTdKjMoQ
czQAnijlks4T6XAM72WuC3EgMN1NB+0Q
=xzLb
-END PGP SIGNATURE-

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




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



Re: Weblogic library and Tomcat

2009-02-12 Thread Mikolaj Rydzewski

Mark Thomas wrote:

As well as JDBC drivers, logging frameworks are frequent culprits for causing 
this.
  

What about commons-logging and log4j?

I use following pattern in my code:

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

private static final Log log = LogFactory.getLog(MyClass.class);


Is it good or is there anything better?


--
Mikolaj Rydzewski m...@ceti.pl


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



Re: Running tomcat from my code

2009-02-12 Thread André Warnier

антон кузнецов wrote:
 
Hello. How can i start and stop tomcat from my own code? Something like startTomcat() and stopTomcat() methods, which in its turn calls to some of tomcat methods. (There is a problem that doesn't allow me to simply calls *.bat(*.sh) files). tomcat version = 6.0.13. Thanks for your work.



I'll try this one.

You can stop the whole Tomcat, by connecting to the shutdown port (see 
server.xml) and sending the magic shutdown string defined there.


You can probably stop and start individual *applications* within Tomcat 
programmatically, since that is what the Manager application does.
Since that application's source code is available, you can peek in it to 
see how it works.


But to start Tomcat, I believe the only way is to start the JVM in which 
Tomcat runs, and for that you probably do need to issue an 
operating-system level command.



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



Re: Running tomcat from my code

2009-02-12 Thread Gregor Schneider
The main question is:

- Of which type is the OP's application-code? Java? C? C++? Lisp? ;)

But most important.

What is the OP trying to achieve? It might well be that there's a
smarter solution to the original request.

Rgds

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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



Re: Running tomcat from my code

2009-02-12 Thread André Warnier

антон кузнецов wrote:
 
Hello. How can i start and stop tomcat from my own code? Something like startTomcat() and stopTomcat() methods, which in its turn calls to some of tomcat methods. (There is a problem that doesn't allow me to simply calls *.bat(*.sh) files). tomcat version = 6.0.13. Thanks for your work.



I'll try this one.

You can stop the whole Tomcat, by connecting to the shutdown port (see 
server.xml) and sending the magic shutdown string defined there.


You can probably stop and start individual *applications* within Tomcat 
programmatically, since that is what the Manager application does.
Since that application's source code is available, you can peek in it to 
see how it works.


But to start Tomcat, I believe the only way is to start the JVM in which 
Tomcat runs, and for that you probably do need to issue an 
operating-system level command.



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



Re: Running tomcat from my code

2009-02-12 Thread Mikolaj Rydzewski

André Warnier wrote:
You can probably stop and start individual *applications* within 
Tomcat programmatically, since that is what the Manager application does.
Since that application's source code is available, you can peek in it 
to see how it works.

Use JMX for such purpose.
But to start Tomcat, I believe the only way is to start the JVM in 
which Tomcat runs, and for that you probably do need to issue an 
operating-system level command.

You can embed Tomcat in your code as well.

It depends what your requirements are.

--
Mikolaj Rydzewski m...@ceti.pl


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



RE: Problems with Tomcat as service on Windows Server 2003

2009-02-12 Thread Peter Crowther
 From: monesseldeur [mailto:raymondesseld...@gmail.com]
 I made a small Java web-application which prints pdf-files -
 on-demand - on the server.
[...]
 When I start the server with the startup.bat, I have no
 problem at all. But unfortunately, that's no option.

Services can't interact with the desktop by default.  Andre's already helped 
you with this one.

As I recall, Windows services don't load the user's profile when they start.  
In particular, they don't load the part that is aware of mapped printers for 
that user.  So you'll have to set up the printers in the batch file.

Is startup.bat starting to look attractive yet? :-)

- Peter

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



Manage Transaction with Tomcat

2009-02-12 Thread Beguine

Hello,
Its possible to manage transactions with remote calls to EJB in
jboss-cointainer? 
Example:
1) start transaction
2) first insert with remote ejb
3) second insert with remore ejb
4) commit or rollback 
 
Thanks,
Luca

-
---
Beguine

Java Web Developer
---
-- 
View this message in context: 
http://www.nabble.com/Manage-Transaction-with-Tomcat-tp21973846p21973846.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Running tomcat from my code

2009-02-12 Thread André Warnier

Mikolaj Rydzewski wrote:
[...]


You can embed Tomcat in your code as well.

I'm not so good at Tomcat, and even less at Java.  So this is pure 
curiosity on my part, but maybe it could also interest the OP.


Can you elaborate a bit on the above, in just 2 lines ?
Don't go too deep in Java, or I would be lost.
Is it like :
You start a JVM with your own code, then your code starts a thread 
running Tomcat's bootstrap.jar, and Tomcat then starts its own threads 
etc..  Because your application started the main Tomcat thread, it has 
control over it ?



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



Re: Weblogic library and Tomcat

2009-02-12 Thread Mark Thomas
Mikolaj Rydzewski wrote:
 Mark Thomas wrote:
 As well as JDBC drivers, logging frameworks are frequent culprits for
 causing this.
   
 What about commons-logging and log4j?
 
 I use following pattern in my code:
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 private static final Log log = LogFactory.getLog(MyClass.class);
 
 
 Is it good or is there anything better?

If commons-logging and log4j and deployed as part of your webapp you should be 
OK.

Mark


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



Re: Why is my page repeatedly invoking itself?

2009-02-12 Thread Tim Funk

Use Firefox + LiveHttpHeaders and discover that the page is probably
being invoked many times (probaly due to a bad image tag or other media
asset)

-Tim

Jonathan Mast wrote:

Here's my setup:
Java 1.4.2
Tomcat 5.5.17
Windows XP
I'm developing in NetBeans 6.5 (which is invoking Tomcat)

The page just reads from a database and stuffs the results into a table.

I noticed that the page was taking forever to load, so i placed logging
statements in it, at the beginning of the page (before the db is accessed)
and in the middle (where the results are unrolled into a table).  Upon
looking at the log file i could see that the page was being invoked hundreds
of times.  There is no pattern discernible from the log file, the entries
are mostly like this:
begin page
print row
print row
print row
print row
begin page
print row
print row
begin page

and so on, no real pattern.

Despite being invoked (or whatever) hundreds of time, the page looks alright
once it finally finishes, which i find rather strange.
I've done many pages like this, some of are much more complex and they all
work fine.
And I know its not a problem with the DB api, i created a test page that
calls the exact same method, unrolls the returned array and does a println
for each item, and it works fine.

any help would be appreciated





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



Re: Weblogic library and Tomcat

2009-02-12 Thread Pieter Temmerman
Hi guys,

I've been trying YourKit profiler, as Mark suggested.
However, I am a little bit stuck.

 Tomcat will clear the references it has created but you are responsible for
 clearing the references you create. Once all the references are cleared gc 
 will
 remove it.

  You need to find which objects are holding on to a reference to the the 
  weblogic
  class and make sure it gets cleared when the app restarts. A context 
  listener
  might be useful here.

In my case (according to the catalina.out errors), the problem is most
certainly caused by references to/from the weblogic classes.

Taking this into account, I'm currently looking at a list (read: long
list) of weblogic classes with YourKit, but to be honest, I have no clue
of what I'm looking for.

My idea was to do a search for classes/objects that have references to
weblogic. But instead it only returns me a list of classes/objects with
weblogic in their name, and I don't know how to start from there in
order to find the objects of the webapp that are referencing to those
classes.

Please take into account that I'm not a programmer, I'm just trying to
figure out why I have to restart Tomcat in order to reload the webapp.
The thing is that I would like to learn how to track down these kind of
problems, that's why I'm asking kindly for your help.

Please let me know if you need any additional information, memory
snapshots, or whatsoever.

Thanks in advance.



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



Re: Weblogic library and Tomcat

2009-02-12 Thread Gregor Schneider
Just a shot from the hip:

Is your Webapp using RMI to communicate with WebLogic?

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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



Re: Weblogic library and Tomcat

2009-02-12 Thread Pieter Temmerman
I'm not the developer of this webapp, so I'm afraid I cannot answer that
question.

On Thu, 2009-02-12 at 12:44 +0100, Gregor Schneider wrote:
 Just a shot from the hip:
 
 Is your Webapp using RMI to communicate with WebLogic?
 
 Gregor
-- 
Pieter Temmerman
email: ptemmerman@sadiel.es
skype: ptemmerman.sadiel

SADIEL TECNOLOGÍAS DE LA INFORMACIÓN, S.A. http://www.sadiel.es.




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



org.apache.jasper.JasperException in compiling class for JSP (tomcat4.x, apache2, mod_jk)

2009-02-12 Thread Shweta Parakh -X (shparakh - Infosys at Cisco)
Hi All,
 
I am using Tomcat 4.1.30, Apache2.2.11 and mod_jk1.2.27.
Could someone please help me with below error ?
 
I have JAVA_HOME variable set correctly. I also tried adding below env
variables to tomcat.sh but of no use.
 
_RUNJAVA=$JAVA_HOME\bin\java
_RUNJAVAW=$JAVA_HOME\bin\javaw
_RUNJDB=$JAVA_HOME\bin\jdb
_RUNJAVAC=$JAVA_HOME\bin\javac
Here is the error, the application is displaying.
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
Project base dir set to: ../tomcat
Detected Java version: 1.4 in: ../Java1.6.0_05/jre
Detected OS: SunOS
[javac] WEB-INF/screens/createDevice1_jsp.java added as
WEB-INF/screens/createDevice1_jsp.class doesn't exist.
[javac] Compiling 1 source file
[javac] Using external javac compiler
[javac] Compilation arguments:
[javac] '-classpath'
[javac]
'../Java1.6.0_05/lib/tools.jar:../tomcat/bin/bootstrap.jar:..tomcat/comm
on/lib/*.jar:..Java1.6.0_05/jre/lib/rt.jar'
[javac] '-sourcepath'
[javac] '../tomcat/work/Standalone/localhost/cns'
[javac] '-encoding'
[javac] 'UTF8'
[javac] '-g'
[javac] 
[javac] The ' characters around the executable and arguments are
[javac] not part of the command.
[javac] File to be compiled:
[javac]
../tomcat/work/Standalone/localhost/cns/WEB-INF/screens/createDevice1_js
p.java

at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHa
ndler.java:130)
at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.ja
va:293)
at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
va:473)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:190)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp
atcher.java:432)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat
cher.java:356)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav
a:1069)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestPr
ocessor.java:455)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
279)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at com.cisco.cns.cfgsrv.UserFilter.doFilter(UserFilter.java:65)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:213)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:551)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:242
2)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:171)
at

Re: Weblogic library and Tomcat

2009-02-12 Thread Pieter Temmerman

 Is your Webapp using RMI to communicate with WebLogic?
Don't know if this will answer your question, but I see that the
following class is loaded:

weblogic.iiop.PortableRemoteObjectDelegateImpl
   |--proDelegate of javax.rmi.PortableRemoteObject [Class]





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



Re: Trouble with cluster and JMX

2009-02-12 Thread Filip Hanik - Dev Lists

Eric B. wrote:
Filip Hanik - Dev Lists devli...@hanik.com wrote in message 
news:49937f4b.9050...@hanik.com...
  

sure turn on

org.apache.catalina.ha.level = FINE
org.apache.catalina.tribes.level = FINE

in logging.properties

however, regular membership discovery over multicast show up even without 
these entries


did you mark your webapp distributable/



Crap.  Now that you mention it, I think I forgot to do that.  Will have to 
check up on that tomorrow.  However, after a bunch of fiddling around, 
putting the Manager within the context element got session replication 
working, even if it isn't marked as distributable /.  Would that be 
expected behaviour by putting the Manager in the context?
  
yes, when web.xml has distributable/, that's what tomcat does 
internally, swaps out the manager

Will check tomorrow and post findings.

Thanks,

Eric 





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


  



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



Problem with lib version jasper-el.jar on tomcat 6.0.18

2009-02-12 Thread ruben rubens
Hello,

I found a posible bug or weird performance with tomcat 6.0.18. I'm using
faces  for MVC, when the context is setting the values for bean atributes
from an empty input (input with null value) I don´t finally get a null value
as I expect, I finally get a primitive default value. For example, If I bind
my java.lang.Float to an input text and I do not fill any value in it, I get
a 0.0 value in my Float atribute, and I expected  null (like the original
value).

The libraries versions that I´m using are listed below:

  dependency
groupIdjavax.faces/groupId
artifactIdjsf-api/artifactId
version1.2_04/version
/dependency
dependency
groupIdjavax.faces/groupId
artifactIdjsf-impl/artifactId
version1.2_04/version
/dependency

In tomcat 6.0.13 I´m not getting the same behaivour. I get that I expect. I
think the problem is with this jar: jasper-el.jar.

Is there an explanation for these? In my opinion, I don´t think is a good
performance get a value from a form that nobody has put there.

Thanks in advance.


Re: Running tomcat from my code

2009-02-12 Thread André Warnier

Mikolaj Rydzewski wrote:
[...]


You can embed Tomcat in your code as well.

I'm not so good at Tomcat, and even less at Java.  So this is pure 
curiosity on my part, but maybe it could also interest the OP.


Can you elaborate a bit on the above, in just 2 lines ?
Don't go too deep in Java, or I would be lost.
Is it like :
You start a JVM with your own code, then your code starts a thread 
running Tomcat's bootstrap.jar, and Tomcat then starts its own threads 
etc..  Because your application started the main Tomcat thread, it has 
control over it ?



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



Re: strange problem w/ connection pool and Oracle

2009-02-12 Thread ovidiu asiminei
Hi John,

This is my context.xml

!--
Valve
className=org.apache.catalina.valves.CometConnectionManagerValve /
--
 Resource name=jdbc/dev
auth=Container
scope=Shareable
type=oracle.jdbc.pool.OracleDataSource
driverclassname=oracle.jdbc.pool.OracleDataSource
factory=oracle.jdbc.pool.OracleDataSourceFactory
connectionCachingEnabled=true
connectionCacheName=vvvPool
connectionCacheProperties={MaxStatementsLimit=10,
InitialLimit=10, ConnectionWaitTimeout=180, MaxLimit=80, MinLimit=10,
PropertyCheckInterva
l=180, InactivityTimeout=1800}
url=jdbc:oracle:thin:@db.example.com:1521:v
user=
password=cc /

/Context


In my tomcat lib directory  ( /tomcat/lib )  I have a copy of the Oracle
JDBC jar ( ojdbc14_10g.jar )

Regards,

Ovidiu

On Wed, Feb 11, 2009 at 5:41 PM, john.c.cartwri...@noaa.gov wrote:

 Hello All,

 I'm having a rather strange problem using Oracle-specific types obtained
 from a connection pool defined my my context.xml.  I'm reading the
 ResultSet w/ getObject, but then when I try to cast the Object to the
 correct type, I see:

 Cause: java.lang.ClassCastException: oracle.sql.STRUCT cannot be cast to
 oracle.sql.STRUCT

 Strangely, using a DataSource configured via Spring works fine.  I've
 listed the snippet from my context.xml defining the pool that doesn't
 work and the one for my Spring DataSource that does.

 Can someone please help me understand what's going on here?

 Thanks!

 --john

 context.xml:
 Resource name=jdbc/DEVEL
  type=javax.sql.DataSource
  auth=Container
  username=username
  password=password
  driverClassName=oracle.jdbc.OracleDriver
  url=jdbc:oracle:thin:@myhostname:1521:DB
  maxActive=8
  maxIdle=4/



 applicationContext.xml:

bean id=dataSource
 class=org.springframework.jdbc.datasource.DriverManagerDataSource
  property name=driverClassName value=oracle.jdbc.OracleDriver/
  property name=url value=jdbc:oracle:thin:@myhostname:1521:DB/
  property name=username value=username/
  property name=password value=password/
   /bean


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




-- 
ovidiu asiminei


Re: Filter versus Valve

2009-02-12 Thread Jake Vang
The code for the Filter implementation:

public class SimpleFilter implements Filter {

public void destroy() {

}

public void doFilter(ServletRequest servletRequest, ServletResponse
servletResponse,
FilterChain filterChain) throws IOException, ServletException {
if(servletRequest instanceof HttpServletRequest) {
HttpServletRequest httpServletRequest =
(HttpServletRequest)servletRequest;
FakeHeadersRequest request = new
FakeHeadersRequest(httpServletRequest);
filterChain.doFilter(request, servletResponse);
} else {
filterChain.doFilter(servletRequest, servletResponse);
}
return;
}

public void init(FilterConfig filterConfig) throws ServletException {

}

}

The code for the Valve subclass:

public class ModifyHeaderValve extends ValveBase {

public void invoke(Request request, Response response, ValveContext
valveContext)
throws IOException, ServletException {
if(
!(request instanceof HttpRequest) ||
!(response instanceof HttpResponse)
) {
valveContext.invokeNext(request, response);
return;
}

if(
!(request.getRequest() instanceof HttpServletRequest) ||
!(response.getResponse() instanceof HttpServletResponse)
) {
valveContext.invokeNext(request, response);
return;
}

HttpServletRequest httpServletRequest = (HttpServletRequest)request;
FakeHeadersRequest fakeHeadersRequest = new
FakeHeadersRequest(httpServletRequest);
String value = fakeHeadersRequest.getHeader(username);
valveContext.invokeNext(request, response);

return;
}

}

The code for the FakeHeadersRequest:

public class FakeHeadersRequest extends HttpServletRequestWrapper {

public FakeHeadersRequest(HttpServletRequest request) {
super(request);
}

public String getHeader(String name) {
HttpServletRequest request = (HttpServletRequest)getRequest();

if(username.equals(name)) {
Cookie[] cookies = request.getCookies();
for(int i=0; i  cookies.length; i++) {
if(username.equals(cookies[i].getName())) {
String val = cookies[i].getValue();
return val;
}
}
}

return request.getHeader(name);
}

public Enumeration getHeaderNames() {
List list = new ArrayList();

HttpServletRequest request = (HttpServletRequest)getRequest();
Enumeration e = request.getHeaderNames();
while(e.hasMoreElements()) {
String n = (String)e.nextElement();
list.add(n);
}
list.add(username);

Enumeration en = Collections.enumeration(list);
return en;
}

}

On Thu, Feb 12, 2009 at 3:05 AM, Kees de Kooter kdekoo...@gmail.com wrote:

 Could you post the code of your valve and your filter?

 Please also not that a Valve is a tomcat specific thing i.e. not
 portable to other app servers. A Filter is part of the servlet spec
 and portable.


 On Thu, Feb 12, 2009 at 06:13, Jake Vang vangj...@googlemail.com wrote:
  I've been looking for a way to modify my request header. I found that
  implementing javax.servlet.Filter is the way to go. However, I noticed
 that
  once after I got my Filter implementation working, my Valve is no longer
  reached (I created my own Valve subclassing
  org.apache.catalina.valves.ValveBase). I've determined this because I've
  placed breakpoints in the Filter.doFilter(...) method and
 Valve.invoke(...)
  methods, and only the breakpoint in the Filter class implementation is
  caught.
 
  My context XML for my web application is:
 
  ?xml version=1.0 encoding=UTF-8?
  Context path=/my-valve
 docBase=C:\my-valve\dist
 reloadable=true
 Valve className=vang.jake.tomcat.valve.ModifyHeaderValve /
  /Context
 
  My web.xml for my web application is:
 
  filter
 filter-namesimpleFilter/filter-name
 filter-classvang.jake.servlet.filter.SimpleFilter/filter-class
 /filter
 filter-mapping
 filter-namesimpleFilter/filter-name
 url-pattern/*/url-pattern
 /filter-mapping
 
  Could someone clarify if the use of one (filter) precludes the use of the
  other (valve)? If so, why? If not, why is my valve never reached?
 
  Thanks.
 

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




Re: Running tomcat from my code

2009-02-12 Thread Mikolaj Rydzewski

André Warnier wrote:
I'm not so good at Tomcat, and even less at Java.  So this is pure 
curiosity on my part, but maybe it could also interest the OP.


Can you elaborate a bit on the above, in just 2 lines ?
Don't go too deep in Java, or I would be lost.

Use google ;-)

http://www.onjava.com/pub/a/onjava/2002/04/03/tomcat.html
http://www.google.pl/search?q=how+to+embed+tomcat


--
Mikolaj Rydzewski m...@ceti.pl


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



of the different methods to get a user-id

2009-02-12 Thread André Warnier

Hi.

I am currently testing/comparing two user authentication methods for 
webapps, in a Windows NTLM context.
Despite my abysmal lack of knowledge in matters Java and Tomcat, I 
notice a difference between the two, and I would like to ask here if it 
matters, and if yes how.
Both authentication methods work as servlet filters. One is/was the 
jCIFS HTTP NTLM filter, the other a commercial product which would 
replace it for NTLMv2. I have asked the same question to the developer 
of both but I'm asking again here, to get a confirmation or additional 
observations.


In both cases below, the web user is authenticated from an HTTP NTLM 
point of view, otherwise the call would not even reach the underlying 
servlet.


In the case of the jCIFS filter, a servlet that is running under cover 
of the filter, can obtain the authenticated user-id by a 
request.getUserPrincipal().getName() call.


In the case of the other filter however, the previous call seems to 
return null, and the way to obtain the authenticated user-id is via 
request.getRemoteUser().


From a practical immediate and personal point of view, it matters 
little to me, as I can adapt my servlet code to either of the above.


But my basic question is : what is the difference, and could that impact 
other servlet code which I did not write ?


For example also, in the case where the user authentication would be 
made at the level of a front-end Apache, connected to this Tomcat via 
mod_jk, and the appropriate parameter has been set so that Tomcat 
accepts the Apache authentication, would either one of the methods above 
return a result different from the other one ?



For convenience, I copied below the Java API doc of both methods.
I see that there is a difference, but my knowledge is too scarce to 
understand the possible implications.


Thanks.

--

*getUserPrincipal*

public java.security.Principal *getUserPrincipal*()

Returns a java.security.Principal object containing the name of the
current authenticated user. If the user has not been authenticated, the
method returns null.

*Returns:*

a java.security.Principal containing the name of the user making this
request; null if the user has not been authenticatedaw

*getRemoteUser*

public java.lang.String *getRemoteUser*()

Returns the login of the user making this request, if the user has been
authenticated, or null if the user has not been authenticated. Whether
the user name is sent with each subsequent request depends on the
browser and type of authentication. Same as the value of the CGI
variable REMOTE_USER.

*Returns:*

a String specifying the login of the user making this request, or null
if the user login is not known

---

Code of a small test servlet which runs under the coverture of Jespa's 
or jCIFS's HTTP filter :


package starweb;

import java.io.IOException;
import java.io.PrintWriter;
import java.security.Principal;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public final class DumpUser extends HttpServlet {
  public void doGet(HttpServletRequest request, HttpServletResponse
response)
  throws IOException, ServletException {

// what I was doing with jCIFS HTTP filter
//  Principal user = request.getUserPrincipal();
//  String userName = (user == null ? *null* : user.getName());

// what I'm doing with the Jespa filter
  String userName = request.getRemoteUser();
  if (userName == null) {
userName = *null*;
  }

  response.setContentType(text/plain);
  PrintWriter writer = response.getWriter();
  writer.println(userName);

  }
}



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



Re: Running tomcat from my code

2009-02-12 Thread André Warnier

Mikolaj Rydzewski wrote:

André Warnier wrote:
I'm not so good at Tomcat, and even less at Java.  So this is pure 
curiosity on my part, but maybe it could also interest the OP.


Can you elaborate a bit on the above, in just 2 lines ?
Don't go too deep in Java, or I would be lost.

Use google ;-)

http://www.onjava.com/pub/a/onjava/2002/04/03/tomcat.html
http://www.google.pl/search?q=how+to+embed+tomcat



I did not think I would find a 2-line answer in Google.
And apparently I was right.  Thanks anyway for suggesting it.
Ok, so it's apparently a lot more complicated than what I suggested.

Why did I expect a 2-line answer with anything to do with Java anyway, 
silly me.

;-)
(yes, I know, it depends how long the lines are..)

Anyway, to get back to the OP's question thus, that was not really a 
simple answer to his problem, was it ?


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



Re: Weblogic library and Tomcat

2009-02-12 Thread Mikolaj Rydzewski

Pieter Temmerman wrote:

In my case (according to the catalina.out errors), the problem is most
certainly caused by references to/from the weblogic classes.
  


INFO: Illegal access: This instance of the web application has already
been stopped. Could not load weblogic.common.T3MiscLogger. 
java.lang.IllegalStateException

   at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1272)
   at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
   at
weblogic.time.common.internal.TimeTable.execute(TimeTable.java:227)
   at
weblogic.time.common.internal.TimeEventGenerator.run(TimeEventGenerator.java:117)
   at java.lang.Thread.run(Thread.java:595)

I don't know Weblogic, but looking at this stacktrace it seems that 
there's additional thread working that uses weblogic classes. This 
thread is not stopped when you undeploy your webapp. Then, it tries to 
access some classes (e.g. weblogic.common.T3MiscLogger), but they are 
unavailable (because webapp has been undeployed).

You should stop such thread during undeploying (e.g. in listener).


--
Mikolaj Rydzewski m...@ceti.pl


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



Re: Problem with lib version jasper-el.jar on tomcat 6.0.18

2009-02-12 Thread Mark Thomas
ruben rubens wrote:
 Hello,
 
 I found a posible bug or weird performance with tomcat 6.0.18. I'm using
 faces  for MVC, when the context is setting the values for bean atributes
 from an empty input (input with null value) I don´t finally get a null value
 as I expect, I finally get a primitive default value. For example, If I bind
 my java.lang.Float to an input text and I do not fill any value in it, I get
 a 0.0 value in my Float atribute, and I expected  null (like the original
 value).
 
 The libraries versions that I´m using are listed below:
 
   dependency
 groupIdjavax.faces/groupId
 artifactIdjsf-api/artifactId
 version1.2_04/version
 /dependency
 dependency
 groupIdjavax.faces/groupId
 artifactIdjsf-impl/artifactId
 version1.2_04/version
 /dependency
 
 In tomcat 6.0.13 I´m not getting the same behaivour. I get that I expect. I
 think the problem is with this jar: jasper-el.jar.
 
 Is there an explanation for these? In my opinion, I don´t think is a good
 performance get a value from a form that nobody has put there.

That behaviour is required by the EL spec (It was a bug that was fixed.). You
can disable the spec compliant behaviour by using
org.apache.el.parser.COERCE_TO_ZERO=false

Mark



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



Re: Weblogic library and Tomcat

2009-02-12 Thread Gregor Schneider
On Thu, Feb 12, 2009 at 1:19 PM, Pieter Temmerman
ptemmerman@sadiel.es wrote:

 Is your Webapp using RMI to communicate with WebLogic?
 Don't know if this will answer your question, but I see that the
 following class is loaded:

 weblogic.iiop.PortableRemoteObjectDelegateImpl
   |--proDelegate of javax.rmi.PortableRemoteObject [Class]


What I remeber is, that we once had problems running one of our
servlets in Weblogic. The problem is, that Weblogic at this time
(don't know if it's still the case) has been using it's own
RMI-implementation including RMI-compiler.

Therefore we had do create two different servlets (which where using
the means of RMI to connect to another server):

- one for Tomcat using Sun's RMI-implementation
- one for WebLogic using Beas's RMI-implementation

Maybe this doesn't have anything to do with your problems, but if you
don't find any other clue, I'd pass this information to the developer
of ypur app so that he can take a look.

More info:

http://edocs.beasys.com/wls/docs70/rmi/rmi_intro.html

Rgds

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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



Re: Problem with lib version jasper-el.jar on tomcat 6.0.18

2009-02-12 Thread ruben rubens
Thanks Mark, you helped me!

2009/2/12 Mark Thomas ma...@apache.org

 ruben rubens wrote:
  Hello,
 
  I found a posible bug or weird performance with tomcat 6.0.18. I'm using
  faces  for MVC, when the context is setting the values for bean atributes
  from an empty input (input with null value) I don´t finally get a null
 value
  as I expect, I finally get a primitive default value. For example, If I
 bind
  my java.lang.Float to an input text and I do not fill any value in it, I
 get
  a 0.0 value in my Float atribute, and I expected  null (like the original
  value).
 
  The libraries versions that I´m using are listed below:
 
dependency
  groupIdjavax.faces/groupId
  artifactIdjsf-api/artifactId
  version1.2_04/version
  /dependency
  dependency
  groupIdjavax.faces/groupId
  artifactIdjsf-impl/artifactId
  version1.2_04/version
  /dependency
 
  In tomcat 6.0.13 I´m not getting the same behaivour. I get that I expect.
 I
  think the problem is with this jar: jasper-el.jar.
 
  Is there an explanation for these? In my opinion, I don´t think is a good
  performance get a value from a form that nobody has put there.

 That behaviour is required by the EL spec (It was a bug that was fixed.).
 You
 can disable the spec compliant behaviour by using
 org.apache.el.parser.COERCE_TO_ZERO=false

 Mark



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




Re: of the different methods to get a user-id

2009-02-12 Thread Tim Funk

Personally -

I would expect
request.getRemoteUser() == request.getUserPrincipal().getName()

But there no literature which says that must be so. So in that absence 
of that - you'll probably need a RemoteUserHackFilter to unify the 
various behaviors and then you standardize on one model and 
RemoteUserHackFilter would adapt to that.


-Tim


André Warnier wrote:

Hi.

I am currently testing/comparing two user authentication methods for 
webapps, in a Windows NTLM context.
Despite my abysmal lack of knowledge in matters Java and Tomcat, I 
notice a difference between the two, and I would like to ask here if it 
matters, and if yes how.
Both authentication methods work as servlet filters. One is/was the 
jCIFS HTTP NTLM filter, the other a commercial product which would 
replace it for NTLMv2. I have asked the same question to the developer 
of both but I'm asking again here, to get a confirmation or additional 
observations.




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



Re: of the different methods to get a user-id

2009-02-12 Thread André Warnier

Tim Funk wrote:

Personally -

I would expect
request.getRemoteUser() == request.getUserPrincipal().getName()

But there no literature which says that must be so. 


And the reality shows it isn't.
So somehow there must be two distinct underlying thingies in Tomcat 
where the two different answers are coming from.


So in that absence
of that - you'll probably need a RemoteUserHackFilter to unify the 
various behaviors and then you standardize on one model and 
RemoteUserHackFilter would adapt to that.



What worries me is not so much my own code, which I can indeed adapt.
What worries me more is other webapps which I do not write.

Somehow it seems to me that there is some inconsistency there.  It seems 
to me that a webapp should have one source it should be able to rely on 
for a user-id, and not have to hack, no ?



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



Tomcat unexpectedly shuts down

2009-02-12 Thread Adlane ACHAB
hi, below is my tomcat config

Tomcat VersionJVM VersionJVM VendorOS NameOS VersionOS ArchitectureApache
Tomcat/6.0.181.6.0-b105Sun Microsystems Inc.Linux2.6.23.12i386


Essentially what happens is this:

The server is running along fine, and then all of a sudden, for no apparent
reason that we can find, the server shuts down. The timing does not seem to
coincide with any stack trace.

Just Tomcat service terminated unexpectedly.

please help


Re: Tomcat unexpectedly shuts down

2009-02-12 Thread Mark Thomas
Adlane ACHAB wrote:
 hi, below is my tomcat config
 
 Tomcat VersionJVM VersionJVM VendorOS NameOS VersionOS ArchitectureApache
 Tomcat/6.0.181.6.0-b105Sun Microsystems Inc.Linux2.6.23.12i386
 
 
 Essentially what happens is this:
 
 The server is running along fine, and then all of a sudden, for no apparent
 reason that we can find, the server shuts down. The timing does not seem to
 coincide with any stack trace.
 
 Just Tomcat service terminated unexpectedly.
 
 please help
 

Linux OOM killer?

Mark


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



Re: Tomcat unexpectedly shuts down

2009-02-12 Thread Adlane ACHAB
no, idon't find any exception on logs

2009/2/12 Mark Thomas ma...@apache.org

 Adlane ACHAB wrote:
  hi, below is my tomcat config
 
  Tomcat VersionJVM VersionJVM VendorOS NameOS VersionOS ArchitectureApache
  Tomcat/6.0.181.6.0-b105Sun Microsystems Inc.Linux2.6.23.12i386
 
 
  Essentially what happens is this:
 
  The server is running along fine, and then all of a sudden, for no
 apparent
  reason that we can find, the server shuts down. The timing does not seem
 to
  coincide with any stack trace.
 
  Just Tomcat service terminated unexpectedly.
 
  please help
 

 Linux OOM killer?

 Mark


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




-- 

= = = = = = = = = = = = =
Adlane ACHAB
Tél : 06 13 46 66 21
adlane.ac...@gmail.com


RE: Tomcat unexpectedly shuts down

2009-02-12 Thread Peter Crowther
 From: Adlane ACHAB [mailto:adlane.ac...@gmail.com]
 Tomcat VersionJVM VersionJVM VendorOS NameOS VersionOS
 ArchitectureApache
 Tomcat/6.0.181.6.0-b105Sun Microsystems Inc.Linux2.6.23.12i386


 Essentially what happens is this:

 The server is running along fine, and then all of a sudden,
 for no apparent
 reason that we can find, the server shuts down. The timing
 does not seem to
 coincide with any stack trace.

 Just Tomcat service terminated unexpectedly.

http://linux-mm.org/OOM_Killer ?  The JVM is often the largest user of memory 
on the system, and hence the first victim when the killer has to run.

Note the line in there Finally the accumulated score is bitshifted by the 
user-settable value of /proc/pid/oomadj - if it *is* the OOM killer, you can 
at least cause it not to kill Tomcat but to choose some other victim :-).

- Peter

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



RE: Tomcat unexpectedly shuts down

2009-02-12 Thread Caldarale, Charles R
 From: Mark Thomas [mailto:ma...@apache.org]
 Subject: Re: Tomcat unexpectedly shuts down

  The server is running along fine, and then all of
  a sudden, for no apparent reason that we can find,
  the server shuts down.

 Linux OOM killer?

Or perhaps code in one of your webapps calling System.exit()?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



RE: Tomcat unexpectedly shuts down

2009-02-12 Thread Caldarale, Charles R
 From: Adlane ACHAB [mailto:adlane.ac...@gmail.com]
 Subject: Re: Tomcat unexpectedly shuts down

 no, idon't find any exception on logs

There won't be any messages in the Tomcat logs, since the kernel just 
terminates the entire selected process without warning when the OOM killer 
fires up.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



RE: Running tomcat from my code

2009-02-12 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: Re: Running tomcat from my code

  You can embed Tomcat in your code as well.

 Can you elaborate a bit on the above, in just 2 lines ?
 Don't go too deep in Java, or I would be lost.

You have to be lost before you can be found:
http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/startup/Embedded.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



Re: Tomcat unexpectedly shuts down

2009-02-12 Thread Adlane ACHAB
no, i grep System.exit and no result found

2009/2/12 Caldarale, Charles R chuck.caldar...@unisys.com

  From: Mark Thomas [mailto:ma...@apache.org]
  Subject: Re: Tomcat unexpectedly shuts down
 
   The server is running along fine, and then all of
   a sudden, for no apparent reason that we can find,
   the server shuts down.
 
  Linux OOM killer?

 Or perhaps code in one of your webapps calling System.exit()?

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.

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




-- 

= = = = = = = = = = = = =
Adlane ACHAB
Tél : 06 13 46 66 21
adlane.ac...@gmail.com


Re: Tomcat unexpectedly shuts down

2009-02-12 Thread Gregor Schneider
What's Linux /var/log/syslog saying? Anything in there?

@Chuck: never heard about the OOM-killer. But what I almost can't
believe is that if such a thing exists, that it doesn't carve it's
footprints into syslog...

Puzzled...

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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



Re: Running tomcat from my code

2009-02-12 Thread Mikolaj Rydzewski

André Warnier wrote:
Anyway, to get back to the OP's question thus, that was not really a 
simple answer to his problem, was it ?

He didn't say he needs simple answer.

--
Mikolaj Rydzewski m...@ceti.pl


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



RE: Tomcat unexpectedly shuts down

2009-02-12 Thread Caldarale, Charles R
 From: Gregor Schneider [mailto:rc4...@googlemail.com]
 Subject: Re: Tomcat unexpectedly shuts down

 @Chuck: never heard about the OOM-killer.

GIYF.  A nasty beast, at best.

 But what I almost can't believe is that if such a
 thing exists, that it doesn't carve it's footprints
 into syslog...

Likely, but since the OP used the term exception, I expect he was referring 
to the Tomcat, not system, logs.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



Re: Tomcat unexpectedly shuts down

2009-02-12 Thread Adlane ACHAB
I don't think that's a memory problem

[image: daily graph]

2009/2/12 Caldarale, Charles R chuck.caldar...@unisys.com

  From: Adlane ACHAB [mailto:adlane.ac...@gmail.com]
  Subject: Re: Tomcat unexpectedly shuts down
 
  no, idon't find any exception on logs

 There won't be any messages in the Tomcat logs, since the kernel just
 terminates the entire selected process without warning when the OOM killer
 fires up.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.

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




-- 

= = = = = = = = = = = = =
Adlane ACHAB
Tél : 06 13 46 66 21
adlane.ac...@gmail.com


RE: Re: Trouble with cluster and JMX

2009-02-12 Thread Jorge Medina
 
To get more verbose messages, the documentation mentions to use the key
org.apache.catalina.tribes.MESSAGES
I am currently trying it...

-Jorge


-Original Message-
From: news [mailto:n...@ger.gmane.org] On Behalf Of Eric B.
Sent: Wednesday, February 11, 2009 11:55 PM
To: users@tomcat.apache.org
Subject: Re: Trouble with cluster and JMX

Filip Hanik - Dev Lists devli...@hanik.com wrote in message
news:49937f4b.9050...@hanik.com...
 sure turn on

 org.apache.catalina.ha.level = FINE
 org.apache.catalina.tribes.level = FINE

 in logging.properties

 however, regular membership discovery over multicast show up even 
 without these entries

 did you mark your webapp distributable/

Crap.  Now that you mention it, I think I forgot to do that.  Will have
to check up on that tomorrow.  However, after a bunch of fiddling
around, putting the Manager within the context element got session
replication working, even if it isn't marked as distributable /.
Would that be expected behaviour by putting the Manager in the context?

Will check tomorrow and post findings.

Thanks,

Eric 




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


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



RE: Tomcat unexpectedly shuts down

2009-02-12 Thread Caldarale, Charles R
 From: Adlane ACHAB [mailto:adlane.ac...@gmail.com]
 Subject: Re: Tomcat unexpectedly shuts down

 no, i grep System.exit and no result found

And did you look inside all jars that your webapps might be using as libraries? 
 You can disable System.exit() with a SecurityManager, if desired.

Do the Tomcat logs show a normal shutdown sequence, or do they just abruptly 
stop?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



Re: Weblogic library and Tomcat

2009-02-12 Thread Pieter Temmerman
Thanks Gregor,

I'll pass that info on to the developer.

Btw, I wrote a small contextListener just to play with it.
In the contextDestroyed method, I print a message.
The weird thing is that in catalina.out I first see a message that my
application is redeploying (when I redeploy obviously) before the
contextDestroyed message appears.
I would rather expect my debug message before seeing the app redeploy.

any thoughts on that?

On Thu, 2009-02-12 at 14:56 +0100, Gregor Schneider wrote:
 On Thu, Feb 12, 2009 at 1:19 PM, Pieter Temmerman
 ptemmerman@sadiel.es wrote:
 
  Is your Webapp using RMI to communicate with WebLogic?
  Don't know if this will answer your question, but I see that the
  following class is loaded:
 
  weblogic.iiop.PortableRemoteObjectDelegateImpl
|--proDelegate of javax.rmi.PortableRemoteObject [Class]
 
 
 What I remeber is, that we once had problems running one of our
 servlets in Weblogic. The problem is, that Weblogic at this time
 (don't know if it's still the case) has been using it's own
 RMI-implementation including RMI-compiler.
 
 Therefore we had do create two different servlets (which where using
 the means of RMI to connect to another server):
 
 - one for Tomcat using Sun's RMI-implementation
 - one for WebLogic using Beas's RMI-implementation
 
 Maybe this doesn't have anything to do with your problems, but if you
 don't find any other clue, I'd pass this information to the developer
 of ypur app so that he can take a look.
 
 More info:
 
 http://edocs.beasys.com/wls/docs70/rmi/rmi_intro.html
 
 Rgds
 
 Gregor
-- 
Pieter Temmerman
email: ptemmerman@sadiel.es
skype: ptemmerman.sadiel

SADIEL TECNOLOGÍAS DE LA INFORMACIÓN, S.A. http://www.sadiel.es.




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



Re: Tomcat unexpectedly shuts down

2009-02-12 Thread Adlane ACHAB
no, nothing about shutdown in tomcat logs, it just abruptly stop

I will check for jar files

2009/2/12 Caldarale, Charles R chuck.caldar...@unisys.com

  From: Adlane ACHAB [mailto:adlane.ac...@gmail.com]
  Subject: Re: Tomcat unexpectedly shuts down
 
  no, i grep System.exit and no result found

 And did you look inside all jars that your webapps might be using as
 libraries?  You can disable System.exit() with a SecurityManager, if
 desired.

 Do the Tomcat logs show a normal shutdown sequence, or do they just
 abruptly stop?

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.

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




-- 

= = = = = = = = = = = = =
Adlane ACHAB
Tél : 06 13 46 66 21
adlane.ac...@gmail.com


RE: Tomcat unexpectedly shuts down

2009-02-12 Thread Caldarale, Charles R
 From: Adlane ACHAB [mailto:adlane.ac...@gmail.com]
 Subject: Re: Tomcat unexpectedly shuts down

 no, nothing about shutdown in tomcat logs, it just abruptly stop

Then it is almost definitely the Linux OOM killer.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



RE: Weblogic library and Tomcat

2009-02-12 Thread Caldarale, Charles R
 From: Pieter Temmerman [mailto:ptemmerman@sadiel.es]
 Subject: Re: Weblogic library and Tomcat

 I would rather expect my debug message before seeing the app redeploy.

Sounds normal to me; the redeployment request triggers the call to the 
contextDestroyed() method.  You might want to log a message for 
contextInitialized() also.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



Re: Running tomcat from my code

2009-02-12 Thread André Warnier

Mikolaj Rydzewski wrote:

André Warnier wrote:
Anyway, to get back to the OP's question thus, that was not really a 
simple answer to his problem, was it ?

He didn't say he needs simple answer.

Not in so many words, Pan Mikolaj, but the general tone of the question 
kind of implied that.

Which is why I felt qualified enough to give a first tentative answer.
Usually, I do not dare, because they are way over my head.
Fortunately, there are real experts here to correct my mistakes.
;-)


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



Re: Tomcat unexpectedly shuts down

2009-02-12 Thread Adlane ACHAB
but I think that we have enough memory,so the Linux OOM killer will not act.
will do?

2009/2/12 Caldarale, Charles R chuck.caldar...@unisys.com

  From: Adlane ACHAB [mailto:adlane.ac...@gmail.com]
  Subject: Re: Tomcat unexpectedly shuts down
 
  no, nothing about shutdown in tomcat logs, it just abruptly stop

 Then it is almost definitely the Linux OOM killer.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.

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




-- 

= = = = = = = = = = = = =
Adlane ACHAB
Tél : 06 13 46 66 21
adlane.ac...@gmail.com


Re: Tomcat unexpectedly shuts down

2009-02-12 Thread Gregor Schneider
Again:

Anything in /var/log/syslog?

If OOMKiller was invoked, there should be somehhing like

Dec 16 10:31:17 velo kernel: [611084.971774] kded invoked oom-killer:
gfp_mask=0x1201d2, order=0, oomkilladj=0

Rgds

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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



Re: of the different methods to get a user-id

2009-02-12 Thread Pid
André Warnier wrote:
 Tim Funk wrote:
 Personally -

 I would expect
 request.getRemoteUser() == request.getUserPrincipal().getName()

 But there no literature which says that must be so. 
 
 And the reality shows it isn't.
 So somehow there must be two distinct underlying thingies in Tomcat
 where the two different answers are coming from.

The Tomcat source code would be a reasonable place to look and see what
Tomcat does, but if a Filter is operating on the request, it may be
replacing it with a Servlet[Response/Request]Wrapper that only overrides
one of the two method return values.


p


 So in that absence
 of that - you'll probably need a RemoteUserHackFilter to unify the
 various behaviors and then you standardize on one model and
 RemoteUserHackFilter would adapt to that.

 What worries me is not so much my own code, which I can indeed adapt.
 What worries me more is other webapps which I do not write.
 
 Somehow it seems to me that there is some inconsistency there.  It seems
 to me that a webapp should have one source it should be able to rely on
 for a user-id, and not have to hack, no ?
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 


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



Re: Tomcat unexpectedly shuts down

2009-02-12 Thread André Warnier

Gregor Schneider wrote:


@Chuck: never heard about the OOM-killer. 


The Tomcat security team have been trying to find this guy for several 
years now, but they're being very discreet about it.
One of the difficulties is that he cleans up after himself by wiping out 
any memory of its intervention.
You have probably heard many times about him in the past, you just have 
forgotten.  That's a sure sign.



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



Re: Tomcat unexpectedly shuts down

2009-02-12 Thread Adlane ACHAB
no, I check the var/log/syslog, no trace of oom killer

2009/2/12 Gregor Schneider rc4...@googlemail.com

 Again:

 Anything in /var/log/syslog?

 If OOMKiller was invoked, there should be somehhing like

 Dec 16 10:31:17 velo kernel: [611084.971774] kded invoked oom-killer:
 gfp_mask=0x1201d2, order=0, oomkilladj=0

 Rgds

 Gregor
 --
 just because your paranoid, doesn't mean they're not after you...
 gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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




-- 

= = = = = = = = = = = = =
Adlane ACHAB
Tél : 06 13 46 66 21
adlane.ac...@gmail.com


Re: Tomcat unexpectedly shuts down

2009-02-12 Thread Pieter Temmerman
What about attaching strace to the tomcat process?
Try executing strace ./bin/catalina.sh run

On Thu, 2009-02-12 at 18:01 +0100, Adlane ACHAB wrote:
 no, I check the var/log/syslog, no trace of oom killer
 
 2009/2/12 Gregor Schneider rc4...@googlemail.com
 
  Again:
 
  Anything in /var/log/syslog?
 
  If OOMKiller was invoked, there should be somehhing like
 
  Dec 16 10:31:17 velo kernel: [611084.971774] kded invoked oom-killer:
  gfp_mask=0x1201d2, order=0, oomkilladj=0
 
  Rgds
 
  Gregor
  --
  just because your paranoid, doesn't mean they're not after you...
  gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
  gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
-- 
Pieter Temmerman
email: ptemmerman@sadiel.es
skype: ptemmerman.sadiel

SADIEL TECNOLOGÍAS DE LA INFORMACIÓN, S.A. http://www.sadiel.es.




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



Re: Tomcat unexpectedly shuts down

2009-02-12 Thread Adlane ACHAB
I think that will produce a hugh log file,The problem is that, tomcat didn't
shutdown directly after start, it can run for one or two days and stop
unexpectedly

2009/2/12 Pieter Temmerman ptemmerman@sadiel.es

 What about attaching strace to the tomcat process?
 Try executing strace ./bin/catalina.sh run

 On Thu, 2009-02-12 at 18:01 +0100, Adlane ACHAB wrote:
  no, I check the var/log/syslog, no trace of oom killer
 
  2009/2/12 Gregor Schneider rc4...@googlemail.com
 
   Again:
  
   Anything in /var/log/syslog?
  
   If OOMKiller was invoked, there should be somehhing like
  
   Dec 16 10:31:17 velo kernel: [611084.971774] kded invoked oom-killer:
   gfp_mask=0x1201d2, order=0, oomkilladj=0
  
   Rgds
  
   Gregor
   --
   just because your paranoid, doesn't mean they're not after you...
   gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
   gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
  
   -
   To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
   For additional commands, e-mail: users-h...@tomcat.apache.org
  
  
 
 
 --
 Pieter Temmerman
 email: ptemmerman@sadiel.es
 skype: ptemmerman.sadiel

 SADIEL TECNOLOGÍAS DE LA INFORMACIÓN, S.A. http://www.sadiel.es.




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




-- 

= = = = = = = = = = = = =
Adlane ACHAB
Tél : 06 13 46 66 21
adlane.ac...@gmail.com


deploying web application on remote server

2009-02-12 Thread Sneha Manohar
Hi ,
 
I have developed web application using netbeans , I wish to deploy on remote 
server .
I have placed files under / webapps  directory of remote server. Tomcat is 
unable to locate libraries .  how do I make tomcat locate libraries which are 
under WEB-INF/lib folder
 
sneha


  Connect with friends all over the world. Get Yahoo! India Messenger at 
http://in.messenger.yahoo.com/?wm=n/

Re: strange problem w/ connection pool and Oracle

2009-02-12 Thread John Cartwright
Thanks to all who responded.  Chuck seemed to hit the nail on the head - 
as soon as I removed the duplicate JDBC driver from the WEB-INF/lib, the 
problem went away.  I didn't intend to have the duplicate driver there, 
it was the result of omitting the scopeprovided/scope in my 
pom.xml.  However, I wouldn't have associated the strange looking class 
cast exception w/ the different classloaders.


Thanks again for the help!

--john


Caldarale, Charles R wrote:

From: john.c.cartwri...@noaa.gov [mailto:john.c.cartwri...@noaa.gov]
Subject: strange problem w/ connection pool and Oracle

Cause: java.lang.ClassCastException: oracle.sql.STRUCT cannot
be cast to oracle.sql.STRUCT



This is a classic symptom of having a class file loaded by two different 
classloaders; despite having the same names, they are not the same class, due 
to the different classloaders.

Check your webapp's lib directory to see if there's a copy of the Oracle JDBC 
jar lurking in there; you can't have it in the webapp if Tomcat is managing the 
connection pool for you.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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

  


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



RE: of the different methods to get a user-id

2009-02-12 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: Re: of the different methods to get a user-id

  I would expect
  request.getRemoteUser() == request.getUserPrincipal().getName()
  But there no literature which says that must be so.

 And the reality shows it isn't.
 So somehow there must be two distinct underlying thingies in Tomcat
 where the two different answers are coming from.

As Pid surmised, it's not Tomcat that is giving you different answers.  Here's 
Tomcat's implementation of HttpServletRequest.getRemoteUser():

public String getRemoteUser() {
if (userPrincipal != null) {
return (userPrincipal.getName());
} else {
return (null);
}
}

[Aside: Don't know why people think return statements need parentheses; maybe 
they get paid for programming based on the number of characters used.]

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



Re: JSP Bean not working

2009-02-12 Thread David Smith
Have you considered putting Client in a package and then referencing the
package?  While people occasionally get away with packageless classes,
it's highly recommended that all classes be in a package.

--David

John Byrne wrote:

 Hello all,

  

 I can’t get a simple form to work.  The error I’m getting is:

 org.apache.jasper.JasperException: Unable to compile class for JSP: 
  
 An error occurred at line: 8 in the jsp file: /CreateClient.jsp
 Client cannot be resolved to a type
 5: meta http-equiv=Content-Type content=text/html; charset=utf-8 /
 6: titleFormTest/title
 7: /head
 8: jsp:useBean id=client scope=request class=Client /
 9: jsp:setProperty name=Client property=* /
 10: body
 11: H1Validating New User Data/H1

  

 I’ve attached a zip file with the jsp code, html files, web.xml,
 classes and hierarchy in it. 

  

 Help!

  

 Thank you,

  

 John

  

  

 John Byrne

 Support Network for Battered Women

 1257 Tasman Dr. Suite C

 Sunnyvale, CA

 94089

  

 (408) 541-6100 x 138

 Fax: (408) 541-

  

 

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


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



RE: JSP Bean not working

2009-02-12 Thread Caldarale, Charles R
 From: John Byrne [mailto:jby...@snbw.org]
 Subject: JSP Bean not working

 8: jsp:useBean id=client scope=request class=Client /

JSPs are not allowed to use the default (empty) package; you need to add a 
package statement to your Client class and include that in the JSP.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



Re: deploying web application on remote server

2009-02-12 Thread Pid
Sneha Manohar wrote:
 Hi ,
  
 I have developed web application using netbeans , I wish to deploy on remote 
 server .
 I have placed files under / webapps  directory of remote server. Tomcat is 
 unable to locate libraries .  how do I make tomcat locate libraries which are 
 under WEB-INF/lib folder
  
 sneha
 
 
   Connect with friends all over the world. Get Yahoo! India Messenger at 
 http://in.messenger.yahoo.com/?wm=n/


to the tune of Humpty Dumpty

The Original Poster sent an email
The Original Poster had a vague FAIL
All the list members and all of the devs
Couldn't put Tomcat together again.


because you didn't tell us what operating system you're using, what
version of tomcat, java etc, or what your log error messages said.

?

p

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



RE: JSP Bean not working

2009-02-12 Thread Caldarale, Charles R
 From: David Smith [mailto:d...@cornell.edu]
 Subject: Re: JSP Bean not working

 it's highly recommended that all classes be in a package.

For JSPs, it's not just recommended, it's required by the spec.  Servlets can 
get away with an empty package, JSPs can't.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



Hello

2009-02-12 Thread Okey Kene
  Hi, Am using windows vista and i wish to know what version of apache tomcat to download.cheers! Regards...Okey Kene      

  

Re: JSP Bean not working

2009-02-12 Thread David Smith

Caldarale, Charles R wrote:
 From: David Smith [mailto:d...@cornell.edu]
 Subject: Re: JSP Bean not working

 it's highly recommended that all classes be in a package.
 

 For JSPs, it's not just recommended, it's required by the spec.  Servlets can 
 get away with an empty package, JSPs can't.

   

I can't disagree with that.  The JSP spec does indeed enforce the use of
packages.  My thought was more general as a practice for all java
programming and probably misleading as a result.

Good catch. :-)

-- David

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



Re: Hello

2009-02-12 Thread Kees Jan Koster

Dear Okey,

Am using windows vista and i wish to know what version of apache  
tomcat to download.



Any version you like.

--
Kees Jan

http://java-monitor.com/forum/
kjkos...@kjkoster.org
06-51838192

Rule 1 for being in a hole: stop digging.


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



Re: Hello

2009-02-12 Thread Steve

Okey Kene wrote:


Hi, 
Am using windows vista and i wish to know what version of apache tomcat 
to download.


cheers!
 
** 
** 
** 
** 
*


*
/Regards.../
/Okey Kene  /
 






either 5.x or 6.0
64bit or 32 bit depending on your os


--
eats the blues for breakfast,
does unix for rent,
plays harp for food,
will play the flute for kicks
rides for the freedom
scrapes for the challenge

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



RE: Hello

2009-02-12 Thread Caldarale, Charles R
 From: Okey Kene [mailto:keneo...@yahoo.com]
 Subject: Hello

 Am using windows vista and i wish to know what version of
 apache tomcat to download.

Resisting the temptation to answer 42, you should be aware that Tomcat is 
pure Java, so any of the downloadable packages are acceptable for use on 
Windows (even the .tar.gz one).  However, due to its flexibility, I would 
recommend the .zip package over the .exe, since the .exe leaves out a few 
niceties.

Which version of Tomcat you want depends on the requirements of the webapps you 
wish to use under Tomcat; nearly all webapps will run properly under the latest 
version (currently 6.0.18), so that would be the usual choice.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



Re: deploying web application on remote server

2009-02-12 Thread Kees Jan Koster

Dear sneha,

I have developed web application using netbeans , I wish to deploy  
on remote server .
I have placed files under / webapps  directory of remote server.  
Tomcat is unable to locate libraries .  how do I make tomcat locate  
libraries which are under WEB-INF/lib folder


Why don't you give us an error message to look at? Then we might be  
able to help you.


--
Kees Jan

http://java-monitor.com/forum/
kjkos...@kjkoster.org
06-51838192

Rule 1 for being in a hole: stop digging.


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



Re: Hello

2009-02-12 Thread Steve

Caldarale, Charles R wrote:

From: Okey Kene [mailto:keneo...@yahoo.com]
Subject: Hello

Am using windows vista and i wish to know what version of
apache tomcat to download.


Resisting the temptation to answer 42, ..


i was going to say the unisex version. but i did answer more appropriately.

ok am done now.

--
eats the blues for breakfast,
does unix for rent,
plays harp for food,
will play the flute for kicks
rides for the freedom
scrapes for the challenge

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



RE: Hello

2009-02-12 Thread Mehrotra, Anurag
If you are using vista 64 bit, do not use the windows installer/exe.

Instead unzip the tomcat zip file and then create shortcuts to startup and 
shutdown batch file found under ../bin folder.

You will also have to install JRE 1.5.0. Tomcat complained about the JRE when I 
tried using the 64 bit JRE 1.6.0.11


Anurag  301-296-3838
*** Please note my email address has changed. Please update it to 
amehro...@telebright.com


The information contained in this message may be privileged and confidential 
and protected from disclosure.  If the reader of this message is not the 
intended recipient, or an employee or agent responsible for delivering this 
message to the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please notify us 
immediately by replying to the message and deleting it from your computer.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Thursday, February 12, 2009 1:47 PM
To: Tomcat Users List
Subject: RE: Hello

 From: Okey Kene [mailto:keneo...@yahoo.com]
 Subject: Hello

 Am using windows vista and i wish to know what version of
 apache tomcat to download.

Resisting the temptation to answer 42, you should be aware that Tomcat is 
pure Java, so any of the downloadable packages are acceptable for use on 
Windows (even the .tar.gz one).  However, due to its flexibility, I would 
recommend the .zip package over the .exe, since the .exe leaves out a few 
niceties.

Which version of Tomcat you want depends on the requirements of the webapps you 
wish to use under Tomcat; nearly all webapps will run properly under the latest 
version (currently 6.0.18), so that would be the usual choice.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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

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



RE: Hello

2009-02-12 Thread Caldarale, Charles R
 From: Mehrotra, Anurag [mailto:amehro...@telebright.com]
 Subject: RE: Hello

 If you are using vista 64 bit, do not use the windows installer/exe.

Not true, the installer works fine on my Vista 64 box.  The tomcat6.exe program 
in the installer (and also in the .zip download) is set up for a 32-bit JVM, 
but it doesn't care if the OS is 32- or 64-bit.

 Instead unzip the tomcat zip file and then create shortcuts
 to startup and shutdown batch file found under ../bin folder.

Definitely a good idea.

 You will also have to install JRE 1.5.0. Tomcat complained
 about the JRE when I tried using the 64 bit JRE 1.6.0.11

Also wrong advice.  I've been running Tomcat on Vista 64 with both 32- and 
64-bit 1.6 JVMs without any problem.  Don't know what you messed up, but Tomcat 
6.0 works well with either 1.5 or 1.6 JVMs (but 1.6 is faster).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



Re: Hello

2009-02-12 Thread Bill Davidson

Okey Kene wrote:
Am using windows vista and i wish to know what version of apache tomcat 
to download.


Are you planning to write webapps or are you only wishing to deploy
webapps you've acquired from other sources?

If you wish to learn to write JEE webapps, then I recommend the
latest version (currently 6.0.18).

If you wish deploy existing webapps, then I suggest you check with
the providers of those webapps as to which is the best version.

In most cases, the latest version should work fine.

You should also read the documentation.  Books don't hurt either.
I like Tomcat The Definitive Guide by Brittain and Darwin for
Tomcat administration and Head First Servlets  JSP by Bashram,
Sierra  Bates as an introduction to writing Java web apps.

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



Re: Problems with Tomcat as service on Windows Server 2003

2009-02-12 Thread monesseldeur

I experience that it's not that simple to find a freeware pdf viewer that can
be run headless from the command line. But I keep looking on the net.

Any suggestion is welcome.


-- 
View this message in context: 
http://www.nabble.com/Problems-with-Tomcat-as-service-on-Windows-Server-2003-tp21965181p21984670.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Oracle connection pooling

2009-02-12 Thread Hamacher, Eric
Hello:

I am in a bind.

I am getting:

javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
  at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
  at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
  at javax.naming.InitialContext.lookup(InitialContext.java:351)
  at survey.db.SurveyConnection.getConnection(SurveyConnection.java:66)
  at util.LoadDropdownListener.loadAllCodes(LoadDropdownListener.java:137)
  at 
util.LoadDropdownListener.contextInitialized(LoadDropdownListener.java:78)

when I add:

Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=GLP_S
password=gideupstg
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/

to either server.xml (under Server), config/context.xml (under Context), or 
in META-INF/context.xml.

Here's what these files look like when I place Resource in them:

** SERVER.XML 
***

Server port=8005 shutdown=SHUTDOWN
  Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngine=on /
  Listener className=org.apache.catalina.core.JasperListener /
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
  GlobalNamingResources
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /

Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=username
password=password
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/

  /GlobalNamingResources
  Service name=Catalina

Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /
Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /

Engine name=Catalina defaultHost=localhost
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/
  Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
  /Host
/Engine
  /Service
/Server

*** CONFIG/CONTEXT.XML ***


Context
Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=username
password=password
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/
WatchedResourceWEB-INF/web.xml/WatchedResource

/Context

*** META-INF/CONTEXT.XML ***

Context

Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=username
password=password
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/
/Context



Here is the offending code:

   Context context = new InitialContext();
DataSource pds = null;
pds = (DataSource)context.lookup(jdbc/GFDataSource);
Connection conn = pds.getConnection();
context.close();


I have tried java:comp/env/jdbc/GFDataSource as well.  I am using 
ojdbc14dms.jar and dms.jar.

J.  ERIC  HAMACHER
Software Application Developer
608.664.3859
8476 Greenway Boulevard
Suite 100
Middleton, WI  53562
USA
GALLUP Technology

Achiever | Learner | Restorative | Intellection | Deliberative



Re: Problems with Tomcat as service on Windows Server 2003

2009-02-12 Thread André Warnier

monesseldeur wrote:

I experience that it's not that simple to find a freeware pdf viewer that can
be run headless from the command line. But I keep looking on the net.

Any suggestion is welcome.

if it is to run headless/gui-less, I suggest you look for a pdf printer 
however.

A viewer would be rather pointless.
;-)


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



Re: Hello

2009-02-12 Thread André Warnier

Okey Kene wrote:


Hi, 
Am using windows vista and i wish to know what version of apache tomcat to download.



Smartass answer :
You can download any version you like, using IE or Firefox.
;-)
..

Less smartass :
If you intend to also run Tomcat under Vista :

(and as a redemption for the above)

Tomcat itself, since it runs under a Java JVM, is always the same.
The Java JVM you need however will be different depending if you run a 
32-bit or 64-bit version of Vista (or XP).

Vista 32-bit - 32-bit Java JDK or JRE
Vista 64-bit - 64-bit Java JDK or JRE

Then for Tomcat 6, there is a choice between 2 downloads : the zip and 
the service installer.


The following may save you some time if you use a 64-bit Vista :

For a 64-bit Vista, we first tried the Service Installer. It installed 
properly, but we could not get it to run. (But Chuck earlier indicated 
that his experience was different).


So we removed the 64-bit Service Installer, and downloaded and installed 
the zip version. That one ran fine in a command window.


To make that one run as a service, you need to execute the (tomcat 
dir)/bin/service.bat script.  We did that, and it did not complain, but 
when we tried to run Tomcat, it did not start.
There was a message in one of the Tomcat logfiles to the effect that 
This is not a proper 32-bit application.


To make it work, we had to download 2 additional files (tomcat5.exe and 
tomcat5w.exe), rename them respectively to tomcat6.exe and tomcat6w.exe, 
and (I think) rerun the service.bat script.


We downloaded them from here :
http://svn.apache.org/repos/asf/tomcat/connectors/trunk/procrun/bin/

Oh, and there are 2 versions of each of the above files, depending on 
whether your CPU is an Intel-64 or an AMD-64.

(I think there is only one 32-bit version).

I hope I haven't confused you beyond redemption.


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



Re: Problems with Tomcat as service on Windows Server 2003

2009-02-12 Thread monesseldeur

Yes I know but at least I have a few more options to check when I look at
viewers =^D

awarnier wrote:
 
 m
 

-- 
View this message in context: 
http://www.nabble.com/Problems-with-Tomcat-as-service-on-Windows-Server-2003-tp21965181p21985418.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: Re: Trouble with cluster and JMX

2009-02-12 Thread Jorge Medina

I did not manage to get more logging from the tribes package. Did you?
I am using the default tomcat-juli configuration, I didn't get any ouput
about sessions replicating other than the initial startup messages. 



-Original Message-
From: Jorge Medina [mailto:jmed...@e-dialog.com] 
Sent: Thursday, February 12, 2009 10:44 AM
To: Tomcat Users List
Subject: RE: Re: Trouble with cluster and JMX

 
To get more verbose messages, the documentation mentions to use the key
org.apache.catalina.tribes.MESSAGES
I am currently trying it...

-Jorge


-Original Message-
From: news [mailto:n...@ger.gmane.org] On Behalf Of Eric B.
Sent: Wednesday, February 11, 2009 11:55 PM
To: users@tomcat.apache.org
Subject: Re: Trouble with cluster and JMX

Filip Hanik - Dev Lists devli...@hanik.com wrote in message
news:49937f4b.9050...@hanik.com...
 sure turn on

 org.apache.catalina.ha.level = FINE
 org.apache.catalina.tribes.level = FINE

 in logging.properties

 however, regular membership discovery over multicast show up even 
 without these entries

 did you mark your webapp distributable/

Crap.  Now that you mention it, I think I forgot to do that.  Will have
to check up on that tomorrow.  However, after a bunch of fiddling
around, putting the Manager within the context element got session
replication working, even if it isn't marked as distributable /.
Would that be expected behaviour by putting the Manager in the context?

Will check tomorrow and post findings.

Thanks,

Eric 




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


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


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



RE: Oracle connection pooling

2009-02-12 Thread Jorge Medina
Try 

ds = (DataSource)context.lookup(java:/comp/env/jdbc/GFDataSource); 

-Original Message-
From: Hamacher, Eric [mailto:eric_hamac...@gallup.com] 
Sent: Thursday, February 12, 2009 3:52 PM
To: users@tomcat.apache.org
Subject: Oracle connection pooling

Hello:

I am in a bind.

I am getting:

javax.naming.NameNotFoundException: Name jdbc is not bound in this
Context at
org.apache.naming.NamingContext.lookup(NamingContext.java:770)
  at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
  at
org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
  at javax.naming.InitialContext.lookup(InitialContext.java:351)
  at
survey.db.SurveyConnection.getConnection(SurveyConnection.java:66)
  at
util.LoadDropdownListener.loadAllCodes(LoadDropdownListener.java:137)
  at
util.LoadDropdownListener.contextInitialized(LoadDropdownListener.java:7
8)

when I add:

Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=GLP_S
password=gideupstg
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/

to either server.xml (under Server), config/context.xml (under
Context), or in META-INF/context.xml.

Here's what these files look like when I place Resource in them:

** SERVER.XML
***

Server port=8005 shutdown=SHUTDOWN
  Listener className=org.apache.catalina.core.AprLifecycleListener
SSLEngine=on /
  Listener className=org.apache.catalina.core.JasperListener /
  Listener
className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
/
  GlobalNamingResources
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
 
factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /

Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=username
password=password
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/

  /GlobalNamingResources
  Service name=Catalina

Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /
Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /

Engine name=Catalina defaultHost=localhost
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/
  Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
  /Host
/Engine
  /Service
/Server

*** CONFIG/CONTEXT.XML
***


Context
Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=username
password=password
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/
WatchedResourceWEB-INF/web.xml/WatchedResource

/Context

*** META-INF/CONTEXT.XML
***

Context

Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=username
password=password
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/
/Context



Here is the offending code:

   Context context = new InitialContext();
DataSource pds = null;
pds = (DataSource)context.lookup(jdbc/GFDataSource);
Connection conn = pds.getConnection();
context.close();


I have tried java:comp/env/jdbc/GFDataSource as well.  I am using
ojdbc14dms.jar and dms.jar.

J.  ERIC  HAMACHER
Software Application Developer

Re: Problems with Tomcat as service on Windows Server 2003

2009-02-12 Thread André Warnier

monesseldeur wrote:

Yes I know but at least I have a few more options to check when I look at
viewers =^D

awarnier wrote:

m




I also found this somewhere :

AcroRd32.exe filename - Executes the Reader and displays a file..
AcroRd32.exe /p filename - Executes the Reader and prints a file..

*
AcroRd32.exe /t path printername drivername portname - Initiates Acrobat
Reader,,
prints a file while suppressing the Acrobat print dialog box,then terminates
Reader.
The four parameters of the /t option evaluate to
path,printername,drivername,and
portname (all strings).
printername - The name of your printer..
drivername - Your printer driver 's name.Whatever appears in the Driver Used
box
when you view your printer 's properties.
portname - The printer 's port.portname cannot contain any /characters;if
it does,
output is routed to the default port for that printer.
If using Acrobat,substitute Acrobat.exe in place of AcroRd32.exe in the
command lines.

*


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



RE: Oracle connection pooling

2009-02-12 Thread Jorge Medina

Is your Oracle database port  and is the name of your SID SID?

We use Oracle jdbc driver with Oracle 10g. 
I set the attributes on the resource to:
   type=javax.sql.DataSource
   driverClassName=oracle.jdbc.OracleDriver
and no factory


-Original Message-
From: Hamacher, Eric [mailto:eric_hamac...@gallup.com] 
Sent: Thursday, February 12, 2009 3:52 PM
To: users@tomcat.apache.org
Subject: Oracle connection pooling

Hello:

I am in a bind.

I am getting:

javax.naming.NameNotFoundException: Name jdbc is not bound in this
Context at
org.apache.naming.NamingContext.lookup(NamingContext.java:770)
  at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
  at
org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
  at javax.naming.InitialContext.lookup(InitialContext.java:351)
  at
survey.db.SurveyConnection.getConnection(SurveyConnection.java:66)
  at
util.LoadDropdownListener.loadAllCodes(LoadDropdownListener.java:137)
  at
util.LoadDropdownListener.contextInitialized(LoadDropdownListener.java:7
8)

when I add:

Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=GLP_S
password=gideupstg
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/

to either server.xml (under Server), config/context.xml (under
Context), or in META-INF/context.xml.

Here's what these files look like when I place Resource in them:

** SERVER.XML
***

Server port=8005 shutdown=SHUTDOWN
  Listener className=org.apache.catalina.core.AprLifecycleListener
SSLEngine=on /
  Listener className=org.apache.catalina.core.JasperListener /
  Listener
className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
/
  GlobalNamingResources
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
 
factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /

Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=username
password=password
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/

  /GlobalNamingResources
  Service name=Catalina

Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /
Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /

Engine name=Catalina defaultHost=localhost
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/
  Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
  /Host
/Engine
  /Service
/Server

*** CONFIG/CONTEXT.XML
***


Context
Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=username
password=password
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/
WatchedResourceWEB-INF/web.xml/WatchedResource

/Context

*** META-INF/CONTEXT.XML
***

Context

Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=username
password=password
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/
/Context



Here is the offending code:

   Context context = new InitialContext();
DataSource pds = null;
pds = (DataSource)context.lookup(jdbc/GFDataSource);
Connection conn = pds.getConnection();
   

Failed installing 'Tomcat5' service

2009-02-12 Thread boraldo

Please help me with this problem.
From this message I even can't understand what is going wrong.

I'm installing Tomcat 5.5.17 as a Service on Windows Vista Home Basic
-- 
View this message in context: 
http://www.nabble.com/Failed-installing-%27Tomcat5%27-service-tp21986081p21986081.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: [OT] Problems with Tomcat as service on Windows Server 2003

2009-02-12 Thread André Warnier

monesseldeur wrote:

Yes I know but at least I have a few more options to check when I look at
viewers =^D

awarnier wrote:

m



I have now marked this off-ttopic, because it is getting a bit far 
from Tomcat issues..


You are running Tomcat under Windows.
On the other hand, on my Windows workstation where I have Acrobat Reader 
installed, if I right-click on a PDF document in the Explorer, it 
proposes a menu in which appears Print (for that document).
What this tells me, is that there must be an entry somewhere in the 
Windows Registry that corresponds to that file type and action (print), 
in which probably the correct command is spelled-out.

The rest is left as an exercise for the reader...




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



RE: Oracle connection pooling

2009-02-12 Thread Propes, Barry L
Mine differs slightly, though I see you're obviously on a diff. version of 
Tomcat than I am.

Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
// Look up our data source
DataSource ds = (DataSource)
  envCtx.lookup(jdbc/myoracle);
// Allocate and use a connection from the pool
Connection connection = ds.getConnection(); 

-Original Message-
From: Hamacher, Eric [mailto:eric_hamac...@gallup.com] 
Sent: Thursday, February 12, 2009 2:52 PM
To: users@tomcat.apache.org
Subject: Oracle connection pooling

Hello:

I am in a bind.

I am getting:

javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at 
org.apache.naming.NamingContext.lookup(NamingContext.java:770)
  at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
  at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
  at javax.naming.InitialContext.lookup(InitialContext.java:351)
  at survey.db.SurveyConnection.getConnection(SurveyConnection.java:66)
  at util.LoadDropdownListener.loadAllCodes(LoadDropdownListener.java:137)
  at 
util.LoadDropdownListener.contextInitialized(LoadDropdownListener.java:78)

when I add:

Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=GLP_S
password=gideupstg
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/

to either server.xml (under Server), config/context.xml (under Context), or 
in META-INF/context.xml.

Here's what these files look like when I place Resource in them:

** SERVER.XML 
***

Server port=8005 shutdown=SHUTDOWN
  Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngine=on /
  Listener className=org.apache.catalina.core.JasperListener /
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
  GlobalNamingResources
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /

Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=username
password=password
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/

  /GlobalNamingResources
  Service name=Catalina

Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /
Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /

Engine name=Catalina defaultHost=localhost
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/
  Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
  /Host
/Engine
  /Service
/Server

*** CONFIG/CONTEXT.XML ***


Context
Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=username
password=password
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/
WatchedResourceWEB-INF/web.xml/WatchedResource

/Context

*** META-INF/CONTEXT.XML ***

Context

Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=username
password=password
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/
/Context



Here is the offending code:

   Context context = new InitialContext();
   

Re: deploying web application on remote server

2009-02-12 Thread Sneha Manohar
Hi ,
Thanks for your reply ,  remote server is on ubuntu Operating system . 
Version of tomcat - 6
Version of java - jdk1.6.
 
I  try to load driver com.mysql.jdbc.Driver , I have put 
mysql-connector-java-5.1.5-bin in WEB-INF /lib folder , I get class not found 
exception error . 
 
I wish to know how tomcat locate libraries . Do I need to add anything in the 
path .
It works on local ,I use net beans , I add the libraries  by clicking 'Add 
library'- Global library -mysql driver. How do I achieve this on remote 
server .
 
sneha
 
 


--- On Thu, 12/2/09, Pid p...@pidster.com wrote:

From: Pid p...@pidster.com
Subject: Re: deploying web application on remote server
To: Tomcat Users List users@tomcat.apache.org
Date: Thursday, 12 February, 2009, 11:57 PM

Sneha Manohar wrote:
 Hi ,
  
 I have developed web application using netbeans , I wish to deploy on
remote server .
 I have placed files under / webapps  directory of remote server. Tomcat is
unable to locate libraries .  how do I make tomcat locate libraries which are
under WEB-INF/lib folder
  
 sneha
 
 
   Connect with friends all over the world. Get Yahoo! India Messenger
at http://in.messenger.yahoo.com/?wm=n/


to the tune of Humpty Dumpty

The Original Poster sent an email
The Original Poster had a vague FAIL
All the list members and all of the devs
Couldn't put Tomcat together again.


because you didn't tell us what operating system you're using, what
version of tomcat, java etc, or what your log error messages said.

?

p

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




  Unlimited freedom, unlimited storage. Get it now, on 
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

RE: Oracle connection pooling

2009-02-12 Thread Propes, Barry L
Yeah --  looked like an odd port to me, too -- I've only seen 1521, 1526 
and 1527 before.
I figured his SID was just a generic placeholder for his real SID. 

-Original Message-
From: Jorge Medina [mailto:jmed...@e-dialog.com] 
Sent: Thursday, February 12, 2009 4:12 PM
To: Tomcat Users List
Subject: RE: Oracle connection pooling


Is your Oracle database port  and is the name of your SID SID?

We use Oracle jdbc driver with Oracle 10g. 
I set the attributes on the resource to:
   type=javax.sql.DataSource
   driverClassName=oracle.jdbc.OracleDriver
and no factory


-Original Message-
From: Hamacher, Eric [mailto:eric_hamac...@gallup.com]
Sent: Thursday, February 12, 2009 3:52 PM
To: users@tomcat.apache.org
Subject: Oracle connection pooling

Hello:

I am in a bind.

I am getting:

javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at
org.apache.naming.NamingContext.lookup(NamingContext.java:770)
  at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
  at
org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
  at javax.naming.InitialContext.lookup(InitialContext.java:351)
  at
survey.db.SurveyConnection.getConnection(SurveyConnection.java:66)
  at
util.LoadDropdownListener.loadAllCodes(LoadDropdownListener.java:137)
  at
util.LoadDropdownListener.contextInitialized(LoadDropdownListener.java:7
8)

when I add:

Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=GLP_S
password=gideupstg
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/

to either server.xml (under Server), config/context.xml (under Context), or 
in META-INF/context.xml.

Here's what these files look like when I place Resource in them:

** SERVER.XML
***

Server port=8005 shutdown=SHUTDOWN
  Listener className=org.apache.catalina.core.AprLifecycleListener
SSLEngine=on /
  Listener className=org.apache.catalina.core.JasperListener /
  Listener
className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
/
  GlobalNamingResources
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
 
factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /

Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=username
password=password
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/

  /GlobalNamingResources
  Service name=Catalina

Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /
Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /

Engine name=Catalina defaultHost=localhost
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/
  Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
  /Host
/Engine
  /Service
/Server

*** CONFIG/CONTEXT.XML
***


Context
Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=username
password=password
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/
WatchedResourceWEB-INF/web.xml/WatchedResource

/Context

*** META-INF/CONTEXT.XML
***

Context

Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=username
password=password

Re: Failed installing 'Tomcat5' service

2009-02-12 Thread André Warnier

boraldo wrote:

Please help me with this problem.

From this message I even can't understand what is going wrong.


Neither can we, unfortunately.  We're good, but not /that/ good.  That's 
a bit short in terms of information.


You may want to have a look at the Windows Event logs, to see if there 
is more information ?


A suggestion, if Windows Vista Home has a command-line window (I don't 
even know if that's the case) :


- de-install the whole Tomcat package
- get a Java 1.6 JDK or JRE (if you don't already have it) and install it
- download the zip version of the Tomcat 5.5 (or better, 6) from the 
Tomcat site http://tomcat.apache.org

(I repeat, the zip version, not the service installer)
- create a directory c:\tomcat on your disk drive
- unzip the zip-file there
- open a command window, go to the c:\tomcat\bin directory, and type 
startup


what hapens ?


And maybe if anyone ever tried to install Tomcat under Windows Vista 
Home Basic, they can take over now ?





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



Re: Apache/mod_jk serves random files from tomcat

2009-02-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yuval,

On 2/12/2009 3:12 AM, Yuval Perlov wrote:
 I actually upgraded from mod_jk 1.2.26 to 27 to try and make the problem
 go away.

Ha! Okay. Sorry for a bad tip. ;)

So, I'm definitely not going to be able to help you from here on out,
but I know that folks like Rainer and Mladen could use some more
information, so I'll go ahead and ask for some.

 The mixup occurs only in tomcat originated data - the static stuff
 coming from httpd stays fine.

Good to know.

 Moreover, in the past I had it setup so the static stuff came from
 tomcat as well. This naturally resulted in significantly more hits
 between apache and tomcat which made the problem appear much faster
 (hence my theory that some resource is being depleted over time).

Is this something you can reproduce reliably in a test environment? Does
it require heavy load in order for this behavior to manifest itself? Or,
is it just after 5M requests everything goes to hell? I'm wondering if
concurrency is the problem or maybe something silly like logging or
maintaining worker status that somehow corrupts something.

It's very odd that responses would be crossed. I don't think any of that
stuff is shared between threads/processes in mod_jk/httpd, but I suppose
when you overwrite memory (which is the only explanation I can think
of), you can't really expect the program to operate properly.

Oh, are you using worker or prefork MPM?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmUplsACgkQ9CaO5/Lv0PANwQCeM7IEsDUu+o8cKjZP3kxAZgXP
7g4AoLyLW2cvmLC7AGGJnEf8jHBzNBvM
=E4BT
-END PGP SIGNATURE-

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



Re: Weblogic library and Tomcat

2009-02-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mark and Mikolaj,

On 2/12/2009 6:19 AM, Mark Thomas wrote:
 Mikolaj Rydzewski wrote:
 Mark Thomas wrote:
 As well as JDBC drivers, logging frameworks are frequent culprits for
 causing this.
   
 What about commons-logging and log4j?

  [snip]
 
 If commons-logging and log4j and deployed as part of your webapp you should 
 be OK.

I have written a contextListener that attempts to clean-up after log4j
during webapp shutdown. It also reads my log4j configuration on startup,
which you can probably ignore. Maybe this would help you:

package org.childhealthcare.diagnosis.servlet;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextListener;
import javax.servlet.ServletContextEvent;

import org.apache.log4j.PropertyConfigurator;
import org.apache.log4j.Logger;
import org.apache.log4j.LogManager;

/**
 * A listener to initialize log4j.
 *
 * @author Chris Schultz
 * @version $Revision: 1.1 $ $Date: 2008-05-27 21:11:53 $
 */
public class Log4jListener
implements ServletContextListener
{
private Logger logger;

public void contextInitialized(ServletContextEvent e)
{
// Trigger loading of the log4j.properties file from the classpath.
new PropertyConfigurator();

logger = Logger.getLogger(this.getClass());

logger.info(Log4j initialized);
}

public void contextDestroyed(ServletContextEvent e)
{
if(LogManager.class.getClassLoader()
   .equals(this.getClass().getClassLoader()))
{
logger.info(Log4j was loaded by application classloader;
shutting down.);

LogManager.shutdown();
}
else
{
logger.info(Log4j was loaded by some other ClassLoader; not
shutting down.);
}
}
}

Whenever I stop Tomcat, though, I get this message (after the log4j was
loaded by webapp classloader message) in catalina.out:

Feb 12, 2009 5:49:19 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
log4j:ERROR LogMananger.repositorySelector was null likely due to error
in class reloading, using NOPLoggerRepository.

I'm a little unclear as to whether that log4j error message is coming
from Tomcat trying to shut down log4j or what. log4j.jar is only
available in my webapp's WEB-INF/lib directory.

shrug

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmUqDIACgkQ9CaO5/Lv0PBHxgCfYoe3cXiRJD2ajzZn0fEJsq2G
uH4An3jmJa8YOvWhiDSjFhkzmRlThzYE
=qKFd
-END PGP SIGNATURE-

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



Re: Problems with Tomcat as service on Windows Server 2003

2009-02-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

monesseldeur,

On 2/12/2009 3:47 PM, monesseldeur wrote:
 I experience that it's not that simple to find a freeware pdf viewer that can
 be run headless from the command line. But I keep looking on the net.
 
 Any suggestion is welcome.

If you have a nice network printer, sometimes you can ftp files to it
and have them print. PDF is basically PostScript, so it's possible that
some printers already know how to print them.

YMMV quite a bit!

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmUqUUACgkQ9CaO5/Lv0PDlGQCgpHAOlx+hrD4hCeDmAdulSsDg
X7sAn2LTugQK/aM1WH9RWbONpxY9ckwN
=E9ik
-END PGP SIGNATURE-

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



RE: Hello

2009-02-12 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: Re: Hello

 Vista 32-bit - 32-bit Java JDK or JRE
 Vista 64-bit - 64-bit Java JDK or JRE

Not necessarily true.  I run both 32- and 64-bit versions of the JVM on my 
Vista 64 box, because some browsers only come in 32-bit versions and therefore 
need the 32-bit plugin to run applets.

 For a 64-bit Vista, we first tried the Service Installer. It installed
 properly, but we could not get it to run.

That depends on the JRE/JDK installed.  To use the tomcat6.exe program that's 
included with the .zip and .exe downloads, you must associate it with a 32-bit 
JVM - even on a 64-bit platform.

 So we removed the 64-bit Service Installer

There is no 64-bit service installer.

 To make it work, we had to download 2 additional files
 (tomcat5.exe and tomcat5w.exe), rename them respectively
 to tomcat6.exe and tomcat6w.exe, and (I think) rerun the
 service.bat script.

What you downloaded was the 64-bit versions, necessary to run Tomcat as a 
service with a 64-bit JVM.  It should not be necessary to rerun the service.bat 
script.

 We downloaded them from here :
 http://svn.apache.org/repos/asf/tomcat/connectors/trunk/procrun/bin/
 Oh, and there are 2 versions of each of the above files, depending on
 whether your CPU is an Intel-64 or an AMD-64.

Not correct.  Use the AMD64 version, which applies to current 64-bit chips from 
both AMD and Intel; the IA64 version is for an older Intel 64-bit architecture 
which has pretty much been killed off (just not soon enough for those of us 
that had to use it).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



Re: deploying web application on remote server

2009-02-12 Thread Pid
Sneha Manohar wrote:
 Hi ,
 Thanks for your reply ,  remote server is on ubuntu Operating system . 
 Version of tomcat - 6
 Version of java - jdk1.6.
  
 I  try to load driver com.mysql.jdbc.Driver , I have put 
 mysql-connector-java-5.1.5-bin in WEB-INF /lib folder , I get class not 
 found exception error . 
  
 I wish to know how tomcat locate libraries . Do I need to add anything in the 
 path .
 It works on local ,I use net beans , I add the libraries  by clicking 'Add 
 library'- Global library -mysql driver. How do I achieve this on remote 
 server .

You're adding it to the Global libraries for what purpose?

If *Tomcat* needs DB access then the jars go in tomcat/lib.

If *your app* needs DB access then the jars go in WEB-INF/lib, (unless
there's already a copy in tomcat/lib).


p




 sneha
  
  
 
 
 --- On Thu, 12/2/09, Pid p...@pidster.com wrote:
 
 From: Pid p...@pidster.com
 Subject: Re: deploying web application on remote server
 To: Tomcat Users List users@tomcat.apache.org
 Date: Thursday, 12 February, 2009, 11:57 PM
 
 Sneha Manohar wrote:
 Hi ,
  
 I have developed web application using netbeans , I wish to deploy on
 remote server .
 I have placed files under / webapps  directory of remote server. Tomcat is
 unable to locate libraries .  how do I make tomcat locate libraries which are
 under WEB-INF/lib folder
  
 sneha


   Connect with friends all over the world. Get Yahoo! India Messenger
 at http://in.messenger.yahoo.com/?wm=n/
 
 
 to the tune of Humpty Dumpty
 
 The Original Poster sent an email
 The Original Poster had a vague FAIL
 All the list members and all of the devs
 Couldn't put Tomcat together again.
 
 
 because you didn't tell us what operating system you're using, what
 version of tomcat, java etc, or what your log error messages said.
 
 ?
 
 p
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
   Unlimited freedom, unlimited storage. Get it now, on 
 http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/


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



Re: Oracle connection pooling

2009-02-12 Thread Anurag Kapur
ds = (DataSource)context.lookup(java:/comp/env/jdbc/GFDataSource);

The above works fine for me as well.

But your original email mentions that you have tried it. That's weird!

Anyway, try the attributes Jorge mentioned. Your context.xml /server.xml
definitions look like a problem to me. The code snippet looks fine (assuming
you use java:/comp/env/jdbc/GFDataSource).

Coming back to your Resource definition,

type=oracle.jdbc.pool.OracleDataSource should not be used as it is
deprecated. type=javax.sql.DataSource should be used to enable DBCP.

Anurag
--
Anurag Kapur
Associate - Technology,
Sapient Corporation India
--


On Thu, Feb 12, 2009 at 10:26 PM, Propes, Barry L
barry.l.pro...@citi.comwrote:

 Yeah --  looked like an odd port to me, too -- I've only seen 1521,
 1526 and 1527 before.
 I figured his SID was just a generic placeholder for his real SID.

 -Original Message-
 From: Jorge Medina [mailto:jmed...@e-dialog.com]
 Sent: Thursday, February 12, 2009 4:12 PM
 To: Tomcat Users List
 Subject: RE: Oracle connection pooling


 Is your Oracle database port  and is the name of your SID SID?

 We use Oracle jdbc driver with Oracle 10g.
 I set the attributes on the resource to:
   type=javax.sql.DataSource
   driverClassName=oracle.jdbc.OracleDriver
 and no factory


 -Original Message-
 From: Hamacher, Eric [mailto:eric_hamac...@gallup.com]
 Sent: Thursday, February 12, 2009 3:52 PM
 To: users@tomcat.apache.org
 Subject: Oracle connection pooling

 Hello:

 I am in a bind.

 I am getting:

 javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
 at
 org.apache.naming.NamingContext.lookup(NamingContext.java:770)
  at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
  at
 org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
  at javax.naming.InitialContext.lookup(InitialContext.java:351)
  at
 survey.db.SurveyConnection.getConnection(SurveyConnection.java:66)
  at
 util.LoadDropdownListener.loadAllCodes(LoadDropdownListener.java:137)
  at
 util.LoadDropdownListener.contextInitialized(LoadDropdownListener.java:7
 8)

 when I add:

 Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=GLP_S
password=gideupstg
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/

 to either server.xml (under Server), config/context.xml (under
 Context), or in META-INF/context.xml.

 Here's what these files look like when I place Resource in them:

 ** SERVER.XML
 ***

 Server port=8005 shutdown=SHUTDOWN
  Listener className=org.apache.catalina.core.AprLifecycleListener
 SSLEngine=on /
  Listener className=org.apache.catalina.core.JasperListener /
  Listener
 className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
 /
  GlobalNamingResources
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved

 factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /

 Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  connectionCachingEnabled=true
maxActive=30
maxIdle=2
maxWait=1000
username=username
password=password
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@server::SID/

  /GlobalNamingResources
  Service name=Catalina

Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /
Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /

Engine name=Catalina defaultHost=localhost
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/
  Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
  /Host
/Engine
  /Service
 /Server

 *** CONFIG/CONTEXT.XML
 ***


 Context
 Resource name=jdbc/GFDataSource auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  

Re: deploying web application on remote server

2009-02-12 Thread Anurag Kapur
I  try to load driver com.mysql.jdbc.Driver , I have put
mysql-connector-java-5.1.5-bin in WEB-INF /lib folder , I get class not
found exception error .

Tomcat filters out all files with except those with a .jar extension in a
lib folder. Any file except a *.jar will be ignored in the WEB-INF/lib
folder.

Look for a .jar file for the connector instead.

Anurag
--
Anurag Kapur
Associate - Technology,
Sapient Corporation India.
--


On Thu, Feb 12, 2009 at 10:26 PM, Sneha Manohar
sneha_hams...@yahoo.co.inwrote:

 Hi ,
 Thanks for your reply ,  remote server is on ubuntu Operating system .
 Version of tomcat - 6
 Version of java - jdk1.6.

 I  try to load driver com.mysql.jdbc.Driver , I have put
 mysql-connector-java-5.1.5-bin in WEB-INF /lib folder , I get class not
 found exception error .

 I wish to know how tomcat locate libraries . Do I need to add anything in
 the path .
 It works on local ,I use net beans , I add the libraries  by clicking 'Add
 library'- Global library -mysql driver. How do I achieve this on remote
 server .

 sneha




 --- On Thu, 12/2/09, Pid p...@pidster.com wrote:

 From: Pid p...@pidster.com
 Subject: Re: deploying web application on remote server
 To: Tomcat Users List users@tomcat.apache.org
 Date: Thursday, 12 February, 2009, 11:57 PM

 Sneha Manohar wrote:
  Hi ,
 
  I have developed web application using netbeans , I wish to deploy on
 remote server .
  I have placed files under / webapps  directory of remote server. Tomcat
 is
 unable to locate libraries .  how do I make tomcat locate libraries which
 are
 under WEB-INF/lib folder
 
  sneha
 
 
Connect with friends all over the world. Get Yahoo! India Messenger
 at http://in.messenger.yahoo.com/?wm=n/


 to the tune of Humpty Dumpty

 The Original Poster sent an email
 The Original Poster had a vague FAIL
 All the list members and all of the devs
 Couldn't put Tomcat together again.


 because you didn't tell us what operating system you're using, what
 version of tomcat, java etc, or what your log error messages said.

 ?

 p

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




   Unlimited freedom, unlimited storage. Get it now, on
 http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/


unable to connect to mysql on remote server

2009-02-12 Thread Sneha Manohar
Hi ,
I am trying to connect to mysql on remote server using following code 
Class.forName(com.mysql.jdbc.Driver).newInstance();
    
 String connectionURL = jdbc:mysql://remoteHostIp:3306/test; 
   
    
 Connection connection = DriverManager.getConnection(connectionURL, root, );
 
I get following errorjavax.servlet.ServletException: 
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link 
failure

Last packet sent to the server was 0 ms ago.

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:852)

org.apache.jasper.runtime.PageContextImpl.access$1100(PageContextImpl.java:71)

org.apache.jasper.runtime.PageContextImpl$12.run(PageContextImpl.java:768)
java.security.AccessController.doPrivileged(Native Method)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:766)
org.apache.jsp.test_jsp._jspService(test_jsp.java:75)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
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:244)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)

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



--- On Fri, 13/2/09, Pid p...@pidster.com wrote:

From: Pid p...@pidster.com
Subject: Re: deploying web application on remote server
To: Tomcat Users List users@tomcat.apache.org
Date: Friday, 13 February, 2009, 4:52 AM

Sneha Manohar wrote:
 Hi ,
 Thanks for your reply ,  remote server is on ubuntu Operating system . 
 Version of tomcat - 6
 Version of java - jdk1.6.
  
 I  try to load driver com.mysql.jdbc.Driver , I have put
mysql-connector-java-5.1.5-bin in WEB-INF /lib folder , I get class
not found exception error . 
  
 I wish to know how tomcat locate libraries . Do I need to add anything in
the path .
 It works on local ,I use net beans , I add the libraries  by clicking
'Add library'- Global library -mysql driver. How do I achieve
this on remote server .

You're adding it to the Global libraries for what purpose?

If *Tomcat* needs DB access then the jars go in tomcat/lib.

If *your app* needs DB access then the jars go in WEB-INF/lib, (unless
there's already a copy in tomcat/lib).


p




 sneha
  
  
 
 
 --- On Thu, 12/2/09, Pid p...@pidster.com wrote:
 
 From: Pid p...@pidster.com
 Subject: Re: deploying web application on remote server
 To: Tomcat Users List users@tomcat.apache.org
 Date: Thursday, 12 February, 2009, 11:57 PM
 
 Sneha Manohar wrote:
 Hi ,
  
 I have developed web application using netbeans , I wish to deploy on
 remote server .
 I have placed files under / webapps  directory of remote server.
Tomcat is
 unable to locate libraries .  how do I make tomcat locate libraries which
are
 under WEB-INF/lib folder
  
 sneha


   Connect with friends all over the world. Get Yahoo! India
Messenger
 at http://in.messenger.yahoo.com/?wm=n/
 
 
 to the tune of Humpty Dumpty
 
 The Original Poster sent an email
 The Original Poster had a vague FAIL
 All the list members and all of the devs
 Couldn't put Tomcat together again.
 
 
 because you didn't tell us what operating system you're using,
what
 version of tomcat, java etc, or what your log error messages said.
 
 ?
 
 p
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
   Unlimited freedom, unlimited storage. Get it now, on
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/


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




  Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/

Re: deploying web application on remote server

2009-02-12 Thread Sneha Manohar
Hi  Anurag ,
 are you from India ..Thanks for your reply 


--- On Fri, 13/2/09, Anurag Kapur anuragka...@gmail.com wrote:

From: Anurag Kapur anuragka...@gmail.com
Subject: Re: deploying web application on remote server
To: Tomcat Users List users@tomcat.apache.org, sneha_hams...@yahoo.co.in
Date: Friday, 13 February, 2009, 5:14 AM

I  try to load driver com.mysql.jdbc.Driver , I have put
mysql-connector-java-5.1.5-bin in WEB-INF /lib folder , I get class
not
found exception error .

Tomcat filters out all files with except those with a .jar
extension in a
lib folder. Any file except a *.jar will be ignored in the WEB-INF/lib
folder.

Look for a .jar file for the connector instead.

Anurag
--
Anurag Kapur
Associate - Technology,
Sapient Corporation India.
--


On Thu, Feb 12, 2009 at 10:26 PM, Sneha Manohar
sneha_hams...@yahoo.co.inwrote:

 Hi ,
 Thanks for your reply ,  remote server is on ubuntu Operating system .
 Version of tomcat - 6
 Version of java - jdk1.6.

 I  try to load driver com.mysql.jdbc.Driver , I have put
 mysql-connector-java-5.1.5-bin in WEB-INF /lib folder , I get
class not
 found exception error .

 I wish to know how tomcat locate libraries . Do I need to add anything in
 the path .
 It works on local ,I use net beans , I add the libraries  by clicking
'Add
 library'- Global library -mysql driver. How do I achieve this
on remote
 server .

 sneha




 --- On Thu, 12/2/09, Pid p...@pidster.com wrote:

 From: Pid p...@pidster.com
 Subject: Re: deploying web application on remote server
 To: Tomcat Users List users@tomcat.apache.org
 Date: Thursday, 12 February, 2009, 11:57 PM

 Sneha Manohar wrote:
  Hi ,
 
  I have developed web application using netbeans , I wish to deploy on
 remote server .
  I have placed files under / webapps  directory of remote server.
Tomcat
 is
 unable to locate libraries .  how do I make tomcat locate libraries which
 are
 under WEB-INF/lib folder
 
  sneha
 
 
Connect with friends all over the world. Get Yahoo! India
Messenger
 at http://in.messenger.yahoo.com/?wm=n/


 to the tune of Humpty Dumpty

 The Original Poster sent an email
 The Original Poster had a vague FAIL
 All the list members and all of the devs
 Couldn't put Tomcat together again.


 because you didn't tell us what operating system you're using,
what
 version of tomcat, java etc, or what your log error messages said.

 ?

 p

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




   Unlimited freedom, unlimited storage. Get it now, on
 http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/



  Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/

Re: unable to connect to mysql on remote server

2009-02-12 Thread Gregor Schneider
By default, MySQL only listens on localhost.
If you have configured MySQL to listen for remote connections, happy
getting hacked...

However, to solve your issue:

- Make sure you can connect to the remote MySQL from the server where
you're running Tomcat:

mysql -h YOUR_HOST_HERE - u USER -p

If that works, come back here, if not:

Consult your MySQL manual or read it up right here:
http://dev.mysql.com/doc/ or ask your questions in your preferred
MySQL-mailinglist.

Rgds

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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



  1   2   >