Server.xml configuration in Tomcat 4.1

2005-02-10 Thread Shilpa Nalgonda
Hi All,
i am using Tomcat4.1, and whenever i create new application i am adding the
context details in server.xml
Is it possible to create a new myapp.xml file and put the context info in
that.
I tried to create a myapp.xml and place it under webapps directory, but the
application is not finding it.
if i place the same context configuration in Server.xml everything works
fine.
Can anyone suggest me how to avoid editing the same server.xmk for each new
application.
can i do this in Tomcat4.1??

below is the context i want to add in server.xml

Context path=/mypuborderstates docBase=mypuborderstates
debug=5 reloadable=true crossContext=true 
useNaming=true

Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_mypuborderstates_log. suffix=.txt
 timestamp=true/
   Resource name=jdbc/ODINPRD
   auth=Container
   type=javax.sql.DataSource/

ResourceParams name=jdbc/ODINPRD
   

blah()

/Context


-Original Message-
From: Dennis Payne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 28, 2004 11:13 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30


If you are running Linux or Unix check the syntax for the 'nice'
command.

 [EMAIL PROTECTED] 12-27-2004 18:55 
Frank W. Zammetti wrote:

 It's interesting, Craig and I had an exchange about threads in
servlet
 containers last week... I can't find a link to the thread
unfortunately.

 Anyway, the basic idea behind that don't spawn your own threads
 inside a servlet container admonishment is based more on the fact
 that it's quite easy to screw up doing so, more than it has to do
with
 virtually anything else.

 You want the servlet container to manager resources for you, and you

 lose that by spawning your own threads.  The container isn't aware of

 the threads, so it can't control them for things like graceful
 shutdowns or simply trying to control resource utilization.  Many
 people, including me, tend to ignore that warning when the situation

 warrants it, but you have to be extra-careful.

 For instance, you don't under any circumstances want to hold on to
 references to response, request or session objects because you don't

 manage them.  You also, unless you really have a need and know what
 your doing, want to spawn threads to handle requests at all.  Any
 threads you do spawn in a container should tend to be independent
 units of execution.  If your use case fits that description, you can

 get away with it relatively safely.

 That being said, spawning things like daemon threads for low-level
 behind-the-scenes type processing is generally OK, so long as you are

 careful (i.e., be sure no runaway processing can occur, make sure it

 will shut down gracefully, etc).  You might be able to use something

 like that in this case, you'll have to decide.  If your using Struts,

 you can spawn the thread from a plug-in, as I've done in the past,
but
 there are non-Struts equivalents (worse comes to worse, just do it in

 a servlet.init()).  Do yourself a favor and make the thread
processing
 functional independent of your app essentially, and even make it so
 it's not aware it's running in a servlet container.  But again,
 caution is the key.  If you make it a demon thread and set it's
 priority as low as you can and be sure to not hold on to a reference

 to it, I've found that works just fine under a number of app servers

 on a numeber of OSs.

 The bottom-line is that really that psuedo-rule is around because
 people tend to shoot themselves in the foot when using threads a bit

 too often, so better to advise against getting into a situation where

 you might do that.  But, if your confident in your ability, and
 believe the use case really warrants it, you CAN do it, and
relatively
 safely.

Frank,
I'm using threads and didn't know I was vulnerable.  Here's how I've
done it.  I created a class that implements runnable and call its
initialize method from a servlet init method at application startup.
 The initialize method creates a thread and sets a low priority for it.

 The run method sleeps the thread and wakes it every two minutes.
A processing class contains the methods that queries the database
(postgres).

1. Is this what you call a daemon thread?
2. Is this better done using cron?  if so how do I ensure that it runs

with a lower priority than my application code?
Phil



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


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


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



How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Shilpa Nalgonda
Hi,
I am using Tomcat4.1.30 version.
I have to develop a client application which looks in the database every 30
minutes,
to retrieve the status of an order and send the status to the remote client.
Again waits for the
The client's response and insert the repsonse back to the database.

I wanted to do this in a servlet, so is there any way that i could run this
servlet automatically inside the
Tomcat container, or is it configurable in servlet mapping? if so can
someone please suggest me with examples...


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



RE: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Shilpa Nalgonda
Thanks for the reply...

The application which i am trying to write is a standalone utility.. Client
does not hit this servlet.

Instead my application which is a servlet, will make some database calls--
and if the required data is present in the database, then that data is sent
to the client via xmlrpc call and the response from the xmlrpc call is
updated back into the dataabse.

So we want this utility preferably servlet in our Tomcat container to be run
every 30 minutes like a cron job, to do the database updates..

There are so many other classes deployed on Tomcat and i want to use those
classes to write this servlet utility.
This is the reason why chose to use servlet, but is there any configurable
parameter to run servlet for every 30 minutes...

-Original Message-
From: Wade Chandler [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 21, 2004 11:03 AM
To: Tomcat Users List
Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30


Shilpa Nalgonda wrote:
 Hi,
 I am using Tomcat4.1.30 version.
 I have to develop a client application which looks in the database every
30
 minutes,
 to retrieve the status of an order and send the status to the remote
client.
 Again waits for the
 The client's response and insert the repsonse back to the database.

 I wanted to do this in a servlet, so is there any way that i could run
this
 servlet automatically inside the
 Tomcat container, or is it configurable in servlet mapping? if so can
 someone please suggest me with examples...


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




Wellit's kind of not extremely clear what you are asking, but why
does the servlet need to do anything except listen for a client which is
threaded to do this every 30 minutes, in other words...why not have the
servlet do what it naturally does...sit there and get hit by client
requestsget the infoand send it back?  I mean...the servlet
can't push to the client unless you want to use something besides http,
or unless you are using servlets on both ends and http servers on both
ends.  You could use keep alives I guess.I wouldn't thoughonly
so many tcp/ip connections.

Wade


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


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



RE: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Shilpa Nalgonda
My application has to use the connection pooling of Tomcat to talk to the
database...
and all my Database access classes are deployed om Tomcat...so if i just
write a java standalone command line program,
can i access those connection pooling classes...

-Original Message-
From: Billy Talton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 21, 2004 11:41 AM
To: Tomcat Users List
Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30


Why are you writing a servlet for this?  If the application does not
use any of the services confined to the Servlet API and Tomcat, just
write a stand-alone application and setup up a cron job to run it.
Seems like overkill to me.


On Tue, 21 Dec 2004 16:28:49 -, Allistair Crossley
[EMAIL PROTECTED] wrote:
 no, and I believe doing so it bad practice. use some OS controlled timer
like cron to issue a HTTP call to your servlet. I once wrote a shell script
that calls a http address on the local machine but cannot remember how ;) if
you are using oracle then you can setup this timer thread inside the
database itself. don't add a thread into your web application.

  -Original Message-
  From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
  Sent: 21 December 2004 16:14
  To: Tomcat Users List
  Subject: RE: How to run servlet for every 30 minutes in Tomcat 4.1.30
 
 
  Thanks for the reply...
 
  The application which i am trying to write is a standalone
  utility.. Client
  does not hit this servlet.
 
  Instead my application which is a servlet, will make some
  database calls--
  and if the required data is present in the database, then
  that data is sent
  to the client via xmlrpc call and the response from the xmlrpc call is
  updated back into the dataabse.
 
  So we want this utility preferably servlet in our Tomcat
  container to be run
  every 30 minutes like a cron job, to do the database updates..
 
  There are so many other classes deployed on Tomcat and i want
  to use those
  classes to write this servlet utility.
  This is the reason why chose to use servlet, but is there any
  configurable
  parameter to run servlet for every 30 minutes...
 
  -Original Message-
  From: Wade Chandler [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, December 21, 2004 11:03 AM
  To: Tomcat Users List
  Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
 
 
  Shilpa Nalgonda wrote:
   Hi,
   I am using Tomcat4.1.30 version.
   I have to develop a client application which looks in the
  database every
  30
   minutes,
   to retrieve the status of an order and send the status to the remote
  client.
   Again waits for the
   The client's response and insert the repsonse back to the database.
  
   I wanted to do this in a servlet, so is there any way that
  i could run
  this
   servlet automatically inside the
   Tomcat container, or is it configurable in servlet mapping?
  if so can
   someone please suggest me with examples...
  
  
  
  -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
  Wellit's kind of not extremely clear what you are asking, but why
  does the servlet need to do anything except listen for a
  client which is
  threaded to do this every 30 minutes, in other words...why
  not have the
  servlet do what it naturally does...sit there and get hit by client
  requestsget the infoand send it back?  I mean...the servlet
  can't push to the client unless you want to use something
  besides http,
  or unless you are using servlets on both ends and http servers on both
  ends.  You could use keep alives I guess.I wouldn't thoughonly
  so many tcp/ip connections.
 
  Wade
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE
 ---
 QAS Ltd.
 Developers of QuickAddress Software
 a href=http://www.qas.com;www.qas.com/a
 Registered in England: No 2582055
 Registered in Australia: No 082 851 474
 ---
 /FONT

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



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


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



Does Tomcat Rollback transactions automatically.

2004-11-23 Thread Shilpa Nalgonda
Hi ,

I am using Tomcat 4.1.30, and using datasource to get the Connection from
Pool.
When there is an exception  in the database operations, the trasaction is
supposed to rollback.
Is it automatically performed in Tomcat?



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



RE:Server.xml problem..

2004-11-22 Thread Shilpa Nalgonda
Hi ,
I am usinh ant deploy target to deploy my web application  on  Tomcat
4.1.30.
I have configured datasource to get the connection pooling  for my webapp
in server.xml.

But whenever i do a ant deploy, the server.xml ia being backed up and a new
server.xml is created.
This new server.xml does not have any of my datasouce configuration for my
webapp.  So my application cannot connect to the database thereby.

How can i resolve this, do i have to write xml file for my webapp, if so
what entries go in that new xml file.  Below is
my ant deploy target and server.xml

target name=deploy depends=compile
   description=Deploying application to servlet container

deploy url=${manager.url}
username=${manager.username}
password=${manager.password}
path=${app.path}
 war=file:/${dist.home}/rpcoemapi.war/

  /target

sErver.xml
--
!-- JNDI datasource setup to connect to Oracle database for
xmlrpc-oemapi--
Context path=/rpcoemapi docBase=rpcoemapi
debug=5 reloadable=true crossContext=true 
useNaming=true

Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_rpcoemapi_log. suffix=.txt
 timestamp=true/
   Resource name=jdbc/MYDS
   auth=Container
   type=javax.sql.DataSource/

ResourceParams name=jdbc/MYDS
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
!-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --
parameter
  namemaxActive/name
  value30/value
/parameter

!-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit.
 --
parameter
 namemaxIdle/name
 value20/value
/parameter


 !-- Maximum time to wait for a dB connection to become available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --
parameter
 namemaxWait/name
 value1/value
/parameter

!-- MySQL dB username and password for dB connections  --
parameter
  nameusername/name
  valuexx/value
/parameter
parameter
  namepassword/name
  valuexx/value
/parameter

!-- Class name for mm.mysql JDBC driver --
parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
/parameter

!-- The JDBC connection url for connecting to your MySQL dB.
 The autoReconnect=true argument to the url makes sure that the
 mm.mysql JDBC Driver will automatically reconnect if mysqld closed
the
 connection.  mysqld by default closes idle connections after 8
hours.
 --
parameter
nameurl/name
valuejdbc:oracle:thin:@ipaddress:1521:DB/value
/parameter
/ResourceParams
/Context


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



RE: Server.xml problem..

2004-11-22 Thread Shilpa Nalgonda
under TOMCAT_HOME/conf i only have server.xml, tomcat-users.xml , web.xml,
catalina.policy and jk2.properties.
i can't find rpcoemapi.xml anywhere under Tomcat_home.

Before i had all the datasource configuration for my Web apps in server.xml.
And i used tomcat manager GUI to deploy the applications.  But now we have
to use ant script to deploy apps.
With this change my server.xml is loosing all the datasource configuration.

Please suggest how to tackle this.

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, November 22, 2004 12:20 PM
To: Tomcat Users List
Subject: RE: Server.xml problem..



Hi,
Are you sure the information for your context isn't written to
conf/[engine]/[host]/rpcoemapi.xml instead of server.xml?

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Monday, November 22, 2004 12:11 PM
To: Tomcat Users List
Subject: RE:Server.xml problem..

Hi ,
I am usinh ant deploy target to deploy my web application  on  Tomcat
4.1.30.
I have configured datasource to get the connection pooling  for my
webapp
in server.xml.

But whenever i do a ant deploy, the server.xml ia being backed up and a
new
server.xml is created.
This new server.xml does not have any of my datasouce configuration for
my
webapp.  So my application cannot connect to the database thereby.

How can i resolve this, do i have to write xml file for my webapp, if
so
what entries go in that new xml file.  Below is
my ant deploy target and server.xml

target name=deploy depends=compile
   description=Deploying application to servlet container

deploy url=${manager.url}
username=${manager.username}
password=${manager.password}
path=${app.path}
 war=file:/${dist.home}/rpcoemapi.war/

  /target

sErver.xml
--
!-- JNDI datasource setup to connect to Oracle database for
xmlrpc-oemapi--
   Context path=/rpcoemapi docBase=rpcoemapi
   debug=5 reloadable=true crossContext=true
useNaming=true

   Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_rpcoemapi_log. suffix=.txt
 timestamp=true/
   Resource name=jdbc/MYDS
   auth=Container
   type=javax.sql.DataSource/

   ResourceParams name=jdbc/MYDS
   parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
!-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --
   parameter
  namemaxActive/name
  value30/value
/parameter

   !-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit.
 --
parameter
 namemaxIdle/name
 value20/value
/parameter


!-- Maximum time to wait for a dB connection to become
available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --
   parameter
 namemaxWait/name
 value1/value
/parameter

   !-- MySQL dB username and password for dB connections  --
   parameter
 nameusername/name
 valuexx/value
   /parameter
   parameter
 namepassword/name
 valuexx/value
   /parameter

   !-- Class name for mm.mysql JDBC driver --
   parameter
 namedriverClassName/name
 valueoracle.jdbc.driver.OracleDriver/value
   /parameter

   !-- The JDBC connection url for connecting to your MySQL dB.
 The autoReconnect=true argument to the url makes sure that the
 mm.mysql JDBC Driver will automatically reconnect if mysqld
closed
the
 connection.  mysqld by default closes idle connections after 8
hours.
 --
   parameter
   nameurl/name
   valuejdbc:oracle:thin:@ipaddress:1521:DB/value
   /parameter
/ResourceParams
/Context


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




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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

JDK Logging...

2004-11-16 Thread Shilpa Nalgonda
Can anyone suggest me how to write to different log files using JDK
Logging..
i.e., a logger for important info, a logger for errors, loggers for
systemerors,


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



RE: JDK Logging...

2004-11-16 Thread Shilpa Nalgonda
Thanks, but we are using only JDK1.4 logging and want to use that..can u
suggest..

-Original Message-
From: Viorel Dragomir [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 16, 2004 10:58 AM
To: Tomcat Users List
Subject: Re: JDK Logging...


Log4j does the job.

http://logging.apache.org/log4j/docs/



Viorel Dragomir

.
..
---



- Original Message -
From: Shilpa Nalgonda
To: Tomcat Users List
Sent: Tuesday, November 16, 2004 17:48
Subject: JDK Logging...


Can anyone suggest me how to write to different log files using JDK
Logging..
i.e., a logger for important info, a logger for errors, loggers for
systemerors,


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


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



cannot deploy application through ant task..

2004-11-16 Thread Shilpa Nalgonda
i have a ant script which has install target. this install target should
deploy my application , but is not happening, i have  the below error in log
file.  any advice?


java.lang.IllegalArgumentException: Document base C:\Program Files\Apache
Group\Tomcat 4.1\webapps\rpcoemapi does not exist or is not a readable
directory
at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:19
3)
at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java
:3349)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3479)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

2004-11-16 13:06:02 StandardContext[/rpcoemapi]: Configuring non-privileged
default Loader
2004-11-16 13:06:02 StandardContext[/rpcoemapi]: Configuring default Manager
2004-11-16 13:06:02 StandardContext[/rpcoemapi]: Processing standard
container startup
2004-11-16 13:06:02 StandardContext[/rpcoemapi]: Context startup failed due
to previous errors
2004-11-16 13:06:02 StandardContext[/rpcoemapi]: Exception during cleanup
after start failed
LifecycleException:  Container StandardContext[/rpcoemapi] has not been
started
at 
org.apache.catalina.core.StandardContext.stop(StandardContext.java:3663)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3641)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, November 15, 2004 9:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 5.5.4 Upgrade Blog



Hi,
It's a good blog.  I didn't see a PermaLink option: if there is one, I'd
like to add the URL of this blog posting to the Tomcat wiki page.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 14, 2004 4:05 PM
To: Tomcat Users List; Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Tomcat 5.5.4 Upgrade Blog

Hi List,



Based on my upgrade to Tomcat 5.5.4 late last week and the few config
issues I came across, I wrote a Blog that can be found on my web site
here



www.adcworks.com/blog http://www.adcworks.com/blog



It covers IIS authentication (thanks Bill), logging, basic JNDI data
source
config.



It won't be useful for everyone, but hopefully for some of you.
Everything
I have written works. Feel free to comment on this Blog from the page
or
add additional information relating to it.



Best regards, Allistair



PS: Remy/Yoav, if you could take a look at this Blog and let me know if
you
think any of it is useful for the Tomcat pages, I can covert it
appropriately.





FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered 

Tomcat not starting...Tomcat4.1.30

2004-11-07 Thread Shilpa Nalgonda
Hi My Tomcat instance is so badly messed up , i am not able to start it...at
all...while i was redeploying my app , it gave me some email related classes
not found error...so i copied all the relevant jar into Tomcat/common/lib
directory...Then it gave me some other other, so to eliminate the problem, i
removed those jars from common/lib and thats it..from then on Tomcat is not
starting...nothing in logs...and says exception starting up...i tried so
many things but the console is not coming up...I just dowmloaded new Tomcat
version in other diretory, did not uninstall the old one , even the new
Tomcat is coming up.. do i have to uninstall the old one before the new
install?...i am afraid that i loose all my old stuff.



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



RE: Tomcat not starting...Tomcat4.1.30

2004-11-07 Thread Shilpa Nalgonda
i looked in all the logs, there is no error at the time i ran the tomcat,
and the way i run tomcat is :
catalina start from the cmd prompt  from directory /tomcat/bin.  The window
closes so that that i cannot see anything.

But i tried to install another tomcat in different directory and even it is
not running? why is it so. and thh newer version does not have logs folders.
I did not unistall old Tomcat version yet...


-Original Message- 
From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] 
Sent: Sun 11/7/2004 1:20 PM 
To: Tomcat Users List 
Cc: 
Subject: RE: Tomcat not starting...Tomcat4.1.30



look at all the logs files, there is always something in there,
if you are running on windows, go to the bin directory in a dos prompt 
and
type catalina.bat run
and see why its failing,

and also, get yourself a version control system, that way you won't lose
data :)

Filip

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 07, 2004 12:07 PM
To: Tomcat Users List
Subject: Tomcat not starting...Tomcat4.1.30


Hi My Tomcat instance is so badly messed up , i am not able to start 
it...at
all...while i was redeploying my app , it gave me some email related 
classes
not found error...so i copied all the relevant jar into 
Tomcat/common/lib
directory...Then it gave me some other other, so to eliminate the 
problem, i
removed those jars from common/lib and thats it..from then on Tomcat is 
not
starting...nothing in logs...and says exception starting up...i tried so
many things but the console is not coming up...I just dowmloaded new 
Tomcat
version in other diretory, did not uninstall the old one , even the new
Tomcat is coming up.. do i have to uninstall the old one before the new
install?...i am afraid that i loose all my old stuff.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.786 / Virus Database: 532 - Release Date: 10/29/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.786 / Virus Database: 532 - Release Date: 10/29/2004


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



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

RE:how to set encoding parameter in Tomcat4...

2004-11-01 Thread Shilpa Nalgonda
Hi,

I am working on an application which has international clients like Japan,
Europe etc.,
Our java Application is using Tomcat4, XmlRPC and Oracle database. This
application will insert the international characters in database.  But the
inserted data is all garbage and is inserted as ''.  Initially i thought
the problem is in the database layer, but i found out that problem is not in
that layer.  The request sent by the client is in Unicode, encoding is
UTF-8.  But when the request is printed in the XmlRPC, it is getting
garbage.  And XMLRPC encoding is set to UTF-8 in the application.  So there
might be some place in tomcat where i should set the encoding.  Can anyone
suggest me how to do that and give me any other suggestions.

And also i am testing this both on my local PC Tomcat instance and on Linux
box.  Same code is being executed on both instances, but the behaviour is
different, on My PC instance i see that some of the field are encoded right,
but on Unix, evrything is inserted as .  Both instances point to same
database and XMLRpc lib is same and Tomcat versions are same.
I am definitely missing something here.  can someone please help








--- Shilpa Nalgonda [EMAIL PROTECTED] wrote:

 can u point me to a resource how i can do it.

 -Original Message-
 From: Evgeny Gesin [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 29, 2004 9:42 AM
 To: Tomcat Users List
 Subject: Re: Internationalization of characters
 --UTF8 encoding


  .. is supposed to take japanese characters an
 insert
  them into database. Is there any setting in
 Tomcat4
  where i should be giving the encoding option.

 You can specify parameters for SQL driver when you define DataSource
 in Tomcat's server.xml. I think most of Oracle drivers can process
 UTF-8, without the needs for such parameters, but MySQL 3.xx, for
 example, needs such parameters...

 Evgeny
 Javadesk / AllTelescopes



 __
 Do you Yahoo!?
 Yahoo! Mail Address AutoComplete - You start. We finish.
 http://promotions.yahoo.com/new_mail


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



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






__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

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


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


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


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



Internationalization of characters --UTF8 encoding

2004-10-29 Thread Shilpa Nalgonda
Hi,

I am using Tomcat4.1, Oracle 8i , and XmlRpc to write an application which
is supposed to take japanese characters an insert them into database.  Is
there any setting in Tomcat4 where i should be giving the encoding option.
And aslo i get the request from the client in the form of xml and pass that
request via xmlrpc and insert into oracle database.
The client sends japanese characters in Unicode , our database has caracter
set of US7ASCII.

select * from NLS_DATABASE_PARAMETERS where parameter = 'NLS_CHARACTERSET';

PARAMETER VALUE
-- --
NLS_CHARACTERSET US7ASCII

The data is being inserted as all brackets in  database.'{{{'
Is there any conversion i need to do while inserting in the database.

Please suggest if anyone has any opinions.


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



RE: Internationalization of characters --UTF8 encoding

2004-10-29 Thread Shilpa Nalgonda
can u point me to a resource how i can do it.

-Original Message-
From: Evgeny Gesin [mailto:[EMAIL PROTECTED]
Sent: Friday, October 29, 2004 9:42 AM
To: Tomcat Users List
Subject: Re: Internationalization of characters --UTF8 encoding 


 .. is supposed to take japanese characters an insert
 them into database. Is there any setting in Tomcat4
 where i should be giving the encoding option.

You can specify parameters for SQL driver when you
define DataSource in Tomcat's server.xml. I think most
of Oracle drivers can process UTF-8, without the needs
for such parameters, but MySQL 3.xx, for example,
needs such parameters...

Evgeny
Javadesk / AllTelescopes



__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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


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



RE: Internationalization of characters --UTF8 encoding

2004-10-29 Thread Shilpa Nalgonda
Our java Application takes UTF-8 encoded unicode data and sores in a Java
String , and should insert that into Oracle8.1.7 database.
Oracle database has US7ASCII encoding.
So when i insert data some of the characters are being lost, and i see '?'
being inserted into database.
How can i convert this UTF-8 encoded java String into ASCII so that database
can load it.

Can anyone suggest what to do...









--- Shilpa Nalgonda [EMAIL PROTECTED] wrote:

 can u point me to a resource how i can do it.

 -Original Message-
 From: Evgeny Gesin [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 29, 2004 9:42 AM
 To: Tomcat Users List
 Subject: Re: Internationalization of characters
 --UTF8 encoding


  .. is supposed to take japanese characters an
 insert
  them into database. Is there any setting in
 Tomcat4
  where i should be giving the encoding option.

 You can specify parameters for SQL driver when you
 define DataSource in Tomcat's server.xml. I think
 most
 of Oracle drivers can process UTF-8, without the
 needs
 for such parameters, but MySQL 3.xx, for example,
 needs such parameters...

 Evgeny
 Javadesk / AllTelescopes



 __
 Do you Yahoo!?
 Yahoo! Mail Address AutoComplete - You start. We
 finish.
 http://promotions.yahoo.com/new_mail


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



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






__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

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


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



RE: Internationalization of characters --UTF8 encoding

2004-10-29 Thread Shilpa Nalgonda
how can i do that any examples...

-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED]
Sent: Friday, October 29, 2004 4:59 PM
To: Tomcat Users List
Subject: RE: Internationalization of characters --UTF8 encoding 


UTF-7. Or any other ACE. 

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 29, 2004 3:38 PM
To: Tomcat Users List
Subject: RE: Internationalization of characters --UTF8 encoding 

Our java Application takes UTF-8 encoded unicode data and sores in a
Java String , and should insert that into Oracle8.1.7 database.
Oracle database has US7ASCII encoding.
So when i insert data some of the characters are being lost, and i see
'?'
being inserted into database.
How can i convert this UTF-8 encoded java String into ASCII so that
database can load it.

Can anyone suggest what to do...









--- Shilpa Nalgonda [EMAIL PROTECTED] wrote:

 can u point me to a resource how i can do it.

 -Original Message-
 From: Evgeny Gesin [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 29, 2004 9:42 AM
 To: Tomcat Users List
 Subject: Re: Internationalization of characters
 --UTF8 encoding


  .. is supposed to take japanese characters an
 insert
  them into database. Is there any setting in
 Tomcat4
  where i should be giving the encoding option.

 You can specify parameters for SQL driver when you define DataSource 
 in Tomcat's server.xml. I think most of Oracle drivers can process 
 UTF-8, without the needs for such parameters, but MySQL 3.xx, for 
 example, needs such parameters...

 Evgeny
 Javadesk / AllTelescopes



 __
 Do you Yahoo!?
 Yahoo! Mail Address AutoComplete - You start. We finish.
 http://promotions.yahoo.com/new_mail


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



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






__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

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


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


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


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



RE: Tomcat 4.1 Connection Pooling...

2004-09-30 Thread Shilpa Nalgonda
Thanks a lot to all who helped me with this...
I replaced all new updated jars: commons-dbcp-1.1.2.jar,
commons-pooling.1.2.jar and Classes12.jar, and the scalability problem
(ORA-00020: maximum number of processes (200) exceeded) is gone..

-Original Message-
From: Michael J. Makunas [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 3:37 PM
To: Tomcat Users List
Subject: Re: Tomcat 4.1 Connection Pooling...


Just a thought (and I apologize if this was already mentioned.I
missed the very beginning of the thread), but I would also make sure you
have the latest connection pooling jars. I recently had a problem where
even though I had the tomcat configured to reclaim abandoned
connections, some were still remaining open. Turned out there was a bug
in the dbcp jar and upgrading to the latest solved it.

-Michael

Dale, Matt wrote:
 Every time your application uses a connection it should call the close()
method to return it to the pool. I had a similar problem where over a fairly
short period of time there was a database error which caused the execute to
throw an exception. I had forgotten to put a finally block in that section
so the connection never got closed. Once I put a finally block in with a
con.close() then it solved my problem.

 Ta
 Matt

 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: 28 September 2004 20:04
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1 Connection Pooling...


 how can i check that and how to resolve it...

 -Original Message-
 From: Dale, Matt [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 3:06 PM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1 Connection Pooling...



 Perhaps your application is hanging on to the database connections and not
 returning them to the pool?

 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: 28 September 2004 19:43
 To: Tomcat Users List; Peter Lin
 Subject: RE: Tomcat 4.1 Connection Pooling...


 I have updated with classes12.jar, but still i have this problem.  But
Peter
 what ii sthe bug that you
 mentioned, i have the problem of
 java.sql.SQLException: ORA-00020: maximum number of processes (200)
exceeded


--
** Michael J. Makunas ** http://www.makunas.com/ **


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


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



org.apache.commons.digester.Digester error--- at tomcat startup...

2004-09-30 Thread Shilpa Nalgonda
I added some elements in web.xml on linux machine and i get this error, but
i cannot see any problem with web.xml, the same web.xml works fine on
windows...below is my web.xml...can someone please suggest


Sep 30, 2004 9:03:31 AM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 26 column 11: The content of element type
web-app must match
(icon?,display-name?,description?,distributable?,context-param*,filter*,fil
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin
g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca
l-ref*).
org.xml.sax.SAXParseException: The content of element type web-app must
match
(icon?,display-name?,description?,distributable?,context-param*,filter*,fil
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin
g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca
l-ref*).
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHand
lerWrapper.java:236)
at
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:17
2)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:38
0)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:31
4)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.
java:2049)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:9
33)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocu
mentFragmentScannerImpl.java:1083)


web.xml...
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app

display-nameMyPub XmlRpc/display-name
description
  This is the container to hold the MLRPC calls
/description
resource-ref
descriptionDB Connection/description
res-ref-namejdbc/mydb/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
servlet
servlet-nameXmlRpcServlet/servlet-name
servlet-classXmlRpcServlet/servlet-class
/servlet
servlet-mapping
servlet-nameXmlRpcServlet/servlet-name
url-pattern/rpc/url-pattern
/servlet-mapping
 /web-app
~


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



RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shilpa Nalgonda
Is it necessary to add this in web.xml, i have configured datasource for
connectonpool only in server.xml...


web.xml
---
resource-ref
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Thanks.
Maybe its the parameter configuration can you send me your configuration for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my application makes 7 database queries, each query gets connection
from datasource and closes() the connection in finally block.  When it gets
connection from datasource it is supposed to get it from pool right???

I noticed that after my application runs 3 times --(3x7 =21).. it gives me
this error

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb..

So can you send me ur config and code snippet to get datasource if
possible...


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:55 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Nope, I can't help unfortunately.  I used Tomcat 4.1 for years
connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat
5.0 and 5.5.  Maybe I'm just lucky, but the docs (specifically the JDBC
DataSources how-to) have always worked for me out of the box.  I've
never seen the error you describe.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Hi Yoav Shapira,
Can you put some light on this pooling stuff...
Thanks.
Shilpa.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 9:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Hi Cary,
I am running my application on both windowsxp and Linux. And my Oracle
version is 8i.
I have the same problem on both OS.  I think increasing the number of
processes would not help.
This has got something to do with Tomcat connection pooling
configuration.
I am missing some configuration stuff there...
if i use these below parameters in server.xml iget timeout
exception...just
after couple of requests..
maxActive :20
maxIdle :10
mxWait :1
removeAbandoned :true
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object 

And if i use this below configuration i get ORA:00020 exception...
maxActive :0
maxIdle :0
mxWait :0
removeAbandoned :true

Can you please help---i have been looking into this since 2 days and
still
it doesn't work...

-Original Message-
From: Cary Conover [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 10:09 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Shilpa,

What OS are you running this configuration on?  If it is AIX I would
investigate to see how the system is configured for the number of
processes
per user on the system.  If it is configured as a Workstation it is
defaulted to 128 processes / login.  If it is configured as a server it
is
set to 500 processes / login.  Plus Oracle support site suggests in the
neighborhood of 2500 processes / login for Oracle 9i to function well
if
you
are running 9i.  These are all system settings that can be found in
smitty
on the system and adjusted as root user.

Hope this helps,

Cary

Shilpa Nalgonda [EMAIL PROTECTED] wrote:
Can someone please suggest how to achieve connection Pooling in tomcat
4.1.
As per the docs i have
1) configured server.xml to include the resource parameters (
datasource,
connection pool size etc)
2) In application code , retrieve connection using datasource
3) Every Method call to database retrieves connection
using datasource.getConnection ()
and closes connection everytime

But still the pooling is not achieved, i get ORA-00020 error( maximim
proceses exceeded), i increased the size from 30 to 200) even then it
is
not
working.

Can someone please help

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 12:55 PM
To: Tomcat Users List
Subject: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool exhausted, cause:


Hi, I am getting the timeout exception for connection pooling, i am
using
Tomca 4.1 and datasource to retrieve connections.
I am attaching all the soure code

RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shilpa Nalgonda
But my application runs fine even with out that entry in web.xml, i am using
Tomcats ConnectionPooling to connect to database..I only have scalability
issue, when i test my application with multiple users i get the ORAcle erro
below..
If only one users is there, then there is no problem...can you please
suggest if adding that entry to web.xml will help...

java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded

at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
at oracle.jdbc.ttc7.O3log.receive1st(O3log.java)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:82)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
ionFactory.java:300)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:816)
at
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool
.java:119)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43)

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Yes, it's needed if you're using server-provided connection pooling.
Read the Servlet Specification.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:47 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Is it necessary to add this in web.xml, i have configured datasource
for
connectonpool only in server.xml...


web.xml
---
resource-ref
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Thanks.
Maybe its the parameter configuration can you send me your
configuration
for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my application makes 7 database queries, each query gets
connection
from datasource and closes() the connection in finally block.  When it
gets
connection from datasource it is supposed to get it from pool right???

I noticed that after my application runs 3 times --(3x7 =21).. it gives
me
this error

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb..

So can you send me ur config and code snippet to get datasource if
possible...


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:55 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Nope, I can't help unfortunately.  I used Tomcat 4.1 for years
connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat
5.0 and 5.5.  Maybe I'm just lucky, but the docs (specifically the JDBC
DataSources how-to) have always worked for me out of the box.  I've
never seen the error you describe.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Hi Yoav Shapira,
Can you put some light on this pooling stuff...
Thanks.
Shilpa.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 9:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Hi Cary,
I am running my application on both windowsxp and Linux. And my Oracle
version is 8i.
I have the same problem on both OS.  I think increasing the number of
processes would not help.
This has got something to do with Tomcat connection pooling
configuration.
I am missing some configuration stuff there...
if i use these below parameters in server.xml iget timeout
exception...just
after couple of requests..
maxActive :20
maxIdle :10
mxWait :1
removeAbandoned :true
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause

RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shilpa Nalgonda
O.k thanks i'll do that, but what exactly you mean by
Tomcat tries to accommodate clueless users., i did not quite understand..

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 1:01 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
The app runs fine because Tomcat tries to accommodate clueless users.
The web.xml snippet you posted is required according to the Servlet
Spec, and that's what you should adhere to.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:55 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

But my application runs fine even with out that entry in web.xml, i am
using
Tomcats ConnectionPooling to connect to database..I only have
scalability
issue, when i test my application with multiple users i get the ORAcle
erro
below..
If only one users is there, then there is no problem...can you please
suggest if adding that entry to web.xml will help...

java.sql.SQLException: ORA-00020: maximum number of processes (200)
exceeded

at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
at oracle.jdbc.ttc7.O3log.receive1st(O3log.java)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
at
oracle.jdbc.driver.OracleConnection.init(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java
)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driver
Conn
e
ctionFactory.java:82)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableCo
nnec
t
ionFactory.java:300)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObje
ctPo
o
l.java:816)
at
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjec
tPoo
l
.java:119)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSour
ce.j
a
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j
ava:
5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43)

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Yes, it's needed if you're using server-provided connection pooling.
Read the Servlet Specification.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:47 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Is it necessary to add this in web.xml, i have configured datasource
for
connectonpool only in server.xml...


web.xml
---
resource-ref
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Thanks.
Maybe its the parameter configuration can you send me your
configuration
for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my application makes 7 database queries, each query gets
connection
from datasource and closes() the connection in finally block.  When it
gets
connection from datasource it is supposed to get it from pool right???

I noticed that after my application runs 3 times --(3x7 =21).. it
gives
me
this error

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb.
.

So can you send me ur config and code snippet to get datasource if
possible...


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:55 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Nope, I can't help unfortunately.  I used Tomcat 4.1 for years
connecting to Oracle 8i and 9i, and I continue to do so now with
Tomcat
5.0 and 5.5.  Maybe I'm just lucky, but the docs (specifically the
JDBC
DataSources how-to) have always worked for me out of the box.  I've
never seen the error you describe.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Hi Yoav Shapira,
Can you put some light on this pooling stuff...
Thanks.
Shilpa.

-Original Message

RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shilpa Nalgonda
I was not aware that i should explicitly close the datasource, but i am
making sure that
i close all the connections by saying Connection.close in the finally
block..can you tell me how to close the datasource and where to do that...


-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 1:06 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 4.1 Connection Pooling...


This error happens when there are too many connections opened. There are too
many connections opened because before you shut down your application, you
don't explicitly close your data source.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: September 28, 2004 12:55 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


But my application runs fine even with out that entry in web.xml, i am using
Tomcats ConnectionPooling to connect to database..I only have scalability
issue, when i test my application with multiple users i get the ORAcle erro
below.. If only one users is there, then there is no problem...can you
please suggest if adding that entry to web.xml will help...

java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded

at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
at oracle.jdbc.ttc7.O3log.receive1st(O3log.java)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:82)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
ionFactory.java:300)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:816)
at
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool
.java:119)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43)

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Yes, it's needed if you're using server-provided connection pooling. Read
the Servlet Specification.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:47 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Is it necessary to add this in web.xml, i have configured datasource
for
connectonpool only in server.xml...


web.xml
---
resource-ref
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Thanks.
Maybe its the parameter configuration can you send me your
configuration
for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my application makes 7 database queries, each query gets
connection
from datasource and closes() the connection in finally block.  When it
gets
connection from datasource it is supposed to get it from pool right???

I noticed that after my application runs 3 times --(3x7 =21).. it gives
me
this error

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb..

So can you send me ur config and code snippet to get datasource if
possible...


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:55 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Nope, I can't help unfortunately.  I used Tomcat 4.1 for years
connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat
5.0 and 5.5.  Maybe I'm just lucky, but the docs (specifically the JDBC
DataSources how-to) have always worked for me out of the box.  I've
never seen the error you describe.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Hi Yoav Shapira,
Can you put some light on this pooling stuff

RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shilpa Nalgonda
I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and use
DBCp for connection Pooling with Tomcat4.1,
i thought classes112 is for 9i...correct me if i am wrong...

-Original Message-
From: Peter Lin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 2:01 PM
To: Tomcat Users List
Subject: Re: Tomcat 4.1 Connection Pooling...


I thought Oracle fixed that bug in their connectionPooling driver back
in 2001. Am I missing something?  Are you using some other driver to
create a pool of jdbc connections to Oracle? sorry for the question if
it's already been answered in earlier messages.

I've used classes112.zip jdbc driver from oracle without any problems
with connection pooling. If you're using classes111.zip driver from
oracle, you should update your driver to the latest.

just in case no one else mentioned it.

peter


On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav [EMAIL PROTECTED]
wrote:

 Hi,
 Hmm ;)  There's a good reason there's no close method on
 javax.sql.DataSource.  There's also a good reason the J2EE spec calls
 for the container, not the user, to manage the lifecycle of JNDI
 resources such as DataSources.  IF you go with this
 ServletContextListener approach to take over lifecycle management of a
 server-provided JNDI resource, you'll be in a murky space at best.

 Yoav Shapira
 Millennium Research Informatics

 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 1:27 PM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 For connecion pooling, when you close the connection, you don't
 actually
 close the physical link. After several shutdown/sartup of your
 application,
 open connection accumulates and exceeds Oracle's 200 thus you receive
 that
 SQLException.
 
 To solve your problem, I would implement a ServletContextListener to
 initialize connection pool when my context is in the initialization
 (public
 method contextInitialized) and close data source when my context is
 destroyed (public method contextDestroyed).
 
 If you have defined loadonstartup servlet in your web.xml, in the
 destroy
 method, explicitly close your data source.
 


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


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



RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shilpa Nalgonda
thanks..

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 2:17 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
You're wrong.  You can and should use classes12.zip (renamed to
classes12.jar) with Oracle 8i.  You can even use the modern ojdbc14.jar
drivers.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 2:09 PM
To: Tomcat Users List; Peter Lin
Subject: RE: Tomcat 4.1 Connection Pooling...

I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and
use
DBCp for connection Pooling with Tomcat4.1,
i thought classes112 is for 9i...correct me if i am wrong...

-Original Message-
From: Peter Lin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 2:01 PM
To: Tomcat Users List
Subject: Re: Tomcat 4.1 Connection Pooling...


I thought Oracle fixed that bug in their connectionPooling driver back
in 2001. Am I missing something?  Are you using some other driver to
create a pool of jdbc connections to Oracle? sorry for the question if
it's already been answered in earlier messages.

I've used classes112.zip jdbc driver from oracle without any problems
with connection pooling. If you're using classes111.zip driver from
oracle, you should update your driver to the latest.

just in case no one else mentioned it.

peter


On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav
[EMAIL PROTECTED]
wrote:

 Hi,
 Hmm ;)  There's a good reason there's no close method on
 javax.sql.DataSource.  There's also a good reason the J2EE spec calls
 for the container, not the user, to manage the lifecycle of JNDI
 resources such as DataSources.  IF you go with this
 ServletContextListener approach to take over lifecycle management of
a
 server-provided JNDI resource, you'll be in a murky space at best.

 Yoav Shapira
 Millennium Research Informatics

 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 1:27 PM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 For connecion pooling, when you close the connection, you don't
 actually
 close the physical link. After several shutdown/sartup of your
 application,
 open connection accumulates and exceeds Oracle's 200 thus you
receive
 that
 SQLException.
 
 To solve your problem, I would implement a ServletContextListener to
 initialize connection pool when my context is in the initialization
 (public
 method contextInitialized) and close data source when my context is
 destroyed (public method contextDestroyed).
 
 If you have defined loadonstartup servlet in your web.xml, in the
 destroy
 method, explicitly close your data source.
 


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


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




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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


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



RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shilpa Nalgonda
I have updated with classes12.jar, but still i have this problem.  But Peter
what ii sthe bug that you
mentioned, i have the problem of
java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded



-Original Message-
From: Peter Lin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 2:23 PM
To: Tomcat Users List
Subject: Re: Tomcat 4.1 Connection Pooling...


Yoav is correct, you should be using the newer driver and not the
older one.  good thing I asked which version the driver is.

that's a really old bug in the old driver. I remember reporting the
bug back in 99 and the support rep said something like, yeah, lots of
people have been reporting the bug.

peter



On Tue, 28 Sep 2004 14:16:43 -0400, Shapira, Yoav [EMAIL PROTECTED]
wrote:

 Hi,
 You're wrong.  You can and should use classes12.zip (renamed to
 classes12.jar) with Oracle 8i.  You can even use the modern ojdbc14.jar
 drivers.

 Yoav Shapira
 Millennium Research Informatics




 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 2:09 PM
 To: Tomcat Users List; Peter Lin
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and
 use
 DBCp for connection Pooling with Tomcat4.1,
 i thought classes112 is for 9i...correct me if i am wrong...
 
 -Original Message-
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 2:01 PM
 To: Tomcat Users List
 Subject: Re: Tomcat 4.1 Connection Pooling...
 
 
 I thought Oracle fixed that bug in their connectionPooling driver back
 in 2001. Am I missing something?  Are you using some other driver to
 create a pool of jdbc connections to Oracle? sorry for the question if
 it's already been answered in earlier messages.
 
 I've used classes112.zip jdbc driver from oracle without any problems
 with connection pooling. If you're using classes111.zip driver from
 oracle, you should update your driver to the latest.
 
 just in case no one else mentioned it.
 
 peter
 
 
 On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav
 [EMAIL PROTECTED]
 wrote:
 
  Hi,
  Hmm ;)  There's a good reason there's no close method on
  javax.sql.DataSource.  There's also a good reason the J2EE spec calls
  for the container, not the user, to manage the lifecycle of JNDI
  resources such as DataSources.  IF you go with this
  ServletContextListener approach to take over lifecycle management of
 a
  server-provided JNDI resource, you'll be in a murky space at best.
 
  Yoav Shapira
  Millennium Research Informatics
 
  -Original Message-
  From: Phillip Qin [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 28, 2004 1:27 PM
  To: 'Tomcat Users List'
  Subject: RE: Tomcat 4.1 Connection Pooling...
  
  For connecion pooling, when you close the connection, you don't
  actually
  close the physical link. After several shutdown/sartup of your
  application,
  open connection accumulates and exceeds Oracle's 200 thus you
 receive
  that
  SQLException.
  
  To solve your problem, I would implement a ServletContextListener to
  initialize connection pool when my context is in the initialization
  (public
  method contextInitialized) and close data source when my context is
  destroyed (public method contextDestroyed).
  
  If you have defined loadonstartup servlet in your web.xml, in the
  destroy
  method, explicitly close your data source.
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.




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



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


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



RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shilpa Nalgonda
how can i check that and how to resolve it...

-Original Message-
From: Dale, Matt [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 3:06 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Perhaps your application is hanging on to the database connections and not
returning them to the pool?

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: 28 September 2004 19:43
To: Tomcat Users List; Peter Lin
Subject: RE: Tomcat 4.1 Connection Pooling...


I have updated with classes12.jar, but still i have this problem.  But Peter
what ii sthe bug that you
mentioned, i have the problem of
java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded



-Original Message-
From: Peter Lin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 2:23 PM
To: Tomcat Users List
Subject: Re: Tomcat 4.1 Connection Pooling...


Yoav is correct, you should be using the newer driver and not the
older one.  good thing I asked which version the driver is.

that's a really old bug in the old driver. I remember reporting the
bug back in 99 and the support rep said something like, yeah, lots of
people have been reporting the bug.

peter



On Tue, 28 Sep 2004 14:16:43 -0400, Shapira, Yoav [EMAIL PROTECTED]
wrote:

 Hi,
 You're wrong.  You can and should use classes12.zip (renamed to
 classes12.jar) with Oracle 8i.  You can even use the modern ojdbc14.jar
 drivers.

 Yoav Shapira
 Millennium Research Informatics




 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 2:09 PM
 To: Tomcat Users List; Peter Lin
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and
 use
 DBCp for connection Pooling with Tomcat4.1,
 i thought classes112 is for 9i...correct me if i am wrong...
 
 -Original Message-
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 2:01 PM
 To: Tomcat Users List
 Subject: Re: Tomcat 4.1 Connection Pooling...
 
 
 I thought Oracle fixed that bug in their connectionPooling driver back
 in 2001. Am I missing something?  Are you using some other driver to
 create a pool of jdbc connections to Oracle? sorry for the question if
 it's already been answered in earlier messages.
 
 I've used classes112.zip jdbc driver from oracle without any problems
 with connection pooling. If you're using classes111.zip driver from
 oracle, you should update your driver to the latest.
 
 just in case no one else mentioned it.
 
 peter
 
 
 On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav
 [EMAIL PROTECTED]
 wrote:
 
  Hi,
  Hmm ;)  There's a good reason there's no close method on
  javax.sql.DataSource.  There's also a good reason the J2EE spec calls
  for the container, not the user, to manage the lifecycle of JNDI
  resources such as DataSources.  IF you go with this
  ServletContextListener approach to take over lifecycle management of
 a
  server-provided JNDI resource, you'll be in a murky space at best.
 
  Yoav Shapira
  Millennium Research Informatics
 
  -Original Message-
  From: Phillip Qin [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 28, 2004 1:27 PM
  To: 'Tomcat Users List'
  Subject: RE: Tomcat 4.1 Connection Pooling...
  
  For connecion pooling, when you close the connection, you don't
  actually
  close the physical link. After several shutdown/sartup of your
  application,
  open connection accumulates and exceeds Oracle's 200 thus you
 receive
  that
  SQLException.
  
  To solve your problem, I would implement a ServletContextListener to
  initialize connection pool when my context is in the initialization
  (public
  method contextInitialized) and close data source when my context is
  destroyed (public method contextDestroyed).
  
  If you have defined loadonstartup servlet in your web.xml, in the
  destroy
  method, explicitly close your data source.
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.




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

RE: cannot deploy the war file..Tomcat 4.1.30 --- please suggest...

2004-09-24 Thread Shilpa Nalgonda
Hi i am not able to deploy the war file on Linux box , i am using
Tomcat4.1.30

The way i deploy it is, i copy the war file under tomcat/webapp directory...
And when i restart the server the war file is not being exploded...and i get
below error in logs...

2004-09-24 15:58:03 StandardContext[/rpcoemapi]: Resources start failed:
java.lang.IllegalArgumentException: Document base
/var/lib/tomcat4/webapps/rpcoe
mapi does not exist or is not a readable directory
at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.
java:193)
at
org.apache.catalina.core.StandardContext.resourcesStart(StandardConte
xt.java:3349)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3
479)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363
)
at
org.apache.catalina.core.StandardService.start(StandardService.java:4
97)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:219
0)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)


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



RE: Tomcat 4.1 Connection Pooling...

2004-09-22 Thread Shilpa Nalgonda
Hi Cary,
I am running my application on both windowsxp and Linux. And my Oracle
version is 8i.
I have the same problem on both OS.  I think increasing the number of
processes would not help.
This has got something to do with Tomcat connection pooling configuration.
I am missing some configuration stuff there...
if i use these below parameters in server.xml iget timeout exception...just
after couple of requests..
maxActive :20
maxIdle :10
mxWait :1
removeAbandoned :true
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object 

And if i use this below configuration i get ORA:00020 exception...
maxActive :0
maxIdle :0
mxWait :0
removeAbandoned :true

Can you please help---i have been looking into this since 2 days and still
it doesn't work...

-Original Message-
From: Cary Conover [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 10:09 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Shilpa,

What OS are you running this configuration on?  If it is AIX I would
investigate to see how the system is configured for the number of processes
per user on the system.  If it is configured as a Workstation it is
defaulted to 128 processes / login.  If it is configured as a server it is
set to 500 processes / login.  Plus Oracle support site suggests in the
neighborhood of 2500 processes / login for Oracle 9i to function well if you
are running 9i.  These are all system settings that can be found in smitty
on the system and adjusted as root user.

Hope this helps,

Cary

Shilpa Nalgonda [EMAIL PROTECTED] wrote:
Can someone please suggest how to achieve connection Pooling in tomcat 4.1.
As per the docs i have
1) configured server.xml to include the resource parameters ( datasource,
connection pool size etc)
2) In application code , retrieve connection using datasource
3) Every Method call to database retrieves connection
using datasource.getConnection ()
and closes connection everytime

But still the pooling is not achieved, i get ORA-00020 error( maximim
proceses exceeded), i increased the size from 30 to 200) even then it is not
working.

Can someone please help

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 12:55 PM
To: Tomcat Users List
Subject: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool exhausted, cause:


Hi, I am getting the timeout exception for connection pooling, i am using
Tomca 4.1 and datasource to retrieve connections.
I am attaching all the soure code and configuration files used in my
application, please suggest where iam doing wrong...

SEVERE: getConnection()--SQLException
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:801)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:47)
at com.mypublisher.oemapi.DAO.Persister.(Persister.java:46)
at
com.mypublisher.oemapi.SubmitOrder.SubmitOrder(SubmitOrder.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xmlrpc.Invoker.execute(Invoker.java:168)
at
org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:123)
at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:185)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:151)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:128)
at
com.mypublisher.oemapi.xmlrpc.XmlRpcServlet.doPost(XmlRpcServlet.java

===
server.xml
-
xmlrpc-oemapi--
debug=5 reloadable=true crossContext=true useNaming=true

prefix=localhost_rpcoemapi_log. suffix=.txt
timestamp=true/
auth=Container
type=javax.sql.DataSource/




factory
org.apache.commons.dbcp.BasicDataSourceFactory



 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --


maxActive
5



 Set to 0 for no limit.
 --


maxIdle
2



 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --


maxWait
1






username
ioeadmin




password
ioeadmin






driverClassName
oracle.jdbc.driver.OracleDriver



 The autoReconnect=true argument to the url makes sure that the
 mm.mysql

RE: Tomcat 4.1 Connection Pooling...

2004-09-22 Thread Shilpa Nalgonda
Can anyone give me advice on the set up of Tomcat4.1 connection pooling
parameters...

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 9:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Hi Cary,
I am running my application on both windowsxp and Linux. And my Oracle
version is 8i.
I have the same problem on both OS.  I think increasing the number of
processes would not help.
This has got something to do with Tomcat connection pooling configuration.
I am missing some configuration stuff there...
if i use these below parameters in server.xml iget timeout exception...just
after couple of requests..
maxActive :20
maxIdle :10
mxWait :1
removeAbandoned :true
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object 

And if i use this below configuration i get ORA:00020 exception...
maxActive :0
maxIdle :0
mxWait :0
removeAbandoned :true

Can you please help---i have been looking into this since 2 days and still
it doesn't work...

-Original Message-
From: Cary Conover [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 10:09 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Shilpa,

What OS are you running this configuration on?  If it is AIX I would
investigate to see how the system is configured for the number of processes
per user on the system.  If it is configured as a Workstation it is
defaulted to 128 processes / login.  If it is configured as a server it is
set to 500 processes / login.  Plus Oracle support site suggests in the
neighborhood of 2500 processes / login for Oracle 9i to function well if you
are running 9i.  These are all system settings that can be found in smitty
on the system and adjusted as root user.

Hope this helps,

Cary

Shilpa Nalgonda [EMAIL PROTECTED] wrote:
Can someone please suggest how to achieve connection Pooling in tomcat 4.1.
As per the docs i have
1) configured server.xml to include the resource parameters ( datasource,
connection pool size etc)
2) In application code , retrieve connection using datasource
3) Every Method call to database retrieves connection
using datasource.getConnection ()
and closes connection everytime

But still the pooling is not achieved, i get ORA-00020 error( maximim
proceses exceeded), i increased the size from 30 to 200) even then it is not
working.

Can someone please help

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 12:55 PM
To: Tomcat Users List
Subject: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool exhausted, cause:


Hi, I am getting the timeout exception for connection pooling, i am using
Tomca 4.1 and datasource to retrieve connections.
I am attaching all the soure code and configuration files used in my
application, please suggest where iam doing wrong...

SEVERE: getConnection()--SQLException
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:801)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:47)
at com.mypublisher.oemapi.DAO.Persister.(Persister.java:46)
at
com.mypublisher.oemapi.SubmitOrder.SubmitOrder(SubmitOrder.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xmlrpc.Invoker.execute(Invoker.java:168)
at
org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:123)
at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:185)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:151)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:128)
at
com.mypublisher.oemapi.xmlrpc.XmlRpcServlet.doPost(XmlRpcServlet.java

===
server.xml
-
xmlrpc-oemapi--
debug=5 reloadable=true crossContext=true useNaming=true

prefix=localhost_rpcoemapi_log. suffix=.txt
timestamp=true/
auth=Container
type=javax.sql.DataSource/




factory
org.apache.commons.dbcp.BasicDataSourceFactory



 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --


maxActive
5



 Set to 0 for no limit.
 --


maxIdle
2



 in ms, in this example 10 seconds. An Exception is thrown

RE: Tomcat 4.1 Connection Pooling...

2004-09-22 Thread Shilpa Nalgonda
Hi Yoav Shapira,
Can you put some light on this pooling stuff...
Thanks.
Shilpa.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 9:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Hi Cary,
I am running my application on both windowsxp and Linux. And my Oracle
version is 8i.
I have the same problem on both OS.  I think increasing the number of
processes would not help.
This has got something to do with Tomcat connection pooling configuration.
I am missing some configuration stuff there...
if i use these below parameters in server.xml iget timeout exception...just
after couple of requests..
maxActive :20
maxIdle :10
mxWait :1
removeAbandoned :true
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object 

And if i use this below configuration i get ORA:00020 exception...
maxActive :0
maxIdle :0
mxWait :0
removeAbandoned :true

Can you please help---i have been looking into this since 2 days and still
it doesn't work...

-Original Message-
From: Cary Conover [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 10:09 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Shilpa,

What OS are you running this configuration on?  If it is AIX I would
investigate to see how the system is configured for the number of processes
per user on the system.  If it is configured as a Workstation it is
defaulted to 128 processes / login.  If it is configured as a server it is
set to 500 processes / login.  Plus Oracle support site suggests in the
neighborhood of 2500 processes / login for Oracle 9i to function well if you
are running 9i.  These are all system settings that can be found in smitty
on the system and adjusted as root user.

Hope this helps,

Cary

Shilpa Nalgonda [EMAIL PROTECTED] wrote:
Can someone please suggest how to achieve connection Pooling in tomcat 4.1.
As per the docs i have
1) configured server.xml to include the resource parameters ( datasource,
connection pool size etc)
2) In application code , retrieve connection using datasource
3) Every Method call to database retrieves connection
using datasource.getConnection ()
and closes connection everytime

But still the pooling is not achieved, i get ORA-00020 error( maximim
proceses exceeded), i increased the size from 30 to 200) even then it is not
working.

Can someone please help

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 12:55 PM
To: Tomcat Users List
Subject: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool exhausted, cause:


Hi, I am getting the timeout exception for connection pooling, i am using
Tomca 4.1 and datasource to retrieve connections.
I am attaching all the soure code and configuration files used in my
application, please suggest where iam doing wrong...

SEVERE: getConnection()--SQLException
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:801)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:47)
at com.mypublisher.oemapi.DAO.Persister.(Persister.java:46)
at
com.mypublisher.oemapi.SubmitOrder.SubmitOrder(SubmitOrder.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xmlrpc.Invoker.execute(Invoker.java:168)
at
org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:123)
at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:185)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:151)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:128)
at
com.mypublisher.oemapi.xmlrpc.XmlRpcServlet.doPost(XmlRpcServlet.java

===
server.xml
-
xmlrpc-oemapi--
debug=5 reloadable=true crossContext=true useNaming=true

prefix=localhost_rpcoemapi_log. suffix=.txt
timestamp=true/
auth=Container
type=javax.sql.DataSource/




factory
org.apache.commons.dbcp.BasicDataSourceFactory



 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --


maxActive
5



 Set to 0 for no limit.
 --


maxIdle
2



 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout

RE: Tomcat 4.1 Connection Pooling...

2004-09-22 Thread Shilpa Nalgonda
Thanks.
Maybe its the parameter configuration can you send me your configuration for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my application makes 7 database queries, each query gets connection
from datasource and closes() the connection in finally block.  When it gets
connection from datasource it is supposed to get it from pool right???

I noticed that after my application runs 3 times --(3x7 =21).. it gives me
this error

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb..

So can you send me ur config and code snippet to get datasource if
possible...


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:55 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Nope, I can't help unfortunately.  I used Tomcat 4.1 for years
connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat
5.0 and 5.5.  Maybe I'm just lucky, but the docs (specifically the JDBC
DataSources how-to) have always worked for me out of the box.  I've
never seen the error you describe.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Hi Yoav Shapira,
Can you put some light on this pooling stuff...
Thanks.
Shilpa.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 9:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Hi Cary,
I am running my application on both windowsxp and Linux. And my Oracle
version is 8i.
I have the same problem on both OS.  I think increasing the number of
processes would not help.
This has got something to do with Tomcat connection pooling
configuration.
I am missing some configuration stuff there...
if i use these below parameters in server.xml iget timeout
exception...just
after couple of requests..
maxActive :20
maxIdle :10
mxWait :1
removeAbandoned :true
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object 

And if i use this below configuration i get ORA:00020 exception...
maxActive :0
maxIdle :0
mxWait :0
removeAbandoned :true

Can you please help---i have been looking into this since 2 days and
still
it doesn't work...

-Original Message-
From: Cary Conover [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 10:09 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Shilpa,

What OS are you running this configuration on?  If it is AIX I would
investigate to see how the system is configured for the number of
processes
per user on the system.  If it is configured as a Workstation it is
defaulted to 128 processes / login.  If it is configured as a server it
is
set to 500 processes / login.  Plus Oracle support site suggests in the
neighborhood of 2500 processes / login for Oracle 9i to function well
if
you
are running 9i.  These are all system settings that can be found in
smitty
on the system and adjusted as root user.

Hope this helps,

Cary

Shilpa Nalgonda [EMAIL PROTECTED] wrote:
Can someone please suggest how to achieve connection Pooling in tomcat
4.1.
As per the docs i have
1) configured server.xml to include the resource parameters (
datasource,
connection pool size etc)
2) In application code , retrieve connection using datasource
3) Every Method call to database retrieves connection
using datasource.getConnection ()
and closes connection everytime

But still the pooling is not achieved, i get ORA-00020 error( maximim
proceses exceeded), i increased the size from 30 to 200) even then it
is
not
working.

Can someone please help

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 12:55 PM
To: Tomcat Users List
Subject: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool exhausted, cause:


Hi, I am getting the timeout exception for connection pooling, i am
using
Tomca 4.1 and datasource to retrieve connections.
I am attaching all the soure code and configuration files used in my
application, please suggest where iam doing wrong...

SEVERE: getConnection()--SQLException
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObje
ctPo
o
l.java:801)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSour
ce.j
a
va:140

RE: removeAbandoned in DBCP

2004-09-22 Thread Shilpa Nalgonda
Hi,
My connection pool works if i set the removeAbandon parameter to true, but i
still do not understand why it works that way,
can someone suggest...can i use that parameter...

parameter
  nameremoveAbandoned/name
  valuetrue/value
/parameter
parameter
nameremoveAbandonedTimeout/name
value0/value
/parameter


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:13 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
My configurations tend to be very similar to those in the documentation.
Check the DBCP (http://jakarta.apache.org/common/dbcp) site for what the
parameters like maxIdle mean.

My code to look up a DataSource and get a connection is the same as
yours, and the same as the docs.  It's boilerplate: Create an
InitialContext, lookup java:comp/env/whatever your resource name is,
cast it to DataSource, getConnection.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Thanks.
Maybe its the parameter configuration can you send me your
configuration
for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my application makes 7 database queries, each query gets
connection
from datasource and closes() the connection in finally block.  When it
gets
connection from datasource it is supposed to get it from pool right???

I noticed that after my application runs 3 times --(3x7 =21).. it gives
me
this error

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb..

So can you send me ur config and code snippet to get datasource if
possible...


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:55 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Nope, I can't help unfortunately.  I used Tomcat 4.1 for years
connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat
5.0 and 5.5.  Maybe I'm just lucky, but the docs (specifically the JDBC
DataSources how-to) have always worked for me out of the box.  I've
never seen the error you describe.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Hi Yoav Shapira,
Can you put some light on this pooling stuff...
Thanks.
Shilpa.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 9:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Hi Cary,
I am running my application on both windowsxp and Linux. And my Oracle
version is 8i.
I have the same problem on both OS.  I think increasing the number of
processes would not help.
This has got something to do with Tomcat connection pooling
configuration.
I am missing some configuration stuff there...
if i use these below parameters in server.xml iget timeout
exception...just
after couple of requests..
maxActive :20
maxIdle :10
mxWait :1
removeAbandoned :true
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object 

And if i use this below configuration i get ORA:00020 exception...
maxActive :0
maxIdle :0
mxWait :0
removeAbandoned :true

Can you please help---i have been looking into this since 2 days and
still
it doesn't work...

-Original Message-
From: Cary Conover [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 10:09 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Shilpa,

What OS are you running this configuration on?  If it is AIX I would
investigate to see how the system is configured for the number of
processes
per user on the system.  If it is configured as a Workstation it is
defaulted to 128 processes / login.  If it is configured as a server
it
is
set to 500 processes / login.  Plus Oracle support site suggests in
the
neighborhood of 2500 processes / login for Oracle 9i to function well
if
you
are running 9i.  These are all system settings that can be found in
smitty
on the system and adjusted as root user.

Hope this helps,

Cary

Shilpa Nalgonda [EMAIL PROTECTED] wrote:
Can someone please suggest how to achieve connection Pooling in tomcat
4.1.
As per the docs i have
1) configured server.xml to include the resource parameters (
datasource,
connection pool size etc)
2) In application code , retrieve

RE: removeAbandoned in DBCP

2004-09-22 Thread Shilpa Nalgonda
Thanks a lot for the reply.  I am releasing all the connections and other
resources in my entire application.
I am using Tomcat4.1.30 and Oracle 8i..
But i have one question though,
does
Connection con = dataSource.getConnection();
 ensures that we are creating connection pool and getting connection from
the pool?
i noticed that there are several classes in DBCp like Pooled Connection
etc., can we use those ...

-Original Message-
From: Robert Bateman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 3:59 PM
To: Tomcat Users List
Subject: Re: removeAbandoned in DBCP


On Wednesday 22 September 2004 03:28 pm, Shilpa Nalgonda wrote:
 Hi,
 My connection pool works if i set the removeAbandon parameter to true, but
 i still do not understand why it works that way,
 can someone suggest...can i use that parameter...

 parameter
   nameremoveAbandoned/name
   valuetrue/value
 /parameter
 parameter
 nameremoveAbandonedTimeout/name
 value0/value
 /parameter


I have both parameters in my pool definition and they work fine.  I did set
my
Timeout a bit bigger though.  In my prod. TC app, I have set (for MySQL,
ymmv):

!-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit. --
parameter
namemaxActive/name
value100/value
/parameter
!-- Maximum time to wait for a dB connection to become available
 in ms, in this example 15 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely. --
parameter
namemaxWait/name
value15000/value
/parameter
!-- Validation Query to insure our connection is still valid. --
parameter
namevalidationQuery/name
valueSELECT version()/value
/parameter
!-- Make sure we test each and every connection before we borrow
 it to see if it is still valid. --
parameter
nametestOnBorrow/name
valuetrue/value
/parameter
!-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit. --
parameter
namemaxIdle/name
value100/value
/parameter
parameter
nameremoveAbandoned/name
valuetrue/value
/parameter
!--Use the removeAbandonedTimeout parameter / seconds.--
parameter
nameremoveAbandonedTimeout/name
value60/value
/parameter
parameter
namelogAbandoned/name
valuetrue/value
/parameter

Also, I noticed on my last app that I was forgetting to release the pooled
connection and I eventually ran out of entries.  You might want to double
check you are releasing/closing your connection.

Bob

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


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



RE: removeAbandoned in DBCP

2004-09-22 Thread Shilpa Nalgonda
Hi Robert,
when you said I have both parameters in my pool definition and they work
fine. 


How did you define the pool , is it by using BasicDataSourceFactory or
somthing else...

parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

I reason i am asking is i still don't understand how pooling is achieved...

BasicDataSourcefactory creates BasicDatasource and when you use the below
code the datasource obtained is basicdatasource.
Context ctx = new InitialContext();
String dataSrc =
msgResource.getMessage(OEMAPIConstants.DATA_SOURCE_NAME);
Context env = (Context)ctx.lookup(java:comp/env);
dataSource = (DataSource) env.lookup(dataSrc);
Connection con = dataSource.getConnection();

Datasource.getConnection gives java.sql.Connection object..so i am not sure
how the Connection is a poolable connection...










riginal Message-
From: Robert Bateman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 3:59 PM
To: Tomcat Users List
Subject: Re: removeAbandoned in DBCP


On Wednesday 22 September 2004 03:28 pm, Shilpa Nalgonda wrote:
 Hi,
 My connection pool works if i set the removeAbandon parameter to true, but
 i still do not understand why it works that way,
 can someone suggest...can i use that parameter...

 parameter
   nameremoveAbandoned/name
   valuetrue/value
 /parameter
 parameter
 nameremoveAbandonedTimeout/name
 value0/value
 /parameter


I have both parameters in my pool definition and they work fine.  I did set
my
Timeout a bit bigger though.  In my prod. TC app, I have set (for MySQL,
ymmv):

!-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit. --
parameter
namemaxActive/name
value100/value
/parameter
!-- Maximum time to wait for a dB connection to become available
 in ms, in this example 15 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely. --
parameter
namemaxWait/name
value15000/value
/parameter
!-- Validation Query to insure our connection is still valid. --
parameter
namevalidationQuery/name
valueSELECT version()/value
/parameter
!-- Make sure we test each and every connection before we borrow
 it to see if it is still valid. --
parameter
nametestOnBorrow/name
valuetrue/value
/parameter
!-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit. --
parameter
namemaxIdle/name
value100/value
/parameter
parameter
nameremoveAbandoned/name
valuetrue/value
/parameter
!--Use the removeAbandonedTimeout parameter / seconds.--
parameter
nameremoveAbandonedTimeout/name
value60/value
/parameter
parameter
namelogAbandoned/name
valuetrue/value
/parameter

Also, I noticed on my last app that I was forgetting to release the pooled
connection and I eventually ran out of entries.  You might want to double
check you are releasing/closing your connection.

Bob

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


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



cannot obtain lock ...

2004-09-21 Thread Shilpa Nalgonda
Logger cannot be created!
java.io.IOException: Couldn't get lock for OEMAPIXmlRpcLog.log
at java.util.logging.FileHandler.openFiles(FileHandler.java:361)
at java.util.logging.FileHandler.init(FileHandler.java:232)
at com.mypublisher.oemapi.OEMAPILogger.init(OEMAPILogger.java:34)
at
com.mypublisher.oemapi.OEMAPILogger.getInstance(OEMAPILogger.java:50)
at com.mypublisher.oemapi.SubmitOrder.init(SubmitOrder.java:26)
at
com.mypublisher.oemapi.xmlrpc.XmlRpcServlet.init(XmlRpcServlet.java:33)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)

I am using java.util.logging API to do logging in my application. For some
reason Tomcat is not able to get the log.
Can anyone help mw with this..is it a permission thing?


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



RE: can anyone suggest....cannot obtain lock ...

2004-09-21 Thread Shilpa Nalgonda


Logger cannot be created!
java.io.IOException: Couldn't get lock for OEMAPIXmlRpcLog.log
at java.util.logging.FileHandler.openFiles(FileHandler.java:361)
at java.util.logging.FileHandler.init(FileHandler.java:232)
at com.mypublisher.oemapi.OEMAPILogger.init(OEMAPILogger.java:34)
at
com.mypublisher.oemapi.OEMAPILogger.getInstance(OEMAPILogger.java:50)
at com.mypublisher.oemapi.SubmitOrder.init(SubmitOrder.java:26)
at
com.mypublisher.oemapi.xmlrpc.XmlRpcServlet.init(XmlRpcServlet.java:33)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)

I am using java.util.logging API to do logging in my application. For some
reason Tomcat is not able to get the log.
Can anyone help mw with this..is it a permission thing?



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



java.lang.IllegalArgumentException:

2004-09-21 Thread Shilpa Nalgonda
I am not able to deploy my application rpcoemapi on linux box, tomcat4.1.
When i copy rpcoemapi.war on tomcat webapps directory (
/usr/share/tomcat4/webapps/rpcoemapi.war ) and restart the server,
the war file is supposed to be exploded, but is not happeneing , insted i
found this error... any help will be greatly appreciated

java.lang.IllegalArgumentException: Document base
/var/lib/tomcat4/webapps/rpcoemapi does not exist or is not a readable
directory
at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:19
3)
at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java
:3349)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3479)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363)
at
org.apache.catalina.core.StandardService.start(StandardService.java:497)


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



RE: Tomcat 4.1 Connection Pooling...

2004-09-21 Thread Shilpa Nalgonda
Can someone please suggest how to achieve connection Pooling in tomcat 4.1.
As per the docs i have
1) configured server.xml to include the resource parameters ( datasource,
connection pool size etc)
2) In application code , retrieve connection using datasource
3) Every Method call to database retrieves connection
using datasource.getConnection ()
and closes connection everytime

But still the pooling is not achieved, i get ORA-00020 error( maximim
proceses exceeded), i increased the size from 30 to 200) even then it is not
working.

Can someone please help

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 12:55 PM
To: Tomcat Users List
Subject: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool exhausted, cause:


Hi,  I am getting the timeout exception for connection pooling, i am using
Tomca 4.1 and datasource to retrieve connections.
I am attaching all the soure code and configuration files used in my
application, please suggest where iam doing wrong...

SEVERE: getConnection()--SQLException
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:801)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:47)
at com.mypublisher.oemapi.DAO.Persister.init(Persister.java:46)
at
com.mypublisher.oemapi.SubmitOrder.SubmitOrder(SubmitOrder.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xmlrpc.Invoker.execute(Invoker.java:168)
at
org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:123)
at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:185)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:151)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:128)
at
com.mypublisher.oemapi.xmlrpc.XmlRpcServlet.doPost(XmlRpcServlet.java

===
server.xml
-
!-- JNDI datasource setup to connect to Oracle database for
xmlrpc-oemapi--
Context path=/rpcoemapi docBase=rpcoemapi
debug=5 reloadable=true crossContext=true useNaming=true

Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_rpcoemapi_log. suffix=.txt
 timestamp=true/
   Resource name=jdbc/MYDB
   auth=Container
   type=javax.sql.DataSource/

ResourceParams name=jdbc/MYDB
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

!-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --
parameter
  namemaxActive/name
  value5/value
/parameter

!-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit.
 --
parameter
 namemaxIdle/name
 value2/value
/parameter

 !-- Maximum time to wait for a dB connection to become available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --
parameter
 namemaxWait/name
 value1/value
/parameter

!-- MySQL dB username and password for dB connections  --
parameter
  nameusername/name
  valueioeadmin/value
/parameter
parameter
  namepassword/name
  valueioeadmin/value
/parameter

!-- Class name for mm.mysql JDBC driver --
parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
/parameter

!-- The JDBC connection url for connecting to your MySQL dB.
 The autoReconnect=true argument to the url makes sure that the
 mm.mysql JDBC Driver will automatically reconnect if mysqld closed
the
 connection.  mysqld by default closes idle connections after 8
hours.
 --
parameter
nameurl/name
valuejdbc:oracle:thin:@ipaddress:1521:MYDB/value
/parameter
/ResourceParams
/Context

RE: Connection Pooling problem

2004-09-21 Thread Shilpa Nalgonda
I am using these parameters : for Connection pooling... in Tomcat 4.1
maxActive :20
maxIdle :10
mxWait :1
removeAbandoned :true

My application makes 5 queries to the database at one time, so it calls
datasource.getConnection 5 times and closes connection 5 times..

When i run this application 3 times in a loop, it fails with the exception
of
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:801)

I still don't understand, whether connection pool is being used...

can someone suggest me what exactly i am missing here...

---


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



org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause:

2004-09-20 Thread Shilpa Nalgonda
Hi,  I am getting the timeout exception for connection pooling, i am using
Tomca 4.1 and datasource to retrieve connections.
I am attaching all the soure code and configuration files used in my
application, please suggest where iam doing wrong...

SEVERE: getConnection()--SQLException
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:801)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:47)
at com.mypublisher.oemapi.DAO.Persister.init(Persister.java:46)
at
com.mypublisher.oemapi.SubmitOrder.SubmitOrder(SubmitOrder.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xmlrpc.Invoker.execute(Invoker.java:168)
at
org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:123)
at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:185)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:151)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:128)
at
com.mypublisher.oemapi.xmlrpc.XmlRpcServlet.doPost(XmlRpcServlet.java

===
server.xml
-
!-- JNDI datasource setup to connect to Oracle database for
xmlrpc-oemapi--
Context path=/rpcoemapi docBase=rpcoemapi
debug=5 reloadable=true crossContext=true useNaming=true

Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_rpcoemapi_log. suffix=.txt
 timestamp=true/
   Resource name=jdbc/MYDB
   auth=Container
   type=javax.sql.DataSource/

ResourceParams name=jdbc/MYDB
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

!-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --
parameter
  namemaxActive/name
  value5/value
/parameter

!-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit.
 --
parameter
 namemaxIdle/name
 value2/value
/parameter

 !-- Maximum time to wait for a dB connection to become available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --
parameter
 namemaxWait/name
 value1/value
/parameter

!-- MySQL dB username and password for dB connections  --
parameter
  nameusername/name
  valueioeadmin/value
/parameter
parameter
  namepassword/name
  valueioeadmin/value
/parameter

!-- Class name for mm.mysql JDBC driver --
parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
/parameter

!-- The JDBC connection url for connecting to your MySQL dB.
 The autoReconnect=true argument to the url makes sure that the
 mm.mysql JDBC Driver will automatically reconnect if mysqld closed
the
 connection.  mysqld by default closes idle connections after 8
hours.
 --
parameter
nameurl/name
valuejdbc:oracle:thin:@ipaddress:1521:MYDB/value
/parameter
/ResourceParams
/Context


===
DatasourceFactory is a singleton class used to retrieve the datasource from
tomcat using JNDi..and connection is obtained from datasource...
  public static DataSource getInstance() throws SystemException
{
if (!isDataSrcAvaliable)
{
if (dataSource == null)
{
new DataSourceFactory();
doLookUp();
isDataSrcAvaliable = true;
} //end if (dataSource == null)
}// end if (!isDataSrcAvaliable)
return dataSource;
} /* end getInstance() */

doLookUp method does this:
Context ctx = new InitialContext();
String dataSrc =

java.util.zip.ZipException: Permission denied

2004-09-15 Thread Shilpa Nalgonda

When i restart tomcat 4.1 server i am getting this error any clue of why we
get this...


Using CATALINA_BASE:
 /usr/share/tomcat4
Using CATALINA_HOME:   /usr/share/tomcat4
Using CATALINA_TMPDIR: /usr/share/tomcat4/temp
Using JAVA_HOME:   /usr/local/j2sdk1.4.2_03
java.util.zip.ZipException: Permission denied
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.init(ZipFile.java:112)
at java.util.jar.JarFile.init(JarFile.java:127)
at java.util.jar.JarFile.init(JarFile.java:65)
at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
dClassLoader.java:1082)
at
org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.ja
va:200)
at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
Factory.java:202)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140)
Bootstrap: Class loader creation threw exception
java.lang.IllegalArgumentException: addRepositoryInternal:
java.util.zip.ZipException: Permission denied
at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
dClassLoader.java:1110)
at
org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.ja
va:200)
at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
Factory.java:202)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140)


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



RE: java.util.zip.ZipException: Permission denied

2004-09-15 Thread Shilpa Nalgonda
thats true i am missing permissions on one of the jar, and it works fine
after setting those.

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 15, 2004 3:33 PM
To: Tomcat Users List
Subject: Re: java.util.zip.ZipException: Permission denied


Check the file permissions of all your .jar files.  At least one of them
somewhere in your tomcat installation has bad permissions.  The user
tomcat is running as needs read permission to all the jars.

--David

Shilpa Nalgonda wrote:

When i restart tomcat 4.1 server i am getting this error any clue of why we
get this...


Using CATALINA_BASE:
 /usr/share/tomcat4
Using CATALINA_HOME:   /usr/share/tomcat4
Using CATALINA_TMPDIR: /usr/share/tomcat4/temp
Using JAVA_HOME:   /usr/local/j2sdk1.4.2_03
java.util.zip.ZipException: Permission denied
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.init(ZipFile.java:112)
at java.util.jar.JarFile.init(JarFile.java:127)
at java.util.jar.JarFile.init(JarFile.java:65)
at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standa
r
dClassLoader.java:1082)
at
org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.j
a
va:200)
at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoade
r
Factory.java:202)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140)
Bootstrap: Class loader creation threw exception
java.lang.IllegalArgumentException: addRepositoryInternal:
java.util.zip.ZipException: Permission denied
at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standa
r
dClassLoader.java:1110)
at
org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.j
a
va:200)
at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoade
r
Factory.java:202)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140)


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




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


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



RE: at the tomcat start up...log4j error..

2004-09-11 Thread Shilpa Nalgonda
Thanks a lot jake it works.

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 11, 2004 1:43 AM
To: Tomcat Users List
Subject: Re: at the tomcat start up...log4j error..


At 05:21 PM 9/10/2004 -0400, you wrote:
log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.D
igester).
log4j:WARN Please initialize the log4j system properly.
Starting service Tomcat-Standalone

I am getting the above error as the tomcat starts up, i hav elog4j.jar
under
commom/lib and log4j.proprties
under webapps/myapps/WEB-INF/lib... any clue..

Tomcat itself won't see the log4j.properties in your webapp.  There are two
issues here:

1.  Log4j tries to perform autoconfiguration at Tomcat startup and isn't
finding a config file.  The solution here is to put a simple
log4j.properties or log4j.xml file in common/classes

2.  Log4j won't perform automatic configuration for your webapp since the
one in common/lib can't see WEB-INF/classes.  In this case, there are a few
different solutions
a.  add a copy of log4j.jar to WEB-INF/lib and your config file to
WEB-INF/classes and autoconfiguration will happen and only affect your
webapp logging.

b.  perform manual configuration at webapp startup and provide Log4j
with the URL of the config file.  However, keep in mind that this will
configure logging not only for your webapp, but also for any other app that
is using Log4j.  This is because Log4j is global to all apps.  The solution
is to do as described in a or do c below...

c.  use a repository selector so that Log4j can be global, but use a
separate logger repository for each application.  This is certainly more
complex than a, but it is a good option.  See more here...
http://wiki.apache.org/logging-log4j/AppContainerLogging

If you check out the log4j-sandbox code mentioned at that link, make sure
to checkout the 0_3_alpha tag, as there are certain files that are required
that were removed from the HEAD branch because they were moved into
Log4j-1.3 HEAD.

Jake


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


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



org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory --help. using Tomcat4.1

2004-09-10 Thread Shilpa Nalgonda
org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFact
ory, cause:
java.sql.SQLException: Connection
refused(DESCRIPTION=(TMP=)(VSNNUM=135286784)(E
RR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv
erConnectionFactory.java:82)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Poolable
ConnectionFactory.java:300)
at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas
icDataSource.java:838)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:821)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:518)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:47)
at com.mypublisher.oemapi.DAO.Persister.init(Persister.java:32)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:56)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)

I have this configuartion in server.xml,

Context path=/rpcoemapi docBase=rpcoemapi
debug=5 reloadable=true crossContext=true useNaming=true

Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_rpcoemapi_log. suffix=.txt
 timestamp=true/
   Resource name=jdbc/DBNAME
   auth=Container
   type=javax.sql.DataSource/

ResourceParams name=jdbc/DBNAME
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

!-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --
parameter
  namemaxActive/name
  value50/value
/parameter

!-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit.
 --
parameter
 namemaxIdle/name
 value10/value
/parameter

 !-- Maximum time to wait for a dB connection to become available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --
parameter
 namemaxWait/name
 value1/value
/parameter

!-- MySQL dB username and password for dB connections  --
parameter
  nameusername/name
  valueioeadmin/value
/parameter
parameter
  namepassword/name
  valueioeadmin/value
/parameter

!-- Class name for mm.mysql JDBC driver --
parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
/parameter

!-- The JDBC connection url for connecting to your MySQL dB.
 The autoReconnect=true argument to the url makes sure that the
 mm.mysql JDBC Driver will automatically reconnect if mysqld closed
the
 connection.  mysqld by default closes idle connections after 8
hours.
 --
parameter
nameurl/name

valuejdbc:oracle:thin:@IPADDRESS:1521:DBNAME?autoReconnect=true/value
/parameter
/ResourceParams
/Context

=
getConnection method uses the below code:

Context ctx = new InitialContext();
Context env = (Context)ctx.lookup(java:comp/env);
DataSource ds = (DataSource) env.lookup(jdbc/DBNAME);
conn = ds.getConnection();


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



RE: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory --help. using Tomcat4.1

2004-09-10 Thread Shilpa Nalgonda

But i use the same configuration and try to connect without using
datasource i have no error.

I have used this code to connect--
Class.forName(oracle.jdbc.driver.OracleDriver);
Connection conn =
DriverManager.getConnection(jdbc:oracle:thin:@IPADDRESS:1521:ODINPRD,
ioeadmin, ioeadmin);


Can i use someother factory instead of
org.apache.commons.dbcp.BasicDataSourceFactory , does that make any
difference...


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 11:28 AM
To: Tomcat Users List
Subject: RE: org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory --help. using Tomcat4.1



Hi,
Look at the cause.  The connection is refused by your database.  It's
not a Tomcat problem, it's likely a simple misconfiguration.  Use
another tool to figure out the correct DB connection parameters, or ask
your DBA if you're not sure.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 11:17 AM
To: Tomcat Users List
Subject: org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory --help. using Tomcat4.1

org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFact
ory, cause:
java.sql.SQLException: Connection
refused(DESCRIPTION=(TMP=)(VSNNUM=135286784)(E
RR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
at
oracle.jdbc.driver.OracleConnection.init(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv
erConnectionFactory.java:82)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Poolable
ConnectionFactory.java:300)
at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas
icDataSource.java:838)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:821)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:518)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:47)
at
com.mypublisher.oemapi.DAO.Persister.init(Persister.java:32)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:56)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)

I have this configuartion in server.xml,

   Context path=/rpcoemapi docBase=rpcoemapi
   debug=5 reloadable=true crossContext=true
useNaming=true

   Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_rpcoemapi_log. suffix=.txt
 timestamp=true/
   Resource name=jdbc/DBNAME
   auth=Container
   type=javax.sql.DataSource/

   ResourceParams name=jdbc/DBNAME
   parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter

   !-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --
   parameter
  namemaxActive/name
  value50/value
/parameter

   !-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit.
 --
parameter
 namemaxIdle/name
 value10/value
/parameter

!-- Maximum time to wait for a dB connection to become
available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --
   parameter
 namemaxWait/name
 value1/value
/parameter

   !-- MySQL dB username and password for dB connections  --
   parameter
 nameusername/name
 valueioeadmin/value
   /parameter
   parameter
 namepassword/name
 valueioeadmin/value
   /parameter

   !-- Class name for mm.mysql JDBC driver --
   parameter
 namedriverClassName/name
 valueoracle.jdbc.driver.OracleDriver/value
   /parameter

   !-- The JDBC connection url for connecting to your MySQL dB.
 The autoReconnect=true argument to the url makes sure that the
 mm.mysql JDBC Driver will automatically reconnect if mysqld
closed
the
 connection.  mysqld by default closes idle connections after 8
hours.
 --
   parameter
   nameurl/name

valuejdbc:oracle:thin:@IPADDRESS:1521:DBNAME?autoReconnect=true/valu
e
   /parameter
/ResourceParams
/Context

RE: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory --help. using Tomcat4.1

2004-09-10 Thread Shilpa Nalgonda
When i do that i get invalid arguments error..

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 1:38 PM
To: Tomcat Users List
Subject: RE: org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory --help. using Tomcat4.1



Hi,
It just occurred to me that at some point the DBCP configuration changed
from username to user as the user name parameter.  Try changing
username to user in your configuration file and restarting Tomcat.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 12:21 PM
To: Tomcat Users List
Subject: RE: org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory --help. using Tomcat4.1


But i use the same configuration and try to connect without using
datasource i have no error.

I have used this code to connect--
Class.forName(oracle.jdbc.driver.OracleDriver);
Connection conn =
DriverManager.getConnection(jdbc:oracle:thin:@IPADDRESS:1521:ODINPRD,
ioeadmin, ioeadmin);


Can i use someother factory instead of
org.apache.commons.dbcp.BasicDataSourceFactory , does that make any
difference...


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 11:28 AM
To: Tomcat Users List
Subject: RE: org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory --help. using Tomcat4.1



Hi,
Look at the cause.  The connection is refused by your database.  It's
not a Tomcat problem, it's likely a simple misconfiguration.  Use
another tool to figure out the correct DB connection parameters, or ask
your DBA if you're not sure.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 11:17 AM
To: Tomcat Users List
Subject: org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory --help. using Tomcat4.1

org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFact
ory, cause:
java.sql.SQLException: Connection
refused(DESCRIPTION=(TMP=)(VSNNUM=135286784)(E
RR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
at
oracle.jdbc.driver.OracleConnection.init(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv
erConnectionFactory.java:82)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Poolable
ConnectionFactory.java:300)
at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas
icDataSource.java:838)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:821)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:518)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:47)
at
com.mypublisher.oemapi.DAO.Persister.init(Persister.java:32)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:56)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)

I have this configuartion in server.xml,

  Context path=/rpcoemapi docBase=rpcoemapi
  debug=5 reloadable=true crossContext=true
useNaming=true

  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_rpcoemapi_log. suffix=.txt
 timestamp=true/
   Resource name=jdbc/DBNAME
   auth=Container
   type=javax.sql.DataSource/

  ResourceParams name=jdbc/DBNAME
  parameter
namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter

  !-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --
  parameter
  namemaxActive/name
  value50/value
/parameter

  !-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit.
 --
parameter
 namemaxIdle/name
 value10/value
/parameter

   !-- Maximum time to wait for a dB connection to become
available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --
  parameter
 namemaxWait/name
 value1/value
/parameter

  !-- MySQL dB username and password for dB connections  --
  parameter
nameusername/name
valueioeadmin/value
  /parameter

at the tomcat start up...log4j error..

2004-09-10 Thread Shilpa Nalgonda
log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.D
igester).
log4j:WARN Please initialize the log4j system properly.
Starting service Tomcat-Standalone

I am getting the above error as the tomcat starts up, i hav elog4j.jar under
commom/lib and log4j.proprties
under webapps/myapps/WEB-INF/lib... any clue..



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



RE: java.security.AccessControlException: access denied

2004-08-25 Thread Shilpa Nalgonda
i was able to get this fixed by replacing the
permission java.io.FilePermission C:\\Program Files\\Apache Group\\Tomcat
4.1\\certs\\-, read;

with
permission java.io.FilePermission ALL FILES, read;



-Original Message-
From: Benjamin Armintor [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 25, 2004 1:23 PM
To: Shilpa Nalgonda
Subject: RE: java.security.AccessControlException: access denied


That's really curious.  I'd try two things:
1) change the file permission to this:
permission java.io.FilePermission ALL FILES, read;

If that works, then there's a problem with the path in the file
permission.  If that doesn't work, then...

2) add a java.security.AllPermission permission (for testing only) If
that doesn't work, then this is not the policy file in use.  If it does,
then another permission is missing, and the exception is being
misreported.

Again, I'd also try writing a JSP that creates a java.io.File at the
certs location, and calls File#canRead() in a
try{}catch(SecurityException) block to make sure that we're looking at
the right problem.

Benjamin J. Armintor
Operations Systems Specialist
ITS-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 5:36 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


I wrote a jsp file to read the cert file from the C:/certs dir.  Initially i
got the same error,
then i changed the catalina.policy file to include file name
  permission java.io.FilePermission C:/certs/f73e89fd.0, read;

and it worked.

But for some reason the verisign authentication still shows the same error.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 4:50 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


I am using -security option to run TC.
I am not quite sure about the syntax of the policy file, i should check
that,
but can u suggest me what is the correct syntax ?
and also i will try to read this file using some test.jsp and let you know.
thanks.

-Original Message-
From: Benjamin Armintor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 4:42 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


You shouldn't need to add it anywhere else: Permissions are cumulative,
so if that file permission is in a grant{} block, all the code running
under the jvm will have it.  You mentioned making the changes to
java.policy as well: This should be unnecessary, as the catalina.policy
file is the only one in effect if you start TC with the -security
option.  The situation as you're describing it sounds right, but since I
know from experience that the security manager works just fine in 4.1.x,
something is getting left out.

Are you using the -security option to get the security manager, or are
you using some parameters in $JAVA_OPTS?
Are you certain about the syntax of your policy file (although that
usually fails more dramatically than this)?
Can you write a test JSP or servlet that reads a file out of that
directory?

Benjamin J. Armintor
Operations Systems Specialist
ITS-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 3:10 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


No certs is a directory.  shall i add it in other place other than the
general grant block.

-Original Message-
From: Benjamin Armintor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 4:09 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


If certs is a file and not a directory, take off the \\- at the end
of the permission url.

Benjamin J. Armintor
Operations Systems Specialist
ITS-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 2:50 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


I added the below line in the general grant{} block.
permission java.io.FilePermission C:\\Program Files\\Apache
Group\\Tomcat 4.1\\certs\\-, read;

I tried placing the certs file in other directory too where there is no
whitespace issue.  But i still have the problem. can you think of
anything else?


-Original Message-
From: Benjamin Armintor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 3:32 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


Where did you add the permission in the catalina.policy file?  In a
general grant{} block? If not, it's possible that your code doesn't
have

problem with security manager.

2004-08-24 Thread Shilpa Nalgonda
I am running Tomcat4.1.30 on windows 2000, with security option turned on.
My java application which is using JDK 1.4, connects to the the credit card
authorizing company called verisign, and returns the approval authorization
code.
I have installed the digital certificate  on $TOMCAT_HOME\certs directory.
There are read permissions on the cert file.
But still for some reason the verisign is not able to read the cert file due
to the below error.

RESULT=-31RESPMSG=The certificate chain did not validate, no local
certificate
found, java.security.AccessControlException: access denied
(java.io.FilePermissi
on C:\Program Files\Apache Group\Tomcat 4.1\certs read)

However when i run Tomcat server without security, everything is file.
Somehow tomcat is restricting the permission to read the cert file.

Verisign uses Jsse.jar to do the security authentication.
I have modofied both java.policy and catalina.policy to grant permission on
the cert file as below.
permission java.io.FilePermission C:\\Program Files\\Apache Group\\Tomcat
4.1\\certs\\-, read;

But this does not help, is there anything else i should do to the server.xml
file...

How does the security manager runs in Tomcat4.1
Please help...


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



java.security.AccessControlException: access denied

2004-08-24 Thread Shilpa Nalgonda

I am running Tomcat4.1.30 on windows 2000, with security option turned on.
My java application which is using JDK 1.4, connects to the the credit card
authorizing company called verisign, and returns the approval authorization
code.
I have installed the digital certificate  on $TOMCAT_HOME\certs directory.
There are read permissions on the cert file.
But still for some reason the verisign is not able to read the cert file due
to the below error.

RESULT=-31RESPMSG=The certificate chain did not validate, no local
certificate
found, java.security.AccessControlException: access denied
(java.io.FilePermissi
on C:\Program Files\Apache Group\Tomcat 4.1\certs read)

However when i run Tomcat server without security, everything is file.
Somehow tomcat is restricting the permission to read the cert file.

Verisign uses Jsse.jar to do the security authentication.
I have modofied both java.policy and catalina.policy to grant permission on
the cert file as below.
permission java.io.FilePermission C:\\Program Files\\Apache Group\\Tomcat
4.1\\certs\\-, read;

But this does not help, is there anything else i should do to the server.xml
file...

How does the security manager runs in Tomcat4.1
Please help...



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



RE: java.security.AccessControlException: access denied

2004-08-24 Thread Shilpa Nalgonda
I added the below line in the general grant{} block.
permission java.io.FilePermission C:\\Program Files\\Apache Group\\Tomcat
4.1\\certs\\-, read;

I tried placing the certs file in other directory too where there is no
whitespace issue.  But i still have the problem.
can you think of anything else?


-Original Message-
From: Benjamin Armintor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 3:32 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


Where did you add the permission in the catalina.policy file?  In a
general grant{} block?
If not, it's possible that your code doesn't have the permission.

It may also be the case that the whitespace in the filepath causes
problems, but someone who actually runs on Windows could tell you better
than I.

Benjamin J. Armintor
Operations Systems Specialist
ITS-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 1:51 PM
To: [EMAIL PROTECTED]
Subject: java.security.AccessControlException: access denied



I am running Tomcat4.1.30 on windows 2000, with security option turned
on. My java application which is using JDK 1.4, connects to the the
credit card authorizing company called verisign, and returns the
approval authorization code. I have installed the digital certificate
on $TOMCAT_HOME\certs directory. There are read permissions on the cert
file. But still for some reason the verisign is not able to read the
cert file due to the below error.

RESULT=-31RESPMSG=The certificate chain did not validate, no local
certificate found, java.security.AccessControlException: access denied
(java.io.FilePermissi on C:\Program Files\Apache Group\Tomcat 4.1\certs
read)

However when i run Tomcat server without security, everything is file.
Somehow tomcat is restricting the permission to read the cert file.

Verisign uses Jsse.jar to do the security authentication.
I have modofied both java.policy and catalina.policy to grant permission
on the cert file as below. permission java.io.FilePermission
C:\\Program Files\\Apache Group\\Tomcat 4.1\\certs\\-, read;

But this does not help, is there anything else i should do to the
server.xml file...

How does the security manager runs in Tomcat4.1
Please help...



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


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


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



RE: java.security.AccessControlException: access denied

2004-08-24 Thread Shilpa Nalgonda
No certs is a directory.  shall i add it in other place other than the
general grant block.

-Original Message-
From: Benjamin Armintor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 4:09 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


If certs is a file and not a directory, take off the \\- at the end
of the permission url.

Benjamin J. Armintor
Operations Systems Specialist
ITS-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 2:50 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


I added the below line in the general grant{} block.
permission java.io.FilePermission C:\\Program Files\\Apache
Group\\Tomcat 4.1\\certs\\-, read;

I tried placing the certs file in other directory too where there is no
whitespace issue.  But i still have the problem. can you think of
anything else?


-Original Message-
From: Benjamin Armintor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 3:32 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


Where did you add the permission in the catalina.policy file?  In a
general grant{} block? If not, it's possible that your code doesn't
have the permission.

It may also be the case that the whitespace in the filepath causes
problems, but someone who actually runs on Windows could tell you better
than I.

Benjamin J. Armintor
Operations Systems Specialist
ITS-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 1:51 PM
To: [EMAIL PROTECTED]
Subject: java.security.AccessControlException: access denied



I am running Tomcat4.1.30 on windows 2000, with security option turned
on. My java application which is using JDK 1.4, connects to the the
credit card authorizing company called verisign, and returns the
approval authorization code. I have installed the digital certificate on
$TOMCAT_HOME\certs directory. There are read permissions on the cert
file. But still for some reason the verisign is not able to read the
cert file due to the below error.

RESULT=-31RESPMSG=The certificate chain did not validate, no local
certificate found, java.security.AccessControlException: access denied
(java.io.FilePermissi on C:\Program Files\Apache Group\Tomcat 4.1\certs
read)

However when i run Tomcat server without security, everything is file.
Somehow tomcat is restricting the permission to read the cert file.

Verisign uses Jsse.jar to do the security authentication.
I have modofied both java.policy and catalina.policy to grant permission
on the cert file as below. permission java.io.FilePermission
C:\\Program Files\\Apache Group\\Tomcat 4.1\\certs\\-, read;

But this does not help, is there anything else i should do to the
server.xml file...

How does the security manager runs in Tomcat4.1
Please help...



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


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


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


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


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



RE: java.security.AccessControlException: access denied

2004-08-24 Thread Shilpa Nalgonda
I am using -security option to run TC.
I am not quite sure about the syntax of the policy file, i should check
that,
but can u suggest me what is the correct syntax ?
and also i will try to read this file using some test.jsp and let you know.
thanks.

-Original Message-
From: Benjamin Armintor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 4:42 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


You shouldn't need to add it anywhere else: Permissions are cumulative,
so if that file permission is in a grant{} block, all the code running
under the jvm will have it.  You mentioned making the changes to
java.policy as well: This should be unnecessary, as the catalina.policy
file is the only one in effect if you start TC with the -security
option.  The situation as you're describing it sounds right, but since I
know from experience that the security manager works just fine in 4.1.x,
something is getting left out.

Are you using the -security option to get the security manager, or are
you using some parameters in $JAVA_OPTS?
Are you certain about the syntax of your policy file (although that
usually fails more dramatically than this)?
Can you write a test JSP or servlet that reads a file out of that
directory?

Benjamin J. Armintor
Operations Systems Specialist
ITS-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 3:10 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


No certs is a directory.  shall i add it in other place other than the
general grant block.

-Original Message-
From: Benjamin Armintor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 4:09 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


If certs is a file and not a directory, take off the \\- at the end
of the permission url.

Benjamin J. Armintor
Operations Systems Specialist
ITS-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 2:50 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


I added the below line in the general grant{} block.
permission java.io.FilePermission C:\\Program Files\\Apache
Group\\Tomcat 4.1\\certs\\-, read;

I tried placing the certs file in other directory too where there is no
whitespace issue.  But i still have the problem. can you think of
anything else?


-Original Message-
From: Benjamin Armintor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 3:32 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


Where did you add the permission in the catalina.policy file?  In a
general grant{} block? If not, it's possible that your code doesn't
have the permission.

It may also be the case that the whitespace in the filepath causes
problems, but someone who actually runs on Windows could tell you better
than I.

Benjamin J. Armintor
Operations Systems Specialist
ITS-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 1:51 PM
To: [EMAIL PROTECTED]
Subject: java.security.AccessControlException: access denied



I am running Tomcat4.1.30 on windows 2000, with security option turned
on. My java application which is using JDK 1.4, connects to the the
credit card authorizing company called verisign, and returns the
approval authorization code. I have installed the digital certificate on
$TOMCAT_HOME\certs directory. There are read permissions on the cert
file. But still for some reason the verisign is not able to read the
cert file due to the below error.

RESULT=-31RESPMSG=The certificate chain did not validate, no local
certificate found, java.security.AccessControlException: access denied
(java.io.FilePermissi on C:\Program Files\Apache Group\Tomcat 4.1\certs
read)

However when i run Tomcat server without security, everything is file.
Somehow tomcat is restricting the permission to read the cert file.

Verisign uses Jsse.jar to do the security authentication.
I have modofied both java.policy and catalina.policy to grant permission
on the cert file as below. permission java.io.FilePermission
C:\\Program Files\\Apache Group\\Tomcat 4.1\\certs\\-, read;

But this does not help, is there anything else i should do to the
server.xml file...

How does the security manager runs in Tomcat4.1
Please help...



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

RE: java.security.AccessControlException: access denied

2004-08-24 Thread Shilpa Nalgonda
I wrote a jsp file to read the cert file from the C:/certs dir.  Initially i
got the same error,
then i changed the catalina.policy file to include file name
  permission java.io.FilePermission C:/certs/f73e89fd.0, read;

and it worked.

But for some reason the verisign authentication still shows the same error.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 4:50 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


I am using -security option to run TC.
I am not quite sure about the syntax of the policy file, i should check
that,
but can u suggest me what is the correct syntax ?
and also i will try to read this file using some test.jsp and let you know.
thanks.

-Original Message-
From: Benjamin Armintor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 4:42 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


You shouldn't need to add it anywhere else: Permissions are cumulative,
so if that file permission is in a grant{} block, all the code running
under the jvm will have it.  You mentioned making the changes to
java.policy as well: This should be unnecessary, as the catalina.policy
file is the only one in effect if you start TC with the -security
option.  The situation as you're describing it sounds right, but since I
know from experience that the security manager works just fine in 4.1.x,
something is getting left out.

Are you using the -security option to get the security manager, or are
you using some parameters in $JAVA_OPTS?
Are you certain about the syntax of your policy file (although that
usually fails more dramatically than this)?
Can you write a test JSP or servlet that reads a file out of that
directory?

Benjamin J. Armintor
Operations Systems Specialist
ITS-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 3:10 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


No certs is a directory.  shall i add it in other place other than the
general grant block.

-Original Message-
From: Benjamin Armintor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 4:09 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


If certs is a file and not a directory, take off the \\- at the end
of the permission url.

Benjamin J. Armintor
Operations Systems Specialist
ITS-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 2:50 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


I added the below line in the general grant{} block.
permission java.io.FilePermission C:\\Program Files\\Apache
Group\\Tomcat 4.1\\certs\\-, read;

I tried placing the certs file in other directory too where there is no
whitespace issue.  But i still have the problem. can you think of
anything else?


-Original Message-
From: Benjamin Armintor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 3:32 PM
To: Tomcat Users List
Subject: RE: java.security.AccessControlException: access denied


Where did you add the permission in the catalina.policy file?  In a
general grant{} block? If not, it's possible that your code doesn't
have the permission.

It may also be the case that the whitespace in the filepath causes
problems, but someone who actually runs on Windows could tell you better
than I.

Benjamin J. Armintor
Operations Systems Specialist
ITS-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 1:51 PM
To: [EMAIL PROTECTED]
Subject: java.security.AccessControlException: access denied



I am running Tomcat4.1.30 on windows 2000, with security option turned
on. My java application which is using JDK 1.4, connects to the the
credit card authorizing company called verisign, and returns the
approval authorization code. I have installed the digital certificate on
$TOMCAT_HOME\certs directory. There are read permissions on the cert
file. But still for some reason the verisign is not able to read the
cert file due to the below error.

RESULT=-31RESPMSG=The certificate chain did not validate, no local
certificate found, java.security.AccessControlException: access denied
(java.io.FilePermissi on C:\Program Files\Apache Group\Tomcat 4.1\certs
read)

However when i run Tomcat server without security, everything is file.
Somehow tomcat is restricting the permission to read the cert file.

Verisign uses Jsse.jar to do the security authentication.
I have modofied both java.policy

RE: application not working on unix.

2004-08-11 Thread Shilpa Nalgonda
I tried to run Tomcat with security on my windows and i get the same acces
denied AccessControlException, what exactly i should be doing to set the
permissions to load the classloader in catalina.policy file, i am using
Tomcat 4.1

-Original Message-
From: Benjamin Armintor [mailto:[EMAIL PROTECTED]
Sent: Friday, August 06, 2004 4:30 PM
To: Tomcat Users List
Subject: RE: application not working on unix.


Maybe the more direct question is: Are you running with the Security
Manager on at your desktop?  If not, get a copy of the server's policy
file, and refer to the Security Manager How-To to make sure that you're
correctly mimicking the permissions on the server on your desktop.  An
AccessControlException generally means that you lack permissions (in
this case, to get the classLoader).

Benjamin J. Armintor
Operations Systems Specialist
ITS-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Friday, August 06, 2004 10:59 AM
To: Tomcat Users List
Subject: RE: application not working on unix.


Nope i di dnot make any cnages there...

-Original Message-
From: Robert Bateman [mailto:[EMAIL PROTECTED]
Sent: Friday, August 06, 2004 11:52 AM
To: Tomcat Users List
Subject: Re: application not working on unix.


On Friday 06 August 2004 11:52 am, Shilpa Nalgonda wrote:
 I am trying to deploy my prototype shoppingcart application onto linux

 environment , i am using apache tomcat4.0.4, and struts 1.1.  The same

 application was deployed successfully on windows.  I have copied

Did you by chance make *any* changes to catalina.policy in the config
folder of Tomcat 4 on Windows?  If so, those changes need to be migrated
as well.

Bob


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


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


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


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



java.net.ConnectException: Connection refused

2004-08-10 Thread Shilpa Nalgonda
I am using Tomcat4.0, mysql 4.0.18 , on Linux environment.  And i am unable
to connect to mysql db.  Below is the url
i am using in server.xml file. and also i have the jdbc driver under
WEB-INF/lib - mysql-connector-java-3.0.14-production-bin.jar...I was
successfully able to deploy the same application on Windows, using the same
server.xml file. please help.

parameter
 namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
parameter
 nameurl/name
valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=true/value
 /parameter
!-- Class name for mm.mysql JDBC driver --
parameter
  namedriverClassName/name
  valueorg.gjt.mm.mysql.Driver/value
/parameter

org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory, cause:
java.sql.SQLException: Server connection failure during transaction. Due to
underlying exception: 'java.net.ConnectException: Connection refused'.

** BEGIN NESTED EXCEPTION **

java.net.ConnectException
MESSAGE: Connection refused

STACKTRACE:

java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.init(Socket.java:309)
at java.net.Socket.init(Socket.java:124)
at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:121)
at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:220)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1884)
at com.mysql.jdbc.Connection.init(Connection.java:440)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:82)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
ionFactory.java:300)
at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataS
ource.java:838)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:821)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
18)
at com.ecommerce.DAO.DAOFactory.getConnection(Unknown Source)
at com.ecommerce.DAO.UserDAO.init(Unknown Source)
at com.ecommerce.action.PlaceOrderAction.execute(Unknown Source)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:484)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
Attempted reconnect 3 times. Giving up.
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1952)
at com.mysql.jdbc.Connection.init(Connection.java:440)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:82)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
ionFactory.java:300)
at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataS
ource.java:838)
at

configre datasource in server.xml

2004-08-09 Thread Shilpa Nalgonda
I have configured for datasouce on Tomcat 4.1.03 in
/TOMCAT_HOME/conf/server.xml file.
My application runs fine on my windows desktop.
Now i am in the process of migrating that applicATION ON lINUX MACHINE.  On
Unix, we have apache installed as connector, which routes requests to Tomcat
server.  so whenever we restart tomcat we also restart apache.
Now my question is can i put the datasource configuration under
TOMCAT_HOME/conf/server.xml..
or should i create a new server.xml with just the datasource configuration
under WEB_INF folder.
Below is the configuration which i want to add in server.xml

!-- JNDI datasource setup to connect to MYSQL database--
Context path=/prototype docBase=prototype
debug=5 reloadable=true crossContext=true useNaming=true

Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_PrototypeDBTest_log. suffix=.txt
 timestamp=true/
   Resource name=jdbc/prototypedb
   auth=Container
   type=javax.sql.DataSource/

ResourceParams name=jdbc/prototypedb
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

!-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --
parameter
  namemaxActive/name
  value20/value
/parameter

!-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit.
 --
parameter
 namemaxIdle/name
 value10/value
/parameter

 !-- Maximum time to wait for a dB connection to become available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --
parameter
 namemaxWait/name
 value1/value
/parameter

!-- MySQL dB username and password for dB connections  --
parameter
  nameusername/name
  valueantonio/value
/parameter
parameter
  namepassword/name
  valueplay/value
/parameter

!-- Class name for mm.mysql JDBC driver --
parameter
  namedriverClassName/name
  valueorg.gjt.mm.mysql.Driver/value
/parameter

!-- The JDBC connection url for connecting to your MySQL dB.
 The autoReconnect=true argument to the url makes sure that the
 mm.mysql JDBC Driver will automatically reconnect if mysqld closed
the
 connection.  mysqld by default closes idle connections after 8
hours.
 --
parameter
nameurl/name

valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=true/value
/parameter
/ResourceParams
/Context


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



org.apache.jasper.JasperException

2004-08-09 Thread Shilpa Nalgonda
I am getting this error, what could be the reason...

2004-08-09 09:32:08 StandardWrapperValve[jsp]: Servlet.service() for servlet
jsp threw exception
org.apache.jasper.JasperException: File /tags/struts-html not found
at
org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java
:214)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java
:174)
at
org.apache.jasper.compiler.JspParseEventListener.processTaglibDirective(JspP
arseEventListener.java:1170)
at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve
ntListener.java:765)
at
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList
ener.java:125)
at
org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:255)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
at
org.apache.jasper.compiler.ParserController.parse(ParserController.java:214)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:176)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:188)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)


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



application not working on unix.

2004-08-06 Thread Shilpa Nalgonda
I am trying to deploy my prototype shoppingcart application onto linux
environment , i am using apache tomcat4.0.4, and struts 1.1.  The same
application was deployed successfully on windows.  I have copied
prototype.war into /var/lib/tomcat4/webapps.
restarted tomcat as /etc/init.d/tomcat4 restart and it does not work.  I
have the following errors in catalina.out and local_host.log ..please help.

I get this error in catlina.out
Aug 6, 2004 3:32:25 AM org.apache.commons.digester.Digester getParser
SEVERE: Digester.getParser:
java.security.AccessControlException: access denied
(java.lang.RuntimePermission getClassLoader)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java
:269)
at
java.security.AccessController.checkPermission(AccessController.java:401)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at java.lang.ClassLoader.getParent(ClassLoader.java:1034)
at
org.apache.catalina.loader.WebappClassLoader.toString(WebappClassLoader.java
:888)
at java.lang.String.valueOf(String.java:2131)
at java.lang.StringBuffer.append(StringBuffer.java:370)
at
javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:34
2)
at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:226)
at
javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:134)
at
org.apache.commons.digester.Digester.getFactory(Digester.java:512)
at org.apache.commons.digester.Digester.getParser(Digester.java:686)
at
org.apache.commons.digester.Digester.getXMLReader(Digester.java:902)
at org.apache.commons.digester.Digester.parse(Digester.java:1567)
at
org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1433)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
8)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3279)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3421)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:738)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:155)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)


=

And i get this error in log file :...localhost_log.2004-08-06.txt

==
2004-08-06 03:32:25 StandardContext[/prototype]: Servlet /prototype threw
load()
 exception
javax.servlet.ServletException: Servlet.init() for servlet action threw
exceptio
n
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:946)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:81
0)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:3279)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3
421)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:78
5)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478)

at

RE: application not working on unix.

2004-08-06 Thread Shilpa Nalgonda
Nope i di dnot make any cnages there...

-Original Message-
From: Robert Bateman [mailto:[EMAIL PROTECTED]
Sent: Friday, August 06, 2004 11:52 AM
To: Tomcat Users List
Subject: Re: application not working on unix.


On Friday 06 August 2004 11:52 am, Shilpa Nalgonda wrote:
 I am trying to deploy my prototype shoppingcart application onto linux
 environment , i am using apache tomcat4.0.4, and struts 1.1.  The same
 application was deployed successfully on windows.  I have copied

Did you by chance make *any* changes to catalina.policy in the config folder
of Tomcat 4 on Windows?  If so, those changes need to be migrated as well.

Bob


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


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



null pointer --org.apache.commons.digester.Digester.getXMLReader(Digester.java:902)

2004-08-06 Thread Shilpa Nalgonda
.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Friday, August 06, 2004 11:53 AM
To: Tomcat Users List
Subject: application not working on unix.


I am trying to deploy my prototype shoppingcart application onto linux
environment , i am using apache tomcat4.0.4, and struts 1.1.  The same
application was deployed successfully on windows.  I have copied
prototype.war into /var/lib/tomcat4/webapps.
restarted tomcat as /etc/init.d/tomcat4 restart and it does not work.  I
have the following errors in catalina.out and local_host.log ..please help.

I get this error in catlina.out
Aug 6, 2004 3:32:25 AM org.apache.commons.digester.Digester getParser
SEVERE: Digester.getParser:
java.security.AccessControlException: access denied
(java.lang.RuntimePermission getClassLoader)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java
:269)
at
java.security.AccessController.checkPermission(AccessController.java:401)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at java.lang.ClassLoader.getParent(ClassLoader.java:1034)
at
org.apache.catalina.loader.WebappClassLoader.toString(WebappClassLoader.java
:888)
at java.lang.String.valueOf(String.java:2131)
at java.lang.StringBuffer.append(StringBuffer.java:370)
at
javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:34
2)
at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:226)
at
javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:134)
at
org.apache.commons.digester.Digester.getFactory(Digester.java:512)
at org.apache.commons.digester.Digester.getParser(Digester.java:686)
at
org.apache.commons.digester.Digester.getXMLReader(Digester.java:902)
at org.apache.commons.digester.Digester.parse(Digester.java:1567)
at
org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1433)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
8)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3279)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3421)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:738)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:155)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)


=

And i get this error in log file :...localhost_log.2004-08-06.txt

==
2004-08-06 03:32:25 StandardContext[/prototype]: Servlet /prototype threw
load()
 exception
javax.servlet.ServletException: Servlet.init() for servlet action threw
exceptio
n
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:946)
at
org.apache.catalina.core.StandardWrapper.load

digester.getparser error...

2004-08-06 Thread Shilpa Nalgonda
I am getting this error when i start my Tomcat 4.0.4 insatance, with struts
application.
what exactly is this?

Aug 6, 2004 8:02:11 AM org.apache.commons.digester.Digester getParser
SEVERE: Digester.getParser:
java.security.AccessControlException: access denied
(java.lang.RuntimePermission getClassLoader)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java
:269)
at
java.security.AccessController.checkPermission(AccessController.java:401)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at java.lang.ClassLoader.getParent(ClassLoader.java:1034)
at
org.apache.catalina.loader.WebappClassLoader.toString(WebappClassLoader.java
:888)
at java.lang.String.valueOf(String.java:2131)
at java.lang.StringBuffer.append(StringBuffer.java:370)
at
javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:34
2)
at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:226)
at
javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:134)
at
org.apache.commons.digester.Digester.getFactory(Digester.java:512)
at org.apache.commons.digester.Digester.getParser(Digester.java:686)
at
org.apache.commons.digester.Digester.getXMLReader(Digester.java:902)
at org.apache.commons.digester.Digester.parse(Digester.java:1567)
at
org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1433)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
8)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3279)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3421)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:738)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:155)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
-- INSERT --


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



RE: org.apache.jasper.JasperException: /CheckCustomer.jsp(36,67) equal symbol expected

2004-07-30 Thread Shilpa Nalgonda
I did waht all is mentioned, but still i have one problem, radio button not
functioning properly.
when i select new user it will take me to shipping.jsp and if i select
returning usr radio it should take me to another ordersummary.jsp page.
But my application is currently taking me to only shipping.jsp no matter
which radio i select.
Am i missing some scope issue...

Below is my jsp---
 label
  html:radio property=customerType value=new/
   bean:message key=prompt.checkCustomerType1/
 /label
 br
label
   html:radio property=customerType value=returning/
   bean:message key=prompt.checkCustomerType2/
/label
br

Below is my struts config==

form-bean
name=CheckCustomerForm
type=com.ecommerce.form.CheckCustomerForm/

 /form-beans

 action
 path=/checkCustomer
type=com.ecommerce.action.CheckCustomerAction
name=CheckCustomerForm
input=/CheckCustomer.jsp
forward name=new path=/EditShipping.jsp /
forward name=returning path=/OrderSummary.jsp /
 /action

===
This is my formBean class--
public class CheckCustomerForm extends ValidatorForm
{

private String ms_EmailAddress = null;
private String ms_CustomerType = null;
private String ms_Password = null;

public CheckCustomerForm()
{
   setCustomerType(new);
}
  public String getCustomerType()
{
return this.ms_CustomerType;
}
public String setCustomerType(String type)
{
return this.ms_CustomerType = type;
}

public void reset(ActionMapping mapping, HttpServletRequest request)
{
this.ms_EmailAddress = null;
this.ms_Password = null;
}

/**
 * Validate the properties that have been set from this HTTP request,
 * and return an codeActionErrors/code object that encapsulates any
 * validation errors that have been found.  If no errors are found,
return
 * codenull/code or an codeActionErrors/code object with no
 * recorded error messages.
 *
 * @param mapping The mapping used to select this instance
 * @param request The servlet request we are processing
 */
public ActionErrors validate(ActionMapping mapping,
 HttpServletRequest request)
{
// Perform validator framework validations
ActionErrors errors = super.validate(mapping, request);
if ((ms_CustomerType == null) || (ms_CustomerType.length()  1))
errors.add(CustomerType,
   new ActionError(error.CustomerType.required));
if ((ms_EmailAddress == null) || (ms_EmailAddress.length()  1))
errors.add(EmailAddress,
   new ActionError(error.EmailAddress.required));
if ((ms_EmailAddress != null)  (ms_Password == null))
errors.add(Password,
   new ActionError(error.Password.required));
return errors;
}



-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 8:01 PM
To: Tomcat Users List
Subject: Re: org.apache.jasper.JasperException:
/CheckCustomer.jsp(36,67) equal symbol expected


Ok.  Cool.  That's what I'm using as well.

Your on the right track with the bean.  Just make sure it extends
org.apache.struts.action.ActionForm (it won't work otherwise) and then
add it to the form-beans section of your struts-config.xml file.
There are examples already there if you're using one of the struts war
files.  I tend to  start with struts-blank.war when I start my projects.

You won't have to instantiate the bean yourself in the jsp because that
will be taken care of by the html:form tag.  You will have to make
sure the name of your form-bean is specified in the name attribute of
your action entry of the struts-config.xml.  Again, the struts war
files have examples in their stock standard struts-config.xml files.
Also take a look at the struts-examples.war and struts-docs.war files.
They are all downloaded together in one archive from the Struts site.

That should get you going.

--David

Shilpa Nalgonda wrote:

thanks, and i am using Struts

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 4:47 PM
To: Tomcat Users List
Subject: Re: org.apache.jasper.JasperException:
/CheckCustomer.jsp(36,67) equal symbol expected


Quick question -- are you using Struts?  I just need to know so I know
what to recommend.

I've got to run now and get my exercise.  I'll check back later when I
get home.

--David

Shilpa Nalgonda wrote:



yeah, ur right i just want to select a default value for the radio button.
Radio button has two values a new user and a returning user.
user also has a email address.

But i am not sure how

RE: [OT] Re: org.apache.jasper.JasperException: /CheckCustomer.jsp(36,67) equal symbol expected

2004-07-30 Thread Shilpa Nalgonda
thanks, i forgot to send you my action class, anyway i'll work on it.
just in case if you can find quickly something wrong in the below code let
me know.
Thanks for all ur help David.

public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws Exception
{

HttpSession session = request.getSession();

CheckCustomerForm usrform = (CheckCustomerForm)form;

if ( usrform.getCustomerType().equals(new))
{//create a new cutsomer..
return (mapping.findForward(new));
}
else
{
if ( usrform.getCustomerType().equals(returning))
{//display a ordersummary.
return (mapping.findForward(returning));
}
}
return (mapping.findForward(new));
}

===
-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 8:37 AM
To: Tomcat Users List
Subject: [OT] Re: org.apache.jasper.JasperException:
/CheckCustomer.jsp(36,67) equal symbol expected


Where your app goes after submitting is up to your action code.
Normally there's a class that extends org.apache.struts.action.Action
and implements the execute method.  Somewhere in that execute method is
something like return mapping.findForward( newUser ) or return
mapping.findForward( returningUser ) where newUser and
returningUser are forwards defined in your struts-config.xml file.

At this point you might want to take a walk down to the local book store
and find a good book on Struts.  Lurking around the struts email lists
wouldn't hurt either.  I've found Mastering Jakarta Struts by James
Goodwill pretty good both for learning and as a reference.  I just hope
he put out a new edition to better cover Struts 1.1.  Lastly, take a
look around the struts documentation both on the struts website and in
the various .war files you downloaded with the struts package.

Good luck.

--David

Shilpa Nalgonda wrote:

I did waht all is mentioned, but still i have one problem, radio button not
functioning properly.
when i select new user it will take me to shipping.jsp and if i select
returning usr radio it should take me to another ordersummary.jsp page.
But my application is currently taking me to only shipping.jsp no matter
which radio i select.
Am i missing some scope issue...

Below is my jsp---
 label
  html:radio property=customerType value=new/
   bean:message key=prompt.checkCustomerType1/
 /label
 br
label
   html:radio property=customerType value=returning/
   bean:message key=prompt.checkCustomerType2/
/label
br

Below is my struts config==

form-bean
   name=CheckCustomerForm
   type=com.ecommerce.form.CheckCustomerForm/

 /form-beans

 action
 path=/checkCustomer
type=com.ecommerce.action.CheckCustomerAction
name=CheckCustomerForm
input=/CheckCustomer.jsp
forward name=new path=/EditShipping.jsp /
forward name=returning path=/OrderSummary.jsp /
 /action

===
This is my formBean class--
public class CheckCustomerForm extends ValidatorForm
{

   private String ms_EmailAddress = null;
   private String ms_CustomerType = null;
   private String ms_Password = null;

   public CheckCustomerForm()
   {
  setCustomerType(new);
   }
  public String getCustomerType()
   {
   return this.ms_CustomerType;
   }
   public String setCustomerType(String type)
   {
   return this.ms_CustomerType = type;
   }

public void reset(ActionMapping mapping, HttpServletRequest request)
{
this.ms_EmailAddress = null;
this.ms_Password = null;
}

/**
 * Validate the properties that have been set from this HTTP request,
 * and return an codeActionErrors/code object that encapsulates any
 * validation errors that have been found.  If no errors are found,
return
 * codenull/code or an codeActionErrors/code object with no
 * recorded error messages.
 *
 * @param mapping The mapping used to select this instance
 * @param request The servlet request we are processing
 */
public ActionErrors validate(ActionMapping mapping,
 HttpServletRequest request)
{
// Perform validator framework validations
ActionErrors errors = super.validate(mapping, request);
if ((ms_CustomerType == null) || (ms_CustomerType.length()  1))
errors.add(CustomerType,
   new ActionError(error.CustomerType.required));
if ((ms_EmailAddress == null) || (ms_EmailAddress.length()  1))
errors.add

org.apache.jasper.JasperException: /CheckCustomer.jsp(36,67) equal symbol expected

2004-07-29 Thread Shilpa Nalgonda
Hi i am getting the following error,
org.apache.jasper.JasperException: /CheckCustomer.jsp(36,67) equal symbol
expected
at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.
java:94)
at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428
)
at
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126
)
at org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:169)
at org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:136)
at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:718)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:804)
at org.apache.jasper.compiler.Parser.parseBody(Parser.java:833)
at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:753)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:804)


belolw is my jsp using struts tags.  I have combined html and struts tags..
where am i doing wrong...

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;

%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
html:html
head
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
titleLogin or Start Order/title
link href=styles/base.css rel=stylesheet type=text/css
link href=styles/checkCustomer.css rel=stylesheet type=text/css
script language=javascript src=basicFunctions.js/script
/head

body
html:errors/
table cellspacing=0
tr
td id=progressBar align=center
spanWelcome/span
spanSelect Product/span
spanChoose Options/span
span id=activeCreate Order/span
spanReview Order/span
spanComplete Order/span
/td
/tr
/table
div class=headType id=topOrdering from MyPublisher is quick and
easy/div
div
html:form action=/checkCustomer
 bean:message key=prompt.emailaddress/
   html:text property=emailAddress size=16
maxlength=16/
  label
   html:radio property=checkCustomerType 
value=new checked/
   bean:message key=prompt.checkCustomerType1/
  label
  br
  label
   html:radio property=checkCustomerType 
value=returning/
   bean:message key=prompt.checkCustomerType2/
  label
  br

  html:password property=password redisplay=false/
  html:submit value=Continue/
 /html:form
/div
div
input type=button value=Back onClick=goBack()
input type=button value=New User
onClick=location.href='editShipping.html'
input type=button value=Existing User
onClick=location.href='orderSummary.html'

/div
/body
/html:html




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



RE: org.apache.jasper.JasperException: /CheckCustomer.jsp(36,67) equal symbol expected

2004-07-29 Thread Shilpa Nalgonda
How to resolve that?


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 3:27 PM
To: Tomcat Users List
Subject: Re: org.apache.jasper.JasperException:
/CheckCustomer.jsp(36,67) equal symbol expected


I bet its:

html:radio property=checkCustomerType value=new checked/

-Tim

Shilpa Nalgonda wrote:
 Hi i am getting the following error,
 org.apache.jasper.JasperException: /CheckCustomer.jsp(36,67) equal symbol
 expected
   at

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.
 java:94)
   at

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428
 )
   at

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126
 )
   at org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:169)
   at org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:136)
   at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:718)
   at org.apache.jasper.compiler.Parser.parseElements(Parser.java:804)
   at org.apache.jasper.compiler.Parser.parseBody(Parser.java:833)
   at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:753)
   at org.apache.jasper.compiler.Parser.parseElements(Parser.java:804)


 belolw is my jsp using struts tags.  I have combined html and struts
tags..
 where am i doing wrong...

 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 http://www.w3.org/TR/html4/loose.dtd;

 %@ page contentType=text/html;charset=UTF-8 language=java %
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
 %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
 %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
 html:html
 head
 meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
 titleLogin or Start Order/title
 link href=styles/base.css rel=stylesheet type=text/css
 link href=styles/checkCustomer.css rel=stylesheet type=text/css
 script language=javascript src=basicFunctions.js/script
 /head

 body
 html:errors/
 table cellspacing=0
   tr
   td id=progressBar align=center
   spanWelcome/span
   spanSelect Product/span
   spanChoose Options/span
   span id=activeCreate Order/span
   spanReview Order/span
   spanComplete Order/span
   /td
   /tr
 /table
   div class=headType id=topOrdering from MyPublisher is quick and
 easy/div
   div
   html:form action=/checkCustomer
bean:message key=prompt.emailaddress/
html:text property=emailAddress size=16
 maxlength=16/
   label
  html:radio property=checkCustomerType 
 value=new checked/
  bean:message key=prompt.checkCustomerType1/
   label
 br
 label
  html:radio property=checkCustomerType 
 value=returning/
  bean:message key=prompt.checkCustomerType2/
   label
 br

   html:password property=password redisplay=false/
   html:submit value=Continue/
  /html:form
   /div
   div
   input type=button value=Back onClick=goBack()
   input type=button value=New User
 onClick=location.href='editShipping.html'
   input type=button value=Existing User
 onClick=location.href='orderSummary.html'

   /div
 /body
 /html:html

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


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



RE: org.apache.jasper.JasperException: /CheckCustomer.jsp(36,67) equal symbol expected

2004-07-29 Thread Shilpa Nalgonda
yeah, ur right i just want to select a default value for the radio button.
Radio button has two values a new user and a returning user.
user also has a email address.

But i am not sure how exactly this can be done ..
should i write a bean class called User with 2 properties,

public class User{
Private String emailaddress = null;
private String usrType = new;

//getters and setters;
}

 And then in jsp % User usr = new User(); %
when i use the  html:radio  tag how can i display that usr?

--please help, i am new to java world

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 3:56 PM
To: Tomcat Users List
Subject: Re: org.apache.jasper.JasperException:
/CheckCustomer.jsp(36,67) equal symbol expected


Well

The checked attribute is without a value.  You'll have to set it to
something or remove it.  As mentioned by Tim Funk, the checked attribute
doesn't exist in the API for the html:radio/ tag.

I'm guessing you want to set one of the radio buttons as a default.  If
so, you'll have to do something different like set a default value in
the bean class when it's initialized.

--David

Shilpa Nalgonda wrote:

How to resolve that?


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 3:27 PM
To: Tomcat Users List
Subject: Re: org.apache.jasper.JasperException:
/CheckCustomer.jsp(36,67) equal symbol expected


I bet its:

html:radio property=checkCustomerType value=new checked/

-Tim

Shilpa Nalgonda wrote:


Hi i am getting the following error,
org.apache.jasper.JasperException: /CheckCustomer.jsp(36,67) equal symbol
expected
  at



org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler
.


java:94)
  at



org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:42
8


)
  at



org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:12
6


)
  at org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:169)
  at org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:136)
  at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:718)
  at org.apache.jasper.compiler.Parser.parseElements(Parser.java:804)
  at org.apache.jasper.compiler.Parser.parseBody(Parser.java:833)
  at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:753)
  at org.apache.jasper.compiler.Parser.parseElements(Parser.java:804)


belolw is my jsp using struts tags.  I have combined html and struts


tags..


where am i doing wrong...

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;

%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
html:html
head
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
titleLogin or Start Order/title
link href=styles/base.css rel=stylesheet type=text/css
link href=styles/checkCustomer.css rel=stylesheet type=text/css
script language=javascript src=basicFunctions.js/script
/head

body
html:errors/
table cellspacing=0
  tr
  td id=progressBar align=center
  spanWelcome/span
  spanSelect Product/span
  spanChoose Options/span
  span id=activeCreate Order/span
  spanReview Order/span
  spanComplete Order/span
  /td
  /tr
/table
  div class=headType id=topOrdering from MyPublisher is quick and
easy/div
  div
  html:form action=/checkCustomer
   bean:message key=prompt.emailaddress/
   html:text property=emailAddress size=16
maxlength=16/
  label
 html:radio property=checkCustomerType 
 value=new checked/
 bean:message key=prompt.checkCustomerType1/
  label
br
label
 html:radio property=checkCustomerType 
 value=returning/
 bean:message key=prompt.checkCustomerType2/
  label
br

  html:password property=password redisplay=false/
  html:submit value=Continue/
 /html:form
  /div
  div
  input type=button value=Back onClick=goBack()
  input type=button value=New User
onClick=location.href='editShipping.html'
  input type=button value=Existing User
onClick=location.href='orderSummary.html'

  /div
/body
/html:html



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

RE: org.apache.jasper.JasperException: /CheckCustomer.jsp(36,67) equal symbol expected

2004-07-29 Thread Shilpa Nalgonda
thanks, and i am using Struts

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 4:47 PM
To: Tomcat Users List
Subject: Re: org.apache.jasper.JasperException:
/CheckCustomer.jsp(36,67) equal symbol expected


Quick question -- are you using Struts?  I just need to know so I know
what to recommend.

I've got to run now and get my exercise.  I'll check back later when I
get home.

--David

Shilpa Nalgonda wrote:

yeah, ur right i just want to select a default value for the radio button.
Radio button has two values a new user and a returning user.
user also has a email address.

But i am not sure how exactly this can be done ..
should i write a bean class called User with 2 properties,

public class User{
Private String emailaddress = null;
private String usrType = new;

//getters and setters;
}

 And then in jsp % User usr = new User(); %
when i use the  html:radio  tag how can i display that usr?

--please help, i am new to java world

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 3:56 PM
To: Tomcat Users List
Subject: Re: org.apache.jasper.JasperException:
/CheckCustomer.jsp(36,67) equal symbol expected


Well

The checked attribute is without a value.  You'll have to set it to
something or remove it.  As mentioned by Tim Funk, the checked attribute
doesn't exist in the API for the html:radio/ tag.

I'm guessing you want to set one of the radio buttons as a default.  If
so, you'll have to do something different like set a default value in
the bean class when it's initialized.

--David

Shilpa Nalgonda wrote:



How to resolve that?


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 3:27 PM
To: Tomcat Users List
Subject: Re: org.apache.jasper.JasperException:
/CheckCustomer.jsp(36,67) equal symbol expected


I bet its:

html:radio property=checkCustomerType value=new checked/

-Tim

Shilpa Nalgonda wrote:




Hi i am getting the following error,
org.apache.jasper.JasperException: /CheckCustomer.jsp(36,67) equal symbol
expected
 at





org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandle
r


.




java:94)
 at





org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:4
2


8




)
 at





org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:1
2


6




)
 at org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:169)
 at org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:136)
 at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:718)
 at org.apache.jasper.compiler.Parser.parseElements(Parser.java:804)
 at org.apache.jasper.compiler.Parser.parseBody(Parser.java:833)
 at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:753)
 at org.apache.jasper.compiler.Parser.parseElements(Parser.java:804)


belolw is my jsp using struts tags.  I have combined html and struts




tags..




where am i doing wrong...

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;

%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
html:html
head
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
titleLogin or Start Order/title
link href=styles/base.css rel=stylesheet type=text/css
link href=styles/checkCustomer.css rel=stylesheet type=text/css
script language=javascript src=basicFunctions.js/script
/head

body
html:errors/
table cellspacing=0
 tr
 td id=progressBar align=center
 spanWelcome/span
 spanSelect Product/span
 spanChoose Options/span
 span id=activeCreate Order/span
 spanReview Order/span
 spanComplete Order/span
 /td
 /tr
/table
 div class=headType id=topOrdering from MyPublisher is quick and
easy/div
 div
 html:form action=/checkCustomer
  bean:message key=prompt.emailaddress/
  html:text property=emailAddress size=16
maxlength=16/
 label
html:radio property=checkCustomerType 
 value=new checked/
bean:message key=prompt.checkCustomerType1/
 label
   br
   label
html:radio property=checkCustomerType 
 value=returning/
bean:message key=prompt.checkCustomerType2/
 label
   br

 html:password property=password redisplay=false/
 html:submit value=Continue/
/html:form
 /div
 div

RE: jasper exception in jsp -- please help..

2004-07-28 Thread Shilpa Nalgonda
org.apache.jasper.JasperException: /BillingInfo.jsp(1,16) quote symbol
expected

I am getting the above error, i am using struts tags in my BillingInfo.jsp.
Below is my BillingInfo.jsp...

%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
html
  head
titleBilling User Registration/title
  /head
  body
h1Customer Billing Information/h1
html:errors/
table
html:form action=BillingInfo
  tr
td
 bean:message key=BillingInfo.firstName /*
/td
td
  html:text property=firstName /
/td
  /tr
td
  bean:message key=BillingInfo.lastName /*
/td
td
  html:text property=lastName /
/td


  tr
td
  html:submit /
/td
td
  html:cancel /
/td
  /tr
/html:form
/table
  /body

==


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



RE: jasper exception in jsp -- please help..

2004-07-28 Thread Shilpa Nalgonda
this is my application.properties file..
==
# -- standard errors --
errors.header=UL
errors.prefix=LI
errors.suffix=/LI
errors.footer=/UL
# -- validator --
errors.invalid={0} is invalid.
errors.maxlength={0} can not be greater than {1} characters.
errors.minlength={0} can not be less than {1} characters.
errors.range={0} is not in the range {1} through {2}.
errors.required={0} is required.
errors.byte={0} must be an byte.
errors.date={0} is not a date.
errors.double={0} must be an double.
errors.float={0} must be an float.
errors.integer={0} must be an integer.
errors.long={0} must be an long.
errors.short={0} must be an short.
errors.creditcard={0} is not a valid credit card number.
errors.email={0} is an invalid e-mail address.
# -- other --
errors.cancel=Operation cancelled.
errors.detail={0}
errors.general=The process did not complete. Details should follow.
errors.token=Request could not be completed. Operation is not in sequence.
# -- welcome --
welcome.title=Struts Blank Application
welcome.heading=Welcome!
welcome.message=To get started on your own application, copy the
struts-blank.war to a new WAR file using the name for your application.
Place it in your container's webapp folder (or equivalent), and let your
container auto-deploy the application. Edit the skeleton configuration files
as needed, restart your container, and you are on your way! (You can find
the application.properties file with this message in the
/WEB-INF/src/java/resources folder.)
BillingInfo.firstName=First Name
BillingInfo.lastName=Last Name

===

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 10:02 AM
To: Tomcat Users List
Subject: Re: jasper exception in jsp -- please help..


Hmm the jsp appears to be alright.  What's in your
application.properties file for properties used in the html:errors/ tag?

Shilpa Nalgonda wrote:

org.apache.jasper.JasperException: /BillingInfo.jsp(1,16) quote symbol
expected

I am getting the above error, i am using struts tags in my BillingInfo.jsp.
Below is my BillingInfo.jsp...

%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
html
  head
titleBilling User Registration/title
  /head
  body
h1Customer Billing Information/h1
html:errors/
table
html:form action=BillingInfo
  tr
td
 bean:message key=BillingInfo.firstName /*
/td
td
  html:text property=firstName /
/td
  /tr
td
  bean:message key=BillingInfo.lastName /*
/td
td
  html:text property=lastName /
/td


  tr
td
  html:submit /
/td
td
  html:cancel /
/td
  /tr
/html:form
/table
  /body

==


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




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


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



RE: jasper exception in jsp -- please help..

2004-07-28 Thread Shilpa Nalgonda
yeah, that helped just by adding closing html and missing tr tags...thanks
for ur help.

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 10:33 AM
To: Tomcat Users List
Subject: Re: jasper exception in jsp -- please help..


Well... worth a shot.  This appears to be the stock, standard
application.properties file.  Got me.  I even ran this snippet through
an XML validator and other than missing tr.../tr around the row for
lastname and a missing /html ending tag, everything is good.  Maybe
check the original file for fancy curly quotes in a place that should
have straight double quotes.  I'm willing to bet it's a something really
small that didn't translate to your email post.

--David

Shilpa Nalgonda wrote:

this is my application.properties file..
==
# -- standard errors --
errors.header=UL
errors.prefix=LI
errors.suffix=/LI
errors.footer=/UL
# -- validator --
errors.invalid={0} is invalid.
errors.maxlength={0} can not be greater than {1} characters.
errors.minlength={0} can not be less than {1} characters.
errors.range={0} is not in the range {1} through {2}.
errors.required={0} is required.
errors.byte={0} must be an byte.
errors.date={0} is not a date.
errors.double={0} must be an double.
errors.float={0} must be an float.
errors.integer={0} must be an integer.
errors.long={0} must be an long.
errors.short={0} must be an short.
errors.creditcard={0} is not a valid credit card number.
errors.email={0} is an invalid e-mail address.
# -- other --
errors.cancel=Operation cancelled.
errors.detail={0}
errors.general=The process did not complete. Details should follow.
errors.token=Request could not be completed. Operation is not in sequence.
# -- welcome --
welcome.title=Struts Blank Application
welcome.heading=Welcome!
welcome.message=To get started on your own application, copy the
struts-blank.war to a new WAR file using the name for your application.
Place it in your container's webapp folder (or equivalent), and let your
container auto-deploy the application. Edit the skeleton configuration
files
as needed, restart your container, and you are on your way! (You can find
the application.properties file with this message in the
/WEB-INF/src/java/resources folder.)
BillingInfo.firstName=First Name
BillingInfo.lastName=Last Name

===

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 10:02 AM
To: Tomcat Users List
Subject: Re: jasper exception in jsp -- please help..


Hmm the jsp appears to be alright.  What's in your
application.properties file for properties used in the html:errors/ tag?

Shilpa Nalgonda wrote:



org.apache.jasper.JasperException: /BillingInfo.jsp(1,16) quote symbol
expected

I am getting the above error, i am using struts tags in my
BillingInfo.jsp.
Below is my BillingInfo.jsp...

%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
html
 head
   titleBilling User Registration/title
 /head
 body
   h1Customer Billing Information/h1
html:errors/
   table
   html:form action=BillingInfo
 tr
   td
bean:message key=BillingInfo.firstName /*
   /td
   td
 html:text property=firstName /
   /td
 /tr
   td
 bean:message key=BillingInfo.lastName /*
   /td
   td
 html:text property=lastName /
   /td


 tr
   td
 html:submit /
   /td
   td
 html:cancel /
   /td
 /tr
   /html:form
   /table
 /body

==


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






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


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




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


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



getting Naming exception with struts...please help...

2004-07-28 Thread Shilpa Nalgonda
I am using struts in my web application, My application is trying to create
a new user in the database when the user clicks on the submit button giving
teh user information.

And i am getting connection not found error.  below is the error stack
trace...

WARNING: Unhandled Exception thrown: class java.lang.NullPointerException
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at com.ecommerce.DAO.DAOFactory.getConnection(Unknown Source)
at com.ecommerce.DAO.UserDAO.init(Unknown Source)
at com.ecommerce.action.BillingInfoAction.execute(Unknown Source)
at
org.apache.struts.action.RequestProcessor.processActionPerform(Reques
tProcessor.java:484)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja

=
First i tried to connect to mysql db without using struts and it works.  I
am using Tomcat 4.1.03 server.  Edited server.xml and web.xml for the
datasource entry to retrieve connection object.  But now i am using struts
and BillingInfoAction classe's execute method calls my DAOFactory class to
retrieve connection  .

Why is it different if i use Struts, why can't the context be bound to my
database? please help...


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



RE: getting Naming exception with struts...please help...

2004-07-28 Thread Shilpa Nalgonda
Can someone please help on this error...

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 11:03 AM
To: Tomcat Users List
Subject: getting Naming exception with struts...please help...


I am using struts in my web application, My application is trying to create
a new user in the database when the user clicks on the submit button giving
teh user information.

And i am getting connection not found error.  below is the error stack
trace...

WARNING: Unhandled Exception thrown: class java.lang.NullPointerException
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at com.ecommerce.DAO.DAOFactory.getConnection(Unknown Source)
at com.ecommerce.DAO.UserDAO.init(Unknown Source)
at com.ecommerce.action.BillingInfoAction.execute(Unknown Source)
at
org.apache.struts.action.RequestProcessor.processActionPerform(Reques
tProcessor.java:484)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja

=
First i tried to connect to mysql db without using struts and it works.  I
am using Tomcat 4.1.03 server.  Edited server.xml and web.xml for the
datasource entry to retrieve connection object.  But now i am using struts
and BillingInfoAction classe's execute method calls my DAOFactory class to
retrieve connection  .

Why is it different if i use Struts, why can't the context be bound to my
database? please help...


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


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



struts problem..action forward not working...please help...

2004-07-28 Thread Shilpa Nalgonda
I am writing a struts application...I have configued struts-config such that
when the user submit billing info,
the data is inserted into database and returns result.jsp page.  when i run
my aplication the billing info is created in database but the result page is
displayed blank.  Is there any in configuraton that i am missing..below is
my striys config

action
path=/BillingInfo
type=com.ecommerce.action.BillingInfoAction
name=BillingInfoForm
input=/BillingInfo.jsp
forward name=success path=/result.jsp /
/action

Below is the action class excute method.
--
public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws Exception
{

HttpSession session = request.getSession();
String action = request.getParameter(action);
if (action == null)
action = Create;
BillingInfoForm usrform = (BillingInfoForm)form;
System.out.println(usrform.firstname: + usrform.getFirstName());
System.out.println(usrform.firstname: + usrform.getLastName());
try
{
UserDAO usrDao = new UserDAO();
usrDao.createUser(usrform);
}
catch(DAOException e)
{
e.printStackTrace();
throw new Exception(User could not be created);

}

return (mapping.findForward(result));
}

web.xml has the default entry

  !-- Standard Action Servlet Mapping --
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping
==


-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 10:33 AM
To: Tomcat Users List
Subject: Re: jasper exception in jsp -- please help..


Well... worth a shot.  This appears to be the stock, standard
application.properties file.  Got me.  I even ran this snippet through
an XML validator and other than missing tr.../tr around the row for
lastname and a missing /html ending tag, everything is good.  Maybe
check the original file for fancy curly quotes in a place that should
have straight double quotes.  I'm willing to bet it's a something really
small that didn't translate to your email post.

--David

Shilpa Nalgonda wrote:

this is my application.properties file..
==
# -- standard errors --
errors.header=UL
errors.prefix=LI
errors.suffix=/LI
errors.footer=/UL
# -- validator --
errors.invalid={0} is invalid.
errors.maxlength={0} can not be greater than {1} characters.
errors.minlength={0} can not be less than {1} characters.
errors.range={0} is not in the range {1} through {2}.
errors.required={0} is required.
errors.byte={0} must be an byte.
errors.date={0} is not a date.
errors.double={0} must be an double.
errors.float={0} must be an float.
errors.integer={0} must be an integer.
errors.long={0} must be an long.
errors.short={0} must be an short.
errors.creditcard={0} is not a valid credit card number.
errors.email={0} is an invalid e-mail address.
# -- other --
errors.cancel=Operation cancelled.
errors.detail={0}
errors.general=The process did not complete. Details should follow.
errors.token=Request could not be completed. Operation is not in sequence.
# -- welcome --
welcome.title=Struts Blank Application
welcome.heading=Welcome!
welcome.message=To get started on your own application, copy the
struts-blank.war to a new WAR file using the name for your application.
Place it in your container's webapp folder (or equivalent), and let your
container auto-deploy the application. Edit the skeleton configuration
files
as needed, restart your container, and you are on your way! (You can find
the application.properties file with this message in the
/WEB-INF/src/java/resources folder.)
BillingInfo.firstName=First Name
BillingInfo.lastName=Last Name

===

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 10:02 AM
To: Tomcat Users List
Subject: Re: jasper exception in jsp -- please help..


Hmm the jsp appears to be alright.  What's in your
application.properties file for properties used in the html:errors/ tag?

Shilpa Nalgonda wrote:



org.apache.jasper.JasperException: /BillingInfo.jsp(1,16) quote symbol
expected

I am getting the above error, i am using struts tags in my
BillingInfo.jsp.
Below is my BillingInfo.jsp...

%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
html
 head

RE: struts problem..action forward not working...pleasehelp...

2004-07-28 Thread Shilpa Nalgonda
I changed to success instead of result, but i have another problem

javax.servlet.ServletException: org/apache/jsp/result_jsp (wrong name:
org/apache/jsp/Result_jsp)

In the beginning i had path as result.jsp in forward element of struts
config file.  But i have named the jsp as Result.jsp.  But inorder to
correct it i rename Result.jsp name to result.jsp .
And i rejared everything and deployed on Tomcat, ut still i have the above
problem..can someone help where i am doing wrong.

-Original Message-
From: David Liles [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 4:07 PM
To: [EMAIL PROTECTED]
Subject: Re: struts problem..action forward not working...pleasehelp...


try:

return (mapping.findForward(success));


 [EMAIL PROTECTED] 07/28/04 02:44PM 
I am writing a struts application...I have configued struts-config such that
when the user submit billing info,
the data is inserted into database and returns result.jsp page.  when i run
my aplication the billing info is created in database but the result page is
displayed blank.  Is there any in configuraton that i am missing..below is
my striys config

action
path=/BillingInfo
type=com.ecommerce.action.BillingInfoAction
name=BillingInfoForm
input=/BillingInfo.jsp
forward name=success path=/result.jsp /
/action

Below is the action class excute method.
--
public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws Exception
{

HttpSession session = request.getSession();
String action = request.getParameter(action);
if (action == null)
action = Create;
BillingInfoForm usrform = (BillingInfoForm)form;
System.out.println(usrform.firstname: + usrform.getFirstName());
System.out.println(usrform.firstname: + usrform.getLastName());
try
{
UserDAO usrDao = new UserDAO();
usrDao.createUser(usrform);
}
catch(DAOException e)
{
e.printStackTrace();
throw new Exception(User could not be created);

}

return (mapping.findForward(result));
}

web.xml has the default entry

  !-- Standard Action Servlet Mapping --
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping
==


-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 10:33 AM
To: Tomcat Users List
Subject: Re: jasper exception in jsp -- please help..


Well... worth a shot.  This appears to be the stock, standard
application.properties file.  Got me.  I even ran this snippet through
an XML validator and other than missing tr.../tr around the row for
lastname and a missing /html ending tag, everything is good.  Maybe
check the original file for fancy curly quotes in a place that should
have straight double quotes.  I'm willing to bet it's a something really
small that didn't translate to your email post.

--David

Shilpa Nalgonda wrote:

this is my application.properties file..
==
# -- standard errors --
errors.header=UL
errors.prefix=LI
errors.suffix=/LI
errors.footer=/UL
# -- validator --
errors.invalid={0} is invalid.
errors.maxlength={0} can not be greater than {1} characters.
errors.minlength={0} can not be less than {1} characters.
errors.range={0} is not in the range {1} through {2}.
errors.required={0} is required.
errors.byte={0} must be an byte.
errors.date={0} is not a date.
errors.double={0} must be an double.
errors.float={0} must be an float.
errors.integer={0} must be an integer.
errors.long={0} must be an long.
errors.short={0} must be an short.
errors.creditcard={0} is not a valid credit card number.
errors.email={0} is an invalid e-mail address.
# -- other --
errors.cancel=Operation cancelled.
errors.detail={0}
errors.general=The process did not complete. Details should follow.
errors.token=Request could not be completed. Operation is not in sequence.
# -- welcome --
welcome.title=Struts Blank Application
welcome.heading=Welcome!
welcome.message=To get started on your own application, copy the
struts-blank.war to a new WAR file using the name for your application.
Place it in your container's webapp folder (or equivalent), and let your
container auto-deploy the application. Edit the skeleton configuration
files
as needed, restart your container, and you are on your way! (You can find
the application.properties file with this message in the
/WEB-INF/src/java/resources folder.)
BillingInfo.firstName=First Name
BillingInfo.lastName=Last Name

why do we get ...javax.servlet.ServletException: org/apache/jsp/result_jsp (wrong name:org/apache/jsp/Result_jsp)

2004-07-28 Thread Shilpa Nalgonda


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]

Sent: Wednesday, July 28, 2004 5:16 PM
To: Tomcat Users List
Subject: RE: struts problem..action forward not working...pleasehelp...


I changed to success instead of result, but i have another problem

javax.servlet.ServletException: org/apache/jsp/result_jsp (wrong name:
org/apache/jsp/Result_jsp)

In the beginning i had path as result.jsp in forward element of struts
config file.  But i have named the jsp as Result.jsp.  But inorder to
correct it i rename Result.jsp name to result.jsp .
And i rejared everything and deployed on Tomcat, ut still i have the above
problem..can someone help where i am doing wrong.

-Original Message-
From: David Liles [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 4:07 PM
To: [EMAIL PROTECTED]
Subject: Re: struts problem..action forward not working...pleasehelp...


try:

return (mapping.findForward(success));


 [EMAIL PROTECTED] 07/28/04 02:44PM 
I am writing a struts application...I have configued struts-config such that
when the user submit billing info,
the data is inserted into database and returns result.jsp page.  when i run
my aplication the billing info is created in database but the result page is
displayed blank.  Is there any in configuraton that i am missing..below is
my striys config

action
path=/BillingInfo
type=com.ecommerce.action.BillingInfoAction
name=BillingInfoForm
input=/BillingInfo.jsp
forward name=success path=/result.jsp /
/action

Below is the action class excute method.
--
public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws Exception
{

HttpSession session = request.getSession();
String action = request.getParameter(action);
if (action == null)
action = Create;
BillingInfoForm usrform = (BillingInfoForm)form;
System.out.println(usrform.firstname: + usrform.getFirstName());
System.out.println(usrform.firstname: + usrform.getLastName());
try
{
UserDAO usrDao = new UserDAO();
usrDao.createUser(usrform);
}
catch(DAOException e)
{
e.printStackTrace();
throw new Exception(User could not be created);

}

return (mapping.findForward(result));
}

web.xml has the default entry

  !-- Standard Action Servlet Mapping --
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping
==


-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 10:33 AM
To: Tomcat Users List
Subject: Re: jasper exception in jsp -- please help..


Well... worth a shot.  This appears to be the stock, standard
application.properties file.  Got me.  I even ran this snippet through
an XML validator and other than missing tr.../tr around the row for
lastname and a missing /html ending tag, everything is good.  Maybe
check the original file for fancy curly quotes in a place that should
have straight double quotes.  I'm willing to bet it's a something really
small that didn't translate to your email post.

--David

Shilpa Nalgonda wrote:

this is my application.properties file..
==
# -- standard errors --
errors.header=UL
errors.prefix=LI
errors.suffix=/LI
errors.footer=/UL
# -- validator --
errors.invalid={0} is invalid.
errors.maxlength={0} can not be greater than {1} characters.
errors.minlength={0} can not be less than {1} characters.
errors.range={0} is not in the range {1} through {2}.
errors.required={0} is required.
errors.byte={0} must be an byte.
errors.date={0} is not a date.
errors.double={0} must be an double.
errors.float={0} must be an float.
errors.integer={0} must be an integer.
errors.long={0} must be an long.
errors.short={0} must be an short.
errors.creditcard={0} is not a valid credit card number.
errors.email={0} is an invalid e-mail address.
# -- other --
errors.cancel=Operation cancelled.
errors.detail={0}
errors.general=The process did not complete. Details should follow.
errors.token=Request could not be completed. Operation is not in sequence.
# -- welcome --
welcome.title=Struts Blank Application
welcome.heading=Welcome!
welcome.message=To get started on your own application, copy the
struts-blank.war to a new WAR file using the name for your application.
Place it in your container's webapp folder (or equivalent), and let your
container auto-deploy the application. Edit the skeleton configuration
files
as needed, restart

RE: why do we get ...javax.servlet.ServletException: org/apache/jsp/result_jsp (wrong name:org/apache/jsp/Result_jsp)

2004-07-28 Thread Shilpa Nalgonda
thanks it works

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 5:42 PM
To: Tomcat Users List
Subject: Re: why do we get ...javax.servlet.ServletException:
org/apache/jsp/result_jsp (wrong name:org/apache/jsp/Result_jsp)


From: Shilpa Nalgonda [EMAIL PROTECTED]
 javax.servlet.ServletException: org/apache/jsp/result_jsp (wrong name:
 org/apache/jsp/Result_jsp)
 In the beginning i had path as result.jsp in forward element of struts
 config file.  But i have named the jsp as Result.jsp.  But inorder to
 correct it i rename Result.jsp name to result.jsp .
 And i rejared everything and deployed on Tomcat, ut still i have the above
 problem..can someone help where i am doing wrong.

Delete all the stuff under /path/to/tomcat/work/${context} (or just the
result_jsp.java and .class files) and it should recompile them and work
fine.  I'm guessing you're on Windows, and it didn't see the rename
properly.

--
Wendy Smoak


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


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



org.apache.jasper.JasperException: Name prototypedb is not bound in this Context

2004-07-27 Thread Shilpa Nalgonda
I am not able to set up datasource for connection pooling , i am using
tomcat 4.1.3, and connection to mysql database..
following is the code to retrieve the datasource...



===
Context ctx = new InitialContext();
Context env = (Context)ctx.lookup(java:comp/env);
DataSource ds = (DataSource) env.lookup(jdbc/prototypedb);
conn = ds.getConnection();

entry in server .xml

 !-- JNDI datasource setup to connect to MYSQL database--
Context path=/PrototypeDBTest docBase=PrototypeDBTest
debug=5 reloadable=true crossContext=true useNaming=true

Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_PrototypeDBTest_log. suffix=.txt
 timestamp=true/
 Resource name=jdbc/prototypedb
   auth=Container
   type=javax.sql.DataSource/

ResourceParams name=jdbc/prototypedb
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

!-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --
parameter
  namemaxActive/name
  value100/value
/parameter

!-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit.
 --
parameter
 namemaxIdle/name
 value30/value
/parameter

 !-- Maximum time to wait for a dB connection to become available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --
parameter
 namemaxWait/name
 value1/value
/parameter

!-- MySQL dB username and password for dB connections  --
parameter
  nameusername/name
  valueantonio/value
/parameter
parameter
  namepassword/name
  valueplay/value
/parameter

!-- Class name for mm.mysql JDBC driver --
parameter
  namedriverClassName/name
  valueorg.gjt.mm.mysql.Driver/value
/parameter

!-- The JDBC connection url for connecting to your MySQL dB.
 The autoReconnect=true argument to the url makes sure that the
 mm.mysql JDBC Driver will automatically reconnect if mysqld closed
the
 connection.  mysqld by default closes idle connections after 8
hours.
 --
parameter
nameurl/name

valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=true/value
/parameter
/ResourceParams
/Context


!-- End of JNDI datasource setup --
===

below is my web.xml..

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app
descriptionPrototypeDB Test App/description
 resource-ref
 descriptionDB Connection/description
res-ref-namejdbc/prototypedb/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
 /resource-ref
 /web-app


Please help: i have added the entry in server.xml between  context for
example... an d host variable.



-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 27, 2004 9:06 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: Validating Users



Hi,
Yup, you should be able to get to the admin app using the richard
user.  The file is case-sensitive, and you have to restart the server
after you edit it (with the default configuration).

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Richard Crawford [mailto:[EMAIL PROTECTED]
Sent: Monday, July 26, 2004 5:41 PM
To: [EMAIL PROTECTED]
Subject: Validating Users

I have just installed Tomcat 5.0.27 on a Solaris 9 computer.  I've got
it pointed at the right installation of Java, and when I go to
http://localhost:8080 I see the Tomcat startup page come up, so I
assume
Tomcat is up and running properly.

However, when I try to access the Tomcat Administration or Tomcat
Manager pages, I get an invalid user error.  However, when I examine
conf/tomcat-users.xml, I find that I am listed as an admin user:

tomcat-users
  role rolename=standard/
  role rolename=manager/
  role rolename=admin/
  user username=richard password=password
roles=admin,standard,manager/
/tomcat-users

So, I *should* be able to get to the administration and management
pages, right?

I feel that I am missing something VERY basic...

-
To unsubscribe, 

RE: Tomcat Datasource -- please help..

2004-07-27 Thread Shilpa Nalgonda
I have defined the resource in web.xml as below... and also defined the
datasouce resources under context in server.xml... even then it does not
help.. I get the same error org.apache.jasper.JasperException: Name
prototypedb is not bound in this Context
 Web.xml

web-app
descriptionPrototypeDB Test App/description
 resource-ref
 descriptionDB Connection/description
res-ref-namejdbc/prototypedb/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
 /resource-ref
 /web-app
===
server.xml
==
!-- JNDI datasource setup to connect to MYSQL database--
Context path=/PrototypeDBTest docBase=PrototypeDBTest
debug=5 reloadable=true crossContext=true
useNaming=true

Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_PrototypeDBTest_log. suffix=.txt
 timestamp=true/
 Resource name=jdbc/prototypedb
   auth=Container
   type=javax.sql.DataSource/

ResourceParams name=jdbc/prototypedb
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

!-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --
parameter
  namemaxActive/name
  value100/value
/parameter

!-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit.
 --
parameter
 namemaxIdle/name
 value30/value
/parameter

 !-- Maximum time to wait for a dB connection to become
available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --
parameter
 namemaxWait/name
 value1/value
/parameter

!-- MySQL dB username and password for dB connections  --
parameter
  nameusername/name
  valueantonio/value
/parameter
parameter
  namepassword/name
  valueplay/value
/parameter

!-- Class name for mm.mysql JDBC driver --
parameter
  namedriverClassName/name
  valueorg.gjt.mm.mysql.Driver/value
/parameter

!-- The JDBC connection url for connecting to your MySQL dB.
 The autoReconnect=true argument to the url makes sure that the
 mm.mysql JDBC Driver will automatically reconnect if mysqld
closed the
 connection.  mysqld by default closes idle connections after 8
hours.
 --
parameter
nameurl/name

valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=true/value

/parameter
/ResourceParams
/Context


=

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 27, 2004 10:04 AM
To: Tomcat Users List
Subject: Re: Tomcat Datasource

In addition to defining the DataSource in Tomcat's admin tool, you'll 
need to define the Resource in you web.xml - something like this:

resource-ref
!-- optional --
description
Resource reference to a factory for java.sql.Connection
instances that may be used for talking to a particular
database that is configured in the server.xml file.
/description
!-- local JNDI name to use in JSPs, servlets, etc. --
res-ref-name
jdbc/phone
/res-ref-name
res-type
javax.sql.DataSource
/res-type
res-auth
Container
/res-auth
/resource-ref

You'll also need to define a ResourceLink in your Context, that links 
what you want to call your DataSource locally (used in web.xml, see 
above) to what you called your DataSource in the admin tool (globally 
... these can be the same, but don't have to be). Something like this:

  ResourceLink global=jdbc/phone name=jdbc/phone 
type=javax.sql.DataSource/

The 'global' attribute provides the name of the global JNDI resource 
(what was defined in the admin tool); 'name' provides the name of the 
local JNDI resource (what will be referenced in web.xml).

That's it! You shouldn't have any problems once you've done this.

Respectfully,
Brice Ruth



Bussie, Andre D wrote:

I'm using Tomcat 5.0.19. I configured a datasource via the Tomcat Admin
tool to configure a datatsource listed below is the server.xml file
settings for the datasource

GlobalNamingResources

Resource name=jdbc/phone auth=Container
type=javax.sql.DataSource description=Database for the phone
application /

ResourceParams name=jdbc/phone

parameter

namemaxWait/name

   

RE: Tomcat Datasource -- please help..

2004-07-27 Thread Shilpa Nalgonda
Below is the code i am using to get the connection,
and datasource...
Context ctx = new InitialContext();
Context env = (Context)ctx.lookup(java:comp/env);
DataSource ds = (DataSource) env.lookup(jdbc/prototypedb);
conn = ds.getConnection();

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 27, 2004 11:07 AM
To: Tomcat Users List
Subject: Re: Tomcat Datasource -- please help..


I believe if you're defining your DataSource in the Context directly, 
not in the Global Naming Resources, then you do not need the 
resource-ref in web.xml, nor the ResourceLink mentioned below.

What code are you using to get to your connection? The JNDI lookup 
should be to java:comp/env/jdbc/prototypedb, in your particular case.

Respectfully,
Brice Ruth

Shilpa Nalgonda wrote:

I have defined the resource in web.xml as below... and also defined the
datasouce resources under context in server.xml... even then it does not
help.. I get the same error org.apache.jasper.JasperException: Name
prototypedb is not bound in this Context
 Web.xml

web-app
descriptionPrototypeDB Test App/description
 resource-ref
 descriptionDB Connection/description
res-ref-namejdbc/prototypedb/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
 /resource-ref
 /web-app
===
server.xml
==
!-- JNDI datasource setup to connect to MYSQL database--
   Context path=/PrototypeDBTest docBase=PrototypeDBTest
   debug=5 reloadable=true crossContext=true
useNaming=true

   Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_PrototypeDBTest_log. suffix=.txt
 timestamp=true/
 Resource name=jdbc/prototypedb
   auth=Container
   type=javax.sql.DataSource/

   ResourceParams name=jdbc/prototypedb
   parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter

   !-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --
   parameter
  namemaxActive/name
  value100/value
/parameter

   !-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit.
 --
parameter
 namemaxIdle/name
 value30/value
/parameter

!-- Maximum time to wait for a dB connection to become
available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --
   parameter
 namemaxWait/name
 value1/value
/parameter

   !-- MySQL dB username and password for dB connections  --
   parameter
 nameusername/name
 valueantonio/value
   /parameter
   parameter
 namepassword/name
 valueplay/value
   /parameter

   !-- Class name for mm.mysql JDBC driver --
   parameter
 namedriverClassName/name
 valueorg.gjt.mm.mysql.Driver/value
   /parameter

   !-- The JDBC connection url for connecting to your MySQL dB.
 The autoReconnect=true argument to the url makes sure that the
 mm.mysql JDBC Driver will automatically reconnect if mysqld
closed the
 connection.  mysqld by default closes idle connections after 8
hours.
 --
   parameter
   nameurl/name

valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=true/value
  

   /parameter
/ResourceParams
/Context


=

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 27, 2004 10:04 AM
To: Tomcat Users List
Subject: Re: Tomcat Datasource

In addition to defining the DataSource in Tomcat's admin tool, you'll 
need to define the Resource in you web.xml - something like this:

resource-ref
!-- optional --
description
Resource reference to a factory for java.sql.Connection
instances that may be used for talking to a particular
database that is configured in the server.xml file.
/description
!-- local JNDI name to use in JSPs, servlets, etc. --
res-ref-name
jdbc/phone
/res-ref-name
res-type
javax.sql.DataSource
/res-type
res-auth
Container
/res-auth
/resource-ref

You'll also need to define a ResourceLink in your Context, that links 
what you want to call your DataSource locally (used in web.xml, see 
above) to what you called your DataSource

RE: Tomcat Datasource -- please help..

2004-07-27 Thread Shilpa Nalgonda
As you have said i am getting jdbc not bound exception only.  But at one
point i changed the env lookup to point to prototypedb instead of
jdbc/prototypedb.. so thats when i get prototypedb not bound error...

Anyway do you think that i have put the context to the jndi resource in the
wrong place in server.xml..
where exactly should i add this in server.xml.

if i add datasource using admin tool the jndi parameter gets added in
GlobalNamingResouce.
which is correct way...

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 27, 2004 11:29 AM
To: Tomcat Users List
Subject: Re: Tomcat Datasource -- please help..


I believe that should work. I'm out of ideas ... it seems strange that
the Exception you're getting is complaining about prototypedb not
being bound, instead of jdbc not being bound ... usually that comes
first. That's the only thing that sticks out to me, but I don't really
know what to make of it!

Shilpa Nalgonda wrote:

Below is the code i am using to get the connection,
and datasource...
   Context ctx = new InitialContext();
   Context env = (Context)ctx.lookup(java:comp/env);
   DataSource ds = (DataSource) env.lookup(jdbc/prototypedb);
   conn = ds.getConnection();

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 27, 2004 11:07 AM
To: Tomcat Users List
Subject: Re: Tomcat Datasource -- please help..


I believe if you're defining your DataSource in the Context directly,
not in the Global Naming Resources, then you do not need the
resource-ref in web.xml, nor the ResourceLink mentioned below.

What code are you using to get to your connection? The JNDI lookup
should be to java:comp/env/jdbc/prototypedb, in your particular case.

Respectfully,
Brice Ruth

Shilpa Nalgonda wrote:



I have defined the resource in web.xml as below... and also defined the
datasouce resources under context in server.xml... even then it does not
help.. I get the same error org.apache.jasper.JasperException: Name
prototypedb is not bound in this Context
Web.xml

web-app
descriptionPrototypeDB Test App/description
resource-ref
descriptionDB Connection/description
res-ref-namejdbc/prototypedb/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
/web-app
===
server.xml
==
!-- JNDI datasource setup to connect to MYSQL database--
  Context path=/PrototypeDBTest docBase=PrototypeDBTest
  debug=5 reloadable=true crossContext=true
useNaming=true

  Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_PrototypeDBTest_log. suffix=.txt
timestamp=true/
Resource name=jdbc/prototypedb
  auth=Container
  type=javax.sql.DataSource/

  ResourceParams name=jdbc/prototypedb
  parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter

  !-- Maximum number of dB connections in pool. Make sure you
configure your mysqld max_connections large enough to handle
all of your db connections. Set to 0 for no limit.
--
  parameter
 namemaxActive/name
 value100/value
   /parameter

  !-- Maximum number of idle dB connections to retain in pool.
Set to 0 for no limit.
--
   parameter
namemaxIdle/name
value30/value
   /parameter

   !-- Maximum time to wait for a dB connection to become
available
in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded.  Set to -1 to wait indefinitely.
--
  parameter
namemaxWait/name
value1/value
   /parameter

  !-- MySQL dB username and password for dB connections  --
  parameter
nameusername/name
valueantonio/value
  /parameter
  parameter
namepassword/name
valueplay/value
  /parameter

  !-- Class name for mm.mysql JDBC driver --
  parameter
namedriverClassName/name
valueorg.gjt.mm.mysql.Driver/value
  /parameter

  !-- The JDBC connection url for connecting to your MySQL dB.
The autoReconnect=true argument to the url makes sure that the
mm.mysql JDBC Driver will automatically reconnect if mysqld
closed the
connection.  mysqld by default closes idle connections after 8
hours.
--
  parameter
  nameurl/name

valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=true/value


  /parameter
/ResourceParams
/Context


=

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 27, 2004 10:04 AM
To: Tomcat Users List