Search:

Type: Posts; User: crazeinc; Keyword(s):

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. SessionImpl.execute(2379) | Could not synchronize...

    SessionImpl.execute(2379) | Could not synchronize database state with session
    net.sf.hibernate.HibernateException: Batch update row count wrong: 0
    at...
  2. I am using a few primitive fields, but they all...

    I am using a few primitive fields, but they all have values.
  3. Could not synchronize database state with session

    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...
  4. Replies
    10
    Views
    2,858

    thanks guys

    thanks guys
  5. Replies
    10
    Views
    2,858

    I finally figured out where I saw the code from....

    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;
  6. Replies
    10
    Views
    2,858

    Hibernate return value after insert

    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...
  7. Replies
    3
    Views
    1,138

    Anybody? I'm kind of at a loss. Perhaps a better...

    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?
  8. Replies
    3
    Views
    1,138

    Preventing double-submissions

    I added this code from the petclinic sample to my form controller:



    protected ModelAndView handleInvalidSubmit(HttpServletRequest request,
    HttpServletResponse response) throws...
  9. Replies
    13
    Views
    6,539

    That's basically what I'm doing now. I set the...

    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...
  10. Replies
    13
    Views
    6,539

    I talked to the sysadmin and he said the network...

    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...
  11. Replies
    13
    Views
    6,539

    According to the C3P0 documentation: ...

    According to the C3P0 documentation:


    idleConnectionTestPeriod sounds like somebody I should be setting, but I wonder how long fairly long means?
  12. Replies
    13
    Views
    6,539

    That's very interesting, I have a feeling that...

    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...
  13. Replies
    13
    Views
    6,539

    Well, the fun isn't over yet. Here's the...

    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...
  14. Replies
    13
    Views
    6,539

    I went ahead and switched to the c3p0 driver and...

    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...
  15. Replies
    13
    Views
    6,539

    Odd PostgreSQL problem

    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...
  16. Replies
    2
    Views
    1,049

    Thanks, I figured with the package name that it...

    Thanks, I figured with the package name that it was in the spring jar. Bad assumption to make apparently :wink:
  17. Replies
    2
    Views
    1,049

    Problem with JavaMailSenderImpl

    I'm getting this error:



    org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'mailSender' defined in ServletContext resource...
  18. Replies
    4
    Views
    1,323

    This is the solution I've come up with so far. It...

    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...
  19. Replies
    4
    Views
    1,323

    Grabbing next id before saving to the db?

    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...
  20. Thread: File upload

    by crazeinc
    Replies
    2
    Views
    991

    There's probably a better way, but why not just...

    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?
  21. Replies
    4
    Views
    857

    ah, I see now, thanks a bunch!

    ah, I see now, thanks a bunch!
  22. Replies
    4
    Views
    857

    Code from MessageController: public class...

    Code from MessageController:


    public class MessageController implements Controller {
    private final Log log = LogFactory.getLog(MessageController.class);
    private MessageManager...
  23. Replies
    4
    Views
    857

    readOnly error

    Hi guys, I'm getting a nullpointerexception from this warning:


    WARN - DispatcherServlet.doService(609) | Handler execution resulted in exception - forwarding to resolved error view...
  24. Thank you for that blurb of code by the way, the...

    Thank you for that blurb of code by the way, the app is working nicely.
  25. To be honest with you I wasn't quite sure, I'm...

    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?
Results 1 to 25 of 43
Page 1 of 2 1 2