Skip to Content
author's profile photo Former Member
Former Member

Datahub 5.6.0.2 iDoc Receiver Failure

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2015 at 05:08 PM
     # 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
    
    
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2015 at 05:34 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 08, 2015 at 05:21 PM

    Hi, please use kernel.jdbc.schemaName=dbo

    Matthias

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.