Creating connection factories

          Can I create one connection factory for use by queues AND topics?
          

In BEA WL, you can configure one CF for both purposes and
          cast it to either javax.jms.QueueConnectionFactory or
          javax.jms.TopicConnectionFactory, or use one of the default
          connection factories in the same manner.
          P.S. For a FAQ, and various helpful links, start with
          the JMS technology page on dev2dev:
          http://dev2dev.bea.com/technologies/jms/index.jsp
          P.P.S. The upcoming JMS 1.1 standard provides a javax.jms CF interface
          that works for both topics and queues. See the JMS Programmer's
          guide introduction for info.
          Eric Kaplan wrote:
          > Can I create one connection factory for use by queues AND topics?
          

Similar Messages

  • Creating multiple connection factories from deployed RAR

    Hi
              I'm using WL Server V8.1 sp4 and have successfully deployed my Connector
              Module (RAR) using the Builder tool.
              Within the Builder I can specify default connection properties in the
              deployment descriptor. What I want though is the ability to define
              multiple connection factories with different properties without having
              to deploy/redeploy the RAR for every different connection configuration.
              I can't believe there is a 1-to-1 mapping between the RAR and connection
              factory settings. I've seen that there's a <ra-link-ref> tag available
              in the weblogic-ra.xml but I can't see how to use this?
              Any advice on how to get this working would be greatly appreciated.
              Cheers
              Chris
              

    Hi
              I've had some success but am still confused by the way WLS requires
              second and subsequent connection factories to be created.
              It appears you create a CF within the weblogic-ra.xml deployment
              descriptor using the <map-config-property> tags. All other properties
              are inherited from the settings within ra.xml (we have them set blank).
              If there is no weblogic-ra.xml then a default is created at RAR deploy
              time. We can modify settings and redeploy the resource adapter using the
              supplied Builder tool. There appears to be a limit on what is possible
              with this tool to create CF instances though. It doesn?t seem possible
              to enter config properties here to appear within the weblogic-ra.xml.
              There are fields to allow entry of the CF name and the RA link reference
              though. (This seems strange that it doesn?t provide full flexibility).
              In order to create a CF a certain amount of manual work is required. You
              need to hand modify the weblogic-ra.xml to specify the connection
              properties you want. Then the file has to be added to RAR file for
              deployment using the jar command.
              A second or subsequent CF must also be prepared in a similar way ? the
              properties are defined in weblogic-ra.xml but this time there is no need
              to redeploy a complete RAR file. We can link to the defaults and classes
              provided in the original deployment. This is done using the
              <ra-link-ref> and specifying the connection-factory-name of the original
              RAR. This new RAR only needs ra.xml and weblogic-ra.xml to deploy so we
              can remove any jar files containing code. However, this cannot be done,
              it seems, from the Builder tool.
              I am concerned it seem to be a lot of manual work and, in particular,
              editing of the rar files we provide to our customers. Does anyone know
              of a better way of achieving multiple CF instances without going through
              this process?
              Regards
              Chris
              ChrisWalker wrote:
              > Hi
              >
              > I'm using WL Server V8.1 sp4 and have successfully deployed my Connector
              > Module (RAR) using the Builder tool.
              > Within the Builder I can specify default connection properties in the
              > deployment descriptor. What I want though is the ability to define
              > multiple connection factories with different properties without having
              > to deploy/redeploy the RAR for every different connection configuration.
              >
              > I can't believe there is a 1-to-1 mapping between the RAR and connection
              > factory settings. I've seen that there's a <ra-link-ref> tag available
              > in the weblogic-ra.xml but I can't see how to use this?
              >
              > Any advice on how to get this working would be greatly appreciated.
              >
              > Cheers
              > Chris
              

  • Setting up LDAP Server to lookup Connection Factories using JNDI

    Can someone let me know how to setup LDAP server within 10G to lookup connection factories using JNDI?
    I read through the Advanced Queuing User Guide and Reference document where this is mentioned and it says use the Database Configuration Assistant to do this but I could not find how.
    When I install 10G is LDAP server automatically setup? How do I get to it?
    Thanks

    That is correct. I was indeed able to use the app server (10g) to give the LDAP user permission to access the objects, then used sql commands to register the objects inside the LDAP.
    However, I am finding NOTHING about actually creating a unique connection factory that can be registered in the LDAP. I find reference to registering Queues/Topics/Factories inside the LDAP, but nothing about actually creating the factories.
    In fact, here
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28420/aq_envir.htm#sthref409
    it's listed that you cannot use sql to create a connectionfactory... not to mention the create java commands for factories look strikingly similar to the queue/topic GET commands, and not the create commands. You can add an alias for that factory using sql, but can't actually create the factory using sql... ???

  • Connection factories in clusters - Help asap!!

    Hi All,
    I have a clusterd envrionment with an admin server ,4 managed servers. the admin and managed server being on different machines. The DB Adapter has been deployed on all the servers available. Now , I created a connection factory , gave the datasorce name and updated the DBAdapter. . I have also copied the Plan.xml file to all the managed server domains.
    My problem is : Am able to see all the connection factories in the admin console, and they are avalilable in all the servers in the cluster. When i try to deploy an OSB project to one of the managed servers, am facing the following issue.
    " +[JCATransport:381987]An error occured while validating JCA transport endpoint. JNDI lookup with URL: jca://eis/DB/GetAddressListConnection failed. Missing JNDI configuration such as undeployed or misconfigured JCA Adapter RAR or connection factory.+ "
    Thanks in advance
    Ramya
    Edited by: Ramya on Mar 18, 2011 11:30 PM

    Check the JNDI tree of particular server where connection factory is not visible. Make sure that DB Adapter is targeted properly to all the managed servers. Try to bounce the adapter or server itself.
    Regards,
    Anuj

  • Connection Factories in a Cluster

    Hi Folks,
              I'm trying to get to grips with the precise behavior of connection factories
              (CF) in a cluster. Any corrections/additions appreciated...(I've read the
              perf. guide).
              According to the docs, you should look at two scenarios
              a) JMS app located on same server as cluster.
              Imagine I have a JMS app deployed to the cluster, and docs say I should
              deploy CF to cluster as well.
              I have JMS server only on one server in the cluster.
              Here is what I think happens:
              i. As far as I know, connection factories will only load balance
              connections across servers hosting connection factories.
              ii. When the app looks up a CF using the JNDI of the cluster, will it
              always get the a CF collocated
              with the app (ie. on same server), because of collocation optimization?
              iii. When the app uses this CF to create a Connection, will the CF load
              balance the connection?
              ie. Will I get a different connection (round robin) every time I
              create a connection?
              If this does happen, then presumably my JMS application will route
              all JMS traffic through this connection to this other
              server, which may not even host a JMS server, which in turn has to
              route to the JMS server.
              iv. If the CF was looked up using the local JNDI context, then the
              local CF will be returned and presumably if
              I create a connection then a local connection will be returned. ie.
              no load balancing. The JMS application will
              use the "local" connection which will in turn route to the
              appropriate server hosting the JMS server..
              b) Where the JMS client is external
              When I have an external JMS client, the docs say you should deploy the CF
              only to those servers hosting the JMS servers.
              i) The docs say that the CF (new InitialContext("t3://clusteraddres"))
              will load balance across the servers in the cluster.
              ii) The docs also say that createConnection (on the CF) will load balance
              too.
              iii) This means that there are two servers involved right? The CF host
              (the server hosting the CF), and the C host (the
              server hosting the C). Does this mean I have two connections from
              teh client (one to each server), or does traffic
              flow from client to CF host to C host?
              The docs certainly imply that you get these two load balancing
              operations, which seems to lead to one of these
              scenarios.
              iii) Presumably, if my client creates multiple connections (one after the
              other) using the same connection factory,
              then it may at one time have a connection going to "ServerA", and at
              another time one going to "ServerB" (unless
              of course I have affinity enabled).
              Any guidance appreciated,
              Regards,
              Jon
              

              Jon Mountjoy wrote:
              > Hi Tom,
              >
              > I have inlined some comments on your comments!
              >
              >
              >>>a) JMS app located on same server as cluster.
              >>> Imagine I have a JMS app deployed to the cluster, and docs say I
              >
              > should
              >
              >>>deploy CF to cluster as well.
              >>> I have JMS server only on one server in the cluster.
              >>>
              >>> Here is what I think happens:
              >>> i. As far as I know, connection factories will only load balance
              >>>connections across servers hosting connection factories.
              >>
              >>Yes.
              >>
              >>> ii. When the app looks up a CF using the JNDI of the cluster, will
              >
              > it
              >
              >>>always get the a CF collocated
              >>> with the app (ie. on same server), because of collocation
              >
              > optimization?
              >
              >>Yes.
              >>
              >>> iii. When the app uses this CF to create a Connection, will the CF
              >
              > load
              >
              >>>balance the connection?
              >>
              >>Not if it is collocated.
              >
              >
              > I guess this confuses me a little. My scenario above speaks about the
              > CF+App deployed to a cluster.
              >
              > Are you talking about if the CF+App is collocated with the JMS server whose
              > destination the App is communicating with?
              No.
              > (I'd guess not, cos I wouldn't
              > know the destination until after I create the connection?).
              If the app is co-located with the the CF, the connection
              is always local.
              >
              >
              >>(Note that a producer to a distributed destination,
              >>by default produces to the local physical instance,
              >>and will not round-robin each message to other
              >>physical destination instances, unless the
              >>connection factory is so configured.)
              >>
              >>
              >>> ie. Will I get a different connection (round robin) every time I
              >>>create a connection?
              >>> If this does happen, then presumably my JMS application will
              >
              > route
              >
              >>>all JMS traffic through this connection to this other
              >>> server, which may not even host a JMS server, which in turn has
              >
              > to
              >
              >>>route to the JMS server.
              >>> iv. If the CF was looked up using the local JNDI context, then the
              >>>local CF will be returned and presumably if
              >>> I create a connection then a local connection will be returned.
              >
              > ie.
              >
              >>>no load balancing. The JMS application will
              >>> use the "local" connection which will in turn route to the
              >>>appropriate server hosting the JMS server..
              >>
              >>Yes.
              >>
              >>
              >>>b) Where the JMS client is external
              >
              >
              >
              >>> iii) This means that there are two servers involved right? The CF host
              >>>(the server hosting the CF), and the C host (the
              >>> server hosting the C). Does this mean I have two connections
              >
              > from
              >
              >>>teh client (one to each server),
              Yes. But not for the reason you think.
              The JNDI context that was used to look up
              the CF keeps its connection, and the JMS
              connection generated from the CF.
              >>> or does traffic
              >>> flow from client to CF host to C host?
              Yes.
              >>> The docs certainly imply that you get these two load balancing
              >>>operations, which seems to lead to one of these
              >>> scenarios.
              >
              >
              > Can you perhaps shed some light on the above question?
              >
              >
              >>>Any guidance appreciated,
              >
              >
              >>Just send a portion of your book royalties. ;-)
              >
              >
              > Hehe. Do you think I'd actually make a profit!? What you will earn, is my
              > eternal gratitude of course :)
              >
              > Regards,
              > Jon
              >
              >
              

  • Problem with EJB and JMS - Failed to obtain/create connection

    hello ejb and jms programmers,
    My problem is my topic MDB keep on retrieving the same message when there is a database connection failure. Maybe somebody could help me how to prevent to retrieve the same data?
    Given:
    - I purposedly turn off the pointbase database because im testing my error handling.
    - Im using SJSAS 8 as my application server.
    - My message Driven Bean of topic type.
    - Im using CMP for my entity bean
    Here is the scenario of whats happening - step by step:
    1. A separate application publishes a message to JMS queue server
    2. My MDB retrieves this message and do some processing then inserts a record (transaction history) in my database
    3. But my db is turned off or down
    4. My MDB sends a successful processing reply to the JMS queue server
    5. Then i noticed that my server.log keeps on growing so when i opened it, the record was not inserted and printed the stacktrace below "RAR5117 : Failed to obtain/create connection. Reason : javax.transaction.SystemException" (complete stacktrace below)
    6. I understand the cause of the stacktrace is because the DB is turned off. But what i dont understand is that my MDB keeps on reading the same message. Since my MDB is of topic type, isnt a topic MDB supposedly reads a message only once???
    So my questions are:
    1. how do i handle insert database error?
    2. how can i stop my MDB from processing the same message?
    3. any better suggestions?
    Thank you in advance :)
    leigh
    *** more complete stack trace ***
    [#|2005-01-09T15:35:57.097+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.transaction|_ThreadID=17;|JTS5041: The resource manager is doing work outside a global transaction
    javax.transaction.xa.XAException
         at com.pointbase.xa.xaException.getXAException(Unknown Source)
         at com.pointbase.xa.xaConnectionResource.start(Unknown Source)
         at com.sun.gjc.spi.XAResourceImpl.start(XAResourceImpl.java:162)
    [#|2005-01-09T15:35:57.167+0800|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5027:Unexpected exception in resource pooling
    javax.transaction.SystemException
         at com.sun.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:185)
         at com.sun.enterprise.distributedtx.J2EETransaction.enlistResource(J2EETransaction.java:360)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.enlistResource(J2EETransactionManagerImpl.java:303)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.enlistResource(J2EETransactionManagerOpt.java:115)
    [#|2005-01-09T15:35:57.177+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5117 : Failed to obtain/create connection. Reason : javax.transaction.SystemException|#]
    [#|2005-01-09T15:35:57.227+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: javax.transaction.SystemException]|#]
    [#|2005-01-09T15:35:57.237+0800|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.ejb|_ThreadID=17;|EJB5071: Some remote or transactional roll back exception occurred
    com.sun.jdo.api.persistence.support.JDODataStoreException: JDO77006: SQL exception: state = null, error code = 0.
    NestedException: java.sql.SQLException: Error in allocating a connection. Cause: javax.transaction.SystemException
    FailedObjectArray: [[email protected]5ac]
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.getConnectionInternal(TransactionImpl.java:1444)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.getConnection(TransactionImpl.java:1339)

    Hi annie,
    Wherever you are handling database transactions,
    you'd not be able to create a Connection if database
    is closed (I think you mentioned turning off the
    database) then at this condition, you should
    certainly throw a System level exception and stop all
    processing with some meaningful flow to indicate a
    failure (like display message on UI). Even
    network problems are handled by exceptions... so I
    don't see a reason why you didn't wrap it in the
    first place.
    Anyway, try handling specific exceptions rather than
    the general Exception... this will give you a better
    idea of what to do in case of an exception.Yes i know this. I am practicing this in my non-j2ee server applications. But the j2ee app im making, i just pass the db url in the descriptor and the app server automatically creates the connection for my app. So where would i put exception handling?
    2. how can i stop my MDB from processing the same
    message?Guaranteed delivery is not supposed to stop
    processing. It will continue to process the message
    after certain intervals till the message is
    delivered. You shouldn't deliver it at all, if you
    are able to detect that the database is off
    The problem here is that my MDB automatically retrieves the message from the JMS queue server. Im not the one retrieving the messages manually.
    My assumed behavior of topic MDB is once the a certain MDB retrieves a message it will not retrieve the same message anymore.
    thank you in advance.
    leigh

  • Data Quality - Failed to create connection to MDR.

    Hi All,
    I have installed Data Quality 11.7.2 on windows 2003 server using SQL 2005 (Both SQL 2005 server and Data Quality are in the same server) , The install was successful. But when I try to Open 'Data Quality Project Architect' it throws an error
    Failed to create connection to MDR.
    Driver error messgage = qodbc_mssql:
    Unable to connect, Database error message =] [microsoft][odbc sql server driver]
    [ tcp/ip sockets] sql server does not exist or access denied
    I checked the ODBC connection and tested it successfully too.
    I am not able to pass through the 'Meta Data Repository Connection' as its failing in 'Setup SQL connection option'
    Any help is appreciated !!!
    Thanks
    Ranjit Krishnan

    Hi Paul,
    Thanks for you reply, OBDC connection was created under System DSN, also tired the users DSN option too, but did not work.
    Recreated the ODBC connection many times still no luck.
    The 'Project Architect' client and the MDR (SQL 2005 Server) are on the same machine.
    Thanks
    Ranjit Krishnan

  • How dynamically create connection pool and Datasource

    Hi
    How I can dynamically create a connection pool and Data source in Oracle 10g Application server. In our J2EE application the user will be login with db user name, password and database name. I want to create connection pool and data source on the fly while login the user with database name. I our application we have access approximate 80 Databases. so my approach is given bellow
    1) Planning to create 80 connection pools and 80 Data sources so when user logs in while selecting the db name i will call the appropriate data source and create the DB connection. Is there any limitation to create number of data sources in oracle app server?
    2) Create DB connection with out using connection pool and data source. But i am not prefer this approach coz we need to handle some transaction in our application.
    Kindly throw some light on managing connection pool programmatically or in application run time.
    I would really appreciate if any one can provide any links or any inormation on this issue.
    Thanks in advance.

    Kindly let me know is there any drawbacks to create 80 Data Sources to connect 80 database in Oracle 10G App server and each data sources should have one connection pool. so i need to create 80 connection pool. Please let me know is this right approach or any work around to create Data source on fly for each request for corresponding database.

  • Not able to create connection or reset the password in Discoverer Plus

    I keep encountering errors when
    I try to create a connection or change my password. Below are the error I get.
    During Change of Password:
    "An invalid connection key was specified. Please correct the connection
    key and try again."
    During Creating Connection :
    " A connection error has occurred.
    - The application encountered an invalid state."
    I am currently using Discoverer 10g Plus.

    Hi All,
    I got the Solution.Its is to do with the 'Default_role' setup in 'DBA_ROLE_PRIV' table.the user should be setup up as 'DEFAULT_ROLE' = 'YES' in the mentioned table.
    Thanks,
    HP

  • Error in creating connection object

    Dear Experts
    When I am creating connection object using ES55 , I get Stop message saying : " Alternate ID not supported" and when i see Help it indicates : An alternative indicator is active in Customizing of the functional location. This functionality is not supported for connection objects and device locations
    what could be going wrong
    Plesae suggest me the solution
    Thanking you in advance
    warm regards
    narasimha

    Hi,
    Please check the following settings in SPRO:
    Plant Maintenance & Customer Service - -Master Data in Plant Maintenance & Customer Service --Technical Objects --Functional Locations --Alternate Labeling of Functional Locations - - Activate Alternative Labeling --
    In this setting pls inactive the setting for Alt.Label.Then go to ES55 and try.It will work.
    Thanks,
    Banasri Mitra

  • Failed to obtain/create connection from connection pool after redeploy

    I have a web application (.war) that uses a jdbc connection pool. The application works fine, however after I redeploy it using the administration console I get "Failed to obtain/create connection from connection pool [ Datavision_Pool ]. Reason : null" followed by "Error allocating connection : [Error in allocating a connection. Cause: null]" from javax.enterprise.resource.resourceadapter and I am forced to restart the instance. I am running Sun Java System Application Server 9.1 (build b58g-fcs)
    using a connection pool to a Microsoft SQL 2000 database using inet software's JDBC drivers. I need to be able to redeploy applications without having to restart the instance. Any help is appreciated.

    I have turned on some additional diagnostics and found out some answers and a work-around, but I think that there may be a bug in the way JDBC connection pool classes are loaded. The actual error was a null pointer in the JDBC driver class in the perpareStatement method. The only line in this method is "return factory.createPreparedStatement( this , sql );" and the only possible NPE would be if the factory was null, which should be impossible because it is a static variable and it is initialized when the class is loaded. The problem occurs because we deploy the JDBC driver .jar file within our .war file, for use when a client doesn't have or want to use connection pooling. Apparently, the connection pool must have picked up some of these classes and when the .war was redeployed, the reference to the factory was lost for existing connections (not sure how). If I remove the JDBC .jar file from the .war, it works, but that wasn't an ideal solution, the other way to get it to work was to change the sun-web.xml file to have <class-loader delegate="true">. We previously had it set to false in version 8.1 because of interference with a different version of the apache Tiles classes, which has now been addressed in version 9.1.
    I still think there is an issue, because the connection pool should never use the application specific classloaders. Am I wrong to believe this?

  • Error Message while creating connection pool

    Hi all,
    I got the following error message while creating connection pool for the
    SQL Server thru the Application Server Admin Console.
    The message is,
    An error has occured.
    Operation 'create.Jdbc.ConnectionPool' failed in 'resources' Config Mbean. Target exception message :
    JdbcConnectionPool Already Exists: cannot add duplicate.
    But the connection pool for the SQL Server was not there in the list.
    What may be the possible reason for this error.
    i was trying to deploy a BMP entiy bean using the Sun Application Server.
    Prior deploying i just tried to create connection pool and test the connection using the Admin Console
    Please help me by providing a solution.

    Kriti Sundar Mazumder wrote:
    Hi
    I am getting an following error message, while creating database connection pool
    in weblogic 7.
    "<Jun 18, 2004 4:52:36 AM CDT> <Error> <JDBC> <001060> <Cannot startup connection
    pool "MyJDBCConnectionPool" java.sql.SQLException: [IBM][JDBC Driver] CLI0647E
    Error allocating DB2 environment handle, rc=-1.>"
    Can anyone help me out in this regard
    Regards
    KritiHi. I am no expert, but it sounds like a problem with the privileges the user
    has... The best thing is to step back to a simpler environment. Can you try
    connecting to DB2 with a simple program like utils.dbping? Please look at our
    driver docs for the DB2 driver, because there are several variations in connect
    properties depending on the type of DB2 you are connecting to...
    Joe

  • Issue while creating connection pool in weblogic using SERVICE NAME

    Found two issues while creating connection pool in weblogic using SERVICE NAME
    1. While running apps from jdeveloper using xxx-jdbc.xml
    weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: Io exception: The Network Adapter could not establish the connection
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:253)
         at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1109)
         at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1033)
         at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:214)
         at weblogic.jdbc.common.internal.ConnectionPool.doStart(ConnectionPool.java:1051)
    2. Configuriing the jndi in Weblogic server
    weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:SERVICENAME
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:253)
         at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1109)
         at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1033)
    Problem
    database url is generated based on SID
    eg: jdbc:oracle:thin:@localhost:1521:SID
    Solution
    (generate seperate url for SERVICE NAME)
    jdbc:oracle:thin:@localhost:1521/SERVICENAME
    ------------------------

    It is so clear: host not found error for network connection and the other SID servcie name not found means your oracle instance name is not up. check with srvctl status for given servcie name or node, else check CRS_Stat -t if you are using RAC.

  • Unable to Create Connection ( Connection error DA0005) in DESKI 3 TIER

    Hi ,
    I have strange error of connection in DESKI 3 Tier.
    Work Flow:
    => Wanted to create a deski report in Three Tier( from Infoview) using specific universe.
    => When I ran query it gives me error saying Connection error DA0005( Unable to create connection)
    Work around did
    => Created Webi report using same univerese reprort ran fine.
    The connection is there  on enterprise I don't know whats going wrong.
    Can any one help me with this error
    Neo.

    Hi Experts ,
    Any suggestions on this  please
    Environment : BOXI 3.1 SP3 , OS: AIX , APPS: WAS7, DB Trying to connect is DB2

  • Problem with creating Connection pool and JNDI, driver is not detected

    Hi,
    I have an issue with creating Connection Pool and JNDI.
    I'm using:
    - JDK 1.6
    - OS: Linux(ubuntu 8.10)
    - Netbeans IDE 6.5.1
    - Java EE 5.0
    - Apache Tomcat 6.0.18 Its lib directory contains all necessary jar files for Oracle database driver
    - Oracle 11g Enterprise
    My problem is that the Oracle database driver is not detected when I want to create a pool (it works pretty well and is detected without any problem when I create ordinary connection by DriverManager)
    Therefore after running:
    InitialContext ic = new InitialContext();
    Context context = (Context)ic.lookup("java:comp/env");
    DataSource dataSource = (DataSource)context.lookup("jdbc/oracle11g");
    Connection connection = dataSource.getConnection();and right after dataSource.getConnection() I have the following exception:
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.OracleDriver'
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1136)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at servlets.Servlet1.doPost(Servlet1.java:47)
    at servlets.Servlet1.doGet(Servlet1.java:29)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:169)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1130)
    ... 17 more
    My application context file (context.xml) is:
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/WebApplication3">
      <Resource auth="Container"
                      driverClassName="oracle.jdbc.OracleDriver"
                      maxActive="8"
                      maxIdle="4"
                      name="jdbc/oracle11g"
                      username="scott"
                      password="tiger"
                      type="javax.sql.DataSource"
                      url="jdbc:oracle:thin:@localhost:1521:database01" />
    </Context>and my web.xml is:
        <resource-ref>
            <description>Oracle Datasource example</description>
            <res-ref-name>jdbc/oracle11g</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
        </resource-ref>
    ...I found similar threads in different forums including sun, such as
    http://forums.sun.com/thread.jspa?threadID=567630&start=0&tstart=0
    http://forums.sun.com/thread.jspa?threadID=639243&tstart=0
    http://forums.sun.com/thread.jspa?threadID=5312178&tstart=0
    , but no solution.
    As many suggest, I also tried to put context directly in the server.xml (instead of my application context) and referencing it by <ResourceLink /> inside my application context but it didn't work and instead it gave me the following message:
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '   ' for connect URL 'null'
    Has anyone succeeded in creating a connection pool with JNDI by using Tomcat 6 or higher ? If yes, could kindly explain about the applied method.
    Regards,

    Hello again,
    Finally I managed to run my application also with Tomcat 6.0.18. There was only two lines that had to be modified
    in the context.xml file (the context of my application project and not server's)
    Instead of writing
    <Context antiJARLocking="true" path="/WebApplication2">
        type="javax.sql.DataSource"
        factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
    </Context>we had to write:
    <Context antiJARLocking="true" path="/WebApplication2">
        type="oracle.jdbc.pool.OracleDataSource"
        factory="oracle.jdbc.pool.OracleDataSourceFactory"
    </Context>- No modification was needed to be done at server level (niether server.xml nor server context.xml)
    - I just added the ojdbc6.jar in $CATALINA_HOME/lib (I didn't even need to add it in WEB-INF/lib of my project)
    - The servlet used to do the test was the same that I presented in my precedent post.
    For those who have encountered my problem and are interested in the format of the web.xml and context.xml
    with Tomcat 6.0, you can find them below:
    Oracle server: Oracle 11g Enterprise
    Tomcat server version: 6.0.18
    Oracle driver: ojdbc.jar
    IDE: Netbeans 6.5.1
    The context.xml file of the web application
    <?xml version="1.0" encoding="UTF-8"?>
    <Context antiJARLocking="true" path="/WebApplication2">
        <Resource name="jdbc/oracle11g"
                  type="oracle.jdbc.pool.OracleDataSource"
                  factory="oracle.jdbc.pool.OracleDataSourceFactory"
                  url="jdbc:oracle:thin:@localhost:1521:database01"
                  driverClassName="oracle.jdbc.OracleDriver"
                  userName="scott"
                  password="tiger"
                  auth="Container"
                  maxActive="100"
                  maxIdle="30"
                  maxWait="10000"
                  logAbandoned="true"
                  removeAbandoned="true"
                  removeAbandonedTimeout="60" />
    </Context>The web.xml of my web application
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <resource-ref>
            <description>Oracle Database 11g DataSource</description>
            <res-type>oracle.jdbc.pool.OracleDataSource</res-type>
            <res-auth>Container</res-auth>
            <res-ref-name>jdbc/oracle11g</res-ref-name>
        </resource-ref>
        <servlet>
            <servlet-name>Servlet1</servlet-name>
            <servlet-class>servlets.Servlet1</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>Servlet1</servlet-name>
            <url-pattern>/Servlet1</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
    </web-app>Ok, now I'm happy as the original problem is completely solved
    Regards

Maybe you are looking for