on 10-05-2015 11:57 PM - last edited on 02-04-2024 4:04 AM by postmig_api_4
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
Hi, please use kernel.jdbc.schemaName=dbo
Matthias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
# 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.