dolfdijkstra / gst-foundation

Sites Global Foundation Project
Apache License 2.0
13 stars 14 forks source link

Translation error in static publication #33

Open GerardoRodriguezVisus opened 10 years ago

GerardoRodriguezVisus commented 10 years ago

Hello, We are facing and error with static publication when we include translated basics assets (Literals).

The code we use is: LocaleService localeService = new DefaultLocaleService(ics);

long dimensionId = DimensionUtils.getDimensionIdForName(ics, locale);

AssetId litTRanslationId = localeService.findTranslation(litAssetId,dimensionId,"SiteDimSetIbis"); if (litTRanslationId != null) { litData = mgr.readAttributes(litTRanslationId, Arrays.asList("text")); attrData = litData.getAttributeData("text"); LOGGER.debug("Found literal: " + litTRanslationId.getId()+ "with text: "+(String) attrData.getData()); result = (String) attrData.getData(); }

This code works perfectly to render the proper translation, but when we are exporting to disk we see the rror:

[2014-09-24 11:49:49,149 UTC] [ERROR] [http-9081-1] [fatwire.logging.cs.db] Exception executing prepared statement: INSERT INTO PublishedAssets (ID,PUBKEYID,ASSETTYPE,ASSETID) VALUES (?,?,?,?) ID = 1378406156613 PUBKEYID = 1378406156612 ASSETTYPE = Literal ASSETID = 1378402428652 java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("CSFINTSTG"."PUBLISHEDASSETS"."ASSETDATE")

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
    [...]
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)

[2014-09-24 11:49:49,153 UTC] [ERROR] [http-9081-1] [cs.core.db.DBTransaction] TransactionUnit failed to execute com.fatwire.cs.core.db.TransactionAbortException: addrows failed at COM.FutureTense.CatalogManager.CatalogEngine$2.execute(CatalogEngine.java:971) at com.fatwire.cs.core.db.NestedTransactionBlock.execute(NestedTransactionBlock.java:189) [...] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) [2014-09-24 11:49:49,156 UTC] [ERROR] [http-9081-1] [fatwire.logging.cs.db] Exception in addrows for table PublishedAssets com.fatwire.cs.core.db.TransactionAbortException: addrows failed at COM.FutureTense.CatalogManager.CatalogEngine$2.execute(CatalogEngine.java:971) at com.fatwire.cs.core.db.NestedTransactionBlock.execute(NestedTransactionBlock.java:189) [...] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) [2014-09-24 11:49:49,159 UTC] [INFO ] [http-9081-1] [com.fatwire.logging.cs] XcelExportService: export: Error: errno=-105 on call to catalog manager for table 'PublishedAssets'[/OpenMarket/Xcelerate/PrologActions/Publish/Export/PublishApprovedAssets#OpenMarket/Xcelerate/Actions/BatchPublish]

Because of this, we guess that the dependencies are not correctly logged because if we edit and approve a published page the HTML is not generated. If the page has not literals it works perfectly (preview and exporting).

Do you have any clue or advise?

Thank you very much. Gerardo