Re: jackrabbit 2.0 binary search indexing

2010-02-19 Thread Ard Schrijvers
On Fri, Feb 19, 2010 at 1:13 AM, ChadDavis chadmichaelda...@gmail.com wrote:
 On Thu, Feb 18, 2010 at 2:39 PM, Alexander Klimetschek aklim...@day.com 
 wrote:
 On Thu, Feb 18, 2010 at 18:35, ChadDavis chadmichaelda...@gmail.com wrote:
 I'm looking for information on how to enable binary search indexing.
 I found documentation for pre-2.0 jackrabbit, and reference to the
 fact that Tika is now used internally for the binary indexing.
 However, I can't find any documentation of how to enable the binary
 indexing . . ..

 It is enabled for all nt:file binaries, ie. the jcr:content/jcr:data
 property. The mimetype for text extraction is taken from the
 jcr:content/jcr:mimeType property. I don't know if you can enable it
 for other binary properties.


 Just to clarify, you are saying that the binary indexing, as long as
 I'm using the JCR built-in node types for my binary file storage, e.g.
 nt:file -- jcr:content nt:resource --jcr:data ( binary property
 with my file ), occurs automatically?

 If so, then something's not working for me.  Can you recommend some
 troubleshooting tips?  How can I determine whether the binaries are
 being indexed?  Note, I'm doing a full text search and it DOES hit
 other node properties, etc.

Make sure you have all the extractors configured you need. This is
done in the SearchIndex configuration. You can also look this up at
the wiki

Ard




Corrupt session and persistent state

2010-02-19 Thread Bram de Kruijff
Hi all,

Recently I came across some strange cases of inconsistent persistent state. 
Most of the time it seems that nodes deserialized from bundles have 
(parent/child or cross) references to non existing bundles/nodes. The problem 
is typically shown by NoSuchItemStateException that can in some cases even 
prevent the repository from starting when for example it fails to boostrap an 
index.

It has proven very difficult to reproduce this problem, but I think I have a 
scenario that does show such a problem after a ReferentialIntegrityException 
has occurred on a session. To demonstrate it I created a jira issue with an 
attached fix @ https://issues.apache.org/jira/browse/JCR-2503 

I ran this against 1.5, 1.6 with the same result. The trunk also shows and 
exception but at a different point in the test. Can someone please 
confirm/verify this and/or explain to me what I might be doing wrong?

Thanks  Regards,
Bram






Re: ThreadLocal errors logged in Tomcat 6.0.24

2010-02-19 Thread Andreas Veithen
We recently upgraded to Jackrabbit 2.0, and in our case there seems to
be a thread of type
org.apache.jackrabbit.util.TransientFileFactory$ReaperThread that is
not stopped correctly. This prevents the application class loader from
being garbage collected after a stop or restart of Jackrabbit and
causes a memory leak.

Andreas

On Mon, Feb 15, 2010 at 13:11, Torgeir Veimo torg...@netenviron.com wrote:
 On 15 February 2010 21:14, Rakesh Vidyadharan rak...@sptci.com wrote:
 On 15 Feb 2010, at 02:42, Thomas Müller wrote:

 Hi,

 It looks like the Jackrabbit repository is not closed when the web
 application is stopped. Could you verify this?

 Regards,
 Thomas

 I am using TransientRepository, and I verified that there are not .lock or 
 .lck files under repository root before I shutdown the container.  It 
 appears to be primarily Derby and Lucene that have these issues, so it may 
 not be a JackRabbit issue per se.

 There's at least one jackrabbit timer that doesn't shut down. Here's
 what I see in the tomcat log, redeploying an app that uses
 TransientRepository;

 Feb 15, 2010 10:07:58 PM org.apache.catalina.loader.WebappClassLoader
 clearReferencesThreads
 SEVERE: A web application appears to have started a thread named
 [Timer-2] but has failed to stop it. This is very likely to create a
 memory leak.
 Feb 15, 2010 10:07:58 PM org.apache.catalina.loader.WebappClassLoader
 clearReferencesThreads
 WARNING: Failed to terminate thread named [Timer-2]
 java.lang.NoSuchFieldException: target
        at java.lang.Class.getDeclaredField(Class.java:1882)
        at 
 org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads(WebappClassLoader.java:1958)
        at 
 org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1707)
        at 
 org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1622)
        at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:710)
        at 
 org.apache.catalina.core.StandardContext.stop(StandardContext.java:4649)
        at 
 org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924)
        at 
 org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1121)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1342)
        at 
 org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)
        at 
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at 
 org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
        at 
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
        at 
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
        at 
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
        at java.lang.Thread.run(Thread.java:637)
 Feb 15, 2010 10:07:58 PM org.apache.catalina.loader.WebappClassLoader
 clearThreadLocalMap
 SEVERE: A web application created a ThreadLocal with key of type
 [java.lang.ThreadLocal] (value [java.lang.threadlo...@4fc0b204]) and a
 value of type [org.apache.jackrabbit.core.query.lucene.PerQueryCache]
 (value [org.apache.jackrabbit.core.query.lucene.perqueryca...@73e74d83])
 but failed to remove it when the web application was stopped. To
 prevent a memory leak, the ThreadLocal has been forcibly removed.
 Feb 15, 2010 10:07:58 PM org.apache.catalina.loader.WebappClassLoader
 clearThreadLocalMap
 SEVERE: A web application created a ThreadLocal with key of type
 [java.lang.ThreadLocal] (value [java.lang.threadlo...@56920ee7]) and a
 value of type [org.apache.derby.iapi.services.context.ContextManager]
 (value [org.apache.derby.iapi.services.context.contextmana...@246972f1])
 but failed to remove it when the web application was stopped. To
 prevent a memory leak, the ThreadLocal has been forcibly removed.
 Feb 15, 2010 10:07:58 PM org.apache.catalina.loader.WebappClassLoader
 clearThreadLocalMap
 SEVERE: A web application created a ThreadLocal with key of type
 [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1] (value
 [org.apache.derby.iapi.sql.dictionary.tabledescripto...@f108c18]) and
 a value of type [java.util.WeakHashMap] (value [{={1}, ={1, 2}, =null,
 ={1}, =null, ={1}, ={1}, =null, ={1}, =null, ={2, 3, 4}, ={1}, =null,
 ={1}, ={1}, ={1, 2}, =null, =null, =null, =null, =null, ={2, 3, 4},
 ={1}, =null, =null, =null}]) but failed to remove it when the web
 application was stopped. To prevent a memory leak, the ThreadLocal has
 been forcibly removed.

 --
 -Tor



RE: DDLs for databases Jackrabbit2.0 supports?

2010-02-19 Thread Niu, Xuetao
Thanks Alex, I found the ddls for Oracle and trying to manually run
them, they all executed successfully, but when I run jackrabbit, I got
the following exceptions:

[java] Caused by: java.sql.SQLSyntaxErrorException: ORA-04098:
trigger 'XNIU_SD.VERSION_T1' is invalid and failed re-validation
[java]
[java] at
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
[java] at
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
[java] at
oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
[java] at
oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
[java] at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
[java] at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
[java] at
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.jav
a:205)
[java] at
oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatem
ent.java:1008)
[java] at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.
java:1307)
[java] at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePrepare
dStatement.java:3449)
[java] at
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStateme
nt.java:3550)
[java] at
oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePrepared
StatementWrapper.java:1374)
[java] at
org.apache.jackrabbit.core.persistence.bundle.ConnectionRecoveryManager.
executeStmtInternal(ConnectionRecoveryManager.java:371)
[java] at
org.apache.jackrabbit.core.persistence.bundle.ConnectionRecoveryManager.
executeStmtInternal(ConnectionRecoveryManager.java:298)
[java] at
org.apache.jackrabbit.core.persistence.bundle.ConnectionRecoveryManager.
executeStmt(ConnectionRecoveryManager.java:261)
[java] at
org.apache.jackrabbit.core.persistence.bundle.ConnectionRecoveryManager.
executeStmt(ConnectionRecoveryManager.java:239)
[java] at
org.apache.jackrabbit.core.persistence.bundle.NGKDbNameIndex.insertStrin
g(NGKDbNameIndex.java:61)
[java] ... 42 more

These are the DDLs for the VERSIONing tables:

create table VERSION_BUNDLE (NODE_ID raw(16) not null, BUNDLE_DATA blob
not null) ;
create unique index VERSION_BUNDLE_IDX on VERSION_BUNDLE (NODE_ID) ;

create table VERSION_REFS (NODE_ID raw(16) not null, REFS_DATA blob not
null) ;
create unique index VERSION_REFS_IDX on VERSION_REFS (NODE_ID) ;

create table VERSION_BINVAL (BINVAL_ID varchar2(64) not null,
BINVAL_DATA blob null) ;
create unique index VERSION_BINVAL_IDX on VERSION_BINVAL (BINVAL_ID) ;

create table VERSION_NAMES (ID INTEGER primary key, NAME varchar2(255)
not null) ;
create unique index VERSION_NAMES_IDX on VERSION_NAMES (NAME) ;
create sequence VERSION_seq_names_id;
create trigger VERSION_t1 before insert on VERSION_NAMES for each row
begin select VERSION_seq_names_id.nextval into :new.id from dual; end;

Could you help? Thanks in advance!
Xuetao






-Original Message-
From: Alexander Klimetschek [mailto:aklim...@day.com] 
Sent: Thursday, February 18, 2010 10:34 PM
To: users@jackrabbit.apache.org
Subject: Re: DDLs for databases Jackrabbit2.0 supports?

On Thu, Feb 18, 2010 at 19:15, Niu, Xuetao xuetao@fiserv.com
wrote:
 I am wondering the DDL of jackrabbit 2.0 for both all databases
 supported, which it uses to create the database structure with. The
DBA
 has to create the database beforehand manually due to permission
limits.

 We are storing all (dbFileSystem, dbPersistenceManager, dbBlabla...)
in
 database, so we need the maximal set.

Depends on the configuration and the schema is dynamically created
because of one schema per workspace. The template DDL files are part
of the jackrabbit-core.jar.

See http://markmail.org/message/7ckso7sf7dkcwqm5 and
http://markmail.org/message/ydqraj2vxxaiesnp

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetsc...@day.com


Re: java.io.FileNotFoundException: http://jackrabbit.apache.org/dtd/repository-1.6.dtd ?

2010-02-19 Thread Paco Avila

Any tip? I have seen there is a repository-1.5.dtd a repository-1.6.dtd is
not needed?
-- 
View this message in context: 
http://n4.nabble.com/java-io-FileNotFoundException-http-jackrabbit-apache-org-dtd-repository-1-6-dtd-tp1009490p1561532.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: java.io.FileNotFoundException: http://jackrabbit.apache.org/dtd/repository-1.6.dtd ?

2010-02-19 Thread Jukka Zitting
Hi,

On Fri, Feb 19, 2010 at 1:35 PM, Paco Avila monk...@gmail.com wrote:
 Any tip? I have seen there is a repository-1.5.dtd a repository-1.6.dtd is
 not needed?

Jackrabbit is supposed to use a local copy of the DTD (included inside
the jackrabbit-core jar). It's a bug if it doesn't.

In any case I'll publish the 1.6 and 2.0 DTDs on the Jackrabbit site,
at least for documentation purposes.

BR,

Jukka Zitting


Export/import on a Node basis Jackrabbit2.0

2010-02-19 Thread Niu, Xuetao
Hello,

 

Is it possible to export a unstructured node into some format (better to
be readable) and import back ?

 

Thanks!

Xuetao



Re: Export/import on a Node basis Jackrabbit2.0

2010-02-19 Thread Rakesh Vidyadharan

On 19 Feb 2010, at 07:13, Niu, Xuetao wrote:

 Hello,
 
 
 
 Is it possible to export a unstructured node into some format (better to
 be readable) and import back ?

I have found the document view more readable than the system view.  You can 
also send the output through a filter or other system to format the output.  
The link shows how I format the output in my jcr manager client.

http://code.google.com/p/sptjcrmanager/source/browse/trunk/src/app/com/sptci/jcr/webui/listener/NodeExportListener.java

Rakesh

Jackrabbit and ha-jdbc

2010-02-19 Thread Ben Short
Hi,

Has anyone ever tried using jackrabbit with ha-jdbc?

Ben

[1] http://ha-jdbc.sourceforge.net/


Re: jackrabbit 2.0 binary search indexing

2010-02-19 Thread ChadDavis
 Make sure you have all the extractors configured you need. This is
 done in the SearchIndex configuration. You can also look this up at
 the wiki


Is this necessary for jackrabbit 2.0?


Re: ItemNotFoundException: failed to build path

2010-02-19 Thread Patricio Echagüe
Sunil, I'm having the same error but in my case I'm using my own persistence
Manager against Cassandra.

After debugging this issue, I found out that it has to do with HashMapIndex
which uses a file to map properties and names at the time of serialize them.
(bundle approach). it generates a file called names.properties.

You can try copying the names.properties from workspace-default into
version - . to see if it works.

at this point, I don't know what I'm doing wrong.

My 2 cents

On Fri, Dec 25, 2009 at 5:04 AM, Alexander Klimetschek aklim...@day.comwrote:

 On Tue, Dec 22, 2009 at 12:13, sunild sunil.dh...@coreobjects.com wrote:
  I am using jackrabbit and have enabled FileDataStore and using
  MSSQLPersistenceManager.
 
  while Add content I am getting WARNING
 
  [SearchIndex] Exception while creating document for node:
  956eb525-e81f-4a4e-9037-f193d6080e5f: javax.jcr.RepositoryException:
 Missing
  child node entry for node with id: 956eb525-e81f-4a4e-9037-f193d6080e5f
 
 
  And While Finding the content I am getting ERROR
 
  Item not found; nested exception is javax.jcr.ItemNotFoundException:
  failed to build path of *64ab495a-c093-4a89-8b86-b9973dd647b6 *:
  *85f65e81-6eed-4c04-8fb5-2e44952b177f* has no child entry for
  64ab495a-c093-4a89-8b86-b9973dd647b6
 
  I have gone through MSSQL Database tables and found a row with
  _/NODE_ID/_ --- *64AB495AC0934A898B86B9973DD647B6*   _/BUNDLE_DATA/_ ---
 
 0204000401*85F65E816EED4C048FB52E44952B177F*000A2D373633393437373734
 
 00030005000901000A3132373331343336353800010126B74B14E0AA498B94844EEC950C1C49000
 
 3000600050A313136383237343937310001001D323030392D31322D32325431363A31363A31342E
 
 3034302B30353A33330007000100090100082D363232363332330001015EBF38CE04A9409ABE4D01CF
 
 EA077C7901019ECFFFA2952740B497619DF093D6D8C30003000A66726F7A656E4E6F64650100
 
 
  which is very much same as the nodeid being search for.  But the nodeId
  present in database doesnot have hyphens and all the characters are Caps.
   That is the problem for the ERROR.

 No, this is right. The serialization in the db is different from the
 plain UUIDs (in order to save space). Also, this is the entry for the
 node in question (the child node). The problem reported means that
 the parent node 85f... does not contain a pointer to the child node,
 whereas that node points to that parent (see the part after the first
 * in the BUNDLE_DATA above - note that this is a binary serialization,
 nothing to be touched manually).

 It looks like some corruption happened earlier.

 You can fix those errors using the consistencyCheck/Fix options for
 the persistence manager. See this link for a guide on that:

 http://wiki.gxdeveloperweb.com/confluence/display/GXDEV/How+to+repair+a+'corrupt'+JCRhttp://wiki.gxdeveloperweb.com/confluence/display/GXDEV/How+to+repair+a+%27corrupt%27+JCR

 Regards,
 Alex

 --
 Alexander Klimetschek
 alexander.klimetsc...@day.com




-- 
Patricio.-


FullTextSearchScore operand

2010-02-19 Thread ChadDavis
I'm trying to figure out exactly how to use the FullTextSearchScore
operand.  Can some one provide a simplest case usage example?

JCR-JQOM, Jackrabbit 2.0.0