Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB, JPA with MS AQccess Database

 
sujendra sugur
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 72
Android Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
sujendra sugur
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 84
5
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic