I have a Database servlet configured in web.xml, which
intialises a connection pool on Server startup.
However, if the data source is unavailable, I get a
Null Pointer exception on my JSPs, which is
propagated from my Data Access class.
IMO, the problem is that you're accessing the database
Wendy,
Thanks for your mail. I don't know if you fully
understood where I'm coming from! As I said, the
database connection is accessed from a Data Access
class (read model), which is called from my
DispatchAction class. Since the exception is not
caught in my DispatchAction class (the methods
?
-Richard
-Original Message-
From: Shyam A [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2003 3:10 PM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: RE: [OT] Handling database connection exceptions
Wendy,
Thanks for your mail. I don't know if you fully
understood where
understood where I'm coming from! As I said, the
database connection is accessed from a Data Access
class (read model), which is called from my
DispatchAction class. Since the exception is not
caught in my DispatchAction class (the methods throw
Since the connection is being accessed from
3:22 PM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Handling database connection exceptions
Shyam,
Where in your JSP does the NullPointerException occur? Is it in a method
call in a scriptlet? If so, your JSP is still indirectly accessing the
database. What Wendy suggested
Richard,
Thanks for your mail. I am pretty sure I don't access
the database in my JSP's. I also use the errorPage
attribute for all my JSP's, however, it does not
handle Null Pointer exceptions that occur due to
problems with database connection.
Given below is the Exception trace...it occurs
Message-
From: Shyam A [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2003 3:53 PM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: RE: [OT] Handling database connection exceptions
Richard,
Thanks for your mail. I am pretty sure I don't access
the database in my JSP's. I
Jim, action's execute throws exception; this exposes the container to
deceleertively do this, if you declare an error page in web.xml.
.V
Jimmy Emmanual wrote:
Why don't you throw the exception from the Data Access class and catch it in
DispatchAction and if there is an exception then forward
, 2003 4:07 PM
To: 'Struts Users Mailing List'
Subject: [OT] Handling database connection exceptions
Shyam,
This problem is not happing in your JSP. According to your stack trace, it
happens in obs.business.UserLogin.checkLogin(UserLogin.java:192) which is
being called in your LoginAction.perform
/building_controller.html#exceptio
n_handler
-Richard
-Original Message-
From: Yee, Richard K,,DMDCWEST
[mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2003 4:07 PM
To: 'Struts Users Mailing List'
Subject: [OT] Handling database connection
exceptions
Shyam
Dear All,
While connecting to Database i am getting following error
'Cannot load JDBC driver class 'null'' in TOMACT server.
I have a bean called UpdateRegDB, in this bean i am connecting to the database,
following is code for connection and i m creating instance of this bean in
ActionServlet
Hello,
I have just started developing with Struts and was wondering if anyone could help me
connect to a Sybase Database using my webapp?
I have set up my JSP page, actionform and action. I have set the datasource properies
in my config.xml and am calling them from my action. It is giving me a
:
Subject: Database Connection
31/07/2003 05:00 PM
Users Mailing List
|Subject: Database Connection
|
|
|Hello,
|
|I have just started developing with Struts and was wondering if
|anyone could help me connect to a Sybase Database using my webapp?
|
|I have set up my JSP page, actionform and action. I have set the
|datasource properies in my config.xml
Hi Navjot,
I ran into trouble as I put it in the classpath you mentioned.
(Connection works, connection works not, and so on)
I think it's better to put it in the webapps classpath, if you're not using
jndi.
yours
Marc
Am Donnerstag, 31. Juli 2003 13:37 schrieb Navjot Singh:
the jar file
singh
|-Original Message-
|From: Marc Ende [mailto:[EMAIL PROTECTED]
|Sent: Thursday, July 31, 2003 5:19 PM
|To: Struts Users Mailing List
|Subject: Re: Database Connection
|
|
|Hi Navjot,
|
|I ran into trouble as I put it in the classpath you mentioned.
|(Connection works, connection works
Am Donnerstag, 31. Juli 2003 13:53 schrieb Navjot Singh:
yes, you can put your class file in webapp CP also - whichever way it works
for you. However, docs say that it should be under tomcat common dir.
Yes of course, they should be under tomcats common dir especially when using
jndi for
Hi,
I'm extrememly new to STRUTS and have juts built my first application.
Would anyone be able to advise me on the best way to make my connection to
my INGRES database? Sample code would be appreciated.
Thanks,
David
This message is for the designated recipient only and may contain
To: [EMAIL PROTECTED]
Subject: RE: Database Connection in Logic Beans - pooling?
Do NOT save the request into the session. That's why there is a connection
pool (DataSource), you take one out, use it, and put it back. If you don't
return it you will ruin the whole point of the pool. The connection
PROTECTED]'
Asunto: Database Connection in Logic Beans - pooling?
I am using:
Tomcat 4.0
Struts 1.0.2
The problem
I have successfully used the Struts database connection pooling in a
trial
web app, but as far as I can tell, a reference to the datasource can
only be
obtained from within
Steve McLeod writes:
I am using:
Tomcat 4.0
Struts 1.0.2
The problem
I have successfully used the Struts database connection pooling in a trial
web app, but as far as I can tell, a reference to the datasource can only be
obtained from within an Action class (or directly
02, 2002 9:06 AM
To: Struts Users Mailing List
Subject: Re: Database Connection in Logic Beans - pooling?
Steve McLeod writes:
I am using:
Tomcat 4.0
Struts 1.0.2
The problem
I have successfully used the Struts database connection pooling in a trial
web app, but as far as I can
. Also, this lets your logic beans
not know about servlets or struts which is much cleaner in my opinion.
Hope that helps,
Dave
-Original Message-
From: Steve McLeod
Sent: Monday, 2 September 2002 10:10 AM
To: '[EMAIL PROTECTED]'
Subject: Database Connection in Logic Beans - pooling?
I am
will be appreciated.
Frederic
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 02, 2002 9:06 AM
To: Struts Users Mailing List
Subject: Re: Database Connection in Logic Beans - pooling?
Steve McLeod writes:
I am using:
Tomcat 4.0
: Database Connection in Logic Beans - pooling?
You can solve this problem by providing a business service framework for
your application (There has been a lot of talk about this sort of thing
on this list...I can't think of a particular thread to reference for you
so you may just want to go through
:[EMAIL PROTECTED]]
Sent: Monday, September 02, 2002 9:17 PM
To: Struts Users Mailing List
Subject: RE: Database Connection in Logic Beans - pooling?
You can solve this problem by providing a business service framework for
your application (There has been a lot of talk about this sort of thing
.
-Original Message-
From: Troy Hart [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 02, 2002 9:17 PM
To: Struts Users Mailing List
Subject: RE: Database Connection in Logic Beans - pooling?
You can solve this problem by providing a business service framework for
your application (There has been
AM
To: [EMAIL PROTECTED]
Subject: RE: Database Connection in Logic Beans - pooling?
Do NOT save the request into the session. That's why there is a connection
pool (DataSource), you take one out, use it, and put it back. If you don't
return it you will ruin the whole point of the pool
I am using:
Tomcat 4.0
Struts 1.0.2
The problem
I have successfully used the Struts database connection pooling in a trial
web app, but as far as I can tell, a reference to the datasource can only be
obtained from within an Action class (or directly within a JSP page but
let's
not know about servlets or struts which is much cleaner in my opinion.
Hope that helps,
Dave
From: Steve McLeod [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: Database Connection in Logic Beans - pooling?
Date: Mon, 2 Sep 2002
]'
Subject: Database Connection in Logic Beans - pooling?
I am using:
Tomcat 4.0
Struts 1.0.2
The problem
I have successfully used the Struts database connection pooling in a trial
web app, but as far as I can tell, a reference to the datasource can only be
obtained from within an Action
Hi,
I'm trying to build a small pilot application with Struts.
My ultimate goal is a dynamic web application with
intensive use of database.
My database is Oracle 8.
The problem is following:
in 'LoginAction' I set up a database connection
(java.sql.Connection variable) with Oracle
PROTECTED]
Subject: Problem with maintaining a database connection in a session
bean
Hi,
I'm trying to build a small pilot application with Struts.
My ultimate goal is a dynamic web application with
intensive use of database.
My database is Oracle 8.
The problem is following:
in 'LoginAction
.
My database is Oracle 8.
The problem is following:
in 'LoginAction' I set up a database connection
(java.sql.Connection variable) with Oracle
database. I save it
in the User session bean as a bean-variable.
Then I test it in a jsp-page.
Everything seems to work: the variable containing
Subject: What is the most viable OSS database connection pooling manager next to
PoolMan?
From: Christopher Cheng [EMAIL PROTECTED]
===
The DBCP component is still in development?
http://cvs.apache.org/viewcvs/jakarta-commons/dbcp/
does not even have a proper webpage.
--
To unsubscribe, e
realm on JDBC for database access.
When I start the Tomcat server, I get the following error...
Any ideas?
TIA
Sridhar
Starting service Tomcat-Standalone
Apache Tomcat/4.0
Catalina.start: LifecycleException: Exception opening database connection:
java.sql.SQLException
Hello,
I'm using the Tomcat's realm on JDBC for database access.
When I start the Tomcat server, I get the following error...
Any ideas?
TIA
Sridhar
Starting service Tomcat-Standalone
Apache Tomcat/4.0
Catalina.start: LifecycleException: Exception opening database connection
Hi,
i've been developing an app with Struts lately and i've reach the point
where i just have to make the database related work in order to acomplish
trasactional and persistence properties. To do so, i was thinking in using
the appropriate Oracle driver, but looking at the the Struts example i
Its hidden away under the Utilities section on the website
http://jakarta.apache.org/struts/api/org/apache/struts/util/package-summary.html#doc.JDBC
and there's a little example of how to use it in the user guide
http://jakarta.apache.org/struts/userGuide/building_model.html#databases
should be
]
rsoft.com cc: (bcc: Craig
Reichenbach/CAM/Lotus)
Subject: database connection-pool
10/01/2001 06:05
-Original Message-
From: Vivek Bhaskaran [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 5:21 PM
To: [EMAIL PROTECTED]
Subject: Re: database connection
A reference to the DataSource is stored in the ServletContext object... You
can get it from that.
- Original Message -
From: Ying
in the databaseservlet class do: getServletContext().getAttribute(key);
-Original Message-
From: Ying Teng
To: [EMAIL PROTECTED]
Sent: 5/4/01 8:17 AM
Subject: RE: database connection
Yes, I can get the DataSource reference in the ServletContext object of
the
ActionServlet class. But I
servlet should be loaded
first.
-Original Message-
From: Ying Teng
To: Gogineni, Pratima
Sent: 5/4/01 12:10 PM
Subject: RE: database connection
I tried that. The ServletContext object does not have that attribute. If
you
look at the servlet.log file, the system initializes the database
A reference to the DataSource is stored in the ServletContext object... You
can get it from that.
- Original Message -
From: Ying Teng [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 03, 2001 11:28 AM
Subject: RE: database connection
What you described is true. Now my
The ServletContext object of databaseServlet or the ActionServlet? Could you
be more specific? Thanks.
-Original Message-
From: Vivek Bhaskaran [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 5:21 PM
To: [EMAIL PROTECTED]
Subject: Re: database connection
A reference
There is only one ServletContext for the entire Web Application.
-Original Message-
From: Ying Teng [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 5:05 PM
To: [EMAIL PROTECTED]
Subject: RE: database connection
The ServletContext object of databaseServlet or the ActionServlet
Hello All,
I am trying to connect to the database but when I do
DataSource dataSource =
(DataSource)servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY)
;
it gives me null as the dataSource value. Can anybody help me out here?
Thanks.
Ying
|
|| |
|+---
|
||
| To: [EMAIL PROTECTED] |
| cc: (bcc: Donnie Hall/Enron Communications) |
| Subject: database connection
: database connection
Did you set up the data source configuration in your struts-config.xml file?
I'm using oracle 8.1.6, my setup looks like this.
data-sources
data-source
autoCommit=false
description=Data Source Configuration
driverClass=oracle.jdbc.driver.OracleDriver
|
|| |
|+---
|
||
| To: [EMAIL PROTECTED] |
| cc: (bcc: Donnie Hall/Enron Communications) |
| Subject: RE: database connection
:
Fax to:
05/02/01 Subject: RE: database connection
09:50 AM
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 12:06 PM
To: [EMAIL PROTECTED]
Subject: RE: database connection
The reason why the value is null is because that is the default when you
don't specify a key value for your datasource. When that is the case you
will obtain
:
Fax to:
05/02/01 Subject: RE: database connection
12:31 PM
Hi,
After several hours with no activity my connection
pool
seems to get garbage collected (or die). It works
fine,
but then I come in the next day and get the following
error:
java.sql.SQLException:
Communication link failure: java.net.SocketException
The full stack trace is at the bottom
Steve A Drake wrote:
As a follow-up to the problem I was having with the setReadOnly() method
for the Connection object (using Informix), I downloaded the
latest/greatest JDBC driver that I could find (SQLJ 2.20.JC1 from
www.informix.com/evaluate) and found the same problem. From the
As a follow-up to the problem I was having with the setReadOnly() method
for the Connection object (using Informix), I downloaded the
latest/greatest JDBC driver that I could find (SQLJ 2.20.JC1 from
www.informix.com/evaluate) and found the same problem. From the release
notes (file:
Hello. I'm trying to configure Struts to instantiate a database
connection pool using the ifxjdbc.jar driver for the Informix Dynamic
Server (7.2). So far, I'm getting exceptions at startup. I also get an
exception when I try to obtain a DB connection. Any help would be appreciated!
Note
to configure Struts to instantiate a database
connection pool using the ifxjdbc.jar driver for the Informix Dynamic
Server (7.2). So far, I'm getting exceptions at startup. I also get an
exception when I try to obtain a DB connection. Any help would be appreciated!
Note that I've verified
On Thu, 25 Jan 2001, Craig R. McClanahan wrote:
It looks like the Informix JDBC driver is throwing an exception when you call
setReadOnly(true) on one of its
connections. Could you try that in a standalone program and see what happens, and
also what happens if you call
setReadOnly(false)?
Howard Moore wrote:
There appears to still be a problem with the database connection pool when
used with the JDBC-ODBC bridge (build 20001209).
In the close() method of org.apache.struts.util.GenericConnection the
statement
"conn.setTypeMap(this.map);"
There appears to still be a problem with the database connection pool when
used with the JDBC-ODBC bridge (build 20001209).
In the close() method of org.apache.struts.util.GenericConnection the
statement
"conn.setTypeMap(this.map);"
throws an UnsupportedOperationException r
61 matches
Mail list logo