0 Replies Latest reply on Sep 7, 2006 6:27 PM by carlos decoppet


    carlos decoppet Newbie

      DataBase Oracle9i
      JBoss 3.2.5

      I have an entity with the next declaration:

       * @ejb.persistence colum-name="fechaexp"
       * @ejb.interface-method
       public abstract java.sql.Timestamp getFechaexp();
       * @ejb.interface-method
       public abstract void setFechaexp(java.sql.Timestamp newFechaexp);

      and in database the fiel fechaExp is Date.

      When I try to recovery the entity:
      1) if the field in database is null or was fill with date-time, I have no problem.
      2) but if the field was only fill with date, I get the next exception:

      javax.ejb.EJBException: Internal error getting results for field fechaexp; nested exception is: java
      .lang.ArrayIndexOutOfBoundsException: -1
      java.lang.ArrayIndexOutOfBoundsException: -1
       at oracle.jdbc.driver.DateTimeCommonAccessor.computeJulianDay(DateTimeCommonAccessor.java:341)
       at oracle.jdbc.driver.DateTimeCommonAccessor.getMillis(DateTimeCommonAccessor.java:386)
       at oracle.jdbc.driver.DateTimeCommonAccessor.getDate(DateTimeCommonAccessor.java:83)

      Tables in database is not only accessed by my application, other application don't made in Java uses the tables too.
      I have tried various configurations
      1) change the field declaration to java.sql.Date. No work
      2) add to xdoclet declaration
       * @ejb.persistence jdbc-type="DATE" sql-type="TIMESTAMP" colum-name="fechaexp"
       * @ejb.interface-method

       * @ejb.persistence jdbc-type="DATE" sql-type="DATE" colum-name="fechaexp"
       * @ejb.interface-method

      and I get the same exception.

      Any help.