Database access from sun 1.4 AppServer problem

I try to connect MSAccess database to j2ee AppServer 1.4 through jdbc-odbc brige under w2k. I used asadmin to create Connection pool, here is the snippet from domain.xml file.
<jdbc-connection-pool connection-validation-method="auto-commit" datasource-classname="sun.jdbc.odbc.ee.ConnectionPoolDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" max-pool-size="32" max-wait-time-in-millis="60000" name="healthpool" pool-resize-quantity="2" steady-pool-size="8" transaction-isolation-level="read-uncommitted">
<property name="databaseName" value="health"/>
<property name="url" value="jdbc:odbc:health"/>
</jdbc-connection-pool>
Variant <property name="databaseName" value=" jdbc:odbc:health "/> also does not works.
I have already put rt.jar from �/jdk/jre/lib to �/domains/domain1/lib/. I even added it�s path to JVM classpath settings -> classpath suffix panel.
I get:
Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: Error getting connection from the EIS
when I try to ping connection pool. What should I do to make it work? Should I declare JdbcOdbcDriver somewhere? Can somebody help me?

hi frends,
i m getting this error:
Edit connection pool
Error occured
Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: Error getting connection from the EIS
Datasource Classname: com.microsoft.jdbcx.sqlserver.SQLServerDataSource
Pool SettingsSteady Pool Size: 8
Maximum Pool Size: 32
Pool Resize Quantity: 2
Idle Timeout: 300Seconds
Max Wait Time: 60000 Milliseconds
Connection ValidationConnection Validation: Required
Validate connections; allows server to reconnect in case of failure
connectionPool.ValidationMethod: auto-commit meta-data table
auto-commit, meta-data, or table; if table
Table Name:
If table validation selected, specify table name
On Any Failure: Close All Connections
Close all connections and reconnect on failure; otherwise reconnect only when used
Transaction IsolationTransaction Isolation: read-uncommitted read-committed repeatable-read serializable
If unspecified, use default level for JDBC Driver
Isolation Level: Guaranteed
All connections use same isolation level; requires Transaction Isolation
Properties i set everything
name
password
serverName
portnumber
selectMethod
databasename

Similar Messages

  • Database access from session bean

    Hello,
    I have a stateless session bean which performs some complex
    calculations, and also does some database access.
    For the database access the bean class has a datasource as
    follows:
    public class TestBean implements SessionBean {
    private DataSource ds_;
    public void ejbCreate() {
         getDataSources();
    private void getDataSources() {
         try {
         Context ictx = new InitialContext();
         ds_ = (DataSource)ictx.lookup("java:comp/env/jdbc/TestDB");
         } catch (Exception e) {
         e.printStackTrace();
         throw new EJBException(e);
    Now this class has a method (which is also in the remote interface)
    calculateSomething(). This method constructs a number of other
    objects that do the actual calculation, and one of these objects
    does the actual database access. How would another object be able to
    use the datasource that was constructed in the bean class?
    I could pass the datasource reference to that object, but that would
    break my encapsulation. This is because that object does not get
    created directly by the bean object, but rather the way the objects
    interact is something like A -> B -> C, where A is the TestBean, and
    C is the object that does the DB access. If I passed the datasource,
    I would need to make B aware of the datasource, which doesn't
    seem good design, because B doesn't do any database access.
    Alternatively I could do the lookup in class C, but that would
    degrade the performance, as an object C gets created and destroyed
    every time the calculateSomething() method is called.
    A third option I have thought of, is to add a public method to the
    bean that returns a connection. Whenever another object gets
    created, a reference to the bean object will be passed along. Then,
    if another object needs to do database access, it will call back
    the bean to get a connection. This seems just as bad (if not worse)
    than the first option.
    Does anyone have an elegant solution for this situation? What is
    the best practice of handling datasources when a bean class doesn't
    do the database access itself? In all the examples I've seen so far,
    all the functionality was in the session bean class, but again that
    doesn't seem good OO design, and would result in a single huge class.
    regards,
    Kostas

    Thanks again to both for the replies. Here are my responses:
    Yi Lin: Yes, I know that an entity bean would solve this problem, however it has been decided not to use entity beans so this is not my call (I think the reason entity beans are not allowed in this project is that they are considered risky: there are other applications that access the same database, so if the container caches entity bean data as you describe, then the users might get inconsistent results).
    Gerard: Actually object B is the one that has the business logic and C is a peer object that only does database access and no calculaitons. For example B can be Customer, and C CustomerDB. This is why object B does not have any knowledge of datasources or connections. So my design does not appear to be that bad!
    As far as the factory you propose is concerned, I cannot understand how this would solve my problem. In order to solve this situation the factory would need to be persistent, i.e. get created by the ejbCreate() method, and destroyed whenever the container decides to destroy the bean. There would be no point in object C creating the factory, as I would have the overhead of doing the JNDI lookup every time I create a C.
    So the question remains the same: how would I pass a reference to the factory from A to C without making B aware of it?

  • How to enable database access from Java or CSharp ?

    I set up an Oracle Express database on my local computer.
    Now I want to connect to this databsee from a CSharp (or Java) program.
    How do I have to specify the connection string?
    The following does NOT work:
    connectionstring = "Data Source=XE;User Id=karl;Password=mypassword";
    connection = new OracleConnection(connectionstring);
    connection.Open();
    I am getting an error
    "Invalid argument" ORA-12532 error
    How do I have to specify the connection string otherwise ?
    Is the sequence of the parameter Data Source, User Id and Password
    important ?
    How do I get a more detailed error message from Oracle ?
    Do I have to enable the accessibility from outside programs
    in Oracle somewhere ?

    about to the error:
    ORA-12532 TNS:invalid argument
    Cause: An internal function received an invalid parameter. This message is not normally visible to the user.
    Action: For further details, turn on tracing and re-execute the operation. If the error persists, contact Oracle Support Services.
    Regards

  • Database Access from JSP

    I'm trying to access a SQL Server database through an ODBC connection on a JSP page and having difficulties. This is the code that I'm using:
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection conn = DriverManager.getConnection("jdbc:odbc:ODBCConnection", "username", "password");
    Statement stmt = conn.createStatement();
    ResultSet results = stmt.executeQuery(
    "SELECT numUserID, txtUsername, txtPassword FROM tblUsers");
    while (results.next()) {
    int DBuserid = results.getInt("numUserID");
    String DBusername = results.getString("txtUsername");
    String DBpassword = results.getString("txtPassword");
    conn.close();
    } catch (Exception exc) {                              
    out.println ("Exception \"" + exc + "\" occured....<br>");
    exc.printStackTrace();
    I've got two servers I'm testing it on. One is the IBM WebSphere 3.5 on Windows NT 4 and the other one is the Oracle 9i Server (Apache) with java support on Windows 2000. The code works fine on the Oracle server, but does not work on the WebSphere. I am getting a "java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Client unable to establish connection" exception. The problem is that I need to run this thing on the WebSphere server.
    I guess this might have something to do with the Java server differences or OS differences, but I don't know what that could be. I'm sure there's something that I'm not doing right, I just need some help figuring out what that is. I'd appreciate any help anyone can provide. Thanks.

    ODBC connection is set up the same on both servers and works with Access. In fact, I have tried to put the same code that I'm trying to use in a regular text java file, it compiled and ran on that same server. I've got a feeling I have the Websphere server setup wrong, but I don't know exactly what and how to fix it.
    Thanks.

  • Database access from Oracle Java Cloud Service application

    I have registered for Oracle Java Cloud Service for trial period. I want to deploy a Spring MVC 3.2 and Hibernate 4.0 web application.
    I created a table in the Database Cloud. I am not sure how do I access the Database Cloud Service from my application.
    Need your guidance/pointers/references that can help me establish connection from my application to the database.
    Thanks,
    Ujjwal

    Hi,
    Use JPA - see the visitors example, it uses @PersistenceUnit injection with previously weaved .class entity files.
    You can use application managed EMF's and EntityManagers with code like the following - which is not preferable to using @PersistenceContext injection on an @Stateless session EJB but...
              EntityManagerFactory emf = Persistence.createEntityManagerFactory("JPAServletPU");
              EntityManager em = emf.createEntityManager();
              EntityTransaction transaction = null;
              try {
                   transaction = em.getTransaction();
                   transaction.begin();
                   Visitor entity = new Visitor();
                   entity.setName(name);
                   entity.setNum(num);
                   em.persist(entity);
                   transaction.commit();
                   System.out.println("Committing: " + entity);
              } catch (Exception e) {
                   e.printStackTrace();
              } finally {
                   em.close();
                   emf.close();
    Use a persistence.xml like the following
    <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
    <persistence-unit name="JPAServletPU" transaction-type="JTA">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
         <!--https://cloud.oracle.com/mycloud/f?p=5300:1000:259334829915901-->
    <jta-data-source>database</jta-data-source>
    <class>com.vision.cloud.jpa.Visitor</class>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
         <property name="eclipselink.target-database" value="Oracle10g" />
    <property name="eclipselink.ddl-generation" value="create-tables"/>
    <!-- property name="eclipselink.ddl-generation" value="drop-and-create-tables"/-->
    </properties>
    </persistence-unit>
    </persistence>
    Check out a tutorial on WebLogic JPA ORM usage here to get started as well.
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial

  • Database Access from JSP - Is it correct?

    From a JSP Page, we need to retreive data from the database. We have our own application specific API commands to retreive data from database. We have doubts in using this API commands.
    Approach 1:
    From the jsp, send the query details to a Java file (BO). From the java file (BO), call the database and retreive the data
    Approach 2:
    Use the API command directly from the jsp page to retreive details from the database.
    In both approaches, the same API command is going to be used. We just want to know is there any advantage in calling the database through the java file (BO) instead of directly from the jsp?
    Regards,
    R.Aravinth

    Thanks Ram. But we are not going to have any complex
    codes written for data retreival. We just epxect a
    single line of code which will call database and that
    API command will return us a storage variable which
    we will use for displaying purpose.
    ok take a look at this
    //code to display lot of other stuff
    <%
        try {
           //code to access db and get data;
        catch(SomeException e){
            //oh-oh you are already on the display logic and have output a lot of stuff
            //how do you handle this
    %>versus this
    //code in some handler or bean
       try{
               //code to get data
              //set an attribute to enable a redirect to jsp page
        catch(Exception e){
              //handle exception, log ?
              //set an attribute to enable a redirect to error page
    Anyways, i wanted to know will the performance of the
    page improve if we call the database from a separate
    java rather than directly from jsp?As evnafets said, the answer is no. It may even be faster :)
    cheers,
    ram.

  • Database access from Managed/Backing bean

    Hi,
    I would like to authenticate web users from a database table, I get the account details
    in the Welcome page, I wish to check if the user exists in the table (from the managed bean), how do I do this?
    Is this good practice to access the db from managed bean? If not how do I do this in model component and pass the value back and forth from managed bean?
    Thanks,
    Jai.

    Hi
    You can get all the information of logged in user from SecurityContext(you can get this either from ADFContext using ADFContext.getCurrent().getSecurityContext() or using EL expression eg. #{securityContext.userName} shows logged in user name)
    API: http://download.oracle.com/docs/cd/E15051_01/apirefs.1111/e10686/oracle/adf/share/security/SecurityContext.html#method_summary
    More details on enabling security: http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/adding_security.htm#BGBCEDDD
    Sireesha

  • Access to Database Access from JDBC

    Hello,
    I have a RFC to JDBC scenario.
    The database is on a different machine to the XI, but from XI is going to map a drive to see the database.
    In the communication channel I specified the drive with the rest of the path:
    jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=Z:/TestDB.mdb
    and I get an error:
    com.sap.aii.af.ra.ms.api.DeliveryException: Database connection could not be established
    Is it possible to access an Access database that is not physically in the machine XI?
    thanks very much,

    hi silvia
    first, you need to install JDBC driver in PI to be able to connect to MS Access.
    please, see these links
    https://forums.sdn.sap.com/click.jspa?searchID=24103238&messageID=7100823
    Re: MS access o XI : External driverof access is required or not.
    Regarding File to JDBC/MS Access database
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f04ce027-934d-2a10-5a8f-fa0b1ed4d88f
    thanks
    PD:points if useful
    Rodrigo

  • Database access from iWeb

    hi all,
    Is there a way to access a database from iWeb (insert database records, update, delete, read ...)
    Thank you,
    Johnny

    Short answer : No
    Here's how you can find out :
    1. Pull down a menu and see if there's a command.
    2. Open the Inspector and check the 10 icons.
    3. Open the Media pane and see if there's a widget.
    If there's none, you have to type the code yourself.
    Here's some explanation how to use PHP in a HTML Snippet :
    http://www.wyodor.net/blog/archives/2010/07/entry_317.html
    http://www.wyodor.net/blog/archives/2011/08/entry_320.html
    And here's an explanation how to use the HTML Snippet :
    http://www.wyodor.net/blog/archives/2009/07/entry_213.html

  • Database access from AIR

    Hello all,
    I'm just getting started with AIR and I'm loving it! One
    thing that I can't seem to find any information about (perhaps
    because it hasn't been done...) is accessing information from a
    database without a (PHP or whatever) program on the server-side
    acting as an intermediary? I know that socket communications are
    available, are there AS / JS libraries available to do this?
    Thanks
    Allan

    You seem pretty conversant with sockets and all; just wanted
    to make sure you knew there is an embedded sqlite app within AIR.
    Don't mean to be patronizing, but if you're looking for a local
    machine solution, it's pretty cool.

  • Database access from flex thro java objects

    Please tell me how to access the data from the MS SQL server
    through a java object and connect it to flex and display the data
    in flex.
    please provide me the code for this assignment.
    Thanks in Advance.
    Selvakumar.

    What would you consider when choosing between FDS and PHP
    (via HTTP) for mySQL communication?
    My app doesn't need to be real time but I am concerned about
    the load on the webserver running PHP. Is that a typical point of
    failure?

  • Database Access from Web Center Portal Application

    Hi,
    I have a requirement to store user preferences in database. These preferences will be fetched at the time of user login and page will be rendered accordingly.
    I was just wondering should I use Entity objects/view object for DB interaction or should I go for eclipselink.
    Please guide which will be the best way keeping performance, maintenance stuff in mind.
    Thanks,
    VN

    I am sorry I missed the environment details.
    I am building oracle webcenter application using ADF framework.
    I cannot use MDS as my user preferences requirements are as follows
    1.Save a certain tab as preferred on a certain page.
    2.Bookmark a product as favorite (Product list will be displayed as dynamic content fetched from UCM)
    3.Make a certain page as home page
    I did some R&D and concluded that these features cannot be implemented without customization (please correct and guide if I am wrong)
    Now I have a custom solution where we will save user prefs in custom DB.
    Coming back to the original question - I need to do some light DB interactions and I am wondering if I can use entity /view object to fetch and update date in DB. Or this is not recommended for such a small degree of DB interaction and I should go for Eclipse link.
    Hope it gives more clarity.
    Please help.
    Thanks,
    VN

  • Write data on database ACCESS from labview

    Hi!
    I want to write on a table of database from labview... I have already succeeded in opening the base and the table but I don't know how write on it... I know that I must use
    with Table
    .Addnew
    Table.Fields(0)=what I want to write
    .update
    end with
    But how do it with labview ???
    Thanks in advance
    hasna
    Attachments:
    lecture_de_la_base.vi ‏35 KB

    Hi Kiki,
    I believe you have another Developer Exchange Forum open for this issue. To keep them similar, I am attaching an updated version of your VI. It is wired to read any errors which occur in the VI. I received error -2147221164. This does not help too much, because the meaning of this error depends upon the ActiveX server. You will want to run this VI yourself, see which error you get, and then consult the ActiveX Server documentation to find the meaning of the error.
    J.R. Allen
    Attachments:
    criture_de_la_base.vi ‏37 KB

  • Database access from WDJava

    Hi experts!!
    I am trying to implement a WD Java with two views.
    The first ones passes the selection parameters for the select statement (to acces the database) in the second one that will show the result of the select statement in table format.
    So far i've implemented the first part:
    When the user presses the 'Submit' button of the first view the following code is triggered. My question is how can i pass the data to the second view's table??? And in which method of the view??
    IWDNode node = wdContext.getChildNode("TEST",0);
    ITESTElement test = wdContext.nodeTEST().currentTESTElement();
            String  name = (String) test.getAttributeValue("NAME");
            String  surname = (String) test.getAttributeValue("SURNAME");
            InitialContext ctx;
            try {
                 ctx = new InitialContext();
               DataSource ds = (DataSource)ctx.lookup( "jdbc/SELECT_POOL");
                 Connection con = ds.getConnection();
              String SelectStmt = "select * from IR_TETS where "
                  + "where NAME = '" + name + "'" ;
                 PreparedStatement stmt = con.prepareStatement(SelectStmt);
            ResultSet resultSet = stmt.executeQuery();
    Please help!!!
    Thanx in advance!!!

    Hi,
    Create a node which contains two attributes
    Ex:
    Details  Cardianlity 0..n
       Name  String
       Age     integer
    Following code will help you to populate the context created above using the data fetched from DB
    InitialContext ctx;
           try {
                ctx = new InitialContext();
                DataSource ds = (DataSource)ctx.lookup( "jdbc/SELECT_POOL");
                Connection con = ds.getConnection();
                String SelectStmt = "select NAME,AGE from IR_TETS where "
                + "where NAME = '" + name + "'" ;
                PreparedStatement stmt = con.prepareStatement(SelectStmt);
                ResultSet resultSet = stmt.executeQuery();
                while (resultSet.next())
                     IWDNodeElement element = wdContext.nodeDetails().createElement();
                     element.setAttributeValue("Name", resultSet.getString("NAME"));
                     element.setAttributeValue("Age", resultSet.getInt("AGE"));
    wdContext.nodeDetails().addElement(element)
           }catch (Exception e) {
              // TODO: handle exception
    Now bind this node to the table
    If their exists records in db you will be able to see them
    Regards
    Ayyapparaj

  • Customer Database Synchonization from R/3 to CRM Problem.

    Dear Sir,
    I just upgrade from CRM 2.0c to CRM 5.0, when to configure the synchonization from SAP R/3 to CRM.  The customer master from R/3 is come to CRM , except the contact person telephone, fax, it does not come to CRM. How can I check on this.
    Please kindly advise.
    Thank you and best regards,
    Vimol

    Hi Vimol,
    Contact person in CRM will get created as separate business partners with internal number range. Make sure you have a generic internal number range assigned to an internal standard grouping.
    Now you can download the object CUSTOMER_REL, which should bring all contact persons into CRM. If still you have the issue, try creating a contact person in CRM manually and see what happens. let me know the outcome
    <b>Do not forget to reward if it helps</b>
    Paul Kondaveeti

Maybe you are looking for

  • My ancient iPod is not being recognized by the computer.

    If I plug my iPhone in using the same cord, the iPhone is recognized.  It was recognizing it earlier when I was trying to upload files.  Now it just has a message about coming to the support page. I haven't used it in a long time, but was hoping to s

  • Problems importing.  error code 50 and 48

    I recently put all my music onto a 1TB LaCie hard drive connected to my network by ethernet. After being away for a few days there had been some sort of power outage and after a bit of trouble hooking up the hard drive again I found that a lot of the

  • How to Change the Name of an iPhone

    So I bought a new 3G phone and gave the old one to my wife who has expressed no desire to have one, and in the 24 she's had in is clearly smitten. I've transferred everything from the old phone to the new, set hers up and all is well except one thing

  • New Condition Table in V/LB

    Dear Experts, We have created new condition table and created new access sequence with the new condition table. In V/LB ( Change Pricing report ) when i going to add new condition table in excisting pricing report system is not allowing. Please sugge

  • Missing Launchpad icons

    Since upgrading to Maverick some of my application icons are missing from Launchpad. The name is there but not the icon. Does anyone know why and how to fix it.