1 Reply Latest reply on Oct 22, 2002 7:44 AM by Shaun Appleton

    JDK1.4 method not available in JDK1.3

    Shaun Appleton Newbie

      I am running JBoss_3.0.3 with Tomcat_4.0.5 with MySql 3.23.49 on NT
      using JDK1.4.1_01

      and I get the following error:

      2002-10-22 11:05:38,515 INFO [STDOUT] LessonBean:ejbCreate() called.
      2002-10-22 11:05:38,515 INFO [STDOUT] Caught exception!
      2002-10-22 11:05:38,515 ERROR [STDERR] javax.ejb.CreateException: java.sql.SQLException: JDK1.4 method not available in JDK1.3
      2002-10-22 11:05:38,515 ERROR [STDERR] at jlids.lesson.LessonBean.ejbCreate(LessonBean.java:721)
      2002-10-22 11:05:38,515 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2002-10-22 11:05:38,515 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2002-10-22 11:05:38,515 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2002-10-22 11:05:38,515 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324)
      ...
      Now I know that my code requires JDK1.4 as it uses some features only available in JDK1.4

      specifically

      pstmt = conn.prepareStatement("insert into TblJLIDSEntry (LISerial) values ('')", Statement.RETURN_GENERATED_KEYS);

      pstmt.executeUpdate();
      /*
      * Generate the Primary Key and return it
      */
      ResultSet rs = pstmt.getGeneratedKeys();
      if (rs.next())
      {
      myPrimKey = rs.getInt(1);
      }

      Has anybody seen this before? If so it a problem with JDK1.4, JBoss or the JDBC driver?

      Thankyou,

      Shaun