Connection Pooling in Data Source

Hello,
I have defined a data source in JDeveloper using
class :oracle.jdbc.pool.OracleConnectionPoolDataSource
In my java bean I am using the code pasted below to make a connection to database.
Can some one tell whether I am using the correct method of connection pooling mechanism or do I need to make some changes? This application uses JSP and used by lots of people which hits database very frequently.
Any help is highly appreciable.
Thanks in advance.
*******Code to make connection*********
private javax.naming.InitialContext context = null;
private javax.sql.DataSource jdbcURL = null;
private static final String url = "jdbc/ProdCoreDS";
public boolean openConnection()
try
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
context = new javax.naming.InitialContext();
jdbcURL = (javax.sql.DataSource)context.lookup(url);
con =  jdbcURL.getConnection();
return true;
  catch(Exception e)
       System.out.println("Error in the Connection  "+e);
    e.printStackTrace();
             return false;
  }

I have read the documentation.
I changed my class to oracle.jdbc.pool.OracleConnectionCacheImpl from
oracle.jdbc.pool.OracleConnectionPoolDataSource
I observed in the EM that the Open JDBC Connections and Total JDBC Connections are the same. When I used oracle.jdbc.pool.OracleConnectionPoolDataSource my Total JDBC Connections was increasing and Open JDBC Connections remains 0.
My question still remains unanswered, could some kindly help.
Q? I have defined a data source in JDeveloper using
oracle.jdbc.pool.OracleConnectionCacheImpl
In my java bean I am using the code pasted below to make a connection to database.
Can some one tell whether I am using the correct method of connection pooling mechanism or do I need to make some changes? This application uses JSP and used by lots of people which hits database very frequently.
Any help is highly appreciable.
Thanks in advance.
*******Code to make connection*********
private javax.naming.InitialContext context = null;
private javax.sql.DataSource jdbcURL = null;
private static final String url = "jdbc/ProdCoreDS";
public boolean openConnection()
try
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
context = new javax.naming.InitialContext();
jdbcURL = (javax.sql.DataSource)context.lookup(url);
con =  jdbcURL.getConnection();
return true;
  catch(Exception e)
       System.out.println("Error in the Connection  "+e);
    e.printStackTrace();
             return false;
     }}

Similar Messages

  • Creation of connection pools and data sources

    Hi,
    is there a possibility to create jdbc connection pools and data sources not manually, with a script or a mbean?
    That would be helpfull, because at the moment every developper has to do that for himself (because of the individuals generated passwords).
    Thanxs

    The weblogic.management.configuration.JDBCDataSourceMBean
    defines a non-transactional JDBC data source.
    http://e-docs.bea.com/wls/docs90/javadocs_mhome/weblogic/management/configuration/JDBCDataSourceMBean.html
    The JDBCConnectionPoolMBean defines a JDBC connection pool.
    http://e-docs.bea.com/wls/docs90/javadocs_mhome/weblogic/management/configuration/JDBCConnectionPoolMBean.html

  • Some doubts in using resource-ref,connection pool n Data-source

    Hi all ,
    I need little bit clarification in the following points.
    1) Does the connection pool which is created can be displayed in JNDI Tree???
    I am seeing only DataSOurce in the JNDI Tree Only.
    2)In case of Bean Managed Persistance, in ejb-jar.xml,
    I had given the following info.
    <resource-ref>
             <res-ref-name>ramukkDataSource</res-ref-name>
             <res-type>javax.sql.DataSource</res-type>
             <res-auth>Container</res-auth>
         </resource-ref>Does the <res-ref-name> refers to Datasource Name??
    In weblogic-ejb-jar.xml
    <reference-descriptor>
           <resource-description>
              <res-ref-name>ramukkDataSource</res-ref-name>
              <jndi-name>ramukkpool</jndi-name>
           </resource-description>
         </reference-descriptor>Here <jndi-name> refers to connection pool as per weblogic bible book.
    If so when i deployed my ejb into the server iam getting Datasource cant be found.
    If i had given like the following,
    In ejb-jar.xml
    <resource-ref>
              <res-ref-name>jdbc/ramuJndi</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
         </resource-ref> In weblogic-ejb-jar.xml
         <reference-descriptor>
              <resource-description>
               <res-ref-name>jdbc/ramuJndi</res-ref-name>
               <jndi-name>jdbc/ramuJndi</jndi-name>
           </resource-description>
        </reference-descriptor>Then only my ejb code is successfully deploying doing some work which is as per xpectation.
    Can any body tell why I have to give the same name for <res-ref-name> n <jndi-name>??
    I am working on this problem from last one week. Still not found the solution.
    Connection Pool Creation
    GENERAL::
    Name : ramukkpool
    url : jdbc:mysql://localhost:3306/test
    Driver Classname: com.mysql.jdbc.Driver
    Properties :
    user = root
    Password = XXX
    create
    TARGETS::
    i had shifted myServer from left side to right side n clicked >>Apply
    (Techncially can we say this as deploying the connection pool into server ???????????
    If not how to deploy the connection pool into server??)
    I did not get any errors in the console.
    Now i am creating a datasource
    CONFIGURATION:
    Name : ramukkDataSource
    JNDIName: jdbc/ramuJndi(Does we have to follow this convention only?? i.e JNDIName should start with jdbc/ only)
    PoolName: ramukkpool
    create
    TARGETS::
    I had shifed myServer from left to right n >>Apply.
    Now also i did not get any errors in the console.Thanx(in advance),
    ramu

    I have read the documentation.
    I changed my class to oracle.jdbc.pool.OracleConnectionCacheImpl from
    oracle.jdbc.pool.OracleConnectionPoolDataSource
    I observed in the EM that the Open JDBC Connections and Total JDBC Connections are the same. When I used oracle.jdbc.pool.OracleConnectionPoolDataSource my Total JDBC Connections was increasing and Open JDBC Connections remains 0.
    My question still remains unanswered, could some kindly help.
    Q? I have defined a data source in JDeveloper using
    oracle.jdbc.pool.OracleConnectionCacheImpl
    In my java bean I am using the code pasted below to make a connection to database.
    Can some one tell whether I am using the correct method of connection pooling mechanism or do I need to make some changes? This application uses JSP and used by lots of people which hits database very frequently.
    Any help is highly appreciable.
    Thanks in advance.
    *******Code to make connection*********
    private javax.naming.InitialContext context = null;
    private javax.sql.DataSource jdbcURL = null;
    private static final String url = "jdbc/ProdCoreDS";
    public boolean openConnection()
    try
        DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    context = new javax.naming.InitialContext();
    jdbcURL = (javax.sql.DataSource)context.lookup(url);
    con =  jdbcURL.getConnection();
    return true;
      catch(Exception e)
           System.out.println("Error in the Connection  "+e);
        e.printStackTrace();
                 return false;
         }}

  • Not getting connected to a data source in obiee 11g

    Hi friends,
    In OBIEE 11g I cannot able to import meta data into a new repository...
    It is not connecting to data source for importing meta data
    It throws the error like connection is failed....
    I have also restarted the services and also checked for the odbc connectivity it is showing connection is
    successful..
    I also entered the corresponding details in TNS notepad...
    These are the following details
    TEST =
    (DESCRIPTION =
    (ADDRESS =
    (PROTOCOL = TCP)
    (HOST = 172.16.1.110)
    (PORT = 1522)
    (CONNECT_DATA =
    (SID = TEST)
    The data source name that i was given is ORCLBI for my reference...
    Then why it is not getting connecting to the data source..Help me friends For importing tables to my repository as soon as it is connected to the data source...
    Thanks
    Harry...

    Hi,
    Go through venkat reply in this...May help you..Re: Cannot connect to Database from the OBIEE 11g upgraded RPD
    Regards,
    Srikanth

  • How to connect to different data sources in  XI 3.1 UNIVERSE?

    hi experts,
    We are going to migrate from BO 6.5 to  BO XI3.1.
    and we have different data sources to extract and generate the reports using various tools like Webi,Crystal Reports, Deski etc.
    1         How to connect to different data sources like SAP BI query, DB2, Oracle etc,, provide me the step by step solution.
    2     We need to migrate the universes and reports from BO 6.5 to BO XI 3.1 using the Report Conversion Tool.
    can we directly convert from the deski reports to Webi or do we need to migrate first through Import Wizard?
    3    Scheduling the Reports through Infoview
    4    Various issues and how to resolve those issues, we generally face while scheduling, and while creating the queries like for example time out errors etc..
    5    BO Security
    6    Universe creation with best practices and the loops,contexts,aliases etc..
    please provide me the step by step solution documents and links.
    thans in advance
    venuscm

    I would recommend to take a look at the official documentation. YOu can find this here
    http://help.sap.com
    NAvugate to SAP BusinessObjects->All products and the select the product you want eg. BusinessObjects ENterprise or Universe designer and the appropriate version XI 3.1. Take a look at the admin and the user guides.
    Currently the Data FEderator will allow you to buid a universe that access data from various data sources. Another option is to merge queries from different universes at report level.
    Regards,
    Stratos

  • Exception Message: The form cannot connect to the data source. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

    When opening a form in SharePoint 12013 that was created from Infopath 2013, I get the following error.
    You do not have permissions to access a database that contains data required for this form to function correctly.
    An entry has been added to the Windows event log of the server.
    Log ID:5566
    When I go to the log files on the SharePoint server. I see the following error.
    Exception Message: The form cannot connect to the data source. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'
    I am guessing this has something to do with the UDCX connection and the database.
    Can anyone help me get this fixed?

    Hi Jim,
    Please check the following kb article when it occurs 5566errro with the UDCX conection file, try the method of using the Secure Store Service to store alternate credentials for the data connection method, or the method of stating the credentials
    in the UDC file explicitly.
    Also check if it could help with setting sql server as "SQL Server and Windows Authentication mode".
    http://support.microsoft.com/kb/981684
    Thanks
    Daniel Yang
    TechNet Community Support

  • Not able to connect to Oracle Data source in Oracle Essbase Studio 11.1.2.2

    Hi,
    When i tried to connect to Oracle data source, i get this error "Unable to establigh connection. Ensure that the server is running, the user name and password are correct, and the ohter data fields match the server's configuration" when i tried to select database.
    If i change server name from to localhost, it allows to select database and does not give any error. but clicking on next button says localhost is not accepted, it needs machine name. Then how to connect to Oracle Data source?
    Edited by: User006 on Oct 10, 2012 12:45 PM

    It is possible the Oracle db has not been installed correctly, I take this is a personal install on a laptop, if so did you install the loopback adaptor.
    Have you tried the connection using the ip of the machine.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Cannot connect to JDBC data source

    We are trying to configure Visual Composer to connect to the backend BI-ABAP
    BI database which is DB2, from the Visual Admin on the windows box.
    Downloaded the driver for DB2 JDBC from IBM website
    (ibm_data_server_driver_package_win64_ALL_LANG_v97.exe) Not sure if this is the correct driver, because we are unable to connect to the BI
    Landscape information
    BI- ABAP: NW 701 SP4 AIX 6100-3/DB2 v9.5.0.4,FIXPACK 4
    BI-JAVA: NW 701 SP4 WIN2003 X64/SQL2005 SP3
    When i run this url http://servername:port/TestJDBC_Web/test2 i i get the following error
    Exception Details:
    com.sap.ip.bi.sdk.exception.BIConnectionFailedException: Cannot open the connection
         at com.sap.ip.bi.sdk.dac.connector.jdbc.JdbcConnectionFactory.getConnectionEx(JdbcConnectionFactory.java:238)
         at com.sap.ip.bi.sdk.trialarea.connector.servlet.model.JDBCModel.getConnection(JDBCModel.java:796)
         at com.sap.ip.bi.sdk.trialarea.connector.servlet.model.JDBCModel.getTables(JDBCModel.java:132)
         at com.sap.ip.bi.sdk.trialarea.connector.servlet.controller.Control2.doPost(Control2.java:25)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    Caused by: com.sap.ip.bi.sdk.exception.BIResourceException: Cannot open the connection
         at com.sap.ip.bi.sdk.dac.connector.jdbc.JdbcManagedConnection.(JdbcManagedConnection.java:123)
         at com.sap.ip.bi.sdk.dac.connector.jdbc.JdbcManagedConnectionFactory.createManagedConnection(JdbcManagedConnectionFactory.java:112)
         at com.sap.engine.services.connector.jca.ConnectionHashSet.match(ConnectionHashSet.java:338)
         at com.sap.engine.services.connector.jca.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:262)
         at com.sap.ip.bi.sdk.dac.connector.jdbc.JdbcConnectionFactory.getConnectionEx(JdbcConnectionFactory.java:233)
         ... 19 more
    Caused by: com.sap.ip.bi.sdk.exception.BIResourceException: Cannot connect to JDBC data source
         at com.sap.ip.bi.sdk.dac.connector.jdbc.impl.Connection.connectDB(Connection.java:336)
         at com.sap.ip.bi.sdk.dac.connector.jdbc.impl.Connection.connect(Connection.java:99)
         at com.sap.ip.bi.sdk.dac.connector.jdbc.JdbcManagedConnection.(JdbcManagedConnection.java:118)
         ... 23 more
    Caused by: java.sql.SQLException: No suitable driver
         at java.sql.DriverManager.getConnection(DriverManager.java:532)
         at java.sql.DriverManager.getConnection(DriverManager.java:140)
         at com.sap.ip.bi.sdk.dac.connector.jdbc.impl.Connection.connectDB(Connection.java:320)
         ... 25 more

    Hi,
    you can check the configuration:
    http://help.sap.com/saphelp_scm50/helpdata/en/43/e35b3315bb2d57e10000000a422035/content.htm
    Regards, Mayur

  • Unable to Connect to the Data Source with Report Builder when using a closed Excel file

    I am using Report Builder 3.0 and to get started I am using an Excel spreadsheet as my data source.  I set this up just fine.  I can connect successfully if the file is open Excel.  But if I close the file, I get the error "Unable to
    Connect to the data source".
    This is my connection string:
    Dsn=Licenses;dbq=C:\USERS\AMEADE\DOCUMENTS\licenses.xlsx;defaultdir=C:\USERS\AMEADE\DOCUMENTS;driverid=790;fil=excel 8.0;maxbuffersize=2048;pagetimeout=5
    Works fine if the file is open but stops working when the file is closed.  Any idea what I can do?

    Hi Alice,
    Based on my understanding, when you keep the Excel file open, you can connect to the data source correctly. But when you close the Excel file, the error “Unable to Connect to the data source” is thrown out.
    In your scenario, I would like to know if only this Excel comes across this issue. Have you experienced the same issue when you use other Excel files as a data source? As we tested in our environment, we can connect to the data source whether the Excel file
    is open. You can refer to this
    article to create a data source again then check if you can connect to the data source when the Excel file is closed.
    If issue persists, I would suggest you use the
    Process Monitor to capture the processes during the connection to the data source. Then check the result of each process to find the exact reason.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Unable to connect with new Data Source

    Hi everybody,
    After many developpment, I finally get my class to do what we need with crystal and webi report using Rebean and RAS SDK's.
    But, today we found a special case that I was thinking to solve following examples but the solutions given by the example do not work.
    Here is the case :
    We have Crystal report in BO using DSN file localted on the C:\ disk of the server. So, the Information for a such report founded in the IConnectionInfo object is :
    ConnectionInfo Kind = CRQE
    QE_DatabaseType = >ODBC (RDO)< (java.lang.String)
    SSO Enabled = >false< (java.lang.Boolean)
    Database DLL = >crdb_odbc.dll< (java.lang.String)
    QE_DatabaseName = >< (java.lang.String)
    QE_LogonProperties = >{FILEDSN=C:\path to DSN, UseDSNProperties=false, Trusted_Connection=false}< (com.crystaldecisions.sdk.occa.report.lib.PropertyBag)
    QE_SQLDB = >true< (java.lang.Boolean)
    QE_ServerDescription = >C:\path to DSN< (java.lang.String)
    Today, we had to import old crystal report in BO and for that report, the Data Source gives a DSN file on another disk R:\...
    So for the report where I found in a IConnectionInfo object a DSN file beginning by R:\, I have to change it by a new one pointing to the right DSN file on the C:\ disk. (The DSN file on the C:\ work perfectely because we can use it with other report).
    I follow this example : http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/e068eba5-1f57-2c10-10a0-91e111c98bc7
    And so I get the following code where I put all the parameter need for the correct DSN file on the C:\ :
    ConnectionInfos ci = (ConnectionInfos)dbcontroller.getConnectionInfos(null).clone();
                   IConnectionInfo ici = ci.getConnectionInfo(0);
                   // Create a new connection and start setting new properties
                   IConnectionInfo newConnectionInfo1 = new ConnectionInfo();
                   newConnectionInfo1.setKind(ConnectionInfoKind.CRQE);
                   newConnectionInfo1.setUserName("momtest");
                   newConnectionInfo1.setPassword("testmom");
                   PropertyBag newpb = new PropertyBag();
                   newpb.put(PropertyBagHelper.CONNINFO_CRQE_DATABASETYPE,"ODBC (RDO)");
                   newpb.put(PropertyBagHelper.CONNINFO_SSO_ENABLED,false);
                   newpb.put(PropertyBagHelper.CONNINFO_DATABASE_DLL,"crdb_odbc.dll");
                   newpb.put(PropertyBagHelper.CONNINFO_CRQE_DATABASENAME,"");
                   newpb.put(PropertyBagHelper.CONNINFO_CRQE_SQLDB,true);
                   newpb.put(PropertyBagHelper.CONNINFO_CRQE_SERVERDESCRIPTION,"path to DSN");
                   PropertyBag LogonProperties = new PropertyBag();
                   LogonProperties.put("FILEDSN","path to DSN");
                   LogonProperties.put("UseDSNProperties", false);
                   LogonProperties.put("Trusted_Connection","false");
                   newpb.put(PropertyBagHelper.CONNINFO_CRQE_LOGONPROPERTIES,LogonProperties);
                   newConnectionInfo1.setAttributes(newpb);
                   try {
                        dbcontroller.replaceConnection(ici, newConnectionInfo1, null, DBOptions._useDefault);
                   catch (ReportSDKServerException error)
                     System.out.println(error.getServerError());
                   System.out.println("--->" + dbcontroller.getServerNames());
                   System.out.println("Refreshing document...");
                   clientDoc.refreshReportDocument();
                   System.out.println("Document refreshed");
                   ByteArrayInputStream byteIS = (ByteArrayInputStream) clientDoc.getPrintOutputController().export(ReportExportFormat.PDF);
    When we arrived at line "ByteArrayInputStream byteIS = (ByteArrayInputStream) clientDoc.getPrintOutputController().export(ReportExportFormat.PDF);" we get a message that the logon failed.
    Someone have an idea?
    Edited by: jerome.vervier on Dec 29, 2011 4:23 PM

    Thanks Adam
    It ensure me that I get no usual error in my code and it confims me what I think.
    Thanks for help !

  • Can latest Essbase version connect to Oracle data sources  directly?

    Hi
    As you know in Essbase 9.3.1, you only can connect to any relational database via an ODBC data source and Essabse cannot talk to relational databases directly. Can Essbase 11.1.1 can talk to Oracle database directly or via OCI?
    Chandra

    Essbase Studio in 11X add jdbc connections, but there is still no "direct" connection. I'm not sure if I would want one. It would imply that Essbase is now tied directly to Oracle databases and we could lose the flexability to connect to other sources.

  • Logon failed when connecting to XML data source over HTTP

    I am trying to create a report using the standard report creation wizard:
    1) new, standard report
    2) create new connection
    3) xml and web services
    4) xml data source
    When using the sample from the SAP site, it works fine:
    http://resources.businessobjects.com/support/downloads/samples/cr/customer_db/customer.xml
    I have an HTTP source that generates XML. I have a schema that describes this XML. If I save the XML to a local file it works fine as a data source with the schema. However, when I try to access the same data via HTTP, I get the following error:
    Logon failed.
    Details: Cannot open file
    Server returned HTTP response code: 401 for URL: http://localhost:8004/report.xqy?Validate%20XML=0&Use%20WS-Security%20Config%20File=&WS-Security%20File%20Location
    However, if I enter that URL in a browser it works fine. And even if I disable security on the HTTP source, it produces the same error.
    Does the URL for the HTTP data source have to conform to some specific pattern? For example, must the URL end in .xml?
    Kelly

    Sorry Brian,
    This is a public forum, if no one can help you do have the option to purchase a support case:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551
    Thank you
    Don

  • Report Designer odbc connection string for data source using a parameter

    I am using stand alone report designer 3 for the present and have a question/problem regarding the odbc connection string for MySQL when setting up the data-source
    I need to be able to enter a parameter which is the database name i.e. BOE-201401 or say BOE-201312 etc  from a list of databases the user can choose from.
    at present the odbc connection string points to BOE-201402
    the connection string is at present  Dsn=Development Server for MYsql;description=MYSQL;server=ldndw01;database=BOE-201402;port=3306
    my parameter has the name BOE_DATABASE
    and in an expression it is  as such
    =Parameters!BOE_DATABASE.Value
    I want to point the datasource for the report to the parameter value before the user sees the report.

    Hi Leslie,
    Based on your description, we want to design a report with a dynamic DataSource connection string. There are the basic steps below for your reference:
    Create report with static database.
    Change data source to report parameter.
    Send new database connection string as a report parameter. 
    More detail information, please refer to the following blog: Dynamic Database in SSRS 2008.
    http://haseebmukhtar.wordpress.com/2011/11/09/dynamic-database-in-ssrs-2008/
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • How to connect to weblogic data source using jndi name?

    I am trying to connect to database using data source look up from weblogic as below:
    factory = "weblogic.jndi.WLInitialContextFactory"
    conn = zxJDBC.lookup('ApplicationDB',INITIAL_CONTEXT_FACTORY=factory)
    this is throwing DatabaseError:
    however i can connect to the db using uname, pwd and url. its working fine using zxJDBC in jython.
    any clue why the first one is failing?

    import java.sql.*;
    import javax.sql.*;
    import javax.naming.*;
    import java.util.*;
    public class MyDataSourceLookupClient
         public final static String JNDI_FACTORY = "weblogic.jndi.WLInitialContextFactory";
         private static String serverUrl ="t3://localhost:7001";
    public static void main(String ar[])throws Exception
    InitialContext ic=null;
    try{
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
              env.put(Context.PROVIDER_URL, serverUrl);
              ic = new InitialContext(env);
    catch(Exception e){}
    try{
    DataSource ds=ic.lookup("YourDataSourceJNDIName");
    Connection con=ds.getConnection();
    System.out.println("\n\t Got Connection: "+con);
    con.close();
    catch(Exception e)
    System.out.println("\n\n\t jack Exception => "+e);
    e.printStackTrace();
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)

  • "logon failed" error when connecting to XML data source

    I have an HTTP source that generates XML. I have a schema that describes this XML. If I save the XML to a local file it works fine as a data source with the schema. However, when I try to access the same data via HTTP, I get the following error:
    Logon failed.
    Details: Cannot open file
    Server returned HTTP response code: 401 for URL: http://localhost:8004/report.xqy?Validate%20XML=0&Use%20WS-Security%20Config%20File=&WS-Security%20File%20Location
    However, if I enter that URL in a browser it works fine. And even if I disable security on the HTTP source, it produces the same error.
    I have tried a local HTTP source as well as the same source running on Amazon EC2.
    Any ideas?

    Thanks for the help.
    I am new to crystal reports, so I do not understand your suggestion. Both of those points look like they are related to Adobe Flash.
    I am trying to create a report using the standard report creation wizard:
    1) new, standard report
    2) create  new connection
    3) xml and web services
    4) xml data source
    When using the sample from the SAP site, it works fine:
    http://resources.businessobjects.com/support/downloads/samples/cr/customer_db/customer.xml
    When connecting to my source from a browser, it works fine. When using my source as a local document instead of over http it works fine. It is only when connecting to my source over http that I get the failed logon error.
    Kelly

Maybe you are looking for

  • Speed on WINDOWS NT

    I have installed JDEVELOPER 3.1 on windows NT 4.0 running on pentium-II 500 Mhz. I feel jdeveloper to be extremely sluggish in performance. Is this the property of the software or there is some way to increase the speed of the software?

  • Maximum number of Apple TVs on a network

    I know the first gen had a maximum of 5 apple TVs you can sync with. If you're not doing syncing but just streaming, is there a maximum number of apple TVs that can stream from one iTunes library?

  • Part of graphic hidden after filter is applied

    I imported a graphic from Illustrator in Motion (a cube). I applied a Bulge filter to it. When I jacked up the amount of Bulge, part of image was hidden. The Bulge doesn't show behond the overall dimensions of the original graphic. How can I show the

  • AS Java applications not starting after patching from 2004s SPS10 to SPS11

    Hi folks, after patching our NetWeaver 2004s from SPS10 to SPS11 and the Kernel from 7.00.83.0 to 7.00.95.0, the applications on the AS Java do not start up automatically any more. Under the following URLs, the same error is shown: http://<fully qual

  • Move iWork 09 to external drive?

    Hi, I'd like to free some space on my SSD. Since now I'm using the current iWork, I'm thinking to move my old "iWork '09" folder from "Applications" to an external drive. If I'll ever encounter issues opening my old iWork 09 documents will I be able