This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes EJB, JPA with MS AQccess Database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB, JPA with MS AQccess Database" Watch "EJB, JPA with MS AQccess Database" New topic
Author

EJB, JPA with MS AQccess Database

sujendra sugur
Greenhorn

Joined: Mar 25, 2010
Posts: 12
Hi,


Please any body let me know how to access with MS Access DB in EJB 3 .

Please suggest me one example with Access DB

Thanks
Sujendra
Suhas Mandrawadkar
Ranch Hand

Joined: Jul 21, 2007
Posts: 72

Hi Sujendra,

I am not really sure about this but in my opinion, you will have to create a Datasource from the Application Server's administration console and then use it in your application using CDI

Regards, Suhas S. Mandrawadkar.
Certifications: SCJP 6, SCWCD 5, Oracle WebLogic Server Administrator, OCE Java EE 6 EJB Developer
sujendra sugur
Greenhorn

Joined: Mar 25, 2010
Posts: 12
hi,


I already created DSN in system but unable to execute . i need to know what are else to be written in persistence.xml .

i wrote like this

<persistence-unit name="MSAccessDS">
<jta-data-source>java:/MSAccessDS</jta-data-source>
<class>cts.HelloEntity</class>

</persistence-unit>.

and i changed all required changes in msaccess-ds.xml file.

iam getting error.

MBeans waiting for other MBeans ---
ObjectName: persistence.units:jar=ejb.jar,unitName=MSAccessDS
State: FAILED
Reason: javax.persistence.PersistenceException: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set for database: ACCESS
I Depend On:
jboss.jca:service=DataSourceBinding,name=MSAccessDS
Depends On Me:
jboss.j2ee:jar=ejb.jar,name=HelloBeanImpl,service=EJB3
jboss.j2ee:jar=ejb.jar,name=Sample,service=EJB3

ObjectName: jboss.j2ee:jar=ejb.jar,name=HelloBeanImpl,service=EJB3
State: NOTYETINSTALLED
I Depend On:
persistence.units:jar=ejb.jar,unitName=MSAccessDS

ObjectName: jboss.j2ee:jar=ejb.jar,name=Sample,service=EJB3
State: NOTYETINSTALLED
I Depend On:
persistence.units:jar=ejb.jar,unitName=MSAccessDS


please help


thanks
sujendra
Richard Reese
author
Ranch Hand

Joined: Jul 13, 2011
Posts: 57
    
    5

Sujendra,


I haven't tried to use MS-Access with Hibernate. However, the following may be useful: http://www.programmingforfuture.com/2011/06/how-to-use-ms-access-with-hibernate.html.

Richard Reese
EJB 3.1 Cookbook
Java 7 New Features Cookbook
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB, JPA with MS AQccess Database
 
Similar Threads
NetBeans IDE 5.0 = how to connect my database
Hibernate and MS Access?
EJB with Data Base Access
Between Syntax
Transactions with MS - Access ?