Jdbc connection in EJB using wsad 5.0

Hi,
I want to develop a small application using Ejbs by using oracle 9i as D/b, wsad 5.0 as app server . The problem is i am not able to connect to oracle database in WSAD. What i am doing is i have installed Oracle 9i in my system and has given the Global database name as "samp" while installation . I open my SQL plus with username scott and password tiger and i am able to do all my sql queries successfully.
Now coming to WSAD,
while creating a JDBC connection using Oracle 9i driver,
i ve opened in Data perspective and in that go to DB Servers -> Right click -> New Connection
There a window is opened for Database Connection.
We need to fill the fields there.
I have given samp as Global d/b name while installing Oracle 9i .
In the window , the feilds are
Connection Name : conn
Database Name : samp
user id : scott
password : tiger
D/b vendor type: Oracle 9i
Jdbc Driver : Oracle Thin Driver
Host : 127.0.0.1
port No: 1521
class location : c:\oracle\ora90\jdbc\lib\classes12.zip
connection url : jdbc:oracle:thin:@127.0.0.1:1521:samp
the class location and connection url are automatically coming.
and please check whether all fields are correct or not
Is this the correct way.
Next in code if i want to connect to database should i use connection establish commands again or i can directly use create statement or prepare statement.
Please reply.
Thanks

Create New Server and configure it properly
It will work
procedure is as follows:
Pls visit the following link:
http://www.webagesolutions.com/knowledgebase/waskb/waskb001/index.html
Adding a Oracle9i DataSource from WSAD5
Bibhas Bhattacharya, Web Age Solutions Inc.
Before you begin, make sure that you have Oracle installed and a database is created. In this document we will use a database called MALL.
Create a WAS V5 Server
If you don't already have a WebSphere V5 server created, do so following these steps. Switch to the Server perspective. Right click in the Server Configuration view and select New->Server and Server Configuration.
Name the server WASV5. Make sure that the Server type is set to WebSphere version 5.0->Test Environment. Click on Finish.
Add the Database User
In WSAD5, the default user ID and password to be used by a DataSource are first entered as a JAAS authentication entry.
In the Server Configuration view, double click on WASV5 to open the configuration editor. Click on the Security tab. Next to the JAAS Authentication Entries list click on Add and add the user.
Add the JDBC Driver
Still in the server configuration GUI click on the DataSource tab. You can add the DataSource at the server level or at the node level. We will add it at the server level. Make sure that the Server Settings is expanded. Next to the JDBC providers list click on Add.
Select the following options:
Database type: Oracle
JDBC provider type: Oracle JDBC Thin Driver or the XA version of it if you need two phase commit transaction.
Click on Next.
Set the name to Oracle Thin Driver.
Notice that the location of the driver's class is automatically set to ${ORACLE_JDBC_DRIVER_PATH}/classes12.zip. Here, ORACLE_JDBC_DRIVER_PATH is a node level variable. We need to make sure that the variable is pointing to the correct directory where Oracle's JDBC driver is installed. In our case, we had installed Oracle in c:\oracle. This had installed the JDBC driver class in C:/oracle/ora81/jdbc/lib/classes12.zip.
In the server configuration GUI click on the Variables tab. Under the Node settings select ORACLE_JDBC_DRIVER_PATH from the Defined variables list. Click on Edit and set the value to C:/oracle/ora81/jdbc/lib.
Add the DataSource
Click on the DataSource tab again. Select the Oracle Thin Driver you had created in the previous step. Click on Add next to the Data source defined in the JDBC provider selected above list.
Select the following options:
Select the type of JDBC Driver: Oracle JDBC Thin Driver.
Select the data source type: Unless you will be testing your application with WAS V4, select Version 5.0. You can not use a V4 DataSource from a J2EE 1.3 EJB module running in WebSphere V5.
Click on Next.
Enter these key attributes in this screen:
Name: My Oracle DataSource
JNDI Name: jdbc/MyDataSource
DataSource helper class name: com.ibm.websphere.rsadapter.OracleDataStoreHelper. Should be selected by default. The helper class is needed if you wish to access IBM extensions to JDBC. For more details search in WSAD help for "WSDataSource interface".
Component-managed authentication alias: Set this if you wish to lookup the DataSource using its global JNDI name or using the java:comp/env/ name space and have set the authentication type of the resource reference to Application. Select the JAAS entry you had created. That is, Database user.
Container-managed authentication alias: Set this if you intend to lookup the DataSource using the java:comp/env/ name space and have set the authentication type of the resource reference to Container. Select the JAAS entry you had created. That is, Database user.
Use this data source in container managed persistence (CMP): Check on if you intend to use the DataSource from CMP EJBs.
Click on Next.
You need to set these properties:
databaseName: MALL in our case.
URL: jdbc:oracle:thin:@noble.webagesolutions.com:1521:MALL. In my case the server host name is noble.webagesolutions.com. The listener port number is 1521 (usually the default in most Oracle installations).
Click on Finish.
You have finished adding the DataSource. Save the server settings by clicking Control+S. Close the server configuration GUI.
Testing the DataSource
There is no out of the box way to test the DataSource. You can create a simple Servlet and add the following code:
public void doGet(HttpServletRequest req, HttpServletResponse resp)
javax.sql.DataSource ds = null;
java.sql.Connection con = null;
java.io.PrintWriter out = resp.getWriter();
resp.setContentType("text/html");
try {
out.println("Looking up DataSource<br>");
javax.naming.InitialContext ctx = new javax.naming.InitialContext();
ds = (javax.sql.DataSource) ctx.lookup("jdbc/MyDataSource");
out.println("Getting connection<br>");
con = ds.getConnection();
con.close();
} catch (Exception e) {
e.printStackTrace(out);
out.println("Done<br>");
Feedback
Your e-mail:
Rate this article:
Very useful Somewhat useful Not bad Needs many corrections
Comments:

Similar Messages

  • JDBC connection in EJB

    In EJBs, we can always spawn a JDBC connection using the internal server side driver through defaultConnection() or kprb. My question is, can we spawn any other kind of connection from an EJB to another database on some remote machine, this would involve using the thin or oci drivers, i try but get security exceptions and access privilege exception though the account i use is privilegded for database operations. Can someone answer my question please.

    see reply in one of the four other forums you posted the same question to !!

  • JDBC connection in EJB (Sorry i know this is a JSP forum but someone might have the a

    In EJBs, we can always spawn a JDBC connection using the internal server side driver through defaultConnection() or kprb. My question is, can we spawn any other kind of connection from an EJB to another database on some remote machine, this would involve using the thin or oci drivers, i try but get security exceptions and access privilege exception though the account i use is privilegded for database operations. Can someone answer my question please.

    see reply in one of the four other forums you posted the same question to !!

  • JDBC connection in session using HttpSessionBindingListener

    Hi All,
    Our architechture needs us to store an OCI connection in the HTTPSession once
    the user logs in. This connection is then used for any DB related queries(passed
    around to workshop controls etc). I know this is againt generally recommended
    practice, but given that we need to do it, i thought of wrapping this connection
    in an HttpSessionBindingListener ,so that when the Servlet API calls the onValueUnbound(),
    i can close the internal connection. However, it has come to my notice that the
    valueUnbound method is not called each and every time a browser window is closed
    or a session times out. Does my wrapper object NEED to implement Serializable?Even
    if it does, the internal OracleOCIConnection is still unserializable. Is there
    any way i can close such a connection reliably when session is closed/invalidated/expired?
    Thanks.
    Vik.

    Hi, I'd refer you to the ejb newsgroup for expert help in that
    area. I'm jdbc, and what you wanted sounded like that.
    Joe
    vik wrote:
    Joe,
    If we were to use a Statefull session bean to do this, could you guide me on how
    i would go about doing it in general terms? One way i can think of is:have a ejbCreate(userName,passWord),
    which is called on login. This calls the getConnection(userName,passWord) from
    the connectionPool,and if the username/pwd is invalid, i will get a CreateException
    wrapping a SQLException. If it goes allright, i now have a session bean associated
    with this client holding a JDBC connection using his credentials.How would i share
    this session bean across the app so that if there are any SQL operations to be
    performed by any action(we are using WorkShop and Weblogic8.1), they are done
    using this session bean. Should i be storing this Stateful Session Bean in the
    HTTP session then?
    Regards,
    Vikram.
    Joe Weinstein <[email protected]> wrote:
    vik wrote:
    Hi All,
    Our architechture needs us to store an OCI connection in the HTTPSessiononce
    the user logs in. This connection is then used for any DB related queries(passed
    around to workshop controls etc). I know this is againt generally recommended
    practice, but given that we need to do it, i thought of wrapping thisconnection
    in an HttpSessionBindingListener ,so that when the Servlet API callsthe onValueUnbound(),
    i can close the internal connection. However, it has come to my noticethat the
    valueUnbound method is not called each and every time a browser windowis closed
    or a session times out. Does my wrapper object NEED to implement Serializable?Even
    if it does, the internal OracleOCIConnection is still unserializable.Is there
    any way i can close such a connection reliably when session is closed/invalidated/expired?
    Thanks.
    Vik.This sounds like stateful session bean, no?
    Joe

  • JDBC Connection Reset when using many processes on 64 bit system

    Hi,
    we've a annoying JDBC connection problem since we migrated our Java server to a 64 bit operating system. Here our environment.
    Database Machine:
    Oracle 10g
    Linux 32 Bit (but same problem on 64 Bit)
    Application Servers Machine:
    JDBC driver 11.1.0.6
    SUN Java 1.6.0_06 64bit
    Linux 64 bit (SLES 10 SP2)
    We have 6 different Java server processes (but with the same code) which all create some connections to the same database (running on a different Hardware). All 6 Java server processes starting at the same time (via scripts).
    Everything was fine, until we migrated the application server machine from 32 bit Linux to 64 bit Linux. From this day on, the half (or one more or less) of our application server processes can't longer connect to the database. The application server processes which have the problem product the following stack trace:
    java.sql.SQLRecoverableException: I/O Exception: Connection reset
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:281)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:118)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:224)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:296)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:611)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:455)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:494)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:199)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:154)
    at com.aaaa.utils.db.DbConnectionPool.<init>(DbConnectionPool.java:130)
    It looks like a network problem with the system but all other network stuff works without problems, between the two machines.
    - We use the thin JDBC driver (no OCI)
    - No firewalls are active on both systems
    - Both systems are in the same subnet connected to the same switch
    - The DNS configuration on both systems are ok (forward and reverse)
    - We've found the same problem on different application-server/database-server pairs with 64 bit application server hardware - but not all of our 64 bit server systems have this problem.
    - When running application server process and database on the same system (connecting via localhost) the problem does not longer appear.
    - The same database machine connected from a 32 bit application server (with 6 different java processes starting at the same time) works without a problem.
    We've tried a lot of things to isolate the problem - but with no success.
    - Same problem with SUN Java 1.6.0_06 32 bit (on 64 bit Linux)
    - Same problem with SUN Java 1.6.0_15 (32 and 64 bit)
    - Played with some JDBC connection properties (oracle.jdbc.TcpNoDelay, oracle.jdbc.ReadTimeout, oracle.net.CONNECT_TIMEOUT, oracle.net.disableOob, oracle.jdbc.RetainV9LongBindBehavior, oracle.jdbc.StreamChunkSize) without a positive result.
    - We've updated Linux network driver
    - We've changed to an completeky other NIC
    - We've tried an other Linux 64 distribution
    - We've increased the PROCESSES parameter in the init.ora
    - We've tried the JDBC driver 11.1.0.6
    - We've tried the _g version of the JDBC driver, but the debugging output simply tell us "Connection Reset" without a hint why.
    - We've tried a more complex JDBC connect string (
    "jdbc:oracle:thin:@(DESCRIPTION=" +
    "(ADDRESS_LIST=" +
    "(ADDRESS=(PROTOCOL=TCP)" +
    "(HOST=host)" + =
    "(PORT=port)" +
    ")" +
    ")" +
    "(CONNECT_DATA=" +
    "(SERVICE_NAME=sid)" +
    "(SERVER=DEDICATED)" +
    ")" +
    Nothing of this things helped us to isolate the problem.
    When we start our application server processes with a long pause (>1 min) between every process start. The problem does not occure. When we start only one application server with the same number of connections as the 6 different application server processes, everything works fine.
    We have absolute no idea why
    - this only occures on 64 bit Linux
    - independent if it's a 32 bit or 64 bit JVM
    - does not occure on all 64 bit application server machines / database machine pairs
    - never occure on the same 64 bit app server hardware when using a 32 bit Linux
    - using the Oracle JDBC 10g driver (10.xxx) there is no problem (but because of other issues, we need to use the JDBC 11g driver)
    Does anybody has an idea what our problem is?
    Thanks in advance,
    greetings

    I was recently struggling with this exact same problem. I opened a ticket with Oracle and this is what they told me.
    java.security.SecureRandom is a standard API provided by sun. Among various methods offered by this class void
    nextBytes(byte[])
    is one. This method is used for generating random bytes. Oracle 11g JDBC drivers use this API to generate random number during
    login. Users using Linux have been encountering SQLException("Io exception: Connection
    reset").
    The problem is two fold
    1. The JVM tries to list all the files in the /tmp (or alternate tmp directory set by -Djava.io.tmpdir) when
    SecureRandom.nextBytes(byte[]) is invoked. If the number of files is large the
    method takes a long time
    to respond and hence cause the server to timeout
    2. The method void nextBytes(byte[]) uses /dev/random on Linux and on some machines which lack the random
    number generating hardware the operation slows down to the extent of bringing the whole login process to
    a halt. Ultimately the the user encounters SQLException("Io exception:
    Connection reset")
    Users upgrading to 11g can encounter this issue if the underlying OS is Linux which is running on a faulty hardware.
    Cause
    The cause of this has not yet been determined exactly. It could either be a problem in
    your hardware or the fact
    that for some reason the software cannot read from dev/random
    Solution
    Change the setup for your application, so you add the next parameter to the java command:
    -Djava.security.egd=file:/dev/../dev/urandom
    We made this change in our java.security file and it has gotten rid of the error.

  • JDBC Connectivity problem - Netbeans using Struts

    I am a beginner - trying to learn java on my own. I am trying to access an Oracle database from my Action class- I think I have the proper struts-config (it used to give errors there, but now it doesn't) the application gets stuck at dataSource = getDataSource(request); statement in my java class. I know this is not the proper programming practice for business logic, but I haven't started with EJBs yet... The IDE has access to my database, I can run SQL commands successfully...
    Any help in this regard will be appreciated!
    Here is my struts-config.. <data-source type="org.apache.commons.dbcp.BasicDataSource">
    <set-property property ="autoCommit" value="false"/>
    <set-property property ="driverClass" value="oracle.jdbc.driver.OracleDriver" />
    <set-property property="url" value="jdbc:oracle:thin:@hostname:port:XE" />
    <set-property property="user" value="user" />
    <set-property property="password" value="pass" />
    </data-source>
    The relevant code in my java class is:
    dataSource = getDataSource(request);
    myConnection = dataSource.getConnection();
    stmt=myConnection.createStatement();
    // my code to do whatever....
    } catch (SQLException sqle) {
    getServlet().log("Connection.process", sqle);
    Thanks all.

    Hi
    please change your code in 2 areas
    1)Loading driver class
    Class.forName("oracle.jdbc.driver.OracleDriver");
    2)getting connection
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger");
    i hope it will help you
    before executing please verify that classes12.jar or ojdbc14.jar is placed in classpath
    for classes12.jar or ojdbc14.jar please goto the following location in your system
    C:\oracle92\ora92\jdbc\lib
    where oracle92 is oracle installation directory ....
    regards
    Dharma

  • JDBC connection to 11g using DBCP connection pool

    Hi
    I am using 11g with Java6 using ojdbc6.jar, aqapi.jar and commons-dbcp-1.2.2.jar running in a Jboss4.3 app server. I have a strange problem in that when the app server is shutdown it then seems to take several minutes before it can be restarted because it cannot get the connections for the pool. If I leave it for 10 mins or so it will restart.
    Any help would be appreciated

    IPv6?
    If that is in play one can end up with retries attempted over IPv6, which then finally gives up and then switched to IPv4.
    You should be able to replicate via the following
    1. You MUST run as the same user as the app server
    2. Create a java console app that does nothing but a regular connect using the SAME connection string as the app server.
    3. Test it and time it.
    4. If that works ok then do the same thing with dbcp.

  • JDBC connection pool failures when used by JMS stores

              We are using WebLogic 6.1 sp2. We defined a separate connection pool for use by
              a JMS Store.
              <JDBCConnectionPool Name="sybaseJMSPool"
              Targets="cluster00"
              InitialCapacity="2"
              MaxCapacity="10"
              DriverName="com.sybase.jdbc2.jdbc.SybDriver"
              Properties="[email protected]@;[email protected]@;charset=utf8"
              URL="jdbc:sybase:Tds:@jms.db.host@/@jms.db.name@"/>
              (note that the @xxx@ string are replaced by actual values).
              We are using Sybase Jconnect 5.5 to a Sybase ASE 12.5 database.
              We deployed this configuration on a number of environments (testing, staging,
              ..). The actual hardware and network configuration is different for the different
              system, but the WebLogic domain stays the same regarding this issue.
              On the test system we frequently get the following exceptions:
              <Aug 13, 2002 1:56:04 PM CEST> <Alert> <JMS> <www00-test> <node00>
              <ExecuteThread: '6' for queue: 'JMS.TimerClientPool'> <> <> <040048>
              <JMSServer "JMSServer00", store failure while writing message for topic
              OrderChangeTopic, java.io.IOException: JMS JDBC store, connection pool =
              <sybaseJMSPool>, prefix = <JMS00>: write failed
              java.sql.SQLException: JZ006: Caught IOException:
              com.sybase.jdbc2.jdbc.SybConnectionDeadException: JZ0C0: Connection is already
              closed.
              at com.sybase.jdbc2.jdbc.ErrorMessage.raiseErrorCheckDead
              (ErrorMessage.java:715)
              at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3124)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1412)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1341)
              at com.sybase.jdbc2.jdbc.SybStatement.doCancel(SybStatement.java:564)
              at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1672)
              at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate
              (SybStatement.java:1625)
              at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate
              (SybPreparedStatement.java:91)
              at com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate
              (P6LogPreparedStatement.java:179)
              at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1246)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              .>
              java.io.IOException: JMS JDBC store, connection pool = <sybaseJMSPool>, prefix
              = <JMS00>: write failed
              java.sql.SQLException: JZ006: Caught IOException:
              com.sybase.jdbc2.jdbc.SybConnectionDeadException: JZ0C0: Connection is already
              closed.
              at com.sybase.jdbc2.jdbc.ErrorMessage.raiseErrorCheckDead
              (ErrorMessage.java:715)
              at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3124)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1412)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1341)
              at com.sybase.jdbc2.jdbc.SybStatement.doCancel(SybStatement.java:564)
              at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1672)
              at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate
              (SybStatement.java:1625)
              at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate
              (SybPreparedStatement.java:91)
              at com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate
              (P6LogPreparedStatement.java:179)
              at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1246)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              at weblogic.jms.store.JDBCIOStream.throwIOException
              (JDBCIOStream.java:1213)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1256)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              Before that this message appeared:
              <Aug 13, 2002 11:31:16 AM CEST> <Error> <ConnectionManager> <www00-test>
              <node00> <ExecuteThread: '26' for queue: 'default'> <> <> <000000>
              <Closing: 'weblogic.rjvm.t3.T3JVMConnection@795af6' because of: 'Server
              received a message over an uninitialized connection: 'JVMMessage from: 'null'
              to: '-4555218188801970213S:192.168.13.1:[7001,7001,7002,7002,7001,7002,-
              1]:ADIS:node00' cmd: 'CMD_REQUEST', QOS: '101', responseId: '1',
              invokableId: '287', flags: 'JVMIDs Not Sent, TX Context Not Sent', abbrev
              offset: '34'''>
              This problem did not occur on another system which was used during a 2 day stress
              testing session.
              It seems that the problem occurs after a period in which no user request where
              made. The user requests trigger EJB's that start sending JMS messages.
              When the problem occurs, the JMS messaging systems seems to lock up as no messages
              are received anymore by the different listeners (MDBs).
              Undeploying and redeploying the JBDC connection pool solves the problem. This
              solution is unacceptable in case of a production system.
              A similarly defined connection pool, which is used by the EJBs to make database
              connection, does not manifest this problem.
              <JDBCConnectionPool Name="sybasePool"
              Targets="cluster00"
              InitialCapacity="10"
              CapacityIncrement="5"
              MaxCapacity="50"
              PreparedStatementCacheSize="150"
              DriverName="com.sybase.jdbc2.jdbc.SybDriver"
              Properties="[email protected]@;[email protected]@;JCONNECT_VERSION=6;charset=utf8"
              URL="jdbc:sybase:Tds:@db.host@/@db.name@"/>
              The JDBC connection pool is used as follows by the JDBC store
              <JMSJDBCStore ConnectionPool="sybaseJMSPool" Name="JDBCStore00" PrefixName="JMS00"/>
              <JMSServer Name="JMSServer00" Store="JDBCStore00" Targets="node00">
              <JMSTopic JNDIName="ADIS.JMSError" JNDINameReplicated="false" Name="ErrorTopic"/>
              <JMSTopic JNDIName="ADIS.Status"
              Name="StatusTopic" RedeliveryDelayOverride="300000"/>
              <JMSTopic JNDIName="ADIS.OrderChange" JNDINameReplicated="false"
              Name="OrderChangeTopic" RedeliveryLimit="3"/>
              </JMSServer>
              Turning on the "Test Reserved Connection" with a appropriate test table does not
              help.
              Some sources on the internet tell us that JZ0C0 errors in the Jconnect driver
              can be related to network problems. Nevertheless the connection pool should be
              able to cope with this.
              Can you provide any solution for this ? Or give us hints what can cause the problem
              

    Zhenhao Qi wrote:
    thanks! Joe.
    The SQL statement itself can no longer be simplified, the long excuation time is due to the database size and complicated Select criteria. I can easily reproduce the problem by using this SQL. I tried "BEA's Oracle driver (Type 4): Version 8.1.7,9.0.1,9.2.0". the question can be dissect into 2 pieces:
    1) why the jdbc connection (using oracle.jdbc.OracleDriver) won't return anything if the SQL execution time > 5min, that is probably the Oracle's problem
    2) why the occupied connection pool won't release even I set "Statementtimeout=600", this is Weblogic's problem.
    ZhenhaoHi. Yes, (1) is oracle's problem. (2) may also be. The JDBC spec has very few
    allowances for one thread to interrupt a second thread's JDBC call. If we
    transmit your timeout request by calling setQueryTimeout() on the oracle
    statement, and if you have a weblogic-controlled transaction we call
    Statement.cancel() on any ongoing statement, we end up relying on whether
    the Oracle driver implements and responds to those calls.
    Are you doing weblogic-controlled transactions? Are you/can you
    call Statement.setQueryTimeout() on your statements, or are these
    generated JDBC queries?
    If you can duplicate the problem using the weblogic.jdbc.oracle.OracleDriver
    we have some other debug avenues. This would be good even if you really
    want to use the thin driver, because we will do the same JDBC calls to
    either driver, and the debug would prove (if) we set up a query timeout
    and if we call cancel(). If we do, then we can know that it is the Oracle
    driver failing in these regards.
    Joe

  • JDBC Connection in ISA 7.0

    Hi,
    Where can we set JDBC connection for local SAP-J2EE DB for ISA 7.0.
    Please provide some information.
    Regards,
    Devender V

    The default connections are preconfigured for Web Channel applications.
    The actual resource references are made in web.xml
         <!-- security settings for administration area -->
         <resource-ref>
              <res-ref-name>SAP/CRM/b2b</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
         </resource-ref>
         <!--JDO connection factory lookup name, required-->
         <resource-ref>
              <res-ref-name>jdo/defaultPMF</res-ref-name>
              <res-type>javax.resource.cci.ConnectionFactory</res-type>
              <res-auth>Container</res-auth>
         </resource-ref>
    This res-ref-name> is the alias of the JDBC Datasource.
    You can find the JDBC connection / aliases either using Visual Admin or NWA Hope you know how to lausch them. I will explain this in Visual Admin.
    After launching Visual Admin, go to Server -> Services -> JDBC Connector of the Cluster in the navigator panel. After that in the working panel, expand Data Sources in Resources. You will find the default data source SAP<instance>DB . If you select this Data source, the details are shown.
    When you install the J2EE engine, the passwords of the JDBC data source SAP<instance>DB is requested  and stored in the and can be managed using the Config Tool. Here you can change the default user, password, connection-string (URL) and the driver.
    You can create a new alias if you want in the J2EE engine, but you have to diligently integrate it to your web application resource to use it in the application.
    Easwar Ram
    http://www.parxlns.com

  • OAS 10.1 3.1 0 OC4J JDBC Connection/Timeout settings

    I am fairly new to OAS, and am trying to resolve a intermitent issue,
    I have an OAS 10.1.3.1.0 with a deployed EAR file I was provided by a supplier containing mainly PL/SQL based logic, which configured the OAS to ask a middle tier for a an external to pass data to it via Stored Procedure and then usiing the deployed package connect to an external Oracle DB and insert the data.
    Oas is running on a Windows 2003 platform that has no problems or connectivity problems, how ever intermittenlt the OAS stops uploading data to the external Oracle DB. Some custom external logging details this as a communication at the time it occurs, how ever there are no comms issues. A quick restart of the OAS windows service resolves the issue.
    Apart from upgrading OAS to patch set 5, the only other thing I considered could be causing the issue is how OAS is handling the session timeout or connection pool.
    I can see the following settings for the JDBC connection I am using, I wondered if anyone could advise anything that could be changed? I am not sure the implications on setting the validate connection to True and also not sure why maximum number of connections is set to -1?
    Connections
    Initial size of Connection Cache
    Minimum Number of Connections
    Maximum Number of Connections
    Connection Retry Interval (seconds)
    Maximum Connection Attempts
    Maximum Number of Statements Cached
    Lower Threshold Limit On Pool (%)
    Defaults to 20% of max connections.
    Validate Connection FalseTrue
    Timeouts
    Inactivity Timeout (seconds)
    Time that an unused connection is inactive before it is removed from the pool.
    Wait For Used Connection Timeout (seconds)
    Maximum time to wait for a used connection to be released.
    Max Active Time for a Used Connection (seconds)
    Maximum time a used connection may be active.
    Abandoned Connection Timeout (seconds)
    Enforce Timeout Limits Interval (seconds)
    Any help would be appreciated

    Hi,
    Along with Priya's suggestions, please refer the link below for the details on the parameters.
    http://download.oracle.com/docs/cd/B32110_01/web.1013/b28958/datasrc.htm#CHDCFCHB
    Hope this will help understand all the parameters.
    Also refer,
    What Should Be My Maximum Connection Pool Size? [ID 1061155.1]
    http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.html
    Regards,
    Mithun

  • Have a error in jdbc connection

    hi
    this nani have a error in jdbc connection in the jdbc connection to be used type 4 driver an error to be displaied an error was ]java.sql.SQLException: Io exception: The Network Adapter could not establish the connection[u any one to find the solution urgently                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Check u r connection string give the correct host name and username password for the connection string also provide correct DB name to the connection string

  • Establish jdbc connection in WSAD 5.2

    I want to establish jdbc connection in WSAD. I have SQL Server 2000 installed in my system, is it required for me to download the sql drivers to establish the connection or will it be in my system as i have installed sql server 2000.
    can anybody of you guide me on this as to how i should proceed in establishing the database connection for SQL Server 2000 in WSAD.

    Check the access permissions for the username you are using to connect.
    Carol.

  • Errors using weblogic sql driver: "No JDBC connection can be made because the transaction state is marked rollback"

    One of our customers starts to encounter this error message recently.
    We checked our log files. It seems that the error happens when
    to obtain a jdbc connection. Have anyone seen similar problems
    and knows how to fix it? thanks in advance.
    We are using weblogic server 6.1sp2, and weblogic sql type 4 driver.
    The functions that invoke the jdbc calls are stateless session bean
    methods with their transaction attributes marked as Required.
    There is no nested calls of these methods.
    A partial stack trace we obtained is as following:
    java.sql.SQLException: No JDBC connection can be made
    because the transaction state is
    Marked Rollback
         at weblogic.jdbc.jts.Connection.getOrCreateConnection(Connection.java:586)
         at weblogic.jdbc.jts.Connection.prepareStatement(Connection.java:115)
         at weblogic.jdbc.rmi.internal.ConnectionImpl.prepareStatement(ConnectionImpl.java:135)
         at weblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:76)
    lixin

    Joseph Weinstein <[email protected]> wrote:
    >
    >
    YuanHui Liu wrote:
    Joe,
    We got the exact same error message. The error came after we got theJDBC connection,
    and trying to create statement off it.
    It occurs intermitently when we are running another standalone JAVAapp to do
    some end of day work, which results in the DB Server being very busy(90+%CPU
    usage) for about 5 minutes. We see a surge of requests to the WLSJDBC Connection
    pool. This would sometimes result in all our subsequent DB requeststo fail and
    lead to a crash.
    We are using WLS6.0SP1. I do not think there's a 30 seconds wait leadingto a
    connection timeout that caused this(rather it is the end effect).
    Can you give us a more detailed explanation? Is there a miscommunicationbetween
    our DB(Sybase12) and WLS?Hi. It looks to you like it's after you get the connection, but really
    it's when the server is
    gettng the pool connection. For performance/synchronization reasons we
    do a clever
    delay: When your code asks for a pool connection we quickly give you
    the pool wrapper,
    but we delay actually reserving the real underlying DBMS connection until
    your first
    real need for a connection, at your first JDBC call, such as createStatement()
    etc.
    It is while waiting for a pool connection long enough for the transaction
    coordinator
    to have timed you out before you ever get a chance. It's nothing to do
    with the
    DBMS or even JDBC, I believe. I think the weblogic server either has
    too few execute-threads
    and/or too few CPU cycles to do the work load.
    Okay, so there's a lazy initialization of the connection.
    From reading our log I believe our failur is immediate rather
    than waiting for 30+ seconds(the default setting) from the DB,
    the timeout occurred later as a result. At the time either because the DB Server
    is very busy.
    Since we are running WLS6.0 we have only one connection pool,
    we have defined a max of 150 threads in the pool. While this
    is happening the DB Server is being pinned by an overnight job,
    but the WLS Server is not busy at all. The DB and WLS resides
    on different physical boxes.
    We also have a thread dump from the WLS console when we rebooted the server, it
    showed that we are hanging on to the thread & jdbc
    connections after these exceptions has occurred instead of releasing them, note
    "16083"(~4.5 hours) seconds has passed:
    142 116222 Retry rollback request for tx: 'transaction=(IdHash=2963855,Name =
    [EJB UserManagerBeanImpl.signalICUserServletHeartBeat()],Xid=30643:8f3838f3709bf53d,Status=Rolling
    Back. [Reason = Unknown],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since
    begin=16083,seconds left=10,ServerResourceInfo[weblogic.jdbc.jts.Connection]=(state=started,assigned=server),SCInfo[server]=(state=active),properties=({weblogic.jdbc=t3://159.55.158.25:8005,
    weblogic.transaction.name=[EJB UserManagerBeanImpl.signalICUserServletHeartBeat()]}))'
    Scheduled Trigger
    So I would argue this problem actually chewed up resources on the WLS server.
    -Yuanhui Liu
    >>
    >>
    Thanks.
    -YuanHui Liu
    Joseph Weinstein <[email protected]> wrote:
    lixin wrote:
    One of our customers starts to encounter this error message recently.
    We checked our log files. It seems that the error happens when
    to obtain a jdbc connection. Have anyone seen similar problems
    and knows how to fix it? thanks in advance.
    We are using weblogic server 6.1sp2, and weblogic sql type 4 driver.
    The functions that invoke the jdbc calls are stateless session bean
    methods with their transaction attributes marked as Required.
    There is no nested calls of these methods.
    A partial stack trace we obtained is as following:
    java.sql.SQLException: No JDBC connection can be made
    because the transaction state is
    Marked Rollback
    at weblogic.jdbc.jts.Connection.getOrCreateConnection(Connection.java:586)Hi. This sounds like a JVM thread starvation issue, and/or a server
    load
    issue. What is
    happening is that the transaction is started, and times out beforethe
    SSB even gets to
    the first JDBC work. I would first verify that the customer is using
    the very latest JVM
    available for the machine.
    Joe Weinstein
    at weblogic.jdbc.jts.Connection.prepareStatement(Connection.java:115)
    at weblogic.jdbc.rmi.internal.ConnectionImpl.prepareStatement(ConnectionImpl.java:135)
    at weblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:76)
    lixin

  • Ias support for EJB, JSP/servlets,JDBC, connection pooling, XML, SOAP, load balancing etc

    Please let me know where I can find more information regarding iPlanet usage/deployment/configuring/tuning etc for support of technologies - like EJB, JSP/servlets, JDBC, connection pooling, XML, load balancing, JDBC & Transactions
    (I have already read the 'Getting Started with the iPlanet Application Server' part five and six - http://developer.iplanet.com/appserver/testdrive/partfive.jsp and partsix.jsp)(I am using the ias testdrive version).

    Hi,
    It's difficult to explain unless the J2EE architecture is understood. Also, explaining things like load balancing, Transactions, tuning, are bit vague and could blow the disk space of this site.
    To get started, the best way is to test the sample applications and the best part is you don't require internet connection to follow each steps. Install iWS and iAS, open browser, type in http://hostname:port/ias-samples/index.html. You can find links to the sample applications bundled. Please follow the steps given on deploying the application. This will enable you to a higher level.
    Regards
    Ganesh .R
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support

  • Error while creating a report that uses Oracle OCI JDBC connectivity

    Please let me know why my CR and LF characters are removed from my forum posting *****
    Hi,
    I was trying to create a report that uses Oracle OCI JDBC connectivity. I am using Eclipse3.4 download from "cr4e-all-in-one-win_2.0.2.zip".  I have successfully created a JDBC OCI connection.
    The connection parameters are given below:
    URL: jdbc:oracle:oci8:@xe
    Database: xe
    username: <userName>
    password: <password>
    I have tested the above connection in Data source Explorer and it works fine!!!
    But I am getting the following error when I drag-and-drop a table from the list of tables. Not sure what I am missing here?  Any help is highly appreciated.
    com.businessobjects.reports.jdbinterface.common.DBException: InvalidURLOrClassName
         at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Open(Unknown Source)
         at com.crystaldecisions.reports.queryengine.JDBConnectionWrapper.Open(SourceFile:123)
         at com.crystaldecisions.reports.queryengine.Connection.br(SourceFile:1771)
         at com.crystaldecisions.reports.queryengine.Connection.bs(SourceFile:491)
         at com.crystaldecisions.reports.queryengine.Connection.t1(SourceFile:2979)
         at com.crystaldecisions.reports.queryengine.Table.u7(SourceFile:2408)
         at com.crystaldecisions.reports.dataengine.datafoundation.AddDatabaseTableCommand.new(SourceFile:529)
         at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71)
         at com.crystaldecisions.reports.common.Document.a(SourceFile:203)
         at com.businessobjects.reports.sdk.requesthandler.f.a(SourceFile:175)
         at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.byte(SourceFile:1079)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1163)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:657)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:163)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:525)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:523)
         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$3.doWork(ExecutorWithIdleProcessing.java:182)
         at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(AbstractCancellableRunnable.java:69)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityTask.run(PriorityTask.java:75)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.runSubtask(PriorityCompoundCancellableRunnable.java:187)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityProgressAwareRunnable.runSubtask(PriorityProgressAwareRunnable.java:90)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.doWork(PriorityCompoundCancellableRunnable.java:144)
         at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(AbstractCancellableRunnable.java:69)
         at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$IdleTask.run(ExecutorWithIdleProcessing.java:320)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Thanks
    Karthik
    Edited by: KARTHIK1 on Oct 14, 2009 9:38 PM

    Hi Ted,
    Thanks for the feedback. I was able to create a report in Creystal Reports Designer 2008 using OCI.  It is not allowing only in the Eclipse plugin. In our environment we are not allowed to user Oracle thin connections and ONLY OCI is allowed.
    1) Can you please let me know if there is a way to do this? 
    2) Will it allow data sources using native database driver?
    3) If so, can I use JRC to create these reports from a desktop java program?
    Thanks & Regards
    Karthik
    Edited by: KARTHIK1 on Oct 15, 2009 4:38 PM

Maybe you are looking for

  • FCE not recognizing camera

    I have a Sony HDR-HC1. FCE HD will recognize the camera when in down-convert mode but not when in HD mode. Any suggestions?

  • How do i post content to Facebook?

    Need help!

  • Fillable forms disappear in the edit screen

    While working on creating fields in Designer, the window intermittently changes into an "Action Canceled" screen. I am forced to click randomly on this new page to make my original form reappear. This is causing a major hindrance. Any solution?

  • NetBeans 6.1 with IdM v8.0, Build Failed

    Admittedly, I'm a newbie to the NetBeans 6.1 environment, working with Idm 8.0 I installed NB, and created a new IdM project. Then I chose 'Manage Embedded Repository' which let's you choose a directory. Is this a repository of flat files ? I am actu

  • %PLATFORM_ENV-1-PWR_RPS: Redundant power supply faulty or in standby mode

    Hi All, We are getting the below error on our Cisco 3560 Switch and the device is running on the image ":c3560-ipservicesk9-mz.122-55.SE4.bin". 010790: Mar  2 00:19:35 PDT: %PLATFORM_ENV-1-PWR_RPS: Redundant power supply faulty or in standby mode 010