cancel
Showing results for 
Search instead for 
Did you mean: 

Datahub 5.6.0.2 iDoc Receiver Failure

Former Member
0 Kudos

I am using Java 8, Hybris 5.6.0.2, Datahub 5.6.0.2 on a Tomcat 7.0.54 (standalone). I try to push a sample iDoc thru REST call (/datahub-webapp/v1/idoc/receiver). I can see the data in the rawitem table but the composition fails due to the following error.

 2015-10-05 13:27:21,268 [ERROR] [c.h.d.s.i.AbstractTransactionManagingActionHandler] Previous event failure PerformCompositionEvent{actionId=1}
 org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [WITH query AS (select ROW_NUMBER() OVER (ORDER BY id) as __hybris_limit_query__, "a0"."isocode","a0"."extensionsource","a0"."dataloadingaction","a0"."status","a0"."rawitemid","a0"."id","a0"."creationtime","a0"."modifiedtime","a0"."datapool","a0"."itemtype","a0"."schemaless_attrs" from "rawitem" "a0" where  ("a0"."tenant" = ? and "a0"."typecode" in (?) and  ("a0"."datapool" = ? and "a0"."dataloadingaction" = ?))) SELECT * FROM query WHERE __hybris_limit_query__ > ? AND __hybris_limit_query__ <= ?]; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'rawitem'.
                 at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231) ~[spring-jdbc-4.1.5.RELEASE.jar:4.1.5.RELEASE]
                 at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) ~[spring-jdbc-4.1.5.RELEASE.jar:4.1.5.RELEASE]

The rawitem table isn't prefixed with the database name hence the error. This sounds like a missing local property item. Can someone tell me what that property would be?

Thanks, Selva

rafal_gdowski
Active Contributor
0 Kudos

Selva,

I will log this as a Major defect and try to provide a solution asap. We smoke-test our releases against all versions of databases supported, and we have not seen this error. If you could email me your properties file that would be great, and it might make the process a bit faster.

Former Member
0 Kudos

Rafal, Please check the properties below.

Thanks, Selva

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi, please use kernel.jdbc.schemaName=dbo

Matthias

Former Member
0 Kudos

Hi Matthias, That's specifically for the datahub DB? It will not affect the hybris DB connection correct?

thanks, Selva

rafal_gdowski
Active Contributor
0 Kudos

That's correct. It's for the data hub db only.

Former Member
0 Kudos

Hi, That didn't do the trick. But the following one did:

dataSource.jndiName=hybrisdh

Thanks, Selva

rafal_gdowski
Active Contributor
0 Kudos

Excellent news.

Former Member
0 Kudos

Hi,

Just an update on this.

The solution you gave above (kernel.jdbc.schemaName=dbo) is actually for Datahub 5.7. I upgraded DH to 5.7 today and failed to compose.

Then I used the above config and it worked like a charm.

Thanks, Selva

Former Member
0 Kudos

Hi Selva,

As mentioned by Rafal we do also test on all supported databases. The only property I could think of is dataSource.jdbcUrl. Please make sure to use the DatabaseName.

dataSource.jdbcUrl=jdbc:sqlserver://address:port;DatabaseName=MyName

Former Member
0 Kudos

Hi,

I do use that, like below.

dataSource.jdbcUrl=jdbc:sqlserver://sql-mmbst-qa5:1433;databaseName=hybrisdh

Not sure what I am missing. If I run that SQL in TOAD with hybrisdh.dbo.rawitem as the table name, it works. Just wondering if I can mention that prefix somewhere in the property file.

Thanks, Selva

Former Member
0 Kudos

Are you able to recreate this error?

Thanks, Selva

Former Member
0 Kudos
 # General configuration
 
 # SAP configuration framework
 # config sapcoreconfiguration
 sapcoreconfiguration.datahuboutbound.enabled=false
 
 # SAP asynchronous order management
 numberseries.cache.size.order_code=1
 saporderexchange.orderoutbound.maxRetries=3
 
 # DataHub Properties:
 datahubadapter.datahuboutbound.url=http://localhost:8180/datahub-webapp/v1
 # data hub
 datahub.extension.exportURL=http://localhost:9101/datahubadapter
 datahub.extension.userName=admin
 datahub.extension.password=nimda
 datahub.encryption.key.path=f:/y/hybris/config/encryption-key.txt
 datahub.server.url=http://localhost:8180/datahub-webapp/v1
 
 dataSource.className=com.microsoft.sqlserver.jdbc.SQLServerConnectionPoolDataSource
 dataSource.jdbcUrl=jdbc:sqlserver://sql-mmbst-qa5:1433;databaseName=hybrisdh
 dataSource.username=hybris
 dataSource.password=blah
  
 #media storage
 media.dataSource.className=com.microsoft.sqlserver.jdbc.SQLServerConnectionPoolDataSource
 media.dataSource.jdbcUrl=jdbc:sqlserver://sql-mmbst-qa5:1433;databaseName=hybrisdh
 media.dataSource.username=hybris
 media.dataSource.password=blah
 
 #sapidoc
 sapidocoutboundadapter.usedynamicidocnumberoffset=true
 sapidocoutboundadapter.sendername=HYDATAHUB
 sapidocoutboundadapter.receivername=WEF_00_200
 sapidocoutboundadapter.senderport=HYDATAHUB_PORT
 
 #targetsystem settings
 targetsystem.hybriscore.url=http://localhost:9101/datahubadapter
 targetsystem.hybriscore.username=admin
 targetsystem.hybriscore.password=nimda
 targetsystem.saperp.url=
 targetsystem.saperp.username=
 targetsystem.saperp.password=
 targetsystem.saperp.receivername=
 
 #sapcoreconfiguration
 sapcoreconfiguration.autocompose.pools=GLOBAL,SAPCONFIGURATION_POOL,SAPCUSTOMER_INBOUND_POOL,SAPCONSUMER_INBOUND_POOL,SAPCONSUMER_OUTBOUND_POOL,SAPORDER_INBOUND_POOL,SAPORDER_OUTBOUND_POOL, SAPCUSTOMER_OUTBOUND_POOL
 sapcoreconfiguration.autopublish.targetsystemsbypools=GLOBAL.HybrisCore,GLOBAL.SapErpSystem,SAPCUSTOMER_OUTBOUND_POOL.SapErpSystem ,SAPCUSTOMER_INBOUND_POOL.HybrisCore,SAPCONSUMER_INBOUND_POOL.HybrisCore,SAPCONSUMER_OUTBOUND_POOL.SapErpSystem,SAPORDER_OUTBOUND_POOL.SapErpSystem,SAPORDER_INBOUND_POOL.HybrisCore
 sapcoreconfiguration.autopublish.sleeptime:5000
 sapcoreconfiguration.autopublish.initialsleeptime:5000
 sapcoreconfiguration.pool=SAPCONFIGURATION_POOL
 
 #sapcustomer
 sapcustomer.language=EN
 
 
 # Customer integration
 # please adapte the number ranges according to the settings in the backend 
 keygen.customer.sap_customer_id.start=0000470000
 keygen.customer.sap_contact_id.start=0000470000
 sapcustomerexchange.outbound.datahub.feed=SAPCONSUMER_OUTBOUND_FEED
 
 # order
 # config async order management - order number
 keygen.order.code.start=5520000