Posted by
Kasubaski, Matt on
Jul 21, 2005; 11:26pm
URL: http://ofbiz.116.s1.nabble.com/RE-OFBiz-Dev-Updated-PostgreSQL-Driver-tp165711.html
I think this may be caused by a mismatch between how the DB was built
and how OfBiz is configured. The error looks like the database has the
wrong column type than what is expected.
Entitymodel_shipment.xml defines "labelimage" as:
<entity entity-name="ShipmentPackageRouteSeg" ...>
<field name="labelImage" type="blob"></field>
Fieldtypepostgres.xml has "blob" defined as:
<field-type-def type="blob" sql-type="OID"
java-type="java.lang.Object"></field-type-def>
Fieldtypepostgres72.xml has "blob" defined as:
<field-type-def type="blob" sql-type="BYTEA"
java-type="java.lang.Object"></field-type-def>
It would appear that the database was built using the
fieldtypepostgres.xml, but is now using fieldtypepostgres72.xml. The
older JDBC may not have made a distinction between the two types, but
the new one does.
My suggestion would be to change the column type to "BYTEA", or recreate
the database using the new driver. (Use export/import XML if you need
to save data.)
Matt
-----Original Message-----
From:
[hidden email] [mailto:
[hidden email]]
On Behalf Of J. Eckard
Sent: Tuesday, July 12, 2005 5:12 PM
To: OFBiz Project Development Discussion
Subject: [OFBiz] Dev - Updated PostgreSQL Driver
After updating my local PostgreSQL jdbc driver to the latest version in
SVN, things seemed ok, but when I tried to quickship an order, I got
the following error:
---- exception report
----------------------------------------------------------
Exception: org.ofbiz.entity.GenericEntityException
Message: Exception while inserting the following entity:
[GenericEntity:ShipmentPackageRouteSeg][createdTxStamp,2005-07-12
17:56:
18.412(java.sql.Timestamp)][shipmentRouteSegmentId,00001(java.lang.Strin
g)][shipmentId,70026(java.lang.String)][lastUpdatedTxStamp,2005-07-12
17:56:
18.412(java.sql.Timestamp)][shipmentPackageSeqId,00001(java.lang.String)
][createdStamp,2005-07-12
17:56:18.412(java.sql.Timestamp)][lastUpdatedStamp,2005-07-12
17:56:18.412(java.sql.Timestamp)] (while inserting:
[GenericEntity:ShipmentPackageRouteSeg][createdTxStamp,2005-07-12
17:56:
18.412(java.sql.Timestamp)][shipmentRouteSegmentId,00001(java.lang.Strin
g)][shipmentId,70026(java.lang.String)][lastUpdatedTxStamp,2005-07-12
17:56:
18.412(java.sql.Timestamp)][shipmentPackageSeqId,00001(java.lang.String)
][createdStamp,2005-07-12
17:56:18.412(java.sql.Timestamp)][lastUpdatedStamp,2005-07-12
17:56:18.412(java.sql.Timestamp)] (SQL Exception while executing the
following:INSERT INTO public.SHIPMENT_PACKAGE_ROUTE_SEG (SHIPMENT_ID,
SHIPMENT_PACKAGE_SEQ_ID, SHIPMENT_ROUTE_SEGMENT_ID, TRACKING_CODE,
BOX_NUMBER, LABEL_IMAGE, LABEL_INTL_SIGN_IMAGE, LABEL_HTML,
PACKAGE_TRANSPORT_COST, PACKAGE_SERVICE_COST, PACKAGE_OTHER_COST,
COD_AMOUNT, INSURED_AMOUNT, CURRENCY_UOM_ID, LAST_UPDATED_STAMP,
LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: column
"label_image" is of type bytea but expression is of type oid)))
This isn't an isolated error, it happens for any order. I have not
updated the PostgreSQL server itself, it is still at 7.4.6.
Any suggestions for a fix would be greatly appreciated...
-Joe
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev