openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SreeAsh <srinivasulu.krist...@fs.mphasis.com>
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">
    <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>

    <properties>
      <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="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
      <property name="openjpa.jdbc.Schema" value="dbo"/>
       </properties>
  </persistence-unit>

Regards
Srini

________________________________
From: DWoods [via OpenJPA] [mailto:ml-node+4541183-1974042908@n2.nabble.com]
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"
value="com.mysql.jdbc.Driver"/>
<property name="openjpa.ConnectionURL"
value="jdbc:mysql://<SERVER_NAME>/<DB_NAME>"/>

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



-Donald


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 "com.microsoft.sqlserver.jdbc.SQLServerDriver" 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="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
>     </properties>
>   </persistence-unit>
>
> please help me to fix this issue....
>
> regsrds
> Srini

________________________________
View message @ http://n2.nabble.com/While-connecting-MySql-Server-i-am-getting-the-Error-For-input-string-JDBC-tp4540703p4541183.html
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 mailmaster@fs.mphasis.com and delete this mail from your records.

-- 
View this message in context: http://n2.nabble.com/While-connecting-MySql-Server-i-am-getting-the-Error-For-input-string-JDBC-tp4540703p4545924.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

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