We've tested OFBiz 10.04.05 release on ubuntu 12.04 for a little while and would like to go into beta with it. So I installed OFBiz 10.04.05 and then run $ ant run-install-extseed
loaded just the extseed data.
I am trying to initialize the application. in https://localhost:8443/ofbizsetup for Initial Setup
I'm able to fill in the first 2 tabs, Organization and Facility. However, I have problem with the 3rd tab, Product Store. When I fill in the MyStore for "Store Name" field, I get the following error -
The Following Errors Occurred:
Error: Error parsing entity xml file: org.ofbiz.entity.GenericEntityException:
Error while inserting: [GenericEntity:CarrierShipmentMethod][createdStamp,2013-06-21 11:13:26.664(java.sql.Timestamp)]
[createdTxStamp,2013-06-21 11:13:26.433(java.sql.Timestamp)]
[lastUpdatedStamp,2013-06-21 11:13:26.664(java.sql.Timestamp)]
[lastUpdatedTxStamp,2013-06-21 11:13:26.433(java.sql.Timestamp)]
[partyId,10000(java.lang.String)][roleTypeId,CARRIER(java.lang.String)]
[sequenceNumber,4(java.lang.Long)]
[shipmentMethodTypeId,LOCAL_DELIVERY(java.lang.String)]
(SQL Exception while executing the following:INSERT INTO CARRIER_SHIPMENT_METHOD
(SHIPMENT_METHOD_TYPE_ID, PARTY_ID, ROLE_TYPE_ID, SEQUENCE_NUMBER, CARRIER_SERVICE_CODE, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
(Cannot add or update a child row: a foreign key constraint fails
(`ofbiz`.`CARRIER_SHIPMENT_METHOD`, CONSTRAINT `CARR_SHMETH_TYPE` FOREIGN KEY
(`SHIPMENT_METHOD_TYPE_ID`) REFERENCES `SHIPMENT_METHOD_TYPE`
(`SHIPMENT_METHOD_TYPE_ID`)))) calling service parseEntityXmlFile in importTempDataFile
I'm trying to create a store! Anyway, I can't seem to proceed. If I do an $ ant run-install then it works fine but it also loads tons of demo data. We want to proceed with OFBiz without all the demo data in it.
What is the best way to get around this?
This error says that there is no LOCAL_DELIVERY record in the ShipmentMethodType entity. For a quick fix you could insert the following data with webtools:
<ShipmentMethodType description="Local Delivery" shipmentMethodTypeId="LOCAL_DELIVERY"/>
But I would recommend to try it with OFBiz 12.04 (I see no reason to use the old OFBiz 10.04.05 version).
Related
My project working on Symfony 4.4 and doctrine migrations bundle 3.2.1.
I used the columnDefinition to write a special column:
columnDefinition="VARCHAR(50) GENERATED ALWAYS AS (IF(ISNULL(`cabinet_id`), 'null', `cabinet_id`)) VIRTUAL"
It works perfect, but now, every time when I call doctrine:migrations:diff, migration is trying to change the column for the same:
ALTER TABLE MonitoringReportUpdate CHANGE virtual_null `virtual_null` VARCHAR(50) GENERATED ALWAYS AS (IF(ISNULL(`cabinet_id`), \'null\', `cabinet_id`)) VIRTUAL
And even if I run this alter, and call doctrine:migrations:diff again, I'll see the same query to execute:
ALTER TABLE MonitoringReportUpdate CHANGE virtual_null `virtual_null` VARCHAR(50) GENERATED ALWAYS AS (IF(ISNULL(`cabinet_id`), \'null\', `cabinet_id`)) VIRTUAL
Did I use columnDefinition wrong or maybe it's just a bug? Or is it possible to ignore this column when I call generate migration?
This is something Doctrine is not able to analyze properly so he is not able to consider it "already done", so he is considering it missing each time you generate a diff.
I already had to try such "complex" doctrine column def and i did not found a good workaround.
My best answer would be : There is something bad in your code that generate that kind of needed behavior in your database : avoid it and adapt your code.
I got "Wrong key or corrupt data" error when executing a query in my code, so I inserted a debug line before the execution of the query to see what it looks like. I used QSqlQuery::lastQuery() to get the query text.
The query looked fine except the WHERE clause:
SELECT ... FROM patient WHERE "idx" = ?
And the debug line happened right after QSqlQuery::addBindValue() was executed to replace the placeholder ? with the real idx value.
I suspect addBindValue() somehow didn't work but I want to be sure. Is it possible lastQuery() still returns the query with placeholder in place even though addBindValue() has been run?
I have recently been trying to upgrade flyway from v4 to v6.5.3. During the process, I faced an issue related to placeholders.
The migration fails with the following error.
ERROR: Unable to parse statement in
D:\Softwares\flyway-commandline-6.5.5-windows-x64\flyway-6.5.5\sql\V3__mysql-7.0.sql
at line 101 col 1. See
https://flywaydb.org/documentation/knownparserlimitations for more
information: No value provided for placeholder: ${'), NOW(), NOW())}.
Check your configuration! Caused by: No value provided for
placeholder: ${'), NOW(), NOW())}. Check your configuration!
SQL,
insert into `configuration`(key, value, created_date , updated_date) values('LOG_LOCATION', REPLACE('${MY_LOG_LOCATION}','#{','${'), NOW(), NOW());
To resolve the above failure, I replaced "${" with "$\{", but this is something I didn't look out for.
On debugging the flyway code, I saw it fails in parsing (during validation, method org.flywaydb.core.internal.parser.Parser.readToken()) of the SQL.
Why is it considering the 3rd argument of REPLACE function as a placeholder?
Note: The above SQL works in Flyway v4
If you read the documentation here, you can see that flyway uses a particular syntax for it's placeholders, ${somestring}. In your code, you have a ${, but it's not defining a placeholder. While Flyway is a pretty sophisticated tool, the mechanism here is simply using string matching. If you want to, you can modify your Flyway instance to use different escape characters for the placeholders. This could be handy if you have to have strings in your code that match that ${ syntax. You can read about that here. Scroll down to where you define the PlaceHolderPrefix and PlaceHolderSuffix. Change those to a different combination of values that are not used in your code and you should be fine.
Straight forward question ..
The documentation for Oracle 10 states:
Oracle 10g sql*loader documentation
(Note, I linked to 10g since it was most convenient, I'll take an answer for Oracle 10 and/or Oracle 11, either way is fine - I suspect it'll be the same answer though - so I added both tags).
ERRORS (errors to allow)
Default: To see the default value for this parameter, invoke SQLLoader without any parameters, as described in Invoking SQLLoader.
ERRORS specifies the maximum number of insert errors to allow. If the number of errors exceeds the value specified for ERRORS, then SQL*Loader terminates the load. To permit no errors at all, set ERRORS=0. To specify that all errors be allowed, use a very high number.
(Emphasis mine).
So, since Oracle handles up to NUMBER(38) .. I tried:
ERRORS=999999999999999999999999999999999999
(36 digits)
and promptly got this error:
SQL*Loader-100: Syntax error on command-line
Trying a much smaller number:
ERRORS=999999
works fine.
So what's the maximum value you can use here ?
I don't find it in the documentation, so not sure if I'm looking in the wrong place, or it's just not in there :)
And yeah, I need a LARGE number, I'm loading a multi-million row file, so I'd like to use the largest possible to avoid any future issues.
IMHO sqlldr is not supporting number(39). I think all number parameter in sql loader are integer data type. And common limits for integer is 2147483647.
sqlldr xxxx control=ctl.ctl errors=2147483648 -> exception
sqlldr xxxx control=ctl.ctl errors=2147483647 -> works fine
I solved the problem setting
errors=-1
worked fine on Oracle 11g
The SQLite.ttinclude (for VB) should have
tbl.Schema="";
in the LoadTables procedure, otherwise the Struts.tt will not compile
Running transformation: System.ArgumentNullException: Value cannot be null.
Parameter name: objectToConvert
at Microsoft.VisualStudio.TextTemplating.ToStringHelper.ToStringWithCulture(Object objectToConvert)
at
Microsoft.VisualStudio.TextTemplatingBB4B38057266A6749A8A039E145DE2BB.GeneratedTextTransformation.TransformText()
I am using the lastest 3.0.0.3 zip from the subsonicproject.com website
Please file this at http://github.com/subsonic/SubSonic-3.0/issues so you can track the status of this bug. If you don't have account (or don't want to create one), just add a comment here and one of us will file it on your behalf.