Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Spring 3.0.6+Eclipselink2.4.0 persist/insert is not working
Spring 3.0.6+Eclipselink2.4.0 persist/insert is not working [message #897418] Tue, 24 July 2012 04:53 Go to next message
Aditya Indramarta is currently offline Aditya IndramartaFriend
Messages: 2
Registered: July 2012
Junior Member
Hello,


I am using Spring306 + EclipseLink240 to manage entity on a MySql database. Select object from db works fine but when I try to persist one, nothing happens. Program executes correctly and no exception are thrown. I probably did something wrong, as I'm not familiar with Spring, thanks for your comments and suggestions

see my attachment for my code
  • Attachment: Context.xml
    (Size: 4.91KB, Downloaded 195 times)
  • Attachment: Persistence.xml
    (Size: 1.57KB, Downloaded 200 times)
  • Attachment: UserDao.java
    (Size: 2.42KB, Downloaded 250 times)
  • Attachment: User.java
    (Size: 10.14KB, Downloaded 300 times)
  • Attachment: UserPK.java
    (Size: 1.69KB, Downloaded 212 times)

[Updated on: Tue, 24 July 2012 05:35]

Report message to a moderator

Re: Spring 3.0.6+Eclipselink2.4.0 persist/insert is not working [message #899661 is a reply to message #897418] Wed, 01 August 2012 17:35 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Check that your Spring transaction is being committed and is integrated with your persistence unit correctly.

Set logging on finest in EclipseLink to determine what is occurring. My guess is that the EntityManager's transaction is never committed.


James : Wiki : Book : Blog : Twitter
Re: Spring 3.0.6+Eclipselink2.4.0 persist/insert is not working [message #899707 is a reply to message #899661] Thu, 02 August 2012 03:32 Go to previous message
Aditya Indramarta is currently offline Aditya IndramartaFriend
Messages: 2
Registered: July 2012
Junior Member
Thank James,
i found solution for my case it because my spring transaction configuration is the mode="aspectj",
i change to :

<tx:annotation-driven transaction-manager="tmMySql"/>


it work smoothly...
Previous Topic:Problem with 2.4 and Sybase drivers
Next Topic:Map<Enum, Entity> table creation works (3 columns), query is wrong (2 values)
Goto Forum:
  


Current Time: Sat Sep 23 11:13:22 GMT 2017

Powered by FUDForum. Page generated in 0.02917 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software