This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Sql query in data-config.xml (Solr Apache)

Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody help with this issue?

In my data-config.xml i have the following sql queries.

<entity dataSource="mtls-ds" name="t" query="select * from tp where tp_id > 220754 and tp_id < 220900" pk="tp_id">
<entity dataSource="mtls-ds" name="tProd" query="select * from prod tp where tp.catlg_core_id='${t.CATLG_CORE_ID}' and tp.catlg_pfix_id='${(t.CATLG_PFIX_ID)}'">

But when i try to execute , t.CATLG_PFIX_ID value is coming as INT'L and its throwing the below error.

select * from prod tp where tp.catlg_core_id='REL' and tp.catlg
_pfix_id=' INT'L' Processing Document # 208136
at org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(
at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(
at org.apache.solr.handler.dataimport.JdbcDataSource.getData(
at org.apache.solr.handler.dataimport.JdbcDataSource.getData(
at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(
at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(
at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(
at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(
at org.apache.solr.handler.dataimport.DocBuilder.execute(
at org.apache.solr.handler.dataimport.DataImporter.doFullImport(
at org.apache.solr.handler.dataimport.DataImporter.runCmd(
at org.apache.solr.handler.dataimport.DataImporter$
Caused by: java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended

at oracle.jdbc.driver.SQLStateMapping.newSQLException(
at oracle.jdbc.driver.DatabaseError.newSQLException(
at oracle.jdbc.driver.DatabaseError.throwSqlException(
at oracle.jdbc.driver.T4CTTIoer.processError(
at oracle.jdbc.driver.T4CTTIoer.processError(
at oracle.jdbc.driver.T4C8Oall.receive(
at oracle.jdbc.driver.T4CStatement.doOall8(
at oracle.jdbc.driver.T4CStatement.executeForDescribe(
at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(
at oracle.jdbc.driver.OracleStatement.executeInternal(
at oracle.jdbc.driver.OracleStatement.execute(
at oracle.jdbc.driver.OracleStatementWrapper.execute(
at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(
... 12 more

Thanks in advance.
Are we home yet? Wait, did we forget the tiny ad?
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!