[jboss-user] [Datasource Configuration] - Timestamp--date--oracle

cfd_bv do-not-reply at jboss.com
Thu Sep 7 17:13:18 EDT 2006


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
  | 	 */
  | 
or

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

and I get the same exception.

Any help.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970221#3970221

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970221



More information about the jboss-user mailing list