CachedRowSetImpl and DataSource

Hi pals,
I got a problem with the CachedRowSetImpl. I set the DataSourceName of the CRS. When I debug, it can successfully connect to the DB and reads the data. It however throws an execution saying "java.sql.SQLException: The url cannot be null". If I give the connection to the CRS, it succeeds. What could be the solution?
Here is the small code :
   CachedRowSet crs = new CachedRowSetImpl();
   crs.setDataSourceName("jdbc/MyDatabase");
   crs.setCommand("Select * From Employees");
   crs.execute();At the line of execute(), I can clearly see that the values are populated from the DB when I debug. It however throws exception as I mentioned above.

Hi,
I also have a problem with the CachedRowSet. Its a different problem but also I cannot interpret the exception I get (see my posting). These exceptions from the CachedRowSet seem to be very strange...
Maybe there is a text or sth else out there which goes a bit into detail when these exceptions are thrown?
Bye
Frank

Similar Messages

  • Error in creating transfer rules beween infosource and datasource in BI 7.0

    Hello Guys
    I am gettting the following error when trying to create transfer rules between infosource and datasource.
    1. Error while activating transformation
    2. Deletion of Objects with Type Transformation
    3. Preprocessing/Collecting DDIC Objects for Transfor mation 094TBEAT814OF89GQXFOFI0DX7ATMS4K
    4. Post Processing/Checking the Deletion for Transfor mation 094TBEAT814OF89GQXFOFI0DX7ATMS4K
    5. Object Transformation 094TBEAT814OF89GQXFOFI0DX7ATMS4K has been deleted
    6. Name of object of type 'TRCS' is missing
    7. Name of object of type 'TRCS' is missing
    8.Key rule 1 (target field: 0COMP_CODE): Initial update set
    9. Key rule 2 (target field: 0PLANT): Initial update set
    10. Key rule 3 (target field: 0OI_EBELN): Initial update set
    11. Key rule 4 (target field: 0AC_DOC_NO): Initial update set
    12. No rule exists
    13. Saving Objects with Type Transformation
    14. Saving Transformation 094TBEAT814OF89GQXFOFI0DX7ATMS4K
    15. Transformation 094TBEAT814OF89GQXFOFI0DX7ATMS4K saved successfully
    16. Activation of Objects with Type Transformation
    17. Saving Objects with Type Transformation
    18. Internal Activation (Transformation )
    19. Preprocessing / Creation of DDIC Objects for Trans formation 094TBEAT814OF89GQXFOFI0DX7ATMS4K
    20. Post Processing/Checking the Activation for Transf ormation 094TBEAT814OF89GQXFOFI0DX7ATMS4K
    21. Transformation 094TBEAT814OF89GQXFOFI0DX7ATMS4K was activated
    22. Syntax error in GP_ERR_RSTRAN_MASTER_TMPL, row 1,644 (-> long text)
    23. Error during generation
    24. Error when activating Transformation 094TBEAT814OF89GQXFOFI0DX7ATMS4K
    25. Resetting of Incorrect Objects Back to the Active Version (Transformation )
    26. Preprocessing / Creation of DDIC Objects for Trans formation 094TBEAT814OF89GQXFOFI0DX7ATMS4K
    27. Post Processing/Checking the Activation for Transf ormation 094TBEAT814OF89GQXFOFI0DX7ATMS4K
    28. Transformation 094TBEAT814OF89GQXFOFI0DX7ATMS4K was activated
    29. Transformation 094TBEAT814OF89GQXFOFI0DX7ATMS4K was reset to the active version
    Can anyone send me a document on how to create cubes, info and data sources,ODS's,multicubes and t/f and update rules in BI 7.0
    Thanks.

    Transformations in BI7
    http://help.sap.com/saphelp_nw04s/helpdata/en/f8/7913426e48db2ce10000000a1550b0/content.htm
    Regards,
    R.Ravi

  • Original System for transformations and DataSources

    Dear All,
    I have imported all DataSources and transformations from DEV box into QAS box. Transports ended without errors and they are working fine.
    I have the following questions, when check the Object Directory Entry (RSA1->Extras-> Object directory entry) for transformations and DataSources the Original System is QAS.
    Should not the original system be DEV?
    Transformations technical names in QAS are not the same as in DEV. Should not they have identical technical names?
    Details:
    BI70 SAP NetWeaver 2004s
    Support Packge 10
    Thanks,
    Carlos Weffer

    Transfornations' technical names change is normal.
    Also, when you see the object directory, the sysytem will eb Qa only as you would have converted the source system while transporting.
    Ravi Thothadri

  • Data binding - Arraycollection and Datasource

    Hi All
    1. Can any one paste a snippet of .MXML code and relevant WDA code (get_Attributes) for an ArrayCollection(Flex) and Datasource(WDA) data binding ?
    2. What is the procedure to set default values for the flex components at application initialisation. Already tried setting the relevant attributes in the WDODOINIT methods of  View and Componenet controller.  Also tried raising an event just after the FlashIsland.Register (this) delcaration in MXML but the event is not fired however subsequent events raised based on user clicks are raised properly. Any pointers as to what is being missed ?
    Thanks in advance
    ksQ

    Hi All
    1. Can any one paste a snippet of .MXML code and relevant WDA code (get_Attributes) for an ArrayCollection(Flex) and Datasource(WDA) data binding ?
    2. What is the procedure to set default values for the flex components at application initialisation. Already tried setting the relevant attributes in the WDODOINIT methods of  View and Componenet controller.  Also tried raising an event just after the FlashIsland.Register (this) delcaration in MXML but the event is not fired however subsequent events raised based on user clicks are raised properly. Any pointers as to what is being missed ?
    Thanks in advance
    ksQ

  • Difference between Extraction Structure and Datasource

    Hi Gurus,
    I have a very basic question here.Can anybody explain to me in detail the difference between an extraction structure and Datasource.
    Thanks in advance

    Hi:
    I am pasting a summarized def. from sap notes.
    http://help.sap.com/saphelp_bw30b/helpdata/en/ad/6b023b6069d22ee10000000a11402f/frameset.htm
    Data Source:
    Data that logically belongs together is stored in the source system in the form of DataSources. A DataSource contains a number of fields in a flat structure used to transfer data into BW (Extract Structure).
    Extract Structure:
    In the extract structure, data from a DataSource is staged in the source system. The extract structure contains the amount of fields that are offered by an extractor in the source system for the data loading process.
    You can edit and enhance DataSource extract structures in the source system. To do this, in the BW Administrator Workbench choose Goto à Modeling à Source Systems à Your Source System à Context Menu (right mouse click) à Customizing Extractors à Subsequent Processing of DataSources.
    While, you are on the topic, you have one more structure.
    Transfer Structure:
    The transfer structure is the structure in which the data is transported from the source system into the SAP Business Information Warehouse.
    It provides a selection of the extract structure fields for the source system.
    It may be a good idea to look into a sample Business Content extractor to get a better understanding of how they are related.
    Chamarthy

  • Database connection timeouts and datasource errors

    Connections in the pool randomly die overnight. Stack traces show that for some reason, the evermind driver is being used even though the MySql connection pool is specified.
    Also, the evermind connection pool is saying connections aren't being closed, and the stack trace shows they're being allocated by entity beans that are definitely not left hanging around.
    Sometimes we get non-serializable errors when trying to retrieve the datasource (this is only after the other errors start). Some connections returned from the pool are still good, so the application limps along.
    EJBs and DAOs both use jdbc/SQLServerDSCore.
    Has anyone seen this problem?
    <data-sources>
         <data-source
              class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"
              name="SQLServerDSCore"
              location="jdbc/SQLServerDSCore"
              xa-location="jdbc/xa/SQLServerXACore"
              ejb-location="jdbc/SQLServerDSCore"
              connection-driver="com.mysql.jdbc.Driver"
              min-connections="5"
              username="xxx"
              password="xxx"
              staleness-timeout="3600"
              alive-poll-query="SELECT 1 FROM medispan"
              url="jdbc:mysql://1.2.3.4:3306/dbo?autoReconnect=true&autoReconnectForPools=true&cachePrepStmts=true&is-connection-validation-required=true"
              inactivity-timeout="30"
         >
              <property name="autoReconnect" value="true"/>
              <property name="autoReconnectForPools" value="true"/>
              <property name="is-connection-validation-required" value="true"/>
              <property name="cachePrepStmts" value="true"/>
         </data-source>
    </data-sources>

    Rick,
    OC4J 9.0.4.0.0 - BTW, do you know of any patches?As far as I know, there are no patches for the 9.0.4
    production version of OC4J stand-alone.
    I'm using container managed persistence,It was not clear to me, from your previous post, that you
    are using CMP entity beans.
    I found staleness-timeout and alive-poll-query
    somewhere on a website when trying to track this
    down. Here's four sources:Those sources refer to OrionServer -- and an older version, too, it seems.
    Like all other Oracle products that start out as somebody
    else's -- including, for example, JBuilder (that became "JDeveloper"), Apache Web Server (that became "Oracle HTTP Server") and TopLink -- their development paths diverge, until, eventually, there is absolutely no similarity between them at all. Hence, the latest versions of OC4J and "OrionServer" are so different, that you cannot be sure that something that works for "OrionServer" will work for OC4J.
    I recall reading something, somewhere, sometime about configuring OC4J to use different databases (other than Oracle), but I really don't remember any details (since it was not relevant to me, because we only use Oracle database). In any case, it is possible to use a non-Oracle database with OC4J.
    Good Luck,
    Avi.

  • Performance problems with combobox and datasource

    We have a perfomance problem, when we are connecting a datatable object or something like this to a datasource property of a combobox. Below you find the source code. The SQL-Statement reads about 40000 rows and the result (all 40000) should be listed in the combobox. There is duration about 30 second before this process has finished. Any suggestions?
    Dim ds As New DataSet
    strSQL = "Select * from am.city"
    conn = New Oracle.DataAccess.Client.OracleConnection(Configuration.ConfigurationSettings.AppSettings("conORA"))
    comm = New Oracle.DataAccess.Client.OracleCommand(strSQL)
    da = New Oracle.DataAccess.Client.OracleDataAdapter(strSQL, conn)
    conn.Open()
    da.Fill(ds)
    conn.Close()
    Dim dt As New DataTable
    dt = ds.Tables(0)
    ComboBox1.DataSource = dt
    ComboBox1.ValueMember = dv.Table.Columns("id").ColumnName
    ComboBox1.DisplayMember = dv.Table.Columns("city").ColumnName

    But how long does it take to fill the DataTable?
    I can fill a 40000 row datatable in under 4 seconds.
    DataBinding a combo box to that many rows is pretty expensive, and not normally recommended.
    David
    Dim strConnection As String = "Data Source=oracle;User ID=scott;Password=tiger;"
    Dim conn As OracleConnection = New OracleConnection(strConnection)
    conn.Open()
    Dim cmd As New OracleCommand("select * from (select * from all_objects union all select * from all_objects) where rownum <= 40000", conn)
    Dim ds As New DataSet()
    Dim da As New OracleDataAdapter(cmd)
    Dim begin As Date = Now
    da.Fill(ds)
    Console.WriteLine(ds.Tables(0).Rows.Count & " rows loaded in " & Now.Subtract(begin).TotalSeconds & " seconds")
    outputs
    40000 rows loaded in 3.734375 seconds

  • Connection pool and datasource

    In WL 7, we need to configure a datasource and a connection pool in order for the application to get a connection to the database. How is the datasource and connection pool related?
    In WL 9.2, there is no option to configure the connection pool, there is only the option to configure the data source. Where did the connection pool go in WL 9.2?

    gerald lee wrote:
    In WL 7, we need to configure a datasource and a connection pool
    in order for the application to get a connection to the database.
    How is the datasource and connection pool related?
    It depends on the WLS version. pre-9.X, there can be more than one datasource pointing to a given pool,
    but you do need a datasource typically to use a pool.
    In WL 9.2, there is no option to configure the connection pool, there is only
    the option to configure the data source. Where did the connection pool go in WL 9.2?In 9.X and beyond the relationship is one-to-one, and you will create both at the
    same time when creating a datasource.
    Joe

  • Error while transporting transformations and datasource Urgent need Help

    Hi all,
    I have been working on this problem for a few days now. I created an ODS object, transformations,  DTP and I am using a  R/3 datasource for extraction. The ODS populates fine in the Dev box, the tranformations and the datasource are fine only in the Dev box. I tried to tranport the objects to the QA box from the Dev Box. Only the ODS transports properly. The transformations are not transported at all. Here is the error I get:
    Start of the after-import method RS_TRFN_AFTER_IMPORT for object type(s) TRFN (Activation Mode)
    No rule exists
    Rule 1 of transformation   () is not valid and is being deleted
    Rule 2 of transformation   () is not valid and is being deleted
    Error occurred during post-handling RS_After_import for TRFN L
    Ended with return code : ==> 8 <===    
    Please do let me know what could be the problem. Please do respond ASAP......
    if you experienced this issue please let me know how you solved it or a possible work around. any help will be greatly appreciated....
    So far we have been using only 3.5 objects. This is the first 7.0 (end to End) transport.

    Hi voodi,
    I just followed the exact sequence that you mentioned. I transported the
    DataSource first....then ODS(write optimized)....then transformations....then Dtp & infopackage.
    data source  ... no errors
    2) ODS ..... no errors
    3) Transformations .... Error....same as mentioned in my earlier post....
    4) DTP and Infopackage ....Error  similar to whats mentioned ...and it says that transformation does not exist.
    Could it be an issue with Source System Translation .....  I dont know much about it .....could you please tell me what it could be and how to resolve it.   I am thinking in these lines because the source system in QA3 exists in the Data Souces Folder and it has  translated properly to QA3Client300. But under the Infoproviders folder (in Q03)...under my DSO the data source still shows Dev3Client 200(client not changed). If this is the issue do you think I need to talk to Basis support for asking them to modify the transport(internally)......can it be done....
    please do give me your feedback....thank you.

  • Error while retriving the connection uisng JNDI and DATASOURCE

    hi guys,
    i had a specifed data source in the the data-sources.xml of CONFIG folder of my application
    <data-source class="oracle.jdbc.pool.OracleConnectionCacheImpl"
    connection-driver="oracle.jdbc.driver.OracleDriver" location="jdbc/OracleDS_native"
    name="OracleDS"
    password="abc"
    url="jdbc:oracle:thin:@BC354321:1521:CRADV1"
    username="xyz"/>
    Here is the program i had written to retrive the datasource
    package javaapplication1;
    import javax.naming.InitialContext;
    import java.sql.*;
    import javax.naming.Context;
    import javax.sql.DataSource;
    public class Main {
    public Main() {
    public static void main(String[] args) {
    Connection con =null;
    try {
    InitialContext context = new InitialContext();
    System.out.println("##########context********"+context);
    DataSource ds = (DataSource)context.lookup("jdbc/OracleDS_native");
    System.out.println("##########DataSource********"+ds);
    con = ds.getConnection();
    catch( Exception exception ) {
    // process exception
    exception.printStackTrace();
    if(con!=null)
    try{ con.close(); }
    catch(SQLException e)
    { e.printStackTrace();}
    ERROR:
    ##########context********javax.naming.InitialContext@2bbd86
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at javaapplication1.Main.main(Main.java:35)
    what might be the problem??
    regards
    Phani

    Phani,
    From the contents of your "data-sources.xml" file that you posted, it looks like you are using a pre-10.1.3.x version of OC4J (stand-alone?), so Jason's link may not be helpful.
    Nonetheless, as Jason mentions, you do need to set some properties that need to be passed to the "InitialContext" class constructor. Probably something like the following.
    [Note that the code is uncompiled and untested.]
    Properties prp = new Properties();
    prp.put(Context.INITIAL_CONTEXT_FACTORY,
            "com.evermind.server.rmi.RMIInitialContextFactory");
    prp.put(Context.PROVIDER_URL, "ormi://oc4j_host");
    prp.put(Context.SECURITY_PRINCIPAL, "user");
    prp.put(Context.SECURITY_CREDENTIALS, "password");
    Context ctx = new InitialContext(prp);
    DataSource ds = (DataSource) context.lookup("jdbc/OracleDS_native");And replace "oc4j_host" with the name of your OC4J host machine as well as "user" and "password" with the appropriate values.
    Note that you can probably use the OC4J admin user's details.
    Good Luck,
    Avi.

  • Block creation issue with new entity and datasource

    The below calculation script that will not create blocks. This is just one of the formula for one cost account. the formula repeats similarly for other cost accounts. When ran it won't create blocks so #missing data. I even tried switching the "AccountCenter" (account dimension dense) and use "DS" (datasource dimension sparse) instead but it runs a lot longer and causes delays in any other calc script that runs after that. I have tried lock and send from excel smart view for those blocks only and  it works the first time the script is run. But every time after the first time the script runs forever and never ends. i had tried set createmissingblock on but that just slowed down everything.
    FIX ("Jan":"Dec", @RELATIVE(Entity1, 0),  @RELATIVE(Entity2,0), "P_PRojects", @RELATIVE(Project1",0),"Actual", &CurrFcst, &CurrFcstVersion, FY15:fy21)
    "AccountCenter"
    @CALCMODE(BLOCK);
    IF (@ISMBR (@RELATIVE("ParentAccountCenter",0)) AND @ISMBR(@RELATIVE("ParentProject",0)) AND @ISMBR ("DS"))
    IF((@ISMBR(&FcstStartMo:"Dec") AND @ISMBR(&FcstYear1) AND @ISMBR(&CurrFcst)) OR (@ISMBR(&FcstYear2:&FcstYear7) AND @ISMBR(&CurrFcst)) OR (@ISMBR(&CurrMth) AND @ISMBR(&CurrYr) AND @ISMBR("Actual")))
    "AccountCenter"=1AccountPct->RetailFP&A*AccountCenterPct->RetailFP&A*AccountCenterAgregate Pct->"RetailFP&A"*("DS_ALL"->"P_Cost"->P_Projects-"DS_ALL"->"722020"->P_Projects-"DS_ALL"->"722200"->P_Projects-"DS_ALL"->"562040"->P_Projects);
    IF (@ISMBR(@RELATIVE("otherEntity",0)))
    @MEMBER(@SUBSTRING(@NAME(@CURRMBR("Entity")),11,24)) = @MEMBER(@SUBSTRING(@NAME(@CURRMBR("Entity")),11,24)) + @CURRMBR("Entity");
    ENDIF
    ENDIF
    ENDIF
    ENDFIX

    Account (dense)
    Period (dense)
    Data Source (sparse)
    Entity (Sparse)
    Project (Sparse)
    Scenario (Sparse)
    Version  (Sparse)
    Year (Sparse)
    EntityFunc Attribute
    Members
    Account (dense) - "AccountCenter"(level1),  "AccountCenter"(level0), 1AccountPct, AccountCenterPct, AccountCenterAgregate Pct, P_Cost", "722020", "722200", "562040"
    Data Source (sparse)- DS, DS_ALL
    Entity (Sparse)- Entity1, Entity2
    Project (Sparse)- RetailFP&A, P_Projects
    FIX ("Jan":"Dec", @RELATIVE(Entity1, 0),  @RELATIVE(Entity2,0), "P_PRojects", @RELATIVE(Project1",0),"Actual", &CurrFcst, &CurrFcstVersion, FY15:fy21)
    "AccountCenter"
    @CALCMODE(BLOCK);
    IF (@ISMBR (@RELATIVE("ParentAccountCenter",0)) AND @ISMBR(@RELATIVE("ParentProject",0)) AND @ISMBR ("DS"))
    IF((@ISMBR(&FcstStartMo:"Dec") AND @ISMBR(&FcstYear1) AND @ISMBR(&CurrFcst)) OR (@ISMBR(&FcstYear2:&FcstYear7) AND @ISMBR(&CurrFcst)) OR (@ISMBR(&CurrMth) AND @ISMBR(&CurrYr) AND @ISMBR("Actual")))
    "AccountCenter"=1AccountPct->RetailFP&A*AccountCenterPct->RetailFP&A*AccountCenterAgregate Pct->"RetailFP&A"*("DS_ALL"->"P_Cost"->P_Projects-"DS_ALL"->"722020"->P_Projects-"DS_ALL"->"722200"->P_Projects-"DS_ALL"->"562040"->P_Projects);
    IF (@ISMBR(@RELATIVE("otherEntity",0)))
    @MEMBER(@SUBSTRING(@NAME(@CURRMBR("Entity")),11,24)) = @MEMBER(@SUBSTRING(@NAME(@CURRMBR("Entity")),11,24)) + @CURRMBR("Entity");
    ENDIF
    ENDIF
    ENDIF
    ENDFIX

  • Portal, BW and Datasources for users

    Hello,
    Our current system toplogy looks like this:
    We have a Portal and BW (NW04s) which share one Java Application Server.
    Since the main work is creating BW reports and presenting them at the portal, the users are being created at the BW System, the roles are being built over there and everything is exported to the portal. The Application Server is not an ABAP one but since the users created in BW and transported to the portal they are considering as an ABAP Datasource. This means that the main feed of the portal are users created on the BW.
    What we would like to do is change the main feed of the portal to our Active Directory server which will handle user creation/deletion/modification. This means that the portal and the BW will no longer share the same Datasource and my questions are:
    1. Is our current work procedure correct?
    2. How can we reflect this change to the BW as well, so it will "know" the new toplogy? Do we need to maintain now two sets of users, one for the portal and one for the BW system?
    3. What will happen with all the users already created on the BW and transported to the portal and their authorizations?
    4. At this new toplogy, who will be in charge of creating the roles and managing the authorizations, the BW side or the portal side?

    Hi Roy,
    according to SAP it is possible. Unfortunately, I have not done it yet. But at SAP TechEd 2006 in Amsterdam Gerlinde Zibulski and Frank Buchholz gave an interesting presentation of "Identity Management in Heterogeneous System Landscapes: the SAP Solution". There they talked about the synchronization at great length. Furthermore you find quite some information in the SAP Library. Even how to enable Windows authentication if the user's ids in ADS and ABAP user management do not match. See <a href="http://help.sap.com/saphelp_nw04/helpdata/en/43/4c3725aeaf30b4e10000000a11466f/content.htm">Configuring the UME when Using Non-ADS Data Sources</a>.
    @Michael: Sounds like you have got some experience regarding the synchronization process. Could you please elaborate why you do not recommand it!
    Best regards,
    Martin

  • Inactive Transformations and DataSources in Production System.

    Hi Experts
    We are working on BI 7.0 engine within Solution Manager.
    We had some issues with DataSources initially while transporting BI Objects from Devp to Prod. We logged it into OSS and followed their procedure to redo the transports.
    In the process, the issue was resolved but 2 New Transformations are created one for each Data Model (since I have only 2 InfoCubes) automatically and is the working model now.
    Actual Transformations from Devp became Inactive in Prod and also there are 2 Inactive DataSources which are also from Devp. 2 New DataSources are again from Devp.
    When I tried to Delete these unwanted Objects from Prod (I asked the Basis to Open Prod for me though this is not the best practice), it is asking for a Request ID. Also, since the Project has Gone Live already, I am scared if I might disturb the Production System.
    Kindly, advise what best could and needs to be done.
    Thanks,
    Chandu

    Initially, we implemented BI-HR module with standard content, which 3.x content (transfer / update rules)... in parallel we also did transformations & DTPs (BI 7.0 model).
    Since, client wasn't sure with conversation of transfer rules (has lots of routines) to transformations & DTPs . So we transported both the models to prod sys... We created daily load process chains with transformations & DTPs... The actual plan was, if PC loads fails, then to go for manual loads of 3.x model...Fortunately 7.0 models was successful...
    Then one month later, we deleted those transfer / update rules and 3.x datasources from prod sys, on the weekend (process chains runs only week days) without any issues...
    We captured those deletion requests and deleted them from SE09 by unlocking them in SE03.

  • Using Oracle Users in Realms and DataSource.getConnection

    Is it possible to authenticate using an Oracle User via JAASRealm and also retrieve connections specific to that user from a DataSource?
    I currently have an application which doesn't use either, but rather sets up a OracleDataSource. So basically I just want to allow the container to administer both the authentication and data source setup, while still allowing the getConnection(user,password):
    CODE
    ocpds = new OracleConnectionPoolDataSource();
    ocpds.setURL(connectionString);
    ocpds.setConnectionProperties(props);
    ods = new OracleDataSource();
    ods.setURL(connectionString);
    ods.setConnectionCachingEnabled(true);
    ods.setConnectionProperties(props);
    // Pool and Cache
    Properties poolProps = new Properties();
    poolProps.setProperty("AbandonedConnectionTimeout", "60");
    poolProps.setProperty("InactivityTimeout", "5");
    poolProps.setProperty("TimeToLiveTimeout", "60");
    poolProps.setProperty("ConnectionWaitTimeout", "60");
    ods.setConnectionCacheProperties(poolProps);
    ods.setConnectionProperties(props);
    Util.logln("Connection Cache Properties");
    cache = OracleConnectionCacheManager.getConnectionCacheManagerInstance();
    cache.createCache(cacheName, ods, poolProps);
    cache.setConnectionPoolDataSource(cacheName, ocpds);
    ........later in the BatCave (JSP or a servlet).....
    conn = (OracleConnection) ods.getConnection(username, password);
    ENDCODE
    This section from OAS Containers for J2EE Services Guide worries me:
    (from: http://download-east.oracle.com/docs/cd/B14099_19/web.1012/b14012/datasrc.htm#sthref572 )
    Using Different User Names for Two Connections to a Single Data Source
    When you retrieve a connection from a DataSource object with a user name and password, this user name and password are used on all subsequent connection retrievals within the same transaction. This is true for all data source types.
    For example, suppose an application retrieves a connection from the jdbc/OracleCMTDS1 data source with the scott user name. When the application retrieves a second connection from the same data source with a different user name, such as adams, the second user name (adams) is ignored. Instead, the original user name (scott) is used.
    Thanks for reading all of this, and I appreciate any help!

    Update:
    I'm still not quite sure what to do. Where I am now:
    1. I don't know how to authenticate against Oracle database users (non-ldap) via JNDI/JAAS/whatever
    2. Proxy authentication (ALTER USER...CONNECT THROUGH...) seems to be promising for using connection pools, and in addition, once realm authentication happens, I can just pass the username and piggyback on the middletier connection without knowing the password used in authentication
    3. I'm not sure if proxy addresses the issue that OAS Containers for J2EE Services Guide talks about in the original post
    4. I'd prefer not to use OID
    Again, if you have any little information, I'd really like to hear it.

  • Classpath and DataSource within Tomcat

    Used software:
    - Tomcat 5.5.11
    - JDK 5.0
    - Windows XP SP2
    Problem statement:
    I have a webapplication, called monitorclient, which uses a connection
    to a database using a JNDI bound DataSource object through my context.xml file.
    To connect to the database (SQL Server), I need several JAR files. Whenever I
    place these JAR files inside the ${CATALINA_HOME}/common/lib directory,
    everything seems to work fine.
    However, I would like to place these JARs into my webapp's lib directory, which is:
    ${CATALINA_HOME}/webapps/monitorclient/WEB-INF/lib/Whenever I do this, the driver class ...
    com.microsoft.jdbc.sqlserver.SQLServerDriver... seems to fail to be found.
    The generated exception is:
    javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid:
      "org.apache.tomcat.dbcp.dbcp.SQLNestedException:
        Cannot load JDBC driver class 'com.microsoft.jdbc.sqlserver.SQLServerDriver'".I've read the Tomcat documentation about classloading, and I can't seem to find
    any errors from my part. I queried the forums and google about this matter but
    I don't seem to get any results.
    Directory structure:
    ${CATALINA_HOME}
      /webapps/
        /monitorclient/
           /META-INF/
              context.xml -> has the DataSource
           /WEB-INF
              /classes/
                /com/.../[some java code]
              /lib/
                msbase.jar       --> when I place these jars here instead of in
                mssqlserver.jar      ${CATALINA_HOME}/commons/lib, classloading
                msutil.jar           seems to fail.
         index.jsp
         blah.jsp
         [...].jspAny help, pointers or the like are greatly appreciated.

    We had a discussion about this a little while ago.
    http://forum.java.sun.com/thread.jspa?threadID=651804
    Coming back to it, I have finally made some time to do that testing I promised. For me it only works when the driver is in /common/lib.
    I have tested this on both Tomcat 4.1.30 and Tomcat 5.0.28
    That makes sense to me, as it is Tomcat being responsible for loading the datasource, the driver needs to be available to the Tomcat internal classes.
    I think this page spells it out rather clearly:
    http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
    NOTE: Do not install these jarfiles in your /WEB-INF/lib, or $JAVA_HOME/jre/lib/ext, or anywhere else. You will experience problems if you install them anyplace other than $CATALINA_HOME/common/lib.
    Can't get any clearer than that...
    Cheers,
    evnafets

Maybe you are looking for