You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by yh-maurizio <m....@reply.it> on 2006/11/17 11:01:51 UTC

Timestamp & Oracle

Hello to everybody.

I'm working with OfBiz using an Oracle DB. I've got an error on the
timestamp using the JOB_SANDBOX table. The problem is in the
java.sql.Timestamp format that is not compatible with oracle.sql.TIMESTAMP.
I've just tryed to convert all the occurrency of Timestamp type in the
framework\service\src\org\ofbiz\service\job\JobManager.java source on
TIMESTAMP type but without result.
I'm looking for a solution, but if someone has already solved this same
problem or want to give me a suggestion... I'd  welcome his hints.

Thanks in advance!

2006-11-16 18:24:42,562 (org.ofbiz.service.job.JobPoller@ab444) [  
GenericDelegator.java:945:ERROR] 
---- exception report
----------------------------------------------------------
Failure in storeByCondition operation for entity [JobSandbox]:
org.ofbiz.entity.GenericDataSourceException: Generic Entity Exception
occured in updateByCondition (SQL Exception while executing the
following:UPDATE ECOMMERCE.JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?, STATUS_ID
= ? WHERE ((RUN_TIME <= '2006-11-16 18:24:42.546' AND START_DATE_TIME IS
NULL AND CANCEL_DATE_TIME IS NULL AND RUN_BY_INSTANCE_ID IS NULL) AND
(POOL_ID IS NULL OR POOL_ID = 'pool')) (ORA-01843: not a valid month
)). Rolling back transaction.
Exception: org.ofbiz.entity.GenericDataSourceException
Message: Generic Entity Exception occured in updateByCondition (SQL
Exception while executing the following:UPDATE ECOMMERCE.JOB_SANDBOX SET
RUN_BY_INSTANCE_ID = ?, STATUS_ID = ? WHERE ((RUN_TIME <= '2006-11-16
18:24:42.546' AND START_DATE_TIME IS NULL AND CANCEL_DATE_TIME IS NULL AND
RUN_BY_INSTANCE_ID IS NULL) AND (POOL_ID IS NULL OR POOL_ID = 'pool'))
(ORA-01843: not a valid month
))
---- stack trace
---------------------------------------------------------------
org.ofbiz.entity.GenericDataSourceException: Generic Entity Exception
occured in updateByCondition (SQL Exception while executing the
following:UPDATE ECOMMERCE.JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?, STATUS_ID
= ? WHERE ((RUN_TIME <= '2006-11-16 18:24:42.546' AND START_DATE_TIME IS
NULL AND CANCEL_DATE_TIME IS NULL AND RUN_BY_INSTANCE_ID IS NULL) AND
(POOL_ID IS NULL OR POOL_ID = 'pool')) (ORA-01843: not a valid month
))
org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:288)
org.ofbiz.entity.datasource.GenericHelperDAO.storeByCondition(GenericHelperDAO.java:186)
org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:942)
org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:917)
org.ofbiz.service.job.JobManager.poll(JobManager.java:151)
org.ofbiz.service.job.JobPoller.run(JobPoller.java:82)
java.lang.Thread.run(Thread.java:595)
org.ofbiz.entity.GenericDataSourceException: SQL Exception while executing
the following:UPDATE ECOMMERCE.JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?,
STATUS_ID = ? WHERE ((RUN_TIME <= '2006-11-16 18:24:42.546' AND
START_DATE_TIME IS NULL AND CANCEL_DATE_TIME IS NULL AND RUN_BY_INSTANCE_ID
IS NULL) AND (POOL_ID IS NULL OR POOL_ID = 'pool')) (ORA-01843: not a valid
month
)
org.ofbiz.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:427)
org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:330)
org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:285)
org.ofbiz.entity.datasource.GenericHelperDAO.storeByCondition(GenericHelperDAO.java:186)
org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:942)
org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:917)
org.ofbiz.service.job.JobManager.poll(JobManager.java:151)
org.ofbiz.service.job.JobPoller.run(JobPoller.java:82)
java.lang.Thread.run(Thread.java:595)
java.sql.SQLException: ORA-01843: not a valid month
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152)
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035)
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876)
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
org.ofbiz.minerva.pool.jdbc.PreparedStatementInPool.executeUpdate(PreparedStatementInPool.java:82)
org.ofbiz.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:424)
org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:330)
org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:285)
org.ofbiz.entity.datasource.GenericHelperDAO.storeByCondition(GenericHelperDAO.java:186)
org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:942)
org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:917)
org.ofbiz.service.job.JobManager.poll(JobManager.java:151)
org.ofbiz.service.job.JobPoller.run(JobPoller.java:82)
java.lang.Thread.run(Thread.java:595)
--------------------------------------------------------------------------------

-- 
View this message in context: http://www.nabble.com/Timestamp---Oracle-tf2650556.html#a7396724
Sent from the OFBiz - Dev mailing list archive at Nabble.com.


Re: Oracle : Warning or Error.

Posted by David E Jones <jo...@undersunconsulting.com>.
It looks like your JDBC driver is not getting the meta data it needs  
for this. If you want it to work, check out DatabaseUtil.java and  
make changes there. The simplest way to avoid the warnings is to turn  
the feature off using the attributes on the datasource element in the  
entityengine.xml file.

-David


On Nov 17, 2006, at 11:59 AM, Chandresh Turakhia wrote:

> Dear all ,
>
> I get tons of such messages but application / user registration works.
>
> What is reason and implications of this errors.
>
> Chand
>
>
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [ACCTG_TRANS_ID] of table [OFBIZ.ACCTG_TRANS] of  
> entity [AcctgTrans] IS NOT a primary key in the database, but IS a  
> primary key in the entity definition. The primary key for this  
> table needs to be re-created or modified to add this column to the  
> primary key. Note that data may need to be added first as a primary  
> key column cannot have an null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [ACCTG_TRANS_ID] of table  
> [OFBIZ.ACCTG_TRANS_ATTRIBUTE] of entity [AcctgTransAttribute] IS  
> NOT a primary key in the database, but IS a primary key in the  
> entity definition. The primary key for this table needs to be re- 
> created or modified to add this column to the primary key. Note  
> that data may need to be added first as a primary key column cannot  
> have an null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [ATTR_NAME] of table [OFBIZ.ACCTG_TRANS_ATTRIBUTE]  
> of entity [AcctgTransAttribute] IS NOT a primary key in the  
> database, but IS a primary key in the entity definition. The  
> primary key for this table needs to be re-created or modified to  
> add this column to the primary key. Note that data may need to be  
> added first as a primary key column cannot have an null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [ACCTG_TRANS_ID] of table [OFBIZ.ACCTG_TRANS_ENTRY]  
> of entity [AcctgTransEntry] IS NOT a primary key in the database,  
> but IS a primary key in the entity definition. The primary key for  
> this table needs to be re-created or modified to add this column to  
> the primary key. Note that data may need to be added first as a  
> primary key column cannot have an null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [ACCTG_TRANS_ENTRY_SEQ_ID] of table  
> [OFBIZ.ACCTG_TRANS_ENTRY] of entity [AcctgTransEntry] IS NOT a  
> primary key in the database, but IS a primary key in the entity  
> definition. The primary key for this table needs to be re-created  
> or modified to add this column to the primary key. Note that data  
> may need to be added first as a primary key column cannot have an  
> null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [ACCTG_TRANS_ENTRY_TYPE_ID] of table  
> [OFBIZ.ACCTG_TRANS_ENTRY_TYPE] of entity [AcctgTransEntryType] IS  
> NOT a primary key in the database, but IS a primary key in the  
> entity definition. The primary key for this table needs to be re- 
> created or modified to add this column to the primary key. Note  
> that data may need to be added first as a primary key column cannot  
> have an null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [ACCTG_TRANS_TYPE_ID] of table  
> [OFBIZ.ACCTG_TRANS_TYPE] of entity [AcctgTransType] IS NOT a  
> primary key in the database, but IS a primary key in the entity  
> definition. The primary key for this table needs to be re-created  
> or modified to add this column to the primary key. Note that data  
> may need to be added first as a primary key column cannot have an  
> null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [ACCTG_TRANS_TYPE_ID] of table  
> [OFBIZ.ACCTG_TRANS_TYPE_ATTR] of entity [AcctgTransTypeAttr] IS NOT  
> a primary key in the database, but IS a primary key in the entity  
> definition. The primary key for this table needs to be re-created  
> or modified to add this column to the primary key. Note that data  
> may need to be added first as a primary key column cannot have an  
> null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [ATTR_NAME] of table [OFBIZ.ACCTG_TRANS_TYPE_ATTR]  
> of entity [AcctgTransTypeAttr] IS NOT a primary key in the  
> database, but IS a primary key in the entity definition. The  
> primary key for this table needs to be re-created or modified to  
> add this column to the primary key. Note that data may need to be  
> added first as a primary key column cannot have an null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [ADDENDUM_ID] of table [OFBIZ.ADDENDUM] of entity  
> [Addendum] IS NOT a primary key in the database, but IS a primary  
> key in the entity definition. The primary key for this table needs  
> to be re-created or modified to add this column to the primary key.  
> Note that data may need to be added first as a primary key column  
> cannot have an null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [MAP_KEY] of table [OFBIZ.ADDRESS_MATCH_MAP] of  
> entity [AddressMatchMap] IS NOT a primary key in the database, but  
> IS a primary key in the entity definition. The primary key for this  
> table needs to be re-created or modified to add this column to the  
> primary key. Note that data may need to be added first as a primary  
> key column cannot have an null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [MAP_VALUE] of table [OFBIZ.ADDRESS_MATCH_MAP] of  
> entity [AddressMatchMap] IS NOT a primary key in the database, but  
> IS a primary key in the entity definition. The primary key for this  
> table needs to be re-created or modified to add this column to the  
> primary key. Note that data may need to be added first as a primary  
> key column cannot have an null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [PARTY_ID] of table [OFBIZ.AFFILIATE] of entity  
> [Affiliate] IS NOT a primary key in the database, but IS a primary  
> key in the entity definition. The primary key for this table needs  
> to be re-created or modified to add this column to the primary key.  
> Note that data may need to be added first as a primary key column  
> cannot have an null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [AGREEMENT_ID] of table [OFBIZ.AGREEMENT] of entity  
> [Agreement] IS NOT a primary key in the database, but IS a primary  
> key in the entity definition. The primary key for this table needs  
> to be re-created or modified to add this column to the primary key.  
> Note that data may need to be added first as a primary key column  
> cannot have an null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [AGREEMENT_ID] of table [OFBIZ.AGREEMENT_ATTRIBUTE]  
> of entity [AgreementAttribute] IS NOT a primary key in the  
> database, but IS a primary key in the entity definition. The  
> primary key for this table needs to be re-created or modified to  
> add this column to the primary key. Note that data may need to be  
> added first as a primary key column cannot have an null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [ATTR_NAME] of table [OFBIZ.AGREEMENT_ATTRIBUTE] of  
> entity [AgreementAttribute] IS NOT a primary key in the database,  
> but IS a primary key in the entity definition. The primary key for  
> this table needs to be re-created or modified to add this column to  
> the primary key. Note that data may need to be added first as a  
> primary key column cannot have an null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [AGREEMENT_ID] of table  
> [OFBIZ.AGREEMENT_GEOGRAPHICAL_APPLIC] of entity  
> [AgreementGeographicalApplic] IS NOT a primary key in the database,  
> but IS a primary key in the entity definition. The primary key for  
> this table needs to be re-created or modified to add this column to  
> the primary key. Note that data may need to be added first as a  
> primary key column cannot have an null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [AGREEMENT_ITEM_SEQ_ID] of table  
> [OFBIZ.AGREEMENT_GEOGRAPHICAL_APPLIC] of entity  
> [AgreementGeographicalApplic] IS NOT a primary key in the database,  
> but IS a primary key in the entity definition. The primary key for  
> this table needs to be re-created or modified to add this column to  
> the primary key. Note that data may need to be added first as a  
> primary key column cannot have an null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [GEO_ID] of table  
> [OFBIZ.AGREEMENT_GEOGRAPHICAL_APPLIC] of entity  
> [AgreementGeographicalApplic] IS NOT a primary key in the database,  
> but IS a primary key in the entity definition. The primary key for  
> this table needs to be re-created or modified to add this column to  
> the primary key. Note that data may need to be added first as a  
> primary key column cannot have an null values.
> 2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR]  
> WARNING: Column [AGREEMENT_ID] of table [OFBIZ.AGREEMENT_ITEM] of  
> entity [AgreementItem] IS NOT a primary key in the database, but IS  
> a primary key in the entity definition. The primary key for this  
> table needs to be re-created or modified to add this column to the  
> primary key. Note that data may need to be added first as a primary  
> key column cannot have an null values.
>
> ----- Original Message ----- From: "Jacopo Cappellato" <ti...@sastau.it>
> To: <of...@incubator.apache.org>
> Sent: Friday, November 17, 2006 3:17 AM
> Subject: Re: Timestamp & Oracle
>
>
>> yh-maurizio wrote:
>>> Ok, it works fine!
>>>
>>
>> Great!
>>
>>> Thank you Jacopo.
>>>
>>> P.S.: Jacopo are you Italian too?
>>
>> Già... vivo a Padova; piacere di conoscerti :-)
>>
>
>


Oracle : Warning or Error.

Posted by Chandresh Turakhia <ch...@bhartitelesoft.com>.
Dear all ,

I get tons of such messages but application / user registration works.

What is reason and implications of this errors.

Chand


2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [ACCTG_TRANS_ID] of table [OFBIZ.ACCTG_TRANS] of entity [AcctgTrans] 
IS NOT a primary key in the database, but IS a primary key in the entity 
definition. The primary key for this table needs to be re-created or 
modified to add this column to the primary key. Note that data may need to 
be added first as a primary key column cannot have an null values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [ACCTG_TRANS_ID] of table [OFBIZ.ACCTG_TRANS_ATTRIBUTE] of entity 
[AcctgTransAttribute] IS NOT a primary key in the database, but IS a primary 
key in the entity definition. The primary key for this table needs to be 
re-created or modified to add this column to the primary key. Note that data 
may need to be added first as a primary key column cannot have an null 
values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [ATTR_NAME] of table [OFBIZ.ACCTG_TRANS_ATTRIBUTE] of entity 
[AcctgTransAttribute] IS NOT a primary key in the database, but IS a primary 
key in the entity definition. The primary key for this table needs to be 
re-created or modified to add this column to the primary key. Note that data 
may need to be added first as a primary key column cannot have an null 
values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [ACCTG_TRANS_ID] of table [OFBIZ.ACCTG_TRANS_ENTRY] of entity 
[AcctgTransEntry] IS NOT a primary key in the database, but IS a primary key 
in the entity definition. The primary key for this table needs to be 
re-created or modified to add this column to the primary key. Note that data 
may need to be added first as a primary key column cannot have an null 
values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [ACCTG_TRANS_ENTRY_SEQ_ID] of table [OFBIZ.ACCTG_TRANS_ENTRY] of 
entity [AcctgTransEntry] IS NOT a primary key in the database, but IS a 
primary key in the entity definition. The primary key for this table needs 
to be re-created or modified to add this column to the primary key. Note 
that data may need to be added first as a primary key column cannot have an 
null values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [ACCTG_TRANS_ENTRY_TYPE_ID] of table [OFBIZ.ACCTG_TRANS_ENTRY_TYPE] 
of entity [AcctgTransEntryType] IS NOT a primary key in the database, but IS 
a primary key in the entity definition. The primary key for this table needs 
to be re-created or modified to add this column to the primary key. Note 
that data may need to be added first as a primary key column cannot have an 
null values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [ACCTG_TRANS_TYPE_ID] of table [OFBIZ.ACCTG_TRANS_TYPE] of entity 
[AcctgTransType] IS NOT a primary key in the database, but IS a primary key 
in the entity definition. The primary key for this table needs to be 
re-created or modified to add this column to the primary key. Note that data 
may need to be added first as a primary key column cannot have an null 
values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [ACCTG_TRANS_TYPE_ID] of table [OFBIZ.ACCTG_TRANS_TYPE_ATTR] of 
entity [AcctgTransTypeAttr] IS NOT a primary key in the database, but IS a 
primary key in the entity definition. The primary key for this table needs 
to be re-created or modified to add this column to the primary key. Note 
that data may need to be added first as a primary key column cannot have an 
null values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [ATTR_NAME] of table [OFBIZ.ACCTG_TRANS_TYPE_ATTR] of entity 
[AcctgTransTypeAttr] IS NOT a primary key in the database, but IS a primary 
key in the entity definition. The primary key for this table needs to be 
re-created or modified to add this column to the primary key. Note that data 
may need to be added first as a primary key column cannot have an null 
values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [ADDENDUM_ID] of table [OFBIZ.ADDENDUM] of entity [Addendum] IS NOT a 
primary key in the database, but IS a primary key in the entity definition. 
The primary key for this table needs to be re-created or modified to add 
this column to the primary key. Note that data may need to be added first as 
a primary key column cannot have an null values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [MAP_KEY] of table [OFBIZ.ADDRESS_MATCH_MAP] of entity 
[AddressMatchMap] IS NOT a primary key in the database, but IS a primary key 
in the entity definition. The primary key for this table needs to be 
re-created or modified to add this column to the primary key. Note that data 
may need to be added first as a primary key column cannot have an null 
values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [MAP_VALUE] of table [OFBIZ.ADDRESS_MATCH_MAP] of entity 
[AddressMatchMap] IS NOT a primary key in the database, but IS a primary key 
in the entity definition. The primary key for this table needs to be 
re-created or modified to add this column to the primary key. Note that data 
may need to be added first as a primary key column cannot have an null 
values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [PARTY_ID] of table [OFBIZ.AFFILIATE] of entity [Affiliate] IS NOT a 
primary key in the database, but IS a primary key in the entity definition. 
The primary key for this table needs to be re-created or modified to add 
this column to the primary key. Note that data may need to be added first as 
a primary key column cannot have an null values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [AGREEMENT_ID] of table [OFBIZ.AGREEMENT] of entity [Agreement] IS 
NOT a primary key in the database, but IS a primary key in the entity 
definition. The primary key for this table needs to be re-created or 
modified to add this column to the primary key. Note that data may need to 
be added first as a primary key column cannot have an null values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [AGREEMENT_ID] of table [OFBIZ.AGREEMENT_ATTRIBUTE] of entity 
[AgreementAttribute] IS NOT a primary key in the database, but IS a primary 
key in the entity definition. The primary key for this table needs to be 
re-created or modified to add this column to the primary key. Note that data 
may need to be added first as a primary key column cannot have an null 
values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [ATTR_NAME] of table [OFBIZ.AGREEMENT_ATTRIBUTE] of entity 
[AgreementAttribute] IS NOT a primary key in the database, but IS a primary 
key in the entity definition. The primary key for this table needs to be 
re-created or modified to add this column to the primary key. Note that data 
may need to be added first as a primary key column cannot have an null 
values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [AGREEMENT_ID] of table [OFBIZ.AGREEMENT_GEOGRAPHICAL_APPLIC] of 
entity [AgreementGeographicalApplic] IS NOT a primary key in the database, 
but IS a primary key in the entity definition. The primary key for this 
table needs to be re-created or modified to add this column to the primary 
key. Note that data may need to be added first as a primary key column 
cannot have an null values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [AGREEMENT_ITEM_SEQ_ID] of table 
[OFBIZ.AGREEMENT_GEOGRAPHICAL_APPLIC] of entity 
[AgreementGeographicalApplic] IS NOT a primary key in the database, but IS a 
primary key in the entity definition. The primary key for this table needs 
to be re-created or modified to add this column to the primary key. Note 
that data may need to be added first as a primary key column cannot have an 
null values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [GEO_ID] of table [OFBIZ.AGREEMENT_GEOGRAPHICAL_APPLIC] of entity 
[AgreementGeographicalApplic] IS NOT a primary key in the database, but IS a 
primary key in the entity definition. The primary key for this table needs 
to be re-created or modified to add this column to the primary key. Note 
that data may need to be added first as a primary key column cannot have an 
null values.
2006-11-17 10:56:11,296 (main) [       DatabaseUtil.java:293:ERROR] WARNING: 
Column [AGREEMENT_ID] of table [OFBIZ.AGREEMENT_ITEM] of entity 
[AgreementItem] IS NOT a primary key in the database, but IS a primary key 
in the entity definition. The primary key for this table needs to be 
re-created or modified to add this column to the primary key. Note that data 
may need to be added first as a primary key column cannot have an null 
values.

----- Original Message ----- 
From: "Jacopo Cappellato" <ti...@sastau.it>
To: <of...@incubator.apache.org>
Sent: Friday, November 17, 2006 3:17 AM
Subject: Re: Timestamp & Oracle


> yh-maurizio wrote:
>> Ok, it works fine!
>>
>
> Great!
>
>> Thank you Jacopo.
>>
>> P.S.: Jacopo are you Italian too?
>
> Già... vivo a Padova; piacere di conoscerti :-)
>
> 



Re: Timestamp & Oracle

Posted by Jacopo Cappellato <ti...@sastau.it>.
yh-maurizio wrote:
> Ok, it works fine!
> 

Great!

> Thank you Jacopo.
> 
> P.S.: Jacopo are you Italian too?

Già... vivo a Padova; piacere di conoscerti :-)

Re: Timestamp & Oracle

Posted by yh-maurizio <m....@reply.it>.
Ok, it works fine!

Thank you Jacopo.

P.S.: Jacopo are you Italian too?
-- 
View this message in context: http://www.nabble.com/Timestamp---Oracle-tf2650556.html#a7397548
Sent from the OFBiz - Dev mailing list archive at Nabble.com.


Re: Timestamp & Oracle

Posted by Jacopo Cappellato <ti...@sastau.it>.
Yes,

I've already seen something similar.
Have a look at the info in this page and see if they can help:

http://docs.ofbiz.org/display/~jacopoc/OFBiz+and+Oracle

(the doc server seems very low at the moment... if you can't reach this 
address now, I'm sure it will be available soon)

Jacopo


yh-maurizio wrote:
> Hello to everybody.
> 
> I'm working with OfBiz using an Oracle DB. I've got an error on the
> timestamp using the JOB_SANDBOX table. The problem is in the
> java.sql.Timestamp format that is not compatible with oracle.sql.TIMESTAMP.
> I've just tryed to convert all the occurrency of Timestamp type in the
> framework\service\src\org\ofbiz\service\job\JobManager.java source on
> TIMESTAMP type but without result.
> I'm looking for a solution, but if someone has already solved this same
> problem or want to give me a suggestion... I'd  welcome his hints.
> 
> Thanks in advance!
> 
> 2006-11-16 18:24:42,562 (org.ofbiz.service.job.JobPoller@ab444) [  
> GenericDelegator.java:945:ERROR] 
> ---- exception report
> ----------------------------------------------------------
> Failure in storeByCondition operation for entity [JobSandbox]:
> org.ofbiz.entity.GenericDataSourceException: Generic Entity Exception
> occured in updateByCondition (SQL Exception while executing the
> following:UPDATE ECOMMERCE.JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?, STATUS_ID
> = ? WHERE ((RUN_TIME <= '2006-11-16 18:24:42.546' AND START_DATE_TIME IS
> NULL AND CANCEL_DATE_TIME IS NULL AND RUN_BY_INSTANCE_ID IS NULL) AND
> (POOL_ID IS NULL OR POOL_ID = 'pool')) (ORA-01843: not a valid month
> )). Rolling back transaction.
> Exception: org.ofbiz.entity.GenericDataSourceException
> Message: Generic Entity Exception occured in updateByCondition (SQL
> Exception while executing the following:UPDATE ECOMMERCE.JOB_SANDBOX SET
> RUN_BY_INSTANCE_ID = ?, STATUS_ID = ? WHERE ((RUN_TIME <= '2006-11-16
> 18:24:42.546' AND START_DATE_TIME IS NULL AND CANCEL_DATE_TIME IS NULL AND
> RUN_BY_INSTANCE_ID IS NULL) AND (POOL_ID IS NULL OR POOL_ID = 'pool'))
> (ORA-01843: not a valid month
> ))
> ---- stack trace
> ---------------------------------------------------------------
> org.ofbiz.entity.GenericDataSourceException: Generic Entity Exception
> occured in updateByCondition (SQL Exception while executing the
> following:UPDATE ECOMMERCE.JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?, STATUS_ID
> = ? WHERE ((RUN_TIME <= '2006-11-16 18:24:42.546' AND START_DATE_TIME IS
> NULL AND CANCEL_DATE_TIME IS NULL AND RUN_BY_INSTANCE_ID IS NULL) AND
> (POOL_ID IS NULL OR POOL_ID = 'pool')) (ORA-01843: not a valid month
> ))
> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:288)
> org.ofbiz.entity.datasource.GenericHelperDAO.storeByCondition(GenericHelperDAO.java:186)
> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:942)
> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:917)
> org.ofbiz.service.job.JobManager.poll(JobManager.java:151)
> org.ofbiz.service.job.JobPoller.run(JobPoller.java:82)
> java.lang.Thread.run(Thread.java:595)
> org.ofbiz.entity.GenericDataSourceException: SQL Exception while executing
> the following:UPDATE ECOMMERCE.JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?,
> STATUS_ID = ? WHERE ((RUN_TIME <= '2006-11-16 18:24:42.546' AND
> START_DATE_TIME IS NULL AND CANCEL_DATE_TIME IS NULL AND RUN_BY_INSTANCE_ID
> IS NULL) AND (POOL_ID IS NULL OR POOL_ID = 'pool')) (ORA-01843: not a valid
> month
> )
> org.ofbiz.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:427)
> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:330)
> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:285)
> org.ofbiz.entity.datasource.GenericHelperDAO.storeByCondition(GenericHelperDAO.java:186)
> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:942)
> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:917)
> org.ofbiz.service.job.JobManager.poll(JobManager.java:151)
> org.ofbiz.service.job.JobPoller.run(JobPoller.java:82)
> java.lang.Thread.run(Thread.java:595)
> java.sql.SQLException: ORA-01843: not a valid month
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
> oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
> oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
> oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
> oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
> oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152)
> oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035)
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876)
> oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
> org.ofbiz.minerva.pool.jdbc.PreparedStatementInPool.executeUpdate(PreparedStatementInPool.java:82)
> org.ofbiz.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:424)
> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:330)
> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:285)
> org.ofbiz.entity.datasource.GenericHelperDAO.storeByCondition(GenericHelperDAO.java:186)
> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:942)
> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:917)
> org.ofbiz.service.job.JobManager.poll(JobManager.java:151)
> org.ofbiz.service.job.JobPoller.run(JobPoller.java:82)
> java.lang.Thread.run(Thread.java:595)
> --------------------------------------------------------------------------------
> 


Re: Timestamp & Oracle

Posted by Chandresh Turakhia <ch...@bhartitelesoft.com>.
HI,

I get this error when I try to switch to oracle

Chand

    [java] 3781 [   GenericDelegator.java:140:INFO ] Creating new Delegator 
with name "default".
    [java] 3968 [   GenericDelegator.java:124:ERROR] Error creating 
delegator
    [java] org.ofbiz.entity.GenericEntityConfException: Could not find a 
delegator with the name
ault
    [java]     at 
org.ofbiz.entity.model.ModelReader.getModelReader(ModelReader.java:85)
    [java]     at 
org.ofbiz.entity.GenericDelegator.<init>(GenericDelegator.java:144)
    [java]     at 
org.ofbiz.entity.GenericDelegator.getGenericDelegator(GenericDelegator.java:12
    [java]     at 
org.ofbiz.service.rmi.RmiServiceContainer.start(RmiServiceContainer.java:100)
    [java]     at 
org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:12
    [java]     at 
org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:71)
    [java]     at org.ofbiz.base.start.Start.startServer(Start.java:178)
    [java]     at org.ofbiz.base.start.Start.start(Start.java:227)
    [java]     at org.ofbiz.base.start.Start.main(Start.java:287)
    [java] 4031 [  ServiceDispatcher.java:74 :INFO ] [ServiceDispatcher] : 
Creating new instance
    [java] 4093 [ ServiceGroupReader.java:105:INFO ] Loaded 1 Group 
definitions from file:/C:/do
ad/MobilePayment/ofbiz/ofbiz-3.0.0/ofbiz/components/common/servicedef/groups_test.xml
    [java] 4125 [ ServiceGroupReader.java:105:INFO ] Loaded 4 Group 
definitions from file:/C:/do
ad/MobilePayment/ofbiz/ofbiz-3.0.0/ofbiz/components/entityext/servicedef/groups.xml
    [java] 4140 [ ServiceGroupReader.java:105:INFO ] Loaded 1 Group 
definitions from file:/C:/do
ad/MobilePayment/ofbiz/ofbiz-3.0.0/ofbiz/components/product/servicedef/groups_shipment.xml
    [java] 4140 [ ServiceGroupReader.java:105:INFO ] Loaded 4 Group 
definitions from file:/C:/do
ad/MobilePayment/ofbiz/ofbiz-3.0.0/ofbiz/components/accounting/servicedef/groups.xml
    [java] 4187 [     ServiceEcaUtil.java:139:INFO ] Loaded 3 Service ECA 
definitions from file:
download/MobilePayment/ofbiz/ofbiz-3.0.0/ofbiz/components/common/servicedef/secas_test.xml
    [java] 4265 [     ServiceEcaUtil.java:139:INFO ] Loaded 1 Service ECA 
definitions from file:
download/MobilePayment/ofbiz/ofbiz-3.0.0/ofbiz/components/content/servicedef/secas.xml
    [java] 4281 [     ServiceEcaUtil.java:139:INFO ] Loaded 9 Service ECA 
definitions from file:
download/MobilePayment/ofbiz/ofbiz-3.0.0/ofbiz/components/party/servicedef/secas.xml
    [java] 4296 [     ServiceEcaUtil.java:139:INFO ] Loaded 3 Service ECA 
definitions from file:
download/MobilePayment/ofbiz/ofbiz-3.0.0/ofbiz/components/workeffort/servicedef/secas.xml
    [java] 4343 [     ServiceEcaUtil.java:139:INFO ] Loaded 12 Service ECA 
definitions from file
/download/MobilePayment/ofbiz/ofbiz-3.0.0/ofbiz/components/product/servicedef/secas.xml
    [java] 4437 [     ServiceEcaUtil.java:139:INFO ] Loaded 12 Service ECA 
definitions from file
/download/MobilePayment/ofbiz/ofbiz-3.0.0/ofbiz/components/product/servicedef/secas_shipment.xml
    [java] 4468 [     ServiceEcaUtil.java:139:INFO ] Loaded 11 Service ECA 
definitions from file
/download/MobilePayment/ofbiz/ofbiz-3.0.0/ofbiz/components/accounting/servicedef/secas.xml
    [java] 4515 [     ServiceEcaUtil.java:139:INFO ] Loaded 28 Service ECA 
definitions from file
/download/MobilePayment/ofbiz/ofbiz-3.0.0/ofbiz/components/order/servicedef/secas.xml
    [java] java.lang.NullPointerException
    [java]     at 
org.ofbiz.service.job.JobManager.reloadCrashedJobs(JobManager.java:193)
    [java]     at org.ofbiz.service.job.JobPoller.<init>(JobPoller.java:69)
    [java]     at 
org.ofbiz.service.job.JobManager.<init>(JobManager.java:77)
    [java]     at 
org.ofbiz.service.ServiceDispatcher.<init>(ServiceDispatcher.java:88)
    [java]     at 
org.ofbiz.service.ServiceDispatcher.getInstance(ServiceDispatcher.java:123)
    [java]     at 
org.ofbiz.service.GenericDispatcher.init(GenericDispatcher.java:81)
    [java]     at 
org.ofbiz.service.GenericDispatcher.<init>(GenericDispatcher.java:58)
    [java]     at 
org.ofbiz.service.GenericDispatcher.<init>(GenericDispatcher.java:46)
    [java]     at 
org.ofbiz.service.rmi.RmiServiceContainer.start(RmiServiceContainer.java:103)
    [java]     at 
org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:12
    [java]     at 
org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:71)
    [java]     at org.ofbiz.base.start.Start.startServer(Start.java:178)
    [java]     at org.ofbiz.base.start.Start.start(Start.java:227)
    [java]     at org.ofbiz.base.start.Start.main(Start.java:287)
    [java] Java Result: 99

----- Original Message ----- 
From: "Jacopo Cappellato" <ti...@sastau.it>
To: <of...@incubator.apache.org>
Sent: Friday, November 17, 2006 2:46 AM
Subject: Re: Timestamp & Oracle


> ant run-install
>
> Chandresh Turakhia wrote:
>> Dear all & Maurizo,
>>
>> Do we need a script to create Oracle tables for ofbiz.
>>
>> I saw some script for HSQL.
>>
>> Nice if someone can share Oracle table creation script
>>
>> Chand
>> ----- Original Message ----- From: "yh-maurizio" <    >
>> To: <of...@incubator.apache.org>
>> Sent: Friday, November 17, 2006 2:01 AM
>> Subject: Timestamp & Oracle
>>
>>
>>>
>>> Hello to everybody.
>>>
>>> I'm working with OfBiz using an Oracle DB. I've got an error on the
>>> timestamp using the JOB_SANDBOX table. The problem is in the
>>> java.sql.Timestamp format that is not compatible with 
>>> oracle.sql.TIMESTAMP.
>>> I've just tryed to convert all the occurrency of Timestamp type in the
>>> framework\service\src\org\ofbiz\service\job\JobManager.java source on
>>> TIMESTAMP type but without result.
>>> I'm looking for a solution, but if someone has already solved this same
>>> problem or want to give me a suggestion... I'd  welcome his hints.
>>>
>>> Thanks in advance!
>>>
>>> 2006-11-16 18:24:42,562 (org.ofbiz.service.job.JobPoller@ab444) [
>>> GenericDelegator.java:945:ERROR]
>>> ---- exception report
>>> ----------------------------------------------------------
>>> Failure in storeByCondition operation for entity [JobSandbox]:
>>> org.ofbiz.entity.GenericDataSourceException: Generic Entity Exception
>>> occured in updateByCondition (SQL Exception while executing the
>>> following:UPDATE ECOMMERCE.JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?, 
>>> STATUS_ID
>>> = ? WHERE ((RUN_TIME <= '2006-11-16 18:24:42.546' AND START_DATE_TIME IS
>>> NULL AND CANCEL_DATE_TIME IS NULL AND RUN_BY_INSTANCE_ID IS NULL) AND
>>> (POOL_ID IS NULL OR POOL_ID = 'pool')) (ORA-01843: not a valid month
>>> )). Rolling back transaction.
>>> Exception: org.ofbiz.entity.GenericDataSourceException
>>> Message: Generic Entity Exception occured in updateByCondition (SQL
>>> Exception while executing the following:UPDATE ECOMMERCE.JOB_SANDBOX SET
>>> RUN_BY_INSTANCE_ID = ?, STATUS_ID = ? WHERE ((RUN_TIME <= '2006-11-16
>>> 18:24:42.546' AND START_DATE_TIME IS NULL AND CANCEL_DATE_TIME IS NULL 
>>> AND
>>> RUN_BY_INSTANCE_ID IS NULL) AND (POOL_ID IS NULL OR POOL_ID = 'pool'))
>>> (ORA-01843: not a valid month
>>> ))
>>> ---- stack trace
>>> ---------------------------------------------------------------
>>> org.ofbiz.entity.GenericDataSourceException: Generic Entity Exception
>>> occured in updateByCondition (SQL Exception while executing the
>>> following:UPDATE ECOMMERCE.JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?, 
>>> STATUS_ID
>>> = ? WHERE ((RUN_TIME <= '2006-11-16 18:24:42.546' AND START_DATE_TIME IS
>>> NULL AND CANCEL_DATE_TIME IS NULL AND RUN_BY_INSTANCE_ID IS NULL) AND
>>> (POOL_ID IS NULL OR POOL_ID = 'pool')) (ORA-01843: not a valid month
>>> ))
>>> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:288)
>>> org.ofbiz.entity.datasource.GenericHelperDAO.storeByCondition(GenericHelperDAO.java:186)
>>> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:942)
>>> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:917)
>>> org.ofbiz.service.job.JobManager.poll(JobManager.java:151)
>>> org.ofbiz.service.job.JobPoller.run(JobPoller.java:82)
>>> java.lang.Thread.run(Thread.java:595)
>>> org.ofbiz.entity.GenericDataSourceException: SQL Exception while 
>>> executing
>>> the following:UPDATE ECOMMERCE.JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?,
>>> STATUS_ID = ? WHERE ((RUN_TIME <= '2006-11-16 18:24:42.546' AND
>>> START_DATE_TIME IS NULL AND CANCEL_DATE_TIME IS NULL AND 
>>> RUN_BY_INSTANCE_ID
>>> IS NULL) AND (POOL_ID IS NULL OR POOL_ID = 'pool')) (ORA-01843: not a 
>>> valid
>>> month
>>> )
>>> org.ofbiz.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:427)
>>> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:330)
>>> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:285)
>>> org.ofbiz.entity.datasource.GenericHelperDAO.storeByCondition(GenericHelperDAO.java:186)
>>> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:942)
>>> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:917)
>>> org.ofbiz.service.job.JobManager.poll(JobManager.java:151)
>>> org.ofbiz.service.job.JobPoller.run(JobPoller.java:82)
>>> java.lang.Thread.run(Thread.java:595)
>>> java.sql.SQLException: ORA-01843: not a valid month
>>> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
>>> oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
>>> oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
>>> oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
>>> oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
>>> oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152)
>>> oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035)
>>> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876)
>>> oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
>>> org.ofbiz.minerva.pool.jdbc.PreparedStatementInPool.executeUpdate(PreparedStatementInPool.java:82)
>>> org.ofbiz.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:424)
>>> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:330)
>>> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:285)
>>> org.ofbiz.entity.datasource.GenericHelperDAO.storeByCondition(GenericHelperDAO.java:186)
>>> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:942)
>>> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:917)
>>> org.ofbiz.service.job.JobManager.poll(JobManager.java:151)
>>> org.ofbiz.service.job.JobPoller.run(JobPoller.java:82)
>>> java.lang.Thread.run(Thread.java:595)
>>> --------------------------------------------------------------------------------
>>>
>>>
>>> -- 
>>> View this message in context: 
>>> http://www.nabble.com/Timestamp---Oracle-tf2650556.html#a7396724
>>> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>>>
>>>
>>
>
> 



Re: Timestamp & Oracle

Posted by Jacopo Cappellato <ti...@sastau.it>.
ant run-install

Chandresh Turakhia wrote:
> Dear all & Maurizo,
> 
> Do we need a script to create Oracle tables for ofbiz.
> 
> I saw some script for HSQL.
> 
> Nice if someone can share Oracle table creation script
> 
> Chand
> ----- Original Message ----- From: "yh-maurizio" <    >
> To: <of...@incubator.apache.org>
> Sent: Friday, November 17, 2006 2:01 AM
> Subject: Timestamp & Oracle
> 
> 
>>
>> Hello to everybody.
>>
>> I'm working with OfBiz using an Oracle DB. I've got an error on the
>> timestamp using the JOB_SANDBOX table. The problem is in the
>> java.sql.Timestamp format that is not compatible with 
>> oracle.sql.TIMESTAMP.
>> I've just tryed to convert all the occurrency of Timestamp type in the
>> framework\service\src\org\ofbiz\service\job\JobManager.java source on
>> TIMESTAMP type but without result.
>> I'm looking for a solution, but if someone has already solved this same
>> problem or want to give me a suggestion... I'd  welcome his hints.
>>
>> Thanks in advance!
>>
>> 2006-11-16 18:24:42,562 (org.ofbiz.service.job.JobPoller@ab444) [
>> GenericDelegator.java:945:ERROR]
>> ---- exception report
>> ----------------------------------------------------------
>> Failure in storeByCondition operation for entity [JobSandbox]:
>> org.ofbiz.entity.GenericDataSourceException: Generic Entity Exception
>> occured in updateByCondition (SQL Exception while executing the
>> following:UPDATE ECOMMERCE.JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?, 
>> STATUS_ID
>> = ? WHERE ((RUN_TIME <= '2006-11-16 18:24:42.546' AND START_DATE_TIME IS
>> NULL AND CANCEL_DATE_TIME IS NULL AND RUN_BY_INSTANCE_ID IS NULL) AND
>> (POOL_ID IS NULL OR POOL_ID = 'pool')) (ORA-01843: not a valid month
>> )). Rolling back transaction.
>> Exception: org.ofbiz.entity.GenericDataSourceException
>> Message: Generic Entity Exception occured in updateByCondition (SQL
>> Exception while executing the following:UPDATE ECOMMERCE.JOB_SANDBOX SET
>> RUN_BY_INSTANCE_ID = ?, STATUS_ID = ? WHERE ((RUN_TIME <= '2006-11-16
>> 18:24:42.546' AND START_DATE_TIME IS NULL AND CANCEL_DATE_TIME IS NULL 
>> AND
>> RUN_BY_INSTANCE_ID IS NULL) AND (POOL_ID IS NULL OR POOL_ID = 'pool'))
>> (ORA-01843: not a valid month
>> ))
>> ---- stack trace
>> ---------------------------------------------------------------
>> org.ofbiz.entity.GenericDataSourceException: Generic Entity Exception
>> occured in updateByCondition (SQL Exception while executing the
>> following:UPDATE ECOMMERCE.JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?, 
>> STATUS_ID
>> = ? WHERE ((RUN_TIME <= '2006-11-16 18:24:42.546' AND START_DATE_TIME IS
>> NULL AND CANCEL_DATE_TIME IS NULL AND RUN_BY_INSTANCE_ID IS NULL) AND
>> (POOL_ID IS NULL OR POOL_ID = 'pool')) (ORA-01843: not a valid month
>> ))
>> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:288) 
>>
>> org.ofbiz.entity.datasource.GenericHelperDAO.storeByCondition(GenericHelperDAO.java:186) 
>>
>> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:942) 
>>
>> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:917) 
>>
>> org.ofbiz.service.job.JobManager.poll(JobManager.java:151)
>> org.ofbiz.service.job.JobPoller.run(JobPoller.java:82)
>> java.lang.Thread.run(Thread.java:595)
>> org.ofbiz.entity.GenericDataSourceException: SQL Exception while 
>> executing
>> the following:UPDATE ECOMMERCE.JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?,
>> STATUS_ID = ? WHERE ((RUN_TIME <= '2006-11-16 18:24:42.546' AND
>> START_DATE_TIME IS NULL AND CANCEL_DATE_TIME IS NULL AND 
>> RUN_BY_INSTANCE_ID
>> IS NULL) AND (POOL_ID IS NULL OR POOL_ID = 'pool')) (ORA-01843: not a 
>> valid
>> month
>> )
>> org.ofbiz.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:427)
>> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:330) 
>>
>> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:285) 
>>
>> org.ofbiz.entity.datasource.GenericHelperDAO.storeByCondition(GenericHelperDAO.java:186) 
>>
>> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:942) 
>>
>> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:917) 
>>
>> org.ofbiz.service.job.JobManager.poll(JobManager.java:151)
>> org.ofbiz.service.job.JobPoller.run(JobPoller.java:82)
>> java.lang.Thread.run(Thread.java:595)
>> java.sql.SQLException: ORA-01843: not a valid month
>> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
>> oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
>> oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
>> oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
>> oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
>> oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152) 
>>
>> oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035) 
>>
>> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876) 
>>
>> oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609) 
>>
>> org.ofbiz.minerva.pool.jdbc.PreparedStatementInPool.executeUpdate(PreparedStatementInPool.java:82) 
>>
>> org.ofbiz.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:424)
>> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:330) 
>>
>> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:285) 
>>
>> org.ofbiz.entity.datasource.GenericHelperDAO.storeByCondition(GenericHelperDAO.java:186) 
>>
>> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:942) 
>>
>> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:917) 
>>
>> org.ofbiz.service.job.JobManager.poll(JobManager.java:151)
>> org.ofbiz.service.job.JobPoller.run(JobPoller.java:82)
>> java.lang.Thread.run(Thread.java:595)
>> -------------------------------------------------------------------------------- 
>>
>>
>> -- 
>> View this message in context: 
>> http://www.nabble.com/Timestamp---Oracle-tf2650556.html#a7396724
>> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>>
>>
> 


Re: Timestamp & Oracle

Posted by Chandresh Turakhia <ch...@bhartitelesoft.com>.
Dear all & Maurizo,

Do we need a script to create Oracle tables for ofbiz.

I saw some script for HSQL.

Nice if someone can share Oracle table creation script

Chand
----- Original Message ----- 
From: "yh-maurizio" <    >
To: <of...@incubator.apache.org>
Sent: Friday, November 17, 2006 2:01 AM
Subject: Timestamp & Oracle


>
> Hello to everybody.
>
> I'm working with OfBiz using an Oracle DB. I've got an error on the
> timestamp using the JOB_SANDBOX table. The problem is in the
> java.sql.Timestamp format that is not compatible with 
> oracle.sql.TIMESTAMP.
> I've just tryed to convert all the occurrency of Timestamp type in the
> framework\service\src\org\ofbiz\service\job\JobManager.java source on
> TIMESTAMP type but without result.
> I'm looking for a solution, but if someone has already solved this same
> problem or want to give me a suggestion... I'd  welcome his hints.
>
> Thanks in advance!
>
> 2006-11-16 18:24:42,562 (org.ofbiz.service.job.JobPoller@ab444) [
> GenericDelegator.java:945:ERROR]
> ---- exception report
> ----------------------------------------------------------
> Failure in storeByCondition operation for entity [JobSandbox]:
> org.ofbiz.entity.GenericDataSourceException: Generic Entity Exception
> occured in updateByCondition (SQL Exception while executing the
> following:UPDATE ECOMMERCE.JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?, 
> STATUS_ID
> = ? WHERE ((RUN_TIME <= '2006-11-16 18:24:42.546' AND START_DATE_TIME IS
> NULL AND CANCEL_DATE_TIME IS NULL AND RUN_BY_INSTANCE_ID IS NULL) AND
> (POOL_ID IS NULL OR POOL_ID = 'pool')) (ORA-01843: not a valid month
> )). Rolling back transaction.
> Exception: org.ofbiz.entity.GenericDataSourceException
> Message: Generic Entity Exception occured in updateByCondition (SQL
> Exception while executing the following:UPDATE ECOMMERCE.JOB_SANDBOX SET
> RUN_BY_INSTANCE_ID = ?, STATUS_ID = ? WHERE ((RUN_TIME <= '2006-11-16
> 18:24:42.546' AND START_DATE_TIME IS NULL AND CANCEL_DATE_TIME IS NULL AND
> RUN_BY_INSTANCE_ID IS NULL) AND (POOL_ID IS NULL OR POOL_ID = 'pool'))
> (ORA-01843: not a valid month
> ))
> ---- stack trace
> ---------------------------------------------------------------
> org.ofbiz.entity.GenericDataSourceException: Generic Entity Exception
> occured in updateByCondition (SQL Exception while executing the
> following:UPDATE ECOMMERCE.JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?, 
> STATUS_ID
> = ? WHERE ((RUN_TIME <= '2006-11-16 18:24:42.546' AND START_DATE_TIME IS
> NULL AND CANCEL_DATE_TIME IS NULL AND RUN_BY_INSTANCE_ID IS NULL) AND
> (POOL_ID IS NULL OR POOL_ID = 'pool')) (ORA-01843: not a valid month
> ))
> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:288)
> org.ofbiz.entity.datasource.GenericHelperDAO.storeByCondition(GenericHelperDAO.java:186)
> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:942)
> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:917)
> org.ofbiz.service.job.JobManager.poll(JobManager.java:151)
> org.ofbiz.service.job.JobPoller.run(JobPoller.java:82)
> java.lang.Thread.run(Thread.java:595)
> org.ofbiz.entity.GenericDataSourceException: SQL Exception while executing
> the following:UPDATE ECOMMERCE.JOB_SANDBOX SET RUN_BY_INSTANCE_ID = ?,
> STATUS_ID = ? WHERE ((RUN_TIME <= '2006-11-16 18:24:42.546' AND
> START_DATE_TIME IS NULL AND CANCEL_DATE_TIME IS NULL AND 
> RUN_BY_INSTANCE_ID
> IS NULL) AND (POOL_ID IS NULL OR POOL_ID = 'pool')) (ORA-01843: not a 
> valid
> month
> )
> org.ofbiz.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:427)
> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:330)
> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:285)
> org.ofbiz.entity.datasource.GenericHelperDAO.storeByCondition(GenericHelperDAO.java:186)
> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:942)
> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:917)
> org.ofbiz.service.job.JobManager.poll(JobManager.java:151)
> org.ofbiz.service.job.JobPoller.run(JobPoller.java:82)
> java.lang.Thread.run(Thread.java:595)
> java.sql.SQLException: ORA-01843: not a valid month
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
> oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
> oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
> oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
> oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
> oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152)
> oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035)
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876)
> oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
> org.ofbiz.minerva.pool.jdbc.PreparedStatementInPool.executeUpdate(PreparedStatementInPool.java:82)
> org.ofbiz.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:424)
> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:330)
> org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:285)
> org.ofbiz.entity.datasource.GenericHelperDAO.storeByCondition(GenericHelperDAO.java:186)
> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:942)
> org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:917)
> org.ofbiz.service.job.JobManager.poll(JobManager.java:151)
> org.ofbiz.service.job.JobPoller.run(JobPoller.java:82)
> java.lang.Thread.run(Thread.java:595)
> --------------------------------------------------------------------------------
>
> -- 
> View this message in context: 
> http://www.nabble.com/Timestamp---Oracle-tf2650556.html#a7396724
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>
>