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 <[email protected]
> 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.
>

Reply via email to