openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: While connecting MySql Server i am getting the Error For input string: "JDBC"
Date Tue, 09 Feb 2010 13:52:18 GMT
Hi Srini,

You need to replace hostname , port, and myDataBase in with the appropriate
values for your database.

For example :
<property name="openjpa.ConnectionURL"
value="jdbc:sqlserver://localhost:1433;databaseName=testDatabase"/>

Regards,
-mike


On Tue, Feb 9, 2010 at 6:19 AM, SreeAsh <srinivasulu.kristnam@fs.mphasis.com
> 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 this message in context:
> http://n2.nabble.com/While-connecting-MySql-Server-i-am-getting-the-Error-For-input-string-JDBC-tp4540703p4540703.html
> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>

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