SessionImpl.execute(2379) | Could not synchronize database state with session
net.sf.hibernate.HibernateException: Batch update row count wrong: 0
at...
Type: Posts; User: crazeinc; Keyword(s):
SessionImpl.execute(2379) | Could not synchronize database state with session
net.sf.hibernate.HibernateException: Batch update row count wrong: 0
at...
I am using a few primitive fields, but they all have values.
I'm a bit mystified why I'm getting this error after a month of no problems with this class:
SessionImpl.execute(2379) | Could not synchronize database state with session...
thanks guys
I finally figured out where I saw the code from. This is from Spring Live:
in the user manager:
public User saveUser(User user){
dao.saveUser(user);
return user;
I was under the impression there was a way to get a return value after using one of the getHibernateTemplate() functions that inserts an object in the db. What I'd like is the id of the row that was...
Anybody? I'm kind of at a loss. Perhaps a better question to ask would be how did you prevent double-submissions if this wasn't the method you followed?
I added this code from the petclinic sample to my form controller:
protected ModelAndView handleInvalidSubmit(HttpServletRequest request,
HttpServletResponse response) throws...
That's basically what I'm doing now. I set the idleConnectionTestPeriod to 10 minutes and haven't gotten the exception since then so I'm happy to have this solved for the interim until the server...
I talked to the sysadmin and he said the network has a short TCP timeout so there's 2 C3P0 properties I'm looking at to get around this:
maxIdleTime & idleConnectionTestPeriod. I could use the...
According to the C3P0 documentation:
idleConnectionTestPeriod sounds like somebody I should be setting, but I wonder how long fairly long means?
That's very interesting, I have a feeling that this is the problem. Unfortunately, I changed two variables when I moved from MySQL to Postgres. The MySQL db was located on the same machine as Tomcat...
Well, the fun isn't over yet. Here's the exception I'm getting now:
com.mchange.v2.c3p0.impl.C3P0PooledConnection@4173b9 invalidated by Exception: org.postgresql.util.PSQLException: An I/O...
I went ahead and switched to the c3p0 driver and everything appears to working okay. Spring really makes switching these pooling jars around with such ease, I love it. Unfortunately, I won't really...
I recently changed my site's db from MySQL to PostgreSQL. Everything went smoothly, except for one thing. If I visit the site for the first time in a while, it'll throw an exception. Any subsequent...
Thanks, I figured with the package name that it was in the spring jar. Bad assumption to make apparently :wink:
I'm getting this error:
org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'mailSender' defined in ServletContext resource...
This is the solution I've come up with so far. It works, but I'm sure it could be better. I'm doing this because I've been told to store the images in the file system and not the database. I think...
I'd like to be able to grab the next primary key id (or maybe the last id used + 1) from a table so I can set an image name that corresponds with that id (and subsequent row information). Is there...
There's probably a better way, but why not just grab the existing image (if it's there) and set it again when you're editing the object?
ah, I see now, thanks a bunch!
Code from MessageController:
public class MessageController implements Controller {
private final Log log = LogFactory.getLog(MessageController.class);
private MessageManager...
Hi guys, I'm getting a nullpointerexception from this warning:
WARN - DispatcherServlet.doService(609) | Handler execution resulted in exception - forwarding to resolved error view...
Thank you for that blurb of code by the way, the app is working nicely.
To be honest with you I wasn't quite sure, I'm fairly new to Spring and AOP in general. Can you define a filter in the application context as if were any other class?