Results 1 to 4 of 4
  1. #1
    praveen_1987 is offline Member
    Join Date
    May 2010
    Posts
    3
    Rep Power
    0

    Default Database connectivity error with Websphere server

    Hi,
    i configured websphere server for database connection and also i mentioned the connection url with user name and pwd in the persistence.xml file of JPA.once i try to get the data, i got the following error.
    EJB threw an unexpected (non-declared) exception
    org.apache.---.persistence.PersistenceException: There were errors initializing your configuration.A connection could not be obtained for driver class "com.microsoft.sqlserver.jdbc.SQLServerDriver" and URL
    jdbc:sqlserver://----- You may have specified an invalid URL.

    please provide me the solution for this.

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Perhaps you didn't confogure your persistence.xml file correctly.
    Perhaps there are more error messages in your logs that you did not post.
    You need to investigate and provide more information to get help.

  3. #3
    praveen_1987 is offline Member
    Join Date
    May 2010
    Posts
    3
    Rep Power
    0

    Default

    Hi,
    the following are the one i am gettig as the cause for the error
    Caused by: com.ibm.websphere.ce.cm.StaleConnectionException: The TCP/IP connection to the host has failed. java.net.UnknownHostException: DSRA0010E: SQL State = 08S01, Error Code = 0
    Caused by: java.lang.RuntimeException: There were errors initializing your configuration: <openjpa-1.2.1-SNAPSHOT-r422266:686069 fatal user error> org.apache.openjpa.util.UserException: A connection could not be obtained for driver class "com.microsoft.sqlserver.jdbc.SQLServerDriver" and URL "jdbc:sqlserver://hostname:portname;databaseName="databasename". You may have specified an invalid URL.

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    So you have an UnknownHostException. First see if you can ping the host that you are specifying in your url. Then see if you can telnet into the port the DB is listening on.
    If you can't do any of those things then you have a network problem.

Similar Threads

  1. Database connectivity
    By rajiparth in forum JDBC
    Replies: 1
    Last Post: 04-07-2009, 07:39 PM
  2. database connectivity
    By rilwanfit in forum Networking
    Replies: 1
    Last Post: 03-13-2009, 07:54 PM
  3. database connectivity
    By vani in forum Eclipse
    Replies: 0
    Last Post: 11-21-2008, 10:03 AM
  4. Websphere Application Server
    By Albert in forum Advanced Java
    Replies: 1
    Last Post: 07-05-2007, 06:52 PM
  5. Replies: 4
    Last Post: 06-05-2007, 01:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •