Incremental Indexing - Dangling meta character '?' near index 0

Submitted by jons911 on Wed, 2009-03-04 08:12.Troubleshooting

Hi,
I'm trying to configure the advanced SQL for incremental indexing, and I keep getting this error when running the update.
Any help would be greatly appreciated.
Here's my SQL (trimmed down) :
select
...
from ... i
where ...
and i.updateDate > ?
and details from the index log:
INFO 2009-03-04 11:00:17,571- Preparing the statement...
ERROR 2009-03-04 11:00:17,597- Error During Main Query:java.util.regex.PatternSyntaxException: Dangling meta character '?' near index 0
?
^:Dangling meta character '?' near index 0
?
^
ERROR 2009-03-04 11:00:17,599- Detailed Error
java.util.regex.PatternSyntaxException: Dangling meta character '?' near index 0
?
^
at java.util.regex.Pattern.error(Unknown Source)
at java.util.regex.Pattern.sequence(Unknown Source)
at java.util.regex.Pattern.expr(Unknown Source)
at java.util.regex.Pattern.compile(Unknown Source)
at java.util.regex.Pattern.(Unknown Source)
at java.util.regex.Pattern.compile(Unknown Source)
at java.lang.String.split(Unknown Source)
at java.lang.String.split(Unknown Source)
at net.javacoding.xsearch.config.IncrementalDataquery.setTimestamp(DBSight:15)
at net.javacoding.xsearch.core.task.a.a.c.a(DBSight:107)
at net.javacoding.xsearch.core.task.a.a.c.execute(DBSight:140)
at net.javacoding.xsearch.core.task.a.c.execute(DBSight:45)
at net.javacoding.xsearch.core.a.b.run(DBSight:134)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Submitted by will on Wed, 2009-03-04 10:38.

I can reproduce this and just fixed it.

Please use the latest 2.1.1beta build 356.

You can also simply apply

 http://www.dbsight.net/download/dbsight.jar

to WEB-INF/lib directory.

The incremental advanced sql could be much faster than the main sql because it doesn't need an order-by.

Submitted by jons911 on Wed, 2009-03-04 13:50.

Hi, Thanks for the quick fix. I'm getting a different error now:

INFO 2009-03-04 16:40:53,349- Preparing the statement...
INFO 2009-03-04 16:40:53,381- select ...
from ... i
where ...
and i.updateDate > ?
INFO 2009-03-04 16:40:53,396- parameter: 2009-03-04 16:19:22.747
INFO 2009-03-04 16:40:53,397- Set Fetch Size to 1000
INFO 2009-03-04 16:40:53,397- executing the statement...
WARN 2009-03-04 16:40:53,441- java.lang.NoClassDefFoundError: org/joda/time/format/DateTimeFormat

The bottom warning happens several times, then the indexing closes with nothing to do.

This warning also popped up in some of the indexes:
WARN 2009-03-04 16:47:11,891- Set Fetch Size Not Supported for the driver, Parameter #1 has not been set.
WARN 2009-03-04 16:47:11,892- Empty document List!

Thansk again,
Jon

Submitted by will on Wed, 2009-03-04 14:21.

Looks like you are using some older version of DBSight 2.x, and the quick fix doesn't work. You will need the new libraries recently added.

It'll be easier if you just upgrade to the latest beta release.

Just download the latest war file, rename it to zip file, unzip it on top of your existing installation.

Or you can extract the libraries under WEB-INF/lib.

Submitted by jons911 on Fri, 2009-03-06 13:35.

Hi,

I'm actually still having a problem with the incremental index. The second warning I reported previously is still happening:

WARN 2009-03-06 16:32:20,573- Set Fetch Size Not Supported for the driver, The value is not set for the parameter number 1.
WARN 2009-03-06 16:32:20,573- Empty document List!

I've also confirmed this behavior is exactly the same with the jTDS and Microsoft SQL Server jdbc drivers.

Also, FWIW - in your jdbcdriver.xml in lib/ext/jdbc/sqlserver, the class is actually "com.microsoft.sqlserver.jdbc.SQLServerDriver". I had to update it because the sqlserver and microsoft were transposed in the version that came with the installation.

Submitted by will on Fri, 2009-03-06 15:09.

Thanks for the note on sqlserver driver name!

Looks like SqlServer doesn't like the setFetchSize() function. To avoid this, you can adjust the list fetch size to something like "-1", in "Advanced Options" page.

Submitted by jons911 on Fri, 2009-03-06 17:58.

So I set Advanced Settings > Fetching Data > List Fetch Size to -1, and when I hit save, it changes it to 0, and the indexing log reports the same error:

WARN 2009-03-06 20:55:31,214- Set Fetch Size Not Supported for the driver, The value is not set for the parameter number 1.
WARN 2009-03-06 20:55:31,215- Empty document List!

FWIW - I only get the warning with incremental indexing operation. Full indexing works fine.

Submitted by will on Fri, 2009-03-06 21:37.

I updated the latest beta release with the fix.

Just applying this file is a quick fix.

 http://www.dbsight.net/download/dbsight.jar

The "adjusting fetch size" was a wrong alarm. Thanks for reporting this!

Submitted by jons911 on Mon, 2009-03-09 08:17.

That did the trick! I'm now up running incremental indexes. Thanks Will.

Submitted by jons911 on Wed, 2009-03-04 17:08.

Thanks again, and sorry about that. I had downloaded and run the latest beta .exe installer, and assumed that would have covered me. I also wasn't sure what to do with the .war, but the .zip rename worked great. Thanks again for the quick response to my bug and the fix!