Specify a Connection URL for JDBC thin
I am trying to generate a Report using JDBC but the connection to the database fails when I try to run this Report. What is the Parameter I have to put for the JDBC Connection. i.e userid=scott/tiger@db1
This topic has been answered in a duplicate thread.
The Oracle Reports Team.
Similar Messages
-
Error Code Definition for JDBC Thin driver
Would like to know where I can find the definition of error codes
for JDBC thin driver to Oracle 7 database. Right now, when I have
database errors, I get SQL execption with CODE=XXXXXX. Need to
know the definition of the error codes in order to decide whether
the application shall retry or quit or do something else. Thank
you in advance.
nullHi,
thin client session Language is controlled by java Locale.
Based on testing code, ORA- messages are localized after the connection is successfully established. ORA- messages returned in the middle of connecting are in instance language.
So, as far as I can say, you need to catch exceptions from DriverManager.getConnection(url, info); and translate them on your own.
Once the connection is successfully returned, ORA- message language is defined by java Locale.
Tests were performed on Oracle 10gR2 (both thin driver and DB). -
Portal Test Connection Failed for JDBC Connector
Hi,
We are trying to create a JDBC system in EP to connect SQL Server 2005 database. Our aim is to build a model in VC using data services from SQL Server 2005.
We deployed the Driver file sqljdbc.jar and connection was successful when tested by creating a data source in Visual Administrator-> JDBC Connector
We have created a system in EP with user mapping type (admin,user) and user mapping also done for system alias with the SQL Server administrator user id and password. UME is maintained in ABAP Stack. When we try for test connection with the system created in EP for JDBC connection, the system throws an error message like Connection failed. Make sure user mapping is set correctly and all connection properties are correct
Test Details:
The test consists of the following steps:
1. Retrieve the default alias of the system
2. Check the connection to the back end application using the connector defined in this system object
Results
Retrieval of default alias successful
Connection failed. Make sure user mapping is set correctly and all connection properties are correct.
The following are the URL and driver class name:
URL: jdbc:sqlserver://<host_name>:1433;DatabaseName=db_ name
Driver class name: com.microsoft.sqlserver.jdbc.SQLServerDriver
Is there any other setting to be maintained in the Visual Administrator or in the Portal?
Kindly let us know any clue to overcome this issue.
Quick response highly appreciated.
Regards
Saravanan.rHi Saravanan and Sathish,
not sure how far you got with this. I had the same problem or at least a very similar one with access to MS SQL Server 2005 and solved it. I followed essentially very similar steps with a couple of minor twists:
1) copied the sqljdbc.jar file to the storyboard server and set the classpath environment variable to point to it.
2) I did not create a data source, just created a new driver "SQLServer".
3) Under Connector Container I cloned SDK_JDBC as "SDK_SSQL".
4) The Visual Composer property vc.bi.sqlEditor Enabled should be set to true for you to be able the SQL Editor in the Data Service in VC.
In the portal I created a system of type BI_JDBC from a template.
The connection url and driver class were as in the thread:
URL: jdbc:sqlserver:ipaddress:1433;DatabaseName=name
Driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
ConnectionFActoryClass as above under 3.
User rights: admin,user
The user mapping to the system alias should be as described.
This should allow you to use the data service in VC to access SQL Server tables. If access to stored procedures (sometimes quite useful) is required, this would need to utilise the p9sqlserver.jar file already on the server.
Best Regards
Felix Logemann -
URL for SqlServer Thin Driver ?
Hi all,
I have developed a web application in jsp with Microsoft SQL Server 2000, used 4th type of driver and it is working fine in my desktop PC . When I tried to deploy war to Laptop, where SQL Server is installed as standalone, i got error in establishing the connection with the socket, Following is the code snippet i used for laptop
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
String strDBUrl="jdbc:microsoft:sqlserver://localhost:1433;databaseName=GNXT;selectMethod=cursor";for workstation or desktop, i just changed the localhost into the database server name
I suspect problem is with the URL, Can anyone give me the URL for Ms Sql Server 4th type jdbc driver?
Suggestions welcome!!!
Regards,
Srini.The URL is the same.
Did you double checked that the server is listening to TCP?
Try to use your local IP instead of 'localhost'. -
Cloudscape & Java Studio Creator - Need Connection URL for toursDB
Has anyone been able to create a data source and connect to the bundled demo databases in the default Cloudscape installation (sample or toursDB) with Java Studio Creator on MacOS X.
I have Cloudscape running ok and I have Java Studio Creator running and I added the "derby.jar" and "derbytools.jar" files to the jar list in Java Studio creator but I'm not sure what the connection URL should be to connect to the example databases.Well, I think I now to having everything working!! I was able to connect to one of the sample Clouldscape databases (bundled with the Cloudscape 10.0 distribution in SJCS) - I had to do the following
--- 1 --- After downloading a Java tool called DbVisualizer Free 4.1.1 and reviewing its documentation I was able to discover how to set an essential Java System Property for it as well as Sun Java Studio Creator on MacOS X. The property was derby.storage.fileSyncTransactionLog=true. This was needed to work around an Apple Java VM problem by bypassing code that uses write sync (rws) mode. The info for this is on the Apache site at: http://www.ibm.com/Search?q=Cloudscape+failures+on+Mac&v=14?=en&cc=zz&Search.x=47&Search.y=10 and the info for setting system properties on "double clickable Java Apps" on MacOS X can be found at: http://www.dbvis.com/products/dbvis/doc/4.1.1/doc/ug/admin/admin.html
--- 2 --- Using the tool in *1* above I then actually got it to connect to an existing sample bundled Cloudscape database using the following connection URL jdbc:derby:/pathToTheDatabaseDirectory (needed to add the path to the URL) and the userID and Password as user1,user1 for reasons stated in the following forum link http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?forum=370&thread=66046. I also used the driver class org.apache.derby.jdbc.EmbeddedDriver.
--- 3 --- Finally, using the config info I used in *2* above I then used the following settings in Sun Java Studio Creator
DataSource Settings Panel Fields set as follows (for Cloudscape 10.0 installation)
DisplayName ---> Cloudscape
JDBC Driver Jar Files ---> derby.jar
Driver Class Name ---> org.apache.derby.jdbc.EmbeddedDriver
URL Template ---> jdbc:derby:
And then......Add Data Source panel fields set as follows
---DataSourceName --> datasource1
---ServerType____ Cloudscape
---HostName ---> left this blank
UserID -> user1
---Password ---> user1
---DatabaseURL ---> jdbc:derby:/Applications/IBM/Cloudscape_10.0/derbyDB
---DriverClass ---> org.apache.derby.jdbc.EmbeddedDriver
thanks for your help. I had been able to connect to Cloudscape programmatically (which your blog documents well), but getting the Sun Java Studio Creator (SJSC) IDE configured for Cloudscape wasn't obvious. Hopefully the above info in *1* and *3* will help anyone using the SJSC IDE on MacOS X. The DbVisualizer Free 4.1.1 is a slick tool I discovered along the way as well. -
Cloudscae & Java Studio Creator - Need Connection URL for toursDB
Has anyone been able to create a data source and connect to the bundled demo databases in the default Cloudscape installation (sample or toursDB) with Java Studio Creator on MacOS X.
I have Cloudscape running ok and I have Java Studio Creator running and I added the "derby.jar" and "derbytools.jar" files to the jar list in Java Studio creator but I'm not sure what the connection URL should be to connect to the example databases.1. load up the embedded driver.
2. use jdbc:derby:toursDB as the database URL. -
Connection Failure for JDBC system in Session Bean using JCA
Hi,
I am trying to write a session bean that runs a query
against a JDBC system, but I keep seeing the following
error in the default trace file in the J2EE log folder:
14##0#0#Path##Java###Throwing
#1#java.sql.SQLException: Invalid connection string
attribute: Database name is required but not supplied#
#1.5#
This is the code, with the line marked (*) being the point where the exception is thrown:
public void getConnection(String sURL, String sUser, String sPassword) {
ManagedConnectionFactory mcf = null;
IConnectionFactory cf = null;
IConnectionSpec cs = null;
try {
mcf = new JDBCManagedConnectionFactory();
cf = (IConnectionFactory) mcf.createConnectionFactory();
cs = cf.getConnectionSpec();
cs.setPropertyValue("UserName", "sa");
cs.setPropertyValue("Password", "admin");
cs.setPropertyValue"driver",
"com.sap.portals.jdbc.sqlserver.SQLServerDriver");
cs.setPropertyValue("url",
"jdbc:sap:sqlserver://localhost:1433;DatabaseName=pubs");
conn = cf.getConnectionEx(cs); (*)
I have tried adding another property value, like so:
cs.setPropertyValue( "DatabaseName", "pubs");
(or) cs.setPropertyValue( "Database", "pubs" );
but I still get the same exception. What does this
exception really mean, what is missing from the
configuration information ?
Also, in the default trace file of the J2EE engine, the
configuration information is printed out, but in an
encrypted format, (see below), is it possible to have it
print out this information in a readable format ?
#1.5#005056A41E66006200000092000009AC000406E03C94F3D9#1133460065906#com.sap.portal.connectors.JDBC#sap.com/CFV3#com.sap.portal.connectors.JDBC#Guest#0####71758520629411daacf7005056a41e66#SAPEngine_Application_Thread[impl:3]_14##0#0#Info##Plain###UserName: ????n????????????????????d?????????????????????????????????????????????s???????????????????????????????????????????????0??????????????????????????????????????????????????h?????0??????R???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????s?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????c???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????u??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????c???????????????????????????????????????????c????????????????3?????????3????e??????????????????????????????????????????????????l???????0????????1????1?????????????????????????????????????????????????????????s?????p?????????????????????????????????????????????????????????????????6?????????????3??????????????s????????????????????t???????????s????????????????????????????????????????????????????????????????????????s????????????????????????????????????????????????????????s?????????????????????????????????g????????????????????????????????????????????????????????????????????????? Password: ******** URL: ???????????????n??????????????????????????????????????????????????????????????????????????0?????e??????????????????????????r?????????????s?????????????O??????????????2???????????7????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????:????5???T?????????????????????????l?????????1????????????????????????????????????????????????????????????????????????????2??????????????????????????????????????????????????????????????????????????????????????????????????h???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????a??????????????????????????????????????????????????????????????????????????????????????????????????S??????????????????????????????????????????????????????????????????????????????????2???????????????????????????u???????????????????????????????????????????????????????????????????????s???????????????????????????????????????????????????????????????????????????????????????????????s?????????????????????????????????????????.?????????????????????????????????????????????????????????????????1????????????????????????????????????l????5??????????? Driver: com.sap.portals.jdbc.sqlserver.SQLServerDriver#
#1.5#0Hi Vladimir,
thanks for your response. The reason I am accessing a
JDBC source via JCA is to get a feel for how JCA works.
What I ultimately want to do is construct a bean that can
give queries to different kinds of sources; JDBC, and SAP
(R3, CRM), and possibly sources like Siebel. For this, I
believe I should use the Connector Gateway Service, as
described in the "Using the JDBC Connector" and "Using
the SAP Backend System Connector" sections of the SAP
Portal Developer's Guide. But for now, my first approach
was to use the approach described in "Connecting via
J2EE" subsection of "Using the JDBC Connector" (see
http://help.sap.com/saphelp_nw04/helpdata/en/30/a0f17aacb34b108b39a96acc33da3f/content.htm)
Thanks,
Colm. -
hi guys,
well, i have a bit of problem here
i have a semesteral project which require us to setup a database
however, i'm not sure if the school will allow us to use the school server
so i would like to know if the url that is passed to getConnection() method can be from a disk drive, e.g:
String url = "jdbc:ids:d:\database.mdb
thanks!!Not sure on the url method. However if you have access on the machine to the ODBC setup you would then create an odbc for jet connection to the mdb file. Name it whatever, say "projdb".
Now in your code you would access it like so:
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
Connection con = DriverManager.getConnection("jdbc:odbc:projdb","","" ); -
Why do i get connection Manager invoke failed to find service connection url for my app store
My Ipad can not download any apps today i just get this message but i can open app store no problems on my IMAC
First, those are two different App Stores. The App Store app on your Mac is for the Mac App Store, apps for Macs, apps for OS X. The App Store app on your iPad is for the iTunes App Store, apps for iOS devices.
Many folks are reporting an issue connecting to the iTunes servers with their iPads for updates. I had 9 updates yesterday and had no such issue on my iPad 4. Some have used the work around of going to their Purchases List and updating each individual app that has an update from there. -
Connection reset using JDBC Oracle thin Driver (towards 10g DB)
Hi we have a home-grown application and a Oracle 10g (10.2.0.1) database.
We created a scheduled servlet that gets a JDBC connection from a persistent connected cache (an OracleDataSource object registered using OracleConnectionCacheManager). The servlet runs every 15 minutes and runs the query "SELECT SYSTIME FROM DUAL" on 10g Database as XYZ user. The datapool was created yday on web-app and all queries ran successfully for about 5 hours after which it reported a connection reset error.
I can then conclude that we cannot keep the server session alive for the JDBC client by running frequent SQL queries.
We didnt get any messages on the DB server side that indicate the release of the session
Ultimately, we are struggling with reset connections from our applications that are
using the JDBC thin oracle driver; after a couple of hours of idle
connections, we receive the below error from the JDBC driver:
Jul 5, 2007 10:59:53 AM oracle.jdbc.driver.DatabaseError throwSqlException
WARNING: DatabaseError.throwSqlException(e): Unable to find ORA number from
exception Jul 5, 2007 10:59:53 AM oracle.jdbc.driver.DatabaseError
findMessage
WARNING: DatabaseError.findMessage(errNum, obj): returned Io exception:
Connection reset Jul 5, 2007 10:59:53 AM
oracle.jdbc.driver.PhysicalConnection getWarnings
INFO: PhysicalConnection.getWarnings()
Any suggestions please ?
VkThe code itself is fine; the problem is with one of:
1) the connection URL
2) intermediate networking
3) the database itself
1) your connection URL is "jdbc:oracle:thin:@127.0.0.1:1521:orcl"
- is Oracle really running on the default port, 1521
- is the installation SID really "orcl"
2) lots of possibilities, but only a couple are likely
- is TCP/IP configured and running on your host
- is there a persoanl firewall rpduct running? perhaps it's blocking the connection
3) Is Oracle running?
Is the listener running? -
Help Needed-Connection Url String for Oracle8i
DriverManager.getConnection(Url , username ,password);
In the above , I need the connection url for Oracle8i Database.
Thanks..This works for me:
jdbc:oracle:thin:@HOST:1521:INSTANCE
Where HOST and INSTANCE represent the machine running oracle and DB instance. 1521 is the default port but may be changed.
Mike -
JDBC thin 8.0.4 connect to Server 8.0.5?
Oracle:
I have a test application (not an applet) that executes correctly
connecting to an Oracle Server 7.X database using Oracle's JDBC
thin drivers. But when I try to connect to an Oracle Server
8.0.5 database, I receive an Oracle error:
ORA-01034: ORACLE not available
The environment for successful application execution is:
Oracle Server 7.X with a TCP Listener on Port 1521
Client workstation NT 4.0
SQL*Net Client is installed (N/A since we're using jdbc thin?)
Java 1.1.1
Oracle JDBC Thin Driver Release 8.0.4
Classes111.zip (7/10/98; 383,256 bytes)
The environment for the un-successful execution is:
Oracle Server 8.0.5 with a TCP Listener on Port 1521
Client workstation NT 4.0
SQL*Net8 Client is installed (N/A since we're using jdbc thin?)
Java 1.1.1
Oracle JDBC Thin Driver Release 8.0.4
Classes111.zip (7/10/98; 383,256 bytes)
Everything else is identical; the only difference is the Oracle
server (7.x vs 8.0.5). The jdbc drivers were downloaded from the
OTN web site. I've reviewed the jdbc documentation available and
reviewed other threads. Is the jdbc thin driver release 8.0.4
compatible with Oracle Server 8.0.5? Is there a more recent
release of Oracle's jdbc thin driver not published on the OTN web
site? Is there something else I should be looking at?
After successful test as an application, I will be testing this
as an applet. As an applet connecting to Server 7.x, it also
works correctly. I have not yet tried the applet connecting to
Server 8.0.5.
Thank you in advance,
Ed Vinarski
5/19/99
null<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Edward Vinarski ([email protected]):
Oracle:
I have a test application (not an applet) that executes correctly
connecting to an Oracle Server 7.X database using Oracle's JDBC
thin drivers. But when I try to connect to an Oracle Server
8.0.5 database, I receive an Oracle error:
ORA-01034: ORACLE not available
The environment for successful application execution is:
Oracle Server 7.X with a TCP Listener on Port 1521
Client workstation NT 4.0
SQL*Net Client is installed (N/A since we're using jdbc thin?)
Java 1.1.1
Oracle JDBC Thin Driver Release 8.0.4
Classes111.zip (7/10/98; 383,256 bytes)
The environment for the un-successful execution is:
Oracle Server 8.0.5 with a TCP Listener on Port 1521
Client workstation NT 4.0
SQL*Net8 Client is installed (N/A since we're using jdbc thin?)
Java 1.1.1
Oracle JDBC Thin Driver Release 8.0.4
Classes111.zip (7/10/98; 383,256 bytes)
Everything else is identical; the only difference is the Oracle
server (7.x vs 8.0.5). The jdbc drivers were downloaded from the
OTN web site. I've reviewed the jdbc documentation available and
reviewed other threads. Is the jdbc thin driver release 8.0.4
compatible with Oracle Server 8.0.5? Is there a more recent
release of Oracle's jdbc thin driver not published on the OTN web
site? Is there something else I should be looking at?
After successful test as an application, I will be testing this
as an applet. As an applet connecting to Server 7.x, it also
works correctly. I have not yet tried the applet connecting to
Server 8.0.5.
Thank you in advance,
Ed Vinarski
5/19/99<HR></BLOCKQUOTE>
Net8 introduces the notion of service name and dbname. I think the version of thin JDBC you are using expect a sid name. Do a lsnrctl serv and find out your sid name and pass it to the connect string for JDBC.
null -
Has anyone run the connection pooling for mysql & tomcat successfully?
I'm trying to set up connection pooling. I'm following the how-to page at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
But when i test the DBTest/test.jsp file, tomcat displays an error =
could not load jdbc driver class 'null'(msdos)
i have placed all the required .jar files in the tomcat lib.
below is the cofiguration i did to the server.xml file
<!-- Example Server Configuration File -->
<!-- Note that component elements are nested corresponding to their
parent-child relationships with each other -->
<!-- A "Server" is a singleton element that represents the entire JVM,
which may contain one or more "Service" instances. The Server
listens for a shutdown command on the indicated port.
Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<!-- Uncomment these entries to enable JMX MBeans support -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
debug="0"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
debug="0"/>
<!-- Global JNDI resources -->
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved">
</Resource>
<ResourceParams name="UserDatabase">
<parameter>
<name>factory</name>
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
</parameter>
<parameter>
<name>pathname</name>
<value>conf/tomcat-users.xml</value>
</parameter>
</ResourceParams>
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" (and therefore the web applications visible
within that Container). Normally, that Container is an "Engine",
but this is not required.
Note: A "Service" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Tomcat-Standalone">
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Each Connector passes requests on to the
associated "Container" (normally an Engine) for processing.
By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
You can also enable an SSL HTTP/1.1 Connector on port 8443 by
following the instructions below and uncommenting the second Connector
entry. SSL support requires the following steps (see the SSL Config
HOWTO in the Tomcat 4.0 documentation bundle for more detailed
instructions):
* Download and install JSSE 1.0.2 or later, and put the JAR files
into "$JAVA_HOME/jre/lib/ext".
* Execute:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
with a password value of "changeit" for both the certificate and
the keystore itself.
By default, DNS lookups are enabled when a web application calls
request.getRemoteHost(). This can have an adverse impact on
performance, so you can disable it by setting the
"enableLookups" attribute to "false". When DNS lookups are disabled,
request.getRemoteHost() will return the String version of the
IP address of the remote client.
-->
<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8081 -->
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="100" debug="0" connectionTimeout="20000"
useURIValidationHack="false" disableUploadTimeout="true" />
<!-- Note : To disable connection timeouts, set connectionTimeout value
to -1 -->
<!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
<!--
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8443" minProcessors="5" maxProcessors="75"
enableLookups="true"
acceptCount="100" debug="0" scheme="https" secure="true"
useURIValidationHack="false" disableUploadTimeout="true">
<Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
clientAuth="false" protocol="TLS" />
</Connector>
-->
<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8009" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="20000"
useURIValidationHack="false"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
<!-- Define an AJP 1.3 Connector on port 8009 -->
<!--
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>
-->
<!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
<!-- See proxy documentation for more information about using this. -->
<!--
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8082" minProcessors="5" maxProcessors="75"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" debug="0" connectionTimeout="20000"
proxyPort="80" useURIValidationHack="false" />
-->
<!-- Define a non-SSL legacy HTTP/1.1 Test Connector on port 8083 -->
<!--
<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="8083" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" />
-->
<!-- Define a non-SSL HTTP/1.0 Test Connector on port 8084 -->
<!--
<Connector className="org.apache.catalina.connector.http10.HttpConnector"
port="8084" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" />
-->
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host). -->
<!-- Define the top level container in our container hierarchy -->
<Engine name="Standalone" defaultHost="localhost" debug="0">
<!-- The request dumper valve dumps useful debugging information about
the request headers and cookies that were received, and the response
headers and cookies that were sent, for all requests received by
this instance of Tomcat. If you care only about requests to a
particular virtual host, or a particular application, nest this
element inside the corresponding <Host> or <Context> entry instead.
For a similar mechanism that is portable to all Servlet 2.3
containers, check out the "RequestDumperFilter" Filter in the
example application (the source for this filter may be found in
"$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
Request dumping is disabled by default. Uncomment the following
element to enable it. -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->
<!-- Global logger unless overridden at lower levels -->
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt"
timestamp="true"/>
<!-- Because this Realm is here, an instance will be shared globally -->
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
debug="0" resourceName="UserDatabase"/>
<!-- Comment out the old realm but leave here for now in case we
need to go back quickly -->
<!--
<Realm className="org.apache.catalina.realm.MemoryRealm" />
-->
<!-- Replace the above Realm with one of the following to get a Realm
stored in a database and accessed via JDBC -->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/authority"
connectionName="test" connectionPassword="test"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
connectionName="scott" connectionPassword="tiger"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="sun.jdbc.odbc.JdbcOdbcDriver"
connectionURL="jdbc:odbc:CATALINA"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!-- Define the default virtual host -->
<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context path="/my-jsp" docBase="c:\JSP-Files" debug="0"
privileged="true" reloadable="true" />
<Context path="" docBase="c:\Inetpub\wwwroot" debug="0" privileged="true" />
<Context path="/sharon" docBase="C:\Tomcat 4.1\webapps\sharon" debug="0" privileged="true" />
<!-- Normally, users must authenticate themselves to each web app
individually. Uncomment the following entry if you would like
a user to be authenticated the first time they encounter a
resource protected by a security constraint, and then have that
user identity maintained across all web applications contained
in this virtual host. -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn"
debug="0"/>
-->
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a relative
(to $CATALINA_HOME) or absolute path to the desired directory.
-->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
-->
<!-- Logger shared by all Contexts related to this virtual host. By
default (when using FileLogger), log files are created in the "logs"
directory relative to $CATALINA_HOME. If you wish, you can specify
a different directory with the "directory" attribute. Specify either a
relative (to $CATALINA_HOME) or absolute path to the desired
directory.-->
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="localhost_log." suffix=".txt"
timestamp="true"/>
<!-- Define properties for each web application. This is only needed
if you want to set non-default properties, or have web application
document roots in places other than the virtual host's appBase
directory. -->
<!-- Tomcat Root Context -->
<!--
<Context path="" docBase="ROOT" debug="0"/>
-->
<!-- Tomcat Examples Context -->
<Context path="/examples" docBase="examples" debug="0"
reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_DBTest_log." suffix=".txt"
timestamp="true"/>
<Ejb name="ejb/EmplRecord" type="Entity"
home="com.wombat.empl.EmployeeRecordHome"
remote="com.wombat.empl.EmployeeRecord"/>
<!-- If you wanted the examples app to be able to edit the
user database, you would uncomment the following entry.
Of course, you would want to enable security on the
application as well, so this is not done by default!
The database object could be accessed like this:
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
UserDatabase database =
(UserDatabase) envCtx.lookup("userDatabase");
-->
<!--
<ResourceLink name="userDatabase" global="UserDatabase"
type="org.apache.catalina.UserDatabase"/>
-->
<!-- PersistentManager: Uncomment the section below to test Persistent
Sessions.
saveOnRestart: If true, all active sessions will be saved
to the Store when Catalina is shutdown, regardless of
other settings. All Sessions found in the Store will be
loaded on startup. Sessions past their expiration are
ignored in both cases.
maxActiveSessions: If 0 or greater, having too many active
sessions will result in some being swapped out. minIdleSwap
limits this. -1 means unlimited sessions are allowed.
0 means sessions will almost always be swapped out after
use - this will be noticeably slow for your users.
minIdleSwap: Sessions must be idle for at least this long
(in seconds) before they will be swapped out due to
maxActiveSessions. This avoids thrashing when the site is
highly active. -1 or 0 means there is no minimum - sessions
can be swapped out at any time.
maxIdleSwap: Sessions will be swapped out if idle for this
long (in seconds). If minIdleSwap is higher, then it will
override this. This isn't exact: it is checked periodically.
-1 means sessions won't be swapped out for this reason,
although they may be swapped out for maxActiveSessions.
If set to >= 0, guarantees that all sessions found in the
Store will be loaded on startup.
maxIdleBackup: Sessions will be backed up (saved to the Store,
but left in active memory) if idle for this long (in seconds),
and all sessions found in the Store will be loaded on startup.
If set to -1 sessions will not be backed up, 0 means they
should be backed up shortly after being used.
To clear sessions from the Store, set maxActiveSessions, maxIdleSwap,
and minIdleBackup all to -1, saveOnRestart to false, then restart
Catalina.
-->
<!--
<Manager className="org.apache.catalina.session.PersistentManager"
debug="0"
saveOnRestart="true"
maxActiveSessions="-1"
minIdleSwap="-1"
maxIdleSwap="-1"
maxIdleBackup="-1">
<Store className="org.apache.catalina.session.FileStore"/>
</Manager>
-->
<Environment name="maxExemptions" type="java.lang.Integer"
value="15"/>
<Parameter name="context.param.name" value="context.param.value"
override="false"/>
<Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
type="javax.sql.DataSource"/>
<Resource name="jdbc/TestDB"
auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/TestDB">
<parameter>
<name>factory</name>
<value>org.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>
<name>maxActive</name>
<value>100</value>
</parameter>
<!-- Maximum number of idle dB connections to retain in pool.
Set to 0 for no limit.
-->
<parameter>
<name>maxIdle</name>
<value>30</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>
<name>maxWait</name>
<value>10000</value>
</parameter>
<!-- MySQL dB username and password for dB connections -->
<parameter>
<name>user</name>
<value>javauser</value>
</parameter>
<parameter>
<name>password</name>
<value>javadude</value>
</parameter>
<!-- Class name for mm.mysql JDBC driver -->
<parameter>
<name>driverClassName</name>
<value>org.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>
<name>url</name>
<value>jdbc:mysql://localhost:3306/javatest?autoReconnect=true</value>
</parameter>
</ResourceParams>
<Resource name="mail/Session" auth="Container"
type="javax.mail.Session"/>
<ResourceParams name="mail/Session">
<parameter>
<name>mail.smtp.host</name>
<value>localhost</value>
</parameter>
</ResourceParams>
<ResourceLink name="linkToGlobalResource"
global="simpleValue"
type="java.lang.Integer"/>
</Context>
</Host>
</Engine>
</Service>
<!-- The MOD_WEBAPP connector is used to connect Apache 1.3 with Tomcat 4.0
as its servlet container. Please read the README.txt file coming with
the WebApp Module distribution on how to build it.
(Or check out the "jakarta-tomcat-connectors/webapp" CVS repository)
To configure the Apache side, you must ensure that you have the
"ServerName" and "Port" directives defined in "httpd.conf". Then,
lines like these to the bottom of your "httpd.conf" file:
LoadModule webapp_module libexec/mod_webapp.so
WebAppConnection warpConnection warp localhost:8008
WebAppDeploy examples warpConnection /examples/
The next time you restart Apache (after restarting Tomcat, if needed)
the connection will be established, and all applications you make
visible via "WebAppDeploy" directives can be accessed through Apache.
-->
<!-- Define an Apache-Connector Service -->
<!--
<Service name="Tomcat-Apache">
<Connector className="org.apache.catalina.connector.warp.WarpConnector"
port="8008" minProcessors="5" maxProcessors="75"
enableLookups="true" appBase="webapps"
acceptCount="10" debug="0"/>
<Engine className="org.apache.catalina.connector.warp.WarpEngine"
name="Apache" debug="0">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="apache_log." suffix=".txt"
timestamp="true"/>
<Realm className="org.apache.catalina.realm.MemoryRealm" />
</Engine>
</Service>
-->
</Server>
Pleas4 help!!!you have your driver jar in Tomcat\common\lib?
if so, check your classpath, it could be that. -
Hi everybody!
I'm preparing an article about JDBC as an addendum I would like to publish JDBC connect URLs for different databases.
Could you help me and provide me with URLs?
Please do not post me URLs for Oracle and MS SQL Server, since they're well known and thoroughly described in a number of sources.
Please post in following way:
1) JDBC class name (as in Class.forName())
2) URL in form of jdbc:<blah-blah> with explanation where are port, hostname, etc
3) Small example like: "jdbc:oracle:thin:@myhost:1521:mysid"
I promise to reward 1 duke $ for each first and new URL format
Paul<driverSyntax dbName="Daffodil DB embedded" driverName="in.co.daffodil.db.jdbc.DaffodilDBDriver" url="jdbc:daffodilDB_embedded:[DATABASE_NAME]"/>
<driverSyntax dbName="Daffodil DB server" driverName="in.co.daffodil.db.rmi.RmiDaffodilDBDriver" url="jdbc:daffodilDB://[HOST_NAME]:[PORT_NUMBER]/[DATABASE_NAME]" />
<driverSyntax dbName="DB2 application" driverName=" COM.ibm.db2.jdbc.app.DB2Driver " url="jdbc:db2: [DATABASE_NAME]" />
<driverSyntax dbName="DB2 net" driverName=" COM.ibm.db2.jdbc.net.DB2Driver " url=" jdbc:db2:// [HOST_NAME] : [PORT_NUMBER] / [DATABASE_NAME] " />
<driverSyntax dbName="Frontbase" driverName="jdbc.FrontBase.FBJDriver" url="jdbc:FrontBase://[HOST_NAME/[DATABASE_NAME]" />
<driverSyntax dbName="Hypersonic SQL" driverName="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:[DATABASE_NAME]" />
<driverSyntax dbName="Mckoi SQL Database" driverName="com.mckoi.JDBCDriver" url="jdbc:mckoi://[HOST_NAME]:[PORT]" />
<driverSyntax dbName="Mimer" driverName="com.mimer.jdbc.Driver" url="jdbc:mimer://[HOST_NAME]:[PORT_NUMBER]/[DATABASE_NAME]" />
<driverSyntax dbName="MS Sql Server" driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver" url="jdbc:microsoft:sqlserver://[HOST_NAME]:[PORT_NUMBER] /"/>
<driverSyntax dbName="MySql" driverName="com.mysql.jdbc.Driver" url="jdbc:mysql://[HOST_NAME]:[PORT_NUMBER]/[DATABASE_NAME]" />
<driverSyntax dbName="Oracle OCI" driverName="oracle.jdbc.OracleDriver" url="jdbc:oracle:oci8:@[HOST_NAME]" />
<driverSyntax dbName="Oracle thin driver" driverName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@[HOST_NAME]:[PORT_NUMBER]"/>
<driverSyntax dbName="Pervasive SQL" driverName="com.pervasive.jdbc.v2.Driver" url="jdbc:pervasive://[HOST_NAME]:[PORT_NUMBER]/[DATABASE_NAME]" />
<driverSyntax dbName="PointBase" driverName="com.pointbase.jdbc.jdbcUniversalDriver" url="jdbc:pointbase:server://[HOST_NAME]/[DATABASE_NAME]" />
<driverSyntax dbName="Postgres" driverName="org.postgresql.Driver" url="jdbc:postgresql://[HOST_NAME]:[PORT_NUMBER]/[DATABASE_NAME]" />
<driverSyntax dbName="Quadcap QED" driverName="com.quadcap.jdbc.JdbcDriver" url="jdbc:qed:[DATABASE_NAME]" />
<driverSyntax dbName="SAPDb" driverName="com.sap.dbtech.jdbc.DriverSapDB" url="jdbc:sapdb://[HOST_NAME]/[DATABASE_NAME]" />
<driverSyntax dbName="SQLBase" driverName="centura.java.sqlbase.SqlbaseDriver" url="jdbc:sqlbase://[HOST_NAME]:[PORT_NUMBER]/[DATABASE_NAME]" />
<driverSyntax dbName="Sybase JConnect 4.x" driverName="com.sybase.jdbc.SybDriver" url="jdbc:sybase:Tds:[HOST_NAME]:[PORT_NUMBER]/[DATABASE_NAME]" />
<driverSyntax dbName="Sybase JConnect 5.x" driverName="com.sybase.jdbc2.jdbc.SybDriver" url="jdbc:sybase:Tds:[HOST_NAME]:[PORT_NUMBER]/[DATABASE_NAME]" />
<driverSyntax dbName="JDBC ODBC Bridge" driverName="sun.jdbc.odbc.JdbcOdbcDriver" url="jdbc:odbc:[DNS]" /> -
I'm trying to specify a jar file in my connection url for javadb so I can access a DB already created by JavaDB. I came across this information on a java pages:
All connection URLs have the following form:
jdbc:derby:<dbName>[propertyList]
The dbName portion of the URL identifies a specific database. A database can be in one of many locations: in the current working directory, on the classpath, in a JAR file, in a specific Java DB database home directory, or in an absolute location on your file system.
However when I specified:
jdbc:derby:myDB.jar;create=false; I get a can't find file sql error, even though I know it's there. If I use the unjared file it's fine.
I created my jar using: jar cf myDB.jar myDB
Any ideas??????????????????/From the following link?
http://java.sun.com/docs/books/tutorial/jdbc/basics/connecting.html
That covers jdbc in general and not just derby.
And I seriously doubt that derby will allow you to keep a modifiable database in a jar. Do you want a read only database?
Maybe you are looking for
-
HT1338 trying to install hp office jet 6600...no luck
trying in install officejet 6600 wireless...noluck
-
I was charged for some songs that I purchased but I had an iTunes card and they deducted that too how do I get my money back from itunes
-
I just purchased this and the directions say to connect the ipod to the computer via the USB cable. When I do that nothing happens. How do I get the music from Itunes to my ipod?
-
10g SE / EE on 64 Bit Windows (AMD64/Intel EM64T)
I would like to know the release date for Standard Edition or Enterprise Edition 10g for the 64 bit on Windows for AMD64/Intel EM64T. Currently Oracle Database 10g Release 1 (10.1.0.2) for Microsoft Windows (64-bit Itanium) is available for download
-
VOFM- Data Transfer- Billing Rouitnes
Hi Please help me in the issue . Created a custom routine with namespace 901 in vofm- datatrasfer i activated the routine and generated the same usiing RV80HGEN but still in syntax check of the routine its showing its not includeed in main program .