Hello!
I tried to get my J2EE app working with DB2 for several days and now
it seems to work, but... (Tomcat 5.0.19 on NT 4.0 with J2SDK 1.4.1_02)
1) Declaring the DB2-datasource in $CATALINA_HOME/conf/server.xml did
not work.
All I got was a message like "Cannot create JDBC driver of class ''
for connect URL 'null', cause: null"
2) DB2-Driver (COM.ibm.db2.jd bc.app.DB2Drive r) is in
CATALINA_HOME/common/lib, file renamed from db2java.zip to db2java.jar
3) I tried to place the ResourceParams in <GlobalNamingRe sources>,
then in <Context...>, but nothing worked for me...
4) Finally I placed a file myApp.xml in
$CATALINA_HOME/conf/Catalina/localhost and declared the datasource in
this file.
5) This way it works fine now. But here comes the question: Is it "the
right way" to place my config-file in
$CATALINA_HOME/conf/Catalina/localhost?
Thanks for each helpful idea.
Oliver
//--- Content of $CATALINA_HOME/conf/Catalina/localhost/myApp.xml
---------
<?xml version='1.0' encoding='utf-8'?>
<Context displayName="my App" path="/myApp"
docBase="D:\Pro gramme\jakarta-tomcat-5.0.19\webapps\ myApp">
<Logger className="org. apache.catalina .logger.FileLog ger"
prefix="myApp_l og." suffix=".txt"
timestamp="true "/>
<Resource auth="Container " name="jdbc/myApp"
type="javax.sql .DataSource"/>
<ResourcePara ms name="jdbc/myApp">
<parameter>
<name>factory </name>
<value>org.apac he.commons.dbcp .BasicDataSourc eFactory</value>
</parameter>
<parameter>
<name>maxWait </name>
<value>5000</value>
</parameter>
<parameter>
<name>maxActive </name>
<value>4</value>
</parameter>
<parameter>
<name>passwor d</name>
<value>...</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:db2 :myApp</value>
</parameter>
<parameter>
<name>driverNam e</name>/database
<value>jdbc:db2 :myApp</value>
</parameter>
<parameter>
<name>driverCla ssName</name>
<value>COM.ibm. db2.jdbc.app.DB 2Driver</value>
</parameter>
<parameter>
<name>maxIdle </name>
<value>2</value>
</parameter>
<parameter>
<name>usernam e</name>
<value>...</value>
</parameter>
</ResourceParams>
</Context>
// --- EOF ----------- 1 15852
Hi Oliver,
i had the same problem. It's not solved, but try to remove the line:
<Resource auth="Container " name="jdbc/myApp"
type="javax.sql .DataSource"/>
from the myApp.xml file and place it into your web.xml of your
application.
Now i am getting the following Exception:
Exception: org.apache.comm ons.dbcp.SQLNes tedException: Cannot create
JDBC driver of class 'COM.ibm.db2.jd bc.app.DB2Drive r' for connect URL
'jdbc:db2:DB', cause: No suitable driver
I placed the db2java.jar in the %CATALINA_HOME%/common/lib and the
application WEB-INF/lib directory. None was succesful.
Hope anybody has a solution.
Greeting oh*****@hotmail .com (Oliver Hoehle) wrote in message news:<68******* *************** ****@posting.go ogle.com>... Hello!
I tried to get my J2EE app working with DB2 for several days and now it seems to work, but... (Tomcat 5.0.19 on NT 4.0 with J2SDK 1.4.1_02)
1) Declaring the DB2-datasource in $CATALINA_HOME/conf/server.xml did not work. All I got was a message like "Cannot create JDBC driver of class '' for connect URL 'null', cause: null"
2) DB2-Driver (COM.ibm.db2.jd bc.app.DB2Drive r) is in CATALINA_HOME/common/lib, file renamed from db2java.zip to db2java.jar
3) I tried to place the ResourceParams in <GlobalNamingRe sources>, then in <Context...>, but nothing worked for me...
4) Finally I placed a file myApp.xml in $CATALINA_HOME/conf/Catalina/localhost and declared the datasource in this file.
5) This way it works fine now. But here comes the question: Is it "the right way" to place my config-file in $CATALINA_HOME/conf/Catalina/localhost?
Thanks for each helpful idea. Oliver
//--- Content of $CATALINA_HOME/conf/Catalina/localhost/myApp.xml --------- <?xml version='1.0' encoding='utf-8'?> <Context displayName="my App" path="/myApp" docBase="D:\Pro gramme\jakarta-tomcat-5.0.19\webapps\ myApp"> <Logger className="org. apache.catalina .logger.FileLog ger" prefix="myApp_l og." suffix=".txt" timestamp="true "/> <Resource auth="Container " name="jdbc/myApp" type="javax.sql .DataSource"/> <ResourcePara ms name="jdbc/myApp"> <parameter> <name>factory </name> <value>org.apac he.commons.dbcp .BasicDataSourc eFactory</value> </parameter> <parameter> <name>maxWait </name> <value>5000</value> </parameter> <parameter> <name>maxActive </name> <value>4</value> </parameter> <parameter> <name>passwor d</name> <value>...</value> </parameter> <parameter> <name>url</name> <value>jdbc:db2 :myApp</value> </parameter> <parameter> <name>driverNam e</name>/database <value>jdbc:db2 :myApp</value> </parameter> <parameter> <name>driverCla ssName</name> <value>COM.ibm. db2.jdbc.app.DB 2Driver</value> </parameter> <parameter> <name>maxIdle </name> <value>2</value> </parameter> <parameter> <name>usernam e</name> <value>...</value> </parameter> </ResourceParams> </Context> // --- EOF ----------- This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: moretti |
last post by:
Hello
I try to see my PHP files through tomcat.
Tomcat 5.0.25 (from binaries)
PHP 4.3.3 (from RPMs)
Linux Suse 9.0
A message asks me to download my PHP file; I cannot open it in my browser
through tomcat server while I can easily do this through apache2 server.
It 's like PHP wasn't interpretted by tomcat.
|
by: Jagdeesh |
last post by:
Hai Colleagues,
I am using Tomcat 4.1.24 and JDK 1.4.0_03 in my winXP machine. I've
transferred a set of folders(containing jsp files) into tomcat's
webapps directory(to /webapps/bob , /webapps/sue) and i have added the
folders bob, sue in my server.xml(in the context path).
When i am trying to run jsp files from my browser, it works fine. But,
the following jsp files reports some exceptions which is quite hard to
understand. Here is...
|
by: Liza |
last post by:
Hi, I have upgraded from Tomcat4.0.4 to Tomcat4.1.29 by installing a
binary, not an RPM. It looks OK but it won't start at boot time.
There are no scripts in /etc/rc.d/init.d/ or /etc/init.d/ All I have
is catalina.sh and startup.sh in $TOMCAT_HOME/bin. There is no
tomcat.conf file for this version either. Should I create my own shell
script? What should be in it? Should it just call catalina.sh or
startup.sh? Where should I put this...
|
by: SPG |
last post by:
Hi,
I am relatively new to TOMCAT, and am trying to deploy a web app using it.
I have a domain name that I want to use to access my web app directly.
By default, I deploy my WAR, and it deploys to webapps/myApp.
To access this I have to use a url like
http://mydomain.com/myApp?someparam=1
What I want to do is use this: http://mydomain.com?someparam=1
|
by: jesper |
last post by:
Hi there.
I have migrated from tomcat 4.1.31 to tomcat 5.5.7
I have a setup with many virtual hosts.
I ame using the option in 5.5 to put context information
in /CATALINA_BASE/conf///context.xml.default
in server.xml each host is defined like this
<host name="name.example.com" autoDeploy="true"... appBase="webapps"/>
| |
by: no-spam |
last post by:
Hello group,
I have some questions concerning configuring and using a JNDI DataSource
with PostgreSQL and Apache Tomcat. Currently, I belive I have
successfully configured a "basic" DataSource. Currently, my configuration
which resides in a context.xml file is as follows:
<Context className="org.apache.catalina.core.StandardContext"
backgroundProcessorDelay="-1"
cachingAllowed="true"
|
by: Monica Ferrero |
last post by:
Hi!
I'm not sure if this is the most adequate mySQL list for this post. If not,
please indicat me which one I should use...
I'm using Tomcat 4.1.24 with Apache 2 and MySQL 4.0.13. I have the mysql-
connector-java-2.0.14-bin.jar in commons/lib.
The application runs normally, and usually about once or twice a day I get
this exception org.apache.commons.dbcp.DbcpException:
java.sql.SQLException: Server configuration denies access to data...
|
by: kommaraju |
last post by:
iam a starter to db2 & jdbc.i have a servlet program which connects to ibm db2
using jdbc.when i run this using apache tomcat 4.1.34 , it is showing a
error message of HTTP STATUS 500
my jdbc program is as follows
import java.sql.*;
import java.lang.*;
import java.io.*;
import java.util.*;
|
by: Arun21084 |
last post by:
Hi,
Recently I installed an application HP SIP(Service Information Portal) on a Windows 2000 server.The application comes along with an installation of Tomcat 5.0.19.
Already there was an Apache 2 running on the server used by other application.
Once after installation of the product(HP SIP), I tried to restart the Tomcat 5.0.19 process using below methods(errors reported below respectively)
1) services.msc console
Could not start...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |