SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye

Welcome, Guest
Guest Settings
Help

Compass Support Forums » Compass » Compass Users

Thread: jdbcDirectory: MySQL fails, HSQLDB works

This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 15 - Pages: 2 [ 1 2 | Next ] - Last Post: Nov 20, 2011 9:47 PM Last Post By: anitas
darthvader

Posts: 8
Registered: 6/26/06
jdbcDirectory: MySQL fails, HSQLDB works
Posted: Feb 4, 2008 11:43 AM
 
  Click to reply to this thread Reply
I'm trying to use Compass (2.0M1) in a Spring environment using a MySQL database for jdbcDirectory. MySQL server version is 5.0.45, mysql-jdbc-connector is 5.1.5. For a testcase, the application context looks like this:

<bean id="dataSource" class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource">
	<property name="url" value="jdbc:mysql://localhost:3306/testdb" />
	<property name="user" value="tesdb" />
	<property name="password" value="testdb" />
</bean>
 
<bean id="compass" class="org.compass.spring.LocalCompassBean">
	<property name="compassSettings">
		<props>
			<prop key="compass.engine.connection">jdbc://</prop>
		</props>
	</property>
	<property name="dataSource" ref="dataSource" />
	<property name="resourceLocations">
		<list>
			<value>classpath:osem-mappings.cpm.xml</value>
		</list>
	</property>
</bean>


When starting up the spring application context, this stacktrace is reported:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'compass' defined in URL [file:../core/src/test/java/com/mindblast/fetcher/CompassFetcherDecoratorTest.xml]: Invocation of init method failed; nested exception is org.compass.core.engine.SearchEngineException: Failed while executing a lucene directory based operation; nested exception is org.apache.lucene.store.jdbc.JdbcStoreException: Failed to execute sql [select name_, 'value_' as x, size_ from index_syndfeed where name_ = ?]; nested exception is java.sql.SQLException: "pos" + "length" arguments can not be larger than the BLOB's length.
Caused by: org.compass.core.engine.SearchEngineException: Failed while executing a lucene directory based operation; nested exception is org.apache.lucene.store.jdbc.JdbcStoreException: Failed to execute sql [select name_, 'value_' as x, size_ from index_syndfeed where name_ = ?]; nested exception is java.sql.SQLException: "pos" + "length" arguments can not be larger than the BLOB's length.
org.apache.lucene.store.jdbc.JdbcStoreException: Failed to execute sql [select name_, 'value_' as x, size_ from index_syndfeed where name_ = ?]; nested exception is java.sql.SQLException: "pos" + "length" arguments can not be larger than the BLOB's length.
java.sql.SQLException: "pos" + "length" arguments can not be larger than the BLOB's length.
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1056)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
	at com.mysql.jdbc.Blob.getBytes(Blob.java:143)
	at org.apache.lucene.store.jdbc.index.FetchOnBufferReadJdbcIndexInput.readInternal(FetchOnBufferReadJdbcIndexInput.java:132)
	at org.apache.lucene.store.jdbc.index.FetchOnBufferReadJdbcIndexInput.access$1400(FetchOnBufferReadJdbcIndexInput.java:35)
	at org.apache.lucene.store.jdbc.index.FetchOnBufferReadJdbcIndexInput$1.execute(FetchOnBufferReadJdbcIndexInput.java:91)
	at org.apache.lucene.store.jdbc.support.JdbcTemplate.executeSelect(JdbcTemplate.java:108)
	at org.apache.lucene.store.jdbc.index.FetchOnBufferReadJdbcIndexInput.refill(FetchOnBufferReadJdbcIndexInput.java:58)
	at org.apache.lucene.store.ConfigurableBufferedIndexInput.readByte(ConfigurableBufferedIndexInput.java:27)
	at org.apache.lucene.store.IndexInput.readInt(IndexInput.java:47)
	at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:200)
	at org.apache.lucene.index.IndexFileDeleter.<init>(IndexFileDeleter.java:156)
	at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:626)
	at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:410)
	at org.compass.core.lucene.engine.store.AbstractLuceneSearchEngineStore$1.doWithStore(AbstractLuceneSearchEngineStore.java:280)
	at org.compass.core.lucene.engine.store.LuceneStoreTemplate.execute(LuceneStoreTemplate.java:43)
	at org.compass.core.lucene.engine.store.LuceneStoreTemplate.executeForSubIndex(LuceneStoreTemplate.java:37)
	at org.compass.core.lucene.engine.store.AbstractLuceneSearchEngineStore.createIndex(AbstractLuceneSearchEngineStore.java:278)
	at org.compass.core.lucene.engine.store.AbstractLuceneSearchEngineStore.verifyIndex(AbstractLuceneSearchEngineStore.java:309)
	at org.compass.core.lucene.engine.store.AbstractLuceneSearchEngineStore.verifyIndex(AbstractLuceneSearchEngineStore.java:324)
	at org.compass.core.lucene.engine.manager.DefaultLuceneSearchEngineIndexManager.verifyIndex(DefaultLuceneSearchEngineIndexManager.java:127)
	at org.compass.core.impl.DefaultCompass$TransactionalSearchEngineIndexManager$2.doInCompass(DefaultCompass.java:320)
	at org.compass.core.CompassTemplate.execute(CompassTemplate.java:132)
	at org.compass.core.CompassTemplate.execute(CompassTemplate.java:114)
	at org.compass.core.impl.DefaultCompass$TransactionalSearchEngineIndexManager.verifyIndex(DefaultCompass.java:318)
	at org.compass.core.lucene.engine.manager.ScheduledLuceneSearchEngineIndexManager.verifyIndex(ScheduledLuceneSearchEngineIndexManager.java:100)
	at org.compass.core.impl.DefaultCompass.<init>(DefaultCompass.java:155)
	at org.compass.core.impl.DefaultCompass.<init>(DefaultCompass.java:109)
	at org.compass.core.impl.DefaultCompass.<init>(DefaultCompass.java:102)
	at org.compass.core.config.CompassConfiguration.buildCompass(CompassConfiguration.java:229)
	at org.compass.spring.LocalCompassBean.newCompass(LocalCompassBean.java:336)
	at org.compass.spring.LocalCompassBean.afterPropertiesSet(LocalCompassBean.java:326)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
	at org.springframework.test.AbstractSingleSpringContextTests.createApplicationContext(AbstractSingleSpringContextTests.java:199)
	at org.springframework.test.AbstractSingleSpringContextTests.loadContextLocations(AbstractSingleSpringContextTests.java:179)
	at org.springframework.test.AbstractSingleSpringContextTests.loadContext(AbstractSingleSpringContextTests.java:158)
	at org.springframework.test.AbstractSpringContextTests.getContext(AbstractSpringContextTests.java:105)
	at org.springframework.test.AbstractSingleSpringContextTests.setUp(AbstractSingleSpringContextTests.java:87)
	at junit.framework.TestCase.runBare(TestCase.java:132)
	at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)


If I change the spring config above by using HSQLDB
	<bean id="dataSource" class="org.hsqldb.jdbc.jdbcDataSource">
		<property name="database" value="jdbc:hsqldb:mem:aname" />
		<property name="user" value="sa" />
		<property name="password" value="" />
	</bean>

it works. I already tried to use compass.engine.store.jdbc.dialect=org.apache.lucene.store.jdbc.dialect.MySQLInnoDBDialect, without success.

Any hints to get MySQL based jdbcDirectory running?

Thanks in advance,
Stefan
vam

Posts: 259
Registered: 1/2/07
Re: jdbcDirectory: MySQL fails, HSQLDB works
Posted: Feb 4, 2008 4:40 PM   in response to: darthvader in response to: darthvader
 
  Click to reply to this thread Reply
Can you add emulateLocators=true to your jdbc url. The compass documentation requires this flag for mysql.
darthvader

Posts: 8
Registered: 6/26/06
Re: jdbcDirectory: MySQL fails, HSQLDB works
Posted: Feb 5, 2008 5:01 AM   in response to: vam in response to: vam
 
  Click to reply to this thread Reply
Thanks for your answer. I get the same exception with emulateLocators=true.
darthvader

Posts: 8
Registered: 6/26/06
Re: jdbcDirectory: MySQL fails, HSQLDB works
Posted: Feb 6, 2008 4:38 AM   in response to: darthvader in response to: darthvader
 
  Click to reply to this thread Reply
Got a solution: Modify the dialect used as suggested by jensg in http://forum.compass-project.org/thread.jspa?messageID=75272&#75272 (near end of first third of the thread):

public class MyDriver extends MySQLInnoDBDialect {
 
public String openBlobSelectQuote() {
return "`";
}
 
public String closeBlobSelectQuote() {
return "`";
}
 
}
siddharth baner...

Posts: 1
Registered: 8/5/09
Re: jdbcDirectory: MySQL fails, HSQLDB works
Posted: Aug 5, 2009 5:50 AM   in response to: darthvader in response to: darthvader
 
  Click to reply to this thread Reply
I changed the dialect as per the example and it worked for me. Thanks.
louisvuittonbox

Posts: 411
Registered: 8/23/11
Re: jdbcDirectory: MySQL fails, HSQLDB works
Posted: Aug 23, 2011 9:41 PM   in response to: darthvader in response to: darthvader
 
  Click to reply to this thread Reply
Producing fabulous high end fashion year after year and season after season, gucci outlet is arguably the world's most prestigious designer of clothes. As you would expect from a gucci outlet online that started out solely making leather goods, they are best known for their classic range of gucci bags and gucci handbags which usually feature the trademark company logo or pattern and come either in leather or canvas finishes which look perfect when coupled with matching gucci shoes. Ladies Gucci Shoes are simply the perfect footwear for any occasion and here at Profile we stock a large selection including Gucci Boots, Flats and High Heels. They are designer shoes of the highest quality.
helen

Posts: 25
Registered: 10/25/11
Re: jdbcDirectory: MySQL fails, HSQLDB works
Posted: Oct 25, 2011 10:00 PM   in response to: darthvader in response to: darthvader
 
  Click to reply to this thread Reply
or in the particular material. Yet, the word replica is totally a various case. Replica is kind of synonymous with fake or imitated. In or Astronomical Celestial omes to a stop, the thieves may grab your phone and get off quickly before you could do anything about it.One more thing, when you're walkin replica watches uk look exotic. This is another feature of these Burberry bags. They are available in various colors.There are three different collections. Each c swiss replica watches for making jewelry to keep a long time. Guadua becomes the main selection when it is still raw. Most of hand painted jewelry comes from with this material. Yachtmaster material so as to help the users read the time easily. Strictly speaking, only the watch that fit in with the standards of ISO can be swiss breitling with kind of proud emotion. The quality IWC imitation watch really makes a style statement. Anybody jogging in the park with these t replica watches became the top of watch industry in eneva, Switzerland. In the year 1920, Baume & Mercier Genève was founded. From then on Baume & Mercier beg replica watches s model as well seeing as the ladies'.There are various kinds of Fossil watches. For the men's selection, it covers casual and dress chronograp replica rolex d, Patek Philippe is one of the prestigious one. People give high praise toward authentic Patek Philippe timepieces with high-class materials, Pasha / Pasha Seatimer ce. It was an impulsive purchase. When I first saw it in the shop window I found it so irresistible that I bought it without second thoughts. Bu louis vuitton handbags As I have mentioned, the material and design of an expensive purse are great. Thus, it is definitely safe to put money inside. And the elega replica gucci art and culture are adopted in glasses design. In YSL's eye, black is the king of colors and its content represents successful people's quality. uk replica watches lutches are all small bags for women to carry for parties. These clutches and shoulder bags are also small. Unlike large totes or hobos, people Day Date work as good remembrances to memorize someone or the very happy hours you spent together with the distinctive one. From dawn to night, the ve swiss replica watches e stainless steel for its dial, fully embodying men' s charm and masculinity. And its unidirectional rotating bezel greatly facilitates the w replica louis vuitton ining in stagnation. Life, for those people, is without end. And what awaits them is the next starting line. Those above is TAG Heuer folks' va swiss replica watches elegant. Don't think it is very awful or out of date. Nothing is impossible! It all depends on your creative and how you wear.ipes Replica Lacoste accuracy and wonderful brand experience. No matter women or men all long for a great watch. It is can be seen as a symbol of social statu swiss replica watches These shoes are available in different colors. Whatever colors you like, you can find your favorite from different high heel pumps in the mark replica louis vuitton plastic case not only has a strong metallic sense, but also gives us a simple and calm impression, which perfectly matches with men's replica gucci
jenny

Posts: 271
Registered: 11/13/11
coach outlet store online
Posted: Nov 13, 2011 7:19 PM   in response to: darthvader in response to: darthvader
 
  Click to reply to this thread Reply
The

coach factory outlet

has been in business for many years. You can log in to find more information about its products and services.
At

louis vuitton sale

,you will find Louis Vuitton Vernis Wallet uses Vernis leather lining instead of classic Monogram canvas, meanwhile creates another classic style with fashion.
Here's your new way to look sophisticated styles. Carry the hot

coach outlet store online

of this summer and be the true trendsetter!
Several days ago, I chose one style of

hermes scarf

from the Swarovski Outlets, which has won good reputation from many customers.
It is a symbol regarding position not to mention nature, Here I would like to launch a excellent bags pertaining to business men, which may be

louis vuitton online

Cupertino M56398.
Almost everyone has identified effectively about this, below, among the best to make sure you will get much more information about

coach outlet

.
lvzeng

Posts: 268
Registered: 11/13/11
louis vuitton
Posted: Nov 13, 2011 7:52 PM   in response to: darthvader in response to: darthvader
 
  Click to reply to this thread Reply
Owning

louis vuitton bags

of their own has been the dreams of many fad-seeking people for a quite long time.
You need not worry about the quality of the

coach outlet store online

for sale now. The Coach brand is famous for the perfect products.
I am so confused that I don,t even know where to buy the

louis vuitton

Handbags. Because I can prefer to chose the fashionable design, favorable price, top service .

coach outlet store online

with fashion style and top quality succeed. In any occasions they are very suitable and appropriate for its precise and rich design.
They're not chosen, so one of these ideal for you.For more flexibleness a lot more like these, there are lots of discount 'shoulder' variations outlet

louis vuitton bags

.

hermes birkin

is an Austrian success story par excellence. At the end of the 19th century Daniel Swarovski founded a company with the aim to cut crystals automatically.

coach outlet store

vision system is a visual enjoy, is a visual art. The particular design has been integrated function and the element of elegancy, then show you an exquisite and excellent product.
coach8outlet

Posts: 282
Registered: 11/13/11
Re: jdbcDirectory: MySQL fails, HSQLDB works
Posted: Nov 14, 2011 1:35 AM   in response to: darthvader in response to: darthvader
 
  Click to reply to this thread Reply

louis vuitton handbags

enjoy high reputation all over the world. They are designed for hand, elbow and shoulder carry thanks to comfortable flat leather handles.
If you have been to the mall lately and browsed

coach outlet

you may find that a high price tag goes along with just about everything in the mall.
This client-oriented and faith-rooted store aims at providing the best LV goods and services, such as top-class

louis vuitton uk

and free shipping.
Turn your attention to such discount coach sneakers for women from Coach Outlet Store online, you will find something unique and special of such authentic coach for sale at coach factory outlet store online.

louis vuitton outlet

online just like a person who want to show himself in front of other people, because he is confident enough, he can attain the respect of other people.
Bezel-set

hermes birkin bag

are showcased in all their brilliance in the chic and timeless design of this tennis bracelet. Rhodium-plated metal bracelet with foldover clasp.
The

coach outlet store online

are utilized for formal event in company area that will display your excellent taste.Not only does a briefcase make is easier to carry things.
tonnyben

Posts: 270
Registered: 11/14/11
Re: jdbcDirectory: MySQL fails, HSQLDB works
Posted: Nov 14, 2011 2:27 AM   in response to: darthvader in response to: darthvader
 
  Click to reply to this thread Reply

coach factory outlet online

featured with stylish leather bags and signature materials, and carry this bag, it can designate people seem to be captivatingly feminine and good-looking. Why not to buy one when it is at an affordable price?
The products that

louis vuitton outlet

is countless, such as: purses, bags, handbags, shoes, belt. Even the same kind of product includes the products for women, the products for men, for summer-day use, for winter-day use.So, it is probably far beyond your imagination.
As a perfect combination of classic and modern fashion,

coach outlet online

can show the customers'unique personality.

hermes birkin

is your premier online shop for a wide range of quality Swarovski Crystal products such as Swarovski Crystals earring, Jewelry, Bracelet etc.
You could find them in desirable quality and price. If you don't mind high class louis vuitton replica bags, have a good time at

louis vuitton outlet online

.

coach purses

tend to be among finest style strikes associated with these days! They're the standing image that many ladies possess, or even, intend on obtaining.
Legend
Guru: 2001 + pts
Expert: 501 - 2000 pts
Super-star: 101 - 500 pts
Assistant: 51 - 100 pts
Participant: 0 - 50 pts
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums