openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SreeAsh <>
Subject RE: While connecting MySql Server i am getting the Error For input string: "JDBC"
Date Wed, 10 Feb 2010 04:35:02 GMT

Thanks for reply,

 I am using the Microsoft Sql Server; please see the driverName in Persistence.xml file
<persistence-unit name="TestSql" transaction-type="RESOURCE_LOCAL">

      <property name="openjpa.ConnectionUserName" value="appl_id2"/>
      <property name="openjpa.ConnectionPassword" value="appl_id2"/>
      <property name="openjpa.ConnectionURL" value="jdbc:sqlserver://host:port/CustomerDB"/>
      <property name="openjpa.ConnectionDriverName" value=""/>
      <property name="openjpa.jdbc.Schema" value="dbo"/>


From: DWoods [via OpenJPA] []
Sent: Tuesday, February 09, 2010 7:35 PM
To: Srinivasulu.Kristnam
Subject: Re: While connecting MySql Server i am getting the Error For input string: "JDBC"

Are you trying to connect to a Microsoft SQL Server or a MySQL server?
Your email says MySQL, but the error message shows you are trying to use
the Microsoft SQL Server driver....

For MySQL, you would use -
<property name="openjpa.ConnectionDriverName"
<property name="openjpa.ConnectionURL"

where <SERVER_NAME> is the IP Address of your MySQL server and <DB_NAME>
is the DB name to connect to.


On 2/9/10 7:19 AM, SreeAsh wrote:

> Hi ,
>   I am new to the JPA, I am using the MySql Server to OpenJPa, while
> connecting to the databse throwing the following error.
> <openjpa-1.2.0-r422266:683325 fatal user error>
> org.apache.openjpa.util.UserException: A connection could not be obtained
> for driver class "" and URL
> "jdbc:sqlserver://host\port;databaseName=MyDataBase".  You may have
> specified an invalid URL.
> Error For input string: "JDBC" and in
> pelase see the persistence.xml file
> <persistence-unit name="TestJpaPU" transaction-type="RESOURCE_LOCAL">
> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>     <class>com.test.jpa.TblCustAddress</class>
>     <class>com.test.jpa.TblCustContact</class>
>     <class>com.test.jpa.TblCustomer</class>
>     <properties>
>       <property name="openjpa.ConnectionUserName" value="user"/>
>       <property name="openjpa.ConnectionPassword" value="pass"/>
>       <property name="openjpa.ConnectionURL"
> value="jdbc:sqlserver://host\port;databaseName=Mydatabase"/>
>       <property name="openjpa.ConnectionDriverName"
> value=""/>
>     </properties>
>   </persistence-unit>
> please help me to fix this issue....
> regsrds
> Srini

View message @
To unsubscribe from While connecting MySql Server i am getting the Error For input string:
"JDBC", click here< (link removed) =>.

Information transmitted by this e-mail is proprietary to MphasiS, its associated companies
and/ or its customers and is intended for use only by the individual or entity to which it
is addressed, and may contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you are not the intended recipient or it appears that
this mail has been forwarded to you without proper authority, you are notified that any use
or dissemination of this information in any manner is strictly prohibited. In such cases,
please notify us immediately at and delete this mail from your records.

View this message in context:
Sent from the OpenJPA Developers mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message