Announcement Announcement Module
Collapse
No announcement yet.
regarding petclinic sample app: error when adding a owner Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • regarding petclinic sample app: error when adding a owner

    I deployed the petclinic sample application in Tomcat 5.0.18 with mysql 4.0.20. I could do search and view records. However when I tried to add a new owner, I typed in the information and clicked on submit, I got the following error: (thank you for your help)

    java.lang.AbstractMethodError: com.mysql.jdbc.jdbc2.Connection.prepareStatement(L java/lang/String;I)Ljava/sql/PreparedStatement;
    sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:324)
    net.sf.hibernate.util.GetGeneratedKeysHelper.prepa reStatement(GetGeneratedKeysHelper.java:39)
    net.sf.hibernate.impl.BatcherImpl.getPreparedState ment(BatcherImpl.java:254)
    net.sf.hibernate.impl.BatcherImpl.prepareStatement (BatcherImpl.java:61)
    net.sf.hibernate.persister.EntityPersister.insert( EntityPersister.java:525)
    net.sf.hibernate.persister.EntityPersister.insert( EntityPersister.java:432)
    net.sf.hibernate.impl.ScheduledIdentityInsertion.e xecute(ScheduledIdentityInsertion.java:29)
    net.sf.hibernate.impl.SessionImpl.doSave(SessionIm pl.java:932)
    net.sf.hibernate.impl.SessionImpl.doSave(SessionIm pl.java:857)
    net.sf.hibernate.impl.SessionImpl.saveWithGenerate dIdentifier(SessionImpl.java:775)
    net.sf.hibernate.impl.SessionImpl.save(SessionImpl .java:738)
    net.sf.hibernate.impl.SessionImpl.saveOrUpdate(Ses sionImpl.java:1388)
    org.springframework.orm.hibernate.HibernateTemplat e$13.doInHibernate(HibernateTemplate.java:344)
    org.springframework.orm.hibernate.HibernateTemplat e.execute(HibernateTemplate.java:200)
    org.springframework.orm.hibernate.HibernateTemplat e.saveOrUpdate(HibernateTemplate.java:341)
    org.springframework.samples.petclinic.hibernate.Hi bernateClinic.storeOwner(HibernateClinic.java:44)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:324)
    org.springframework.aop.framework.AopProxyUtils.in vokeJoinpointUsingReflection(AopProxyUtils.java:61 )
    org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:149)
    org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :116)
    org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:56)
    org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :138)
    org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:152)
    $Proxy0.storeOwner(Unknown Source)
    org.springframework.samples.petclinic.web.AddOwner Form.onSubmit(AddOwnerForm.java:28)
    org.springframework.web.servlet.mvc.SimpleFormCont roller.onSubmit(SimpleFormController.java:297)
    org.springframework.web.servlet.mvc.SimpleFormCont roller.onSubmit(SimpleFormController.java:272)
    org.springframework.web.servlet.mvc.SimpleFormCont roller.processFormSubmission(SimpleFormController. java:223)
    org.springframework.web.servlet.mvc.AbstractFormCo ntroller.handleRequestInternal(AbstractFormControl ler.java:237)
    org.springframework.web.servlet.mvc.AbstractContro ller.handleRequest(AbstractController.java:128)
    org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter.handle(SimpleControllerHandlerAda pter.java:44)
    org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:522)
    org.springframework.web.servlet.FrameworkServlet.s ervice(FrameworkServlet.java:321)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:856)

  • #2
    You need to use a JDBC driver that supports JDBC 3.0. The most recent MySQL driver mysql-connector-java-3.0.15-ga should work.

    Comment


    • #3
      Thanks

      I see.

      Comment

      Working...
      X