If you can reach the SQLServer DB using the JDBC driver directly,
then there is no reason why you shouldn't be able to reach it
through the JPA Persistence layer.
Try looking on Oracle's Toplink website (they are the suppliers
of the "official" JPA library for the JDK) for a possible answer
to your question.
If you can't find anything there, try replacing the Toplink JPA
layer with Hibernate (from JBoss). Their JPA library may have
a better chance of working with your JDBC driver.
Arshad Noor
StrongAuth, Inc.
rsajja wrote:
> Yes, I do have a JDBC driver installed. In fact, I am able to write a JDBC program to access SQL Server 2008 database using that driver. But am having trouble using JPA with the same driver.
>
>
>
> I wanted to find out if anybody has used JPA with SQL Server 2008.
>
>
>
> Thanks.
>
>
>
>
> Arshad Noor wrote:
>> Do you have a JDBC driver installed for SQLServer? NB supports
>
>> Apache Derby (JavaDB) directly, but I'm not sure if it includes
>
>> a JDBC driver for SQLServer.
>
>
>> Arshad Noor
>
>> StrongAuth, Inc.
>
>
>> rsajja wrote:
>
>>> I am able to create a simple JPA Java application from NetBeans using Apache Derby database. But when I try to do the same with SQL Server 2008, I keep getting the following error:
>
>
>
>
>>> SEVERE: Application class sample.DBTestApp failed to launch
>
>
>>> javax.persistence.PersistenceException: No Persistence provider for EntityManager named RS6910SQLEXPRESS:3027;databaseName=TestPU: The following providers:
>
>
>>> oracle.toplink.essentials.PersistenceProvider
>
>
>>> oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
>
>
>>> Returned null to createEntityManagerFactory.
>
>
>
>
>>> at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:154)
>
>
>>> at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
>
>
>>> at sample.DBTestAppView.initComponents(DBTestAppView.java:285)
>
>
>>> at sample.DBTestAppiew.<init>(DBTestAppiew.java:36)
>
>
>>> at sample.DBTestApp.startup(DBTestApp.java:19)
>
>
>
>
>>> Appreciate your help looking into this.
>
>
>
>
>
>
>
>
>