0 Replies Latest reply on Feb 2, 2004 11:22 PM by k sw

    MySQL loader constraint error

    k sw Newbie

      Firstly, I'd like to apologize if this is not the appropriate Section for posting this problem.

      I am developing an application using MySQL 4.0 as datasource. It is currently tested and developed on JBoss 3.2.1. I have not encountered any problem configuring the dataSource and developing codes that accesses the database.

      All is fine except when I try to access a DATETIME field, I will get the following error:

      javax.servlet.ServletException: Unexpected Error
      java.lang.LinkageError: Class com/mysql/jdbc/Connection violates loader constraints
       at com.mysql.jdbc.TimeUtil.changeTimezone(TimeUtil.java:987)
       at com.mysql.jdbc.ResultSet.getTimestampInternal(ResultSet.java:3824)
       at com.mysql.jdbc.ResultSet.getTimestamp(ResultSet.java:1911)
       at com.mysql.jdbc.ResultSet.getTimestamp(ResultSet.java:1925)
       at com.p2h.application.billpayment.support.jdbc.MysqlJdbcBillPaymentOrderDAO

      I understand that LinkageError are usually caused by two copies of the same class existing in the server. After looking around, I found 2 copies of MySQL JDBC driver within the tmp directory that resulted from repeated deployment/undeployment of my application. The files are named [xx].mysql-connector....jar where [xx] are numbers.

      1. Are the files under tmp the cause of the problem above?
      2. If so, can this be avoided without having to manually delete the older copies?