Tribune

Home » Liferay Portal » English » Liferay Legacy

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Chad Shryock
lucene.store.type=jdbc sql error
12 dicembre 2006 17.15
Risposta

Chad Shryock

Punteggio: Expert

Messaggi: 285

Data di Iscrizione: 26 agosto 2006

Messaggi recenti

Hello,

I want to have lucene store in the database. So I changed the portal-ext.properties to have:
1    lucene.store.type=jdbc


However, when I start the server I am getting this error:
 119:24:17,751 ERROR [STDERR] Exception in thread "com.liferay.portal.lucene.LuceneIndexer.liferay.com"
 219:24:17,751 ERROR [STDERR] java.lang.RuntimeException: java.lang.UnsupportedOperationException: Not sql provided to define if a table exists
 319:24:17,751 ERROR [STDERR]     at com.liferay.portal.lucene.LuceneUtil._delete(LuceneUtil.java:251)
 419:24:17,751 ERROR [STDERR]     at com.liferay.portal.lucene.LuceneUtil.delete(LuceneUtil.java:166)
 519:24:17,752 ERROR [STDERR]     at com.liferay.portal.lucene.LuceneIndexer.reIndex(LuceneIndexer.java:85)
 619:24:17,752 ERROR [STDERR]     at com.liferay.portal.lucene.LuceneIndexer.run(LuceneIndexer.java:63)
 719:24:17,752 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:613)
 819:24:17,752 ERROR [STDERR] Caused by: java.lang.UnsupportedOperationException: Not sql provided to define if a table exists
 919:24:17,752 ERROR [STDERR]     at org.apache.lucene.store.jdbc.dialect.Dialect.sqlTableExists(Dialect.java:65)
1019:24:17,752 ERROR [STDERR]     at org.apache.lucene.store.jdbc.JdbcDirectory.tableExists(JdbcDirectory.java:184)
1119:24:17,752 ERROR [STDERR]     at com.liferay.portal.lucene.LuceneUtil._delete(LuceneUtil.java:243)
1219:24:17,752 ERROR [STDERR]     ... 4 more


I am assuming this is because the tables don't exist in the database. Where can I find the SQL to create the tables?

I have googled, searched all of the sql liferay provides, any help would be greatly appreciated.

Thanks,
Chad.
Jorge Ferrer
RE: lucene.store.type=jdbc sql error
12 dicembre 2006 21.01
Risposta

Jorge Ferrer

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 2768

Data di Iscrizione: 31 agosto 2006

Messaggi recenti

One table is needed for each company using the following formula:

"LUCENE_"+StringUtil.replace(companyId, StringPool.PERIOD, StringPool.UNDERLINE)

Related to the schema of the table take a look at http://static.compassframework.org/docs/latest/jdbcdirectory.html
Isa B.
RE: lucene.store.type=jdbc sql error
20 dicembre 2006 1.36
Risposta

Isa B.

Punteggio: New Member

Messaggi: 17

Data di Iscrizione: 27 novembre 2006

Messaggi recenti

Hi Chad,
I have your same problem but I have not find solution...
Can you tell me how have you do?
Many thanks!
Chad Shryock
RE: lucene.store.type=jdbc sql error
20 dicembre 2006 18.42
Risposta

Chad Shryock

Punteggio: Expert

Messaggi: 285

Data di Iscrizione: 26 agosto 2006

Messaggi recenti

I haven't tried yet. For now I put it back to the file based. This is on my list to figure out (and write a wiki article), but it is low on my priority list.

-Chad.
Vladislav Pernin
RE: lucene.store.type=jdbc sql error
31 gennaio 2007 5.57
Risposta

Vladislav Pernin

Punteggio: Junior Member

Messaggi: 59

Data di Iscrizione: 19 dicembre 2006

Messaggi recenti

Did you guys find the solution ?

Vlad
Chad Shryock
RE: lucene.store.type=jdbc sql error
31 gennaio 2007 6.24
Risposta

Chad Shryock

Punteggio: Expert

Messaggi: 285

Data di Iscrizione: 26 agosto 2006

Messaggi recenti

I haven't had time to work on it. I need to find a db ddl example. Then it should work.

-Chad.
Richard Sezov
RE: lucene.store.type=jdbc sql error
14 marzo 2007 13.32
Risposta

Richard Sezov

LIFERAY STAFF

Punteggio: Regular Member

Messaggi: 211

Data di Iscrizione: 7 febbraio 2007

Messaggi recenti

I'm seeing the same problem, but for some reason only on MySQL. If I configure this setting with Oracle, the table is automatically created.

Not sure if Jorge's tip will work, as I created the same table in my MySQL database that was generated in the Oracle database, and it's still not working.
Jason Amy
RE: lucene.store.type=jdbc sql error
23 marzo 2007 14.02
Risposta

Jason Amy

Punteggio: Junior Member

Messaggi: 77

Data di Iscrizione: 4 luglio 2006

Messaggi recenti

Rich Sezov:
I'm seeing the same problem, but for some reason only on MySQL. If I configure this setting with Oracle, the table is automatically created.

Not sure if Jorge's tip will work, as I created the same table in my MySQL database that was generated in the Oracle database, and it's still not working.


Rich, any luck with this? If I could get this working, I believe going from a test to stage to prod environment would be exporting/importing some LAR files, and a DB schema copy..?? Given that all the Liferay portal data would be in a DB, the Jackrabbit in the DB and (eventually) the Lucene index in the DB. Am I leaving anything out?

Do you have the schema that the Oracle script created? I'd like to give it a shot.

Thanks, Jason
Richard Sezov
RE: lucene.store.type=jdbc sql error
26 marzo 2007 11.13
Risposta

Richard Sezov

LIFERAY STAFF

Punteggio: Regular Member

Messaggi: 211

Data di Iscrizione: 7 febbraio 2007

Messaggi recenti

Jason Amy:
Rich, any luck with this?


Nope, not on MySQL (which is, thankfully, only my prototype environment). Seems to work fine on Oracle.

Jason Amy:
If I could get this working, I believe going from a test to stage to prod environment would be exporting/importing some LAR files, and a DB schema copy..?? Given that all the Liferay portal data would be in a DB, the Jackrabbit in the DB and (eventually) the Lucene index in the DB. Am I leaving anything out?


That's exactly what I was thinking: I could design / develop everything on dev, promote to Q/A environment, test, and then promote to Prod without having to rebuild everything.

Jason Amy:
Do you have the schema that the Oracle script created? I'd like to give it a shot.


Sure! It's actually quite a small table. I'm going to remove the table name, as my organization is secretive about such things, but it gets generated in the form LUCENE_DOMAIN, where DOMAIN is what's defined as the company ID in your web.xml. So if we were to install Lucene search for Google (just to pick an absurd example), the table name would be LUCENE_GOOGLE_COM.

1CREATE TABLE "LUCENE_[domain goes here]"
2(
3   NAME_ VARCHAR2(150) PRIMARY KEY not null,
4   VALUE_ BLOB,
5   SIZE_ NUMBER(10),
6   LF_ TIMESTAMP(6),
7   DELETED_ NUMBER(1)
8);


I already attempted what you're doing on MySQL and it didn't work (i.e., I took the script above and tried to "force" it into MySQL). At that point, I was stumped, as I didn't know where else to look. Maybe it's a bug that should be entered into Jira (http://support.liferay.com).

Let me know how it goes!
Andrew K Bishop
RE: lucene.store.type=jdbc sql error
29 marzo 2007 18.52
Risposta

Andrew K Bishop

Punteggio: New Member

Messaggi: 5

Data di Iscrizione: 28 marzo 2007

Messaggi recenti

Hi guys

Any luck with this yet, as I am also having the same trouble, and I have no idea what else I could try. As I need to get it working with MySQL 5.0.37 and above, also I am using the ndbcluster engine.

Thanks

Andrew
David Truong
RE: lucene.store.type=jdbc sql error
11 agosto 2010 22.35
Risposta

David Truong

LIFERAY STAFF

Punteggio: Expert

Messaggi: 314

Data di Iscrizione: 23 marzo 2005

Messaggi recenti