You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Ista Pouss <is...@gmail.com> on 2010/09/30 11:06:35 UTC
Newbee search text
Hi,
Some newbee questions about text search in a jackrabbit repository.
On a result, is it possible to get the worlds around the result ? (I
have a property with "The beautiful dog is black and white", I search
"dog", I want "... beautiful DOG is black...")
Is it possible to get some cloud tag automatically ?
Is it possible to have some score / pertinence in result ?
Is there a tutorial about plain text search with jackrabbit ?
Thanks.
Re: Cannot create JDBC driver of class 'org.apache.derby.jdbc.EmbeddedDriver'
for connect URL 'jdbc:derby:...'
Posted by Justin Edelson <ju...@justinedelson.com>.
derby mailing list?
On Thu, Sep 30, 2010 at 11:11 AM, Clemens Wyss <cl...@mysign.ch> wrote:
> same error when I change the path...
>
> Got one step further:
>
> when I force the loading of EmbeddedDriver:
> ...
> org.apache.derby.jdbc.EmbeddedDriver driver =
> (EmbeddedDriver) Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
> ...
> I get a FileNotFoundException, unfortunately the missing file is not mentioned:
> Thread [main] (Suspended (exception FileNotFoundException))
> URLClassPath$JarLoader.getJarFile(URL) line: 641
> URLClassPath$JarLoader.access$600(URLClassPath$JarLoader, URL) line: 538
> URLClassPath$JarLoader$1.run() line: 605
> AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method]
> URLClassPath$JarLoader.ensureOpen() line: 597
> URLClassPath$JarLoader.<init>(URL, URLStreamHandler, HashMap) line: 581
> URLClassPath$JarLoader$3.run() line: 806
> AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method]
> URLClassPath$JarLoader.getResource(String, boolean, Set) line: 802
> URLClassPath$JarLoader.getResource(String, boolean) line: 762
> URLClassPath.getResource(String, boolean) line: 168
> URLClassLoader$1.run() line: 192
> AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
> Launcher$AppClassLoader(URLClassLoader).findClass(String) line: 188
> Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: 303
> Launcher$AppClassLoader.loadClass(String, boolean) line: 301
> Launcher$AppClassLoader(ClassLoader).loadClass(String) line: 248
> Launcher$AppClassLoader(ClassLoader).loadClassInternal(String) line: 316
> Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
> Class<T>.forName(String) line: 169
> FileMonitor(BaseMonitor).getImplementations(Properties, boolean) line: not available
> FileMonitor(BaseMonitor).getDefaultImplementations() line: not available
> FileMonitor(BaseMonitor).runWithState(Properties, PrintStream) line: not available
> FileMonitor.<init>(Properties, PrintStream) line: not available
> Monitor.startMonitor(Properties, PrintStream) line: not available
> JDBCBoot.boot(String, PrintStream) line: not available
> EmbeddedDriver.boot() line: not available
> EmbeddedDriver.<clinit>() line: not available
> Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
> Class<T>.forName(String) line: 169
> JcrAccess.<init>() line: 27
> Proj2SlingApp.main(String[]) line: 68
> ...
> What dependencies (jar's) am I possibly missing?
>
>
>> -----Original Message-----
>> From: justinedelson@gmail.com
>> [mailto:justinedelson@gmail.com]On Behalf
>> Of Justin Edelson
>> Sent: Thursday, September 30, 2010 4:56 PM
>> To: users@jackrabbit.apache.org
>> Subject: Re: Cannot create JDBC driver of class
>> 'org.apache.derby.jdbc.EmbeddedDriver' for connect URL
>> 'jdbc:derby:...'
>>
>>
>> Something looks weird about this line:
>>
>> String home = "/dev/sling/sling/jackrabbit";
>>
>> You're running on Windows, right? So maybe this should be
>>
>> String home = "c:\\dev\\sling\\sling\\jackrabbit";
>>
>> WDYT?
>>
>> Justin
>>
>> On Thu, Sep 30, 2010 at 10:18 AM, Clemens Wyss
>> <cl...@mysign.ch> wrote:
>> > I am trying to open an existing sling jackrabbit repository.
>> >
>> > My code is as follows:
>> > ...
>> > String configURLObj =
>> "file:/C:/dev/sling/sling/jackrabbit/repository.xml";
>> > URL configURL = new URL(configURLObj);
>> > InputStream ins = configURL.openStream();
>> > String home = "/dev/sling/sling/jackrabbit";
>> > RepositoryConfig crc = RepositoryConfig.create( ins, home );
>> > //RepositoryConfig crc = RepositoryConfig.create( new
>> File("/dev/sling/sling/jackrabbit") );
>> > Repository repository = RepositoryImpl.create( crc );
>> > ...
>> >
>> > or
>> >
>> > ...
>> > RepositoryConfig crc = RepositoryConfig.create( new
>> File("/dev/sling/sling/jackrabbit") );
>> > Repository repository = RepositoryImpl.create( crc );
>> > ...
>> >
>> > Unforunately I am getting a
>> > javax.jcr.RepositoryException: Cannot instantiate
>> persistence manager
>> > org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager
>> >
>> > with the nested SQLNestedException
>> > Cannot create JDBC driver of class
>> 'org.apache.derby.jdbc.EmbeddedDriver'
>> > for connect URL
>> 'jdbc:derby:/dev/sling/sling/jackrabbit/version/db;create=true'
>> >
>> > Also note
>> > - jackrabbit-standalone-2.1.1.jar and derby-10.5.3.0_1.jar
>> are in build/run path
>> > - sling is not ruuning ;-)
>> > - lock files are deleted ;-)
>> >
>> > Any help/advice appreciated
>> > Clemens
>> >
>> >
>>
>
RE: Cannot create JDBC driver of class
'org.apache.derby.jdbc.EmbeddedDriver' for connect URL 'jdbc:derby:...'
Posted by Clemens Wyss <cl...@mysign.ch>.
same error when I change the path...
Got one step further:
when I force the loading of EmbeddedDriver:
...
org.apache.derby.jdbc.EmbeddedDriver driver =
(EmbeddedDriver) Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
...
I get a FileNotFoundException, unfortunately the missing file is not mentioned:
Thread [main] (Suspended (exception FileNotFoundException))
URLClassPath$JarLoader.getJarFile(URL) line: 641
URLClassPath$JarLoader.access$600(URLClassPath$JarLoader, URL) line: 538
URLClassPath$JarLoader$1.run() line: 605
AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method]
URLClassPath$JarLoader.ensureOpen() line: 597
URLClassPath$JarLoader.<init>(URL, URLStreamHandler, HashMap) line: 581
URLClassPath$JarLoader$3.run() line: 806
AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method]
URLClassPath$JarLoader.getResource(String, boolean, Set) line: 802
URLClassPath$JarLoader.getResource(String, boolean) line: 762
URLClassPath.getResource(String, boolean) line: 168
URLClassLoader$1.run() line: 192
AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
Launcher$AppClassLoader(URLClassLoader).findClass(String) line: 188
Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: 303
Launcher$AppClassLoader.loadClass(String, boolean) line: 301
Launcher$AppClassLoader(ClassLoader).loadClass(String) line: 248
Launcher$AppClassLoader(ClassLoader).loadClassInternal(String) line: 316
Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
Class<T>.forName(String) line: 169
FileMonitor(BaseMonitor).getImplementations(Properties, boolean) line: not available
FileMonitor(BaseMonitor).getDefaultImplementations() line: not available
FileMonitor(BaseMonitor).runWithState(Properties, PrintStream) line: not available
FileMonitor.<init>(Properties, PrintStream) line: not available
Monitor.startMonitor(Properties, PrintStream) line: not available
JDBCBoot.boot(String, PrintStream) line: not available
EmbeddedDriver.boot() line: not available
EmbeddedDriver.<clinit>() line: not available
Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
Class<T>.forName(String) line: 169
JcrAccess.<init>() line: 27
Proj2SlingApp.main(String[]) line: 68
...
What dependencies (jar's) am I possibly missing?
> -----Original Message-----
> From: justinedelson@gmail.com
> [mailto:justinedelson@gmail.com]On Behalf
> Of Justin Edelson
> Sent: Thursday, September 30, 2010 4:56 PM
> To: users@jackrabbit.apache.org
> Subject: Re: Cannot create JDBC driver of class
> 'org.apache.derby.jdbc.EmbeddedDriver' for connect URL
> 'jdbc:derby:...'
>
>
> Something looks weird about this line:
>
> String home = "/dev/sling/sling/jackrabbit";
>
> You're running on Windows, right? So maybe this should be
>
> String home = "c:\\dev\\sling\\sling\\jackrabbit";
>
> WDYT?
>
> Justin
>
> On Thu, Sep 30, 2010 at 10:18 AM, Clemens Wyss
> <cl...@mysign.ch> wrote:
> > I am trying to open an existing sling jackrabbit repository.
> >
> > My code is as follows:
> > ...
> > String configURLObj =
> "file:/C:/dev/sling/sling/jackrabbit/repository.xml";
> > URL configURL = new URL(configURLObj);
> > InputStream ins = configURL.openStream();
> > String home = "/dev/sling/sling/jackrabbit";
> > RepositoryConfig crc = RepositoryConfig.create( ins, home );
> > //RepositoryConfig crc = RepositoryConfig.create( new
> File("/dev/sling/sling/jackrabbit") );
> > Repository repository = RepositoryImpl.create( crc );
> > ...
> >
> > or
> >
> > ...
> > RepositoryConfig crc = RepositoryConfig.create( new
> File("/dev/sling/sling/jackrabbit") );
> > Repository repository = RepositoryImpl.create( crc );
> > ...
> >
> > Unforunately I am getting a
> > javax.jcr.RepositoryException: Cannot instantiate
> persistence manager
> > org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager
> >
> > with the nested SQLNestedException
> > Cannot create JDBC driver of class
> 'org.apache.derby.jdbc.EmbeddedDriver'
> > for connect URL
> 'jdbc:derby:/dev/sling/sling/jackrabbit/version/db;create=true'
> >
> > Also note
> > - jackrabbit-standalone-2.1.1.jar and derby-10.5.3.0_1.jar
> are in build/run path
> > - sling is not ruuning ;-)
> > - lock files are deleted ;-)
> >
> > Any help/advice appreciated
> > Clemens
> >
> >
>
Re: Cannot create JDBC driver of class 'org.apache.derby.jdbc.EmbeddedDriver'
for connect URL 'jdbc:derby:...'
Posted by Justin Edelson <ju...@justinedelson.com>.
Something looks weird about this line:
String home = "/dev/sling/sling/jackrabbit";
You're running on Windows, right? So maybe this should be
String home = "c:\\dev\\sling\\sling\\jackrabbit";
WDYT?
Justin
On Thu, Sep 30, 2010 at 10:18 AM, Clemens Wyss <cl...@mysign.ch> wrote:
> I am trying to open an existing sling jackrabbit repository.
>
> My code is as follows:
> ...
> String configURLObj = "file:/C:/dev/sling/sling/jackrabbit/repository.xml";
> URL configURL = new URL(configURLObj);
> InputStream ins = configURL.openStream();
> String home = "/dev/sling/sling/jackrabbit";
> RepositoryConfig crc = RepositoryConfig.create( ins, home );
> //RepositoryConfig crc = RepositoryConfig.create( new File("/dev/sling/sling/jackrabbit") );
> Repository repository = RepositoryImpl.create( crc );
> ...
>
> or
>
> ...
> RepositoryConfig crc = RepositoryConfig.create( new File("/dev/sling/sling/jackrabbit") );
> Repository repository = RepositoryImpl.create( crc );
> ...
>
> Unforunately I am getting a
> javax.jcr.RepositoryException: Cannot instantiate persistence manager
> org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager
>
> with the nested SQLNestedException
> Cannot create JDBC driver of class 'org.apache.derby.jdbc.EmbeddedDriver'
> for connect URL 'jdbc:derby:/dev/sling/sling/jackrabbit/version/db;create=true'
>
> Also note
> - jackrabbit-standalone-2.1.1.jar and derby-10.5.3.0_1.jar are in build/run path
> - sling is not ruuning ;-)
> - lock files are deleted ;-)
>
> Any help/advice appreciated
> Clemens
>
>
Re: Newbee search text
Posted by Ard Schrijvers <a....@onehippo.com>.
On Fri, Oct 1, 2010 at 10:30 AM, Ista Pouss <is...@gmail.com> wrote:
> 2010/10/1 Ard Schrijvers <a....@onehippo.com>:
>>
>> Not really, You can extend the SearchIndex however, or completely
>> implement your own
>>
>
> Super very intersting.
>
> But I've not see how to say to jackrabbit "please use
> MySearchIndexer"... I've double-check read
> http://wiki.apache.org/jackrabbit/SearchIndex,
> http://wiki.apache.org/jackrabbit/Search, and
> http://wiki.apache.org/jackrabbit/IndexingConfiguration... I don't
> find.
in the repository.xml you can configure in the <searchIndex> element a
different search index implementation,
Regards Ard
>
> (but I've found
> http://jackrabbit.apache.org/api/2.1/org/apache/jackrabbit/core/query/lucene/SearchIndex.html
> :-)
>
> Planty of thanks.
>
--
Hippo
Europe • Amsterdam Oosteinde 11 • 1017 WT Amsterdam • +31 (0)20 522 4466
USA • San Francisco 185 H Street Suite B • Petaluma CA 94952-5100
• +1 (707) 773 4646
Canada • Montréal 5369 Boulevard St-Laurent • Montréal QC H2T
1S5 • +1 (514) 316 8966
www.onehippo.com • www.onehippo.org • info@onehippo.com
Re: Newbee search text
Posted by Ista Pouss <is...@gmail.com>.
2010/10/1 Ard Schrijvers <a....@onehippo.com>:
>
> Not really, You can extend the SearchIndex however, or completely
> implement your own
>
Super very intersting.
But I've not see how to say to jackrabbit "please use
MySearchIndexer"... I've double-check read
http://wiki.apache.org/jackrabbit/SearchIndex,
http://wiki.apache.org/jackrabbit/Search, and
http://wiki.apache.org/jackrabbit/IndexingConfiguration... I don't
find.
(but I've found
http://jackrabbit.apache.org/api/2.1/org/apache/jackrabbit/core/query/lucene/SearchIndex.html
:-)
Planty of thanks.
Re: Newbee search text
Posted by Ard Schrijvers <a....@onehippo.com>.
On Thu, Sep 30, 2010 at 3:07 PM, Ista Pouss <is...@gmail.com> wrote:
> 2010/9/30 Ard Schrijvers <a....@onehippo.com>:
>> Hello,
>>
>> On Thu, Sep 30, 2010 at 11:06 AM, Ista Pouss <is...@gmail.com> wrote:
>>>
>>> On a result, is it possible to get the worlds around the result ? (I
>>> have a property with "The beautiful dog is black and white", I search
>>> "dog", I want "... beautiful DOG is black...")
>>
>> see [1]
>>
>
> Is it possible with an exemple with SQL2 ?
I don't know. Perhaps someone else knows.
>
>
>>>
>>> Is it possible to get some cloud tag automatically ?
>>
>> No
>>
>
> And with jackrabbit is it possible to use directly lucene ?
Not really, You can extend the SearchIndex however, or completely
implement your own
>
>
>>>
>>> Is it possible to have some score / pertinence in result ?
>>
>> double score = row.getValue(JCRConstants.JCR_SCORE).getDouble();
>>
>
> Thanks.
>
> But I don't find JCR_SCORE in spec 283 ? Is it my mistake, or is there
> some other spec ?
Jackrabbit has some more features than just core spec...not everything
is documented I guess
>
>
>>
>>>
>>> Is there a tutorial about plain text search with jackrabbit ?
>>
>> You can take a look at the specs (170/283) : the search part is pretty
>> well readable and explanatory
>>
>
> Please, a tutorial with some exemples and images :-)
Would indeed be great to have one :-) Sry, don't have one either :-)
Regards Ard
>
> Thanks.
>
--
Hippo
Europe • Amsterdam Oosteinde 11 • 1017 WT Amsterdam • +31 (0)20 522 4466
USA • San Francisco 185 H Street Suite B • Petaluma CA 94952-5100
• +1 (707) 773 4646
Canada • Montréal 5369 Boulevard St-Laurent • Montréal QC H2T
1S5 • +1 (514) 316 8966
www.onehippo.com • www.onehippo.org • info@onehippo.com
Cannot create JDBC driver of class
'org.apache.derby.jdbc.EmbeddedDriver' for connect URL 'jdbc:derby:...'
Posted by Clemens Wyss <cl...@mysign.ch>.
I am trying to open an existing sling jackrabbit repository.
My code is as follows:
...
String configURLObj = "file:/C:/dev/sling/sling/jackrabbit/repository.xml";
URL configURL = new URL(configURLObj);
InputStream ins = configURL.openStream();
String home = "/dev/sling/sling/jackrabbit";
RepositoryConfig crc = RepositoryConfig.create( ins, home );
//RepositoryConfig crc = RepositoryConfig.create( new File("/dev/sling/sling/jackrabbit") );
Repository repository = RepositoryImpl.create( crc );
...
or
...
RepositoryConfig crc = RepositoryConfig.create( new File("/dev/sling/sling/jackrabbit") );
Repository repository = RepositoryImpl.create( crc );
...
Unforunately I am getting a
javax.jcr.RepositoryException: Cannot instantiate persistence manager
org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager
with the nested SQLNestedException
Cannot create JDBC driver of class 'org.apache.derby.jdbc.EmbeddedDriver'
for connect URL 'jdbc:derby:/dev/sling/sling/jackrabbit/version/db;create=true'
Also note
- jackrabbit-standalone-2.1.1.jar and derby-10.5.3.0_1.jar are in build/run path
- sling is not ruuning ;-)
- lock files are deleted ;-)
Any help/advice appreciated
Clemens
Re: Newbee search text
Posted by Ista Pouss <is...@gmail.com>.
2010/9/30 Ard Schrijvers <a....@onehippo.com>:
> Hello,
>
> On Thu, Sep 30, 2010 at 11:06 AM, Ista Pouss <is...@gmail.com> wrote:
>>
>> On a result, is it possible to get the worlds around the result ? (I
>> have a property with "The beautiful dog is black and white", I search
>> "dog", I want "... beautiful DOG is black...")
>
> see [1]
>
Is it possible with an exemple with SQL2 ?
>>
>> Is it possible to get some cloud tag automatically ?
>
> No
>
And with jackrabbit is it possible to use directly lucene ?
>>
>> Is it possible to have some score / pertinence in result ?
>
> double score = row.getValue(JCRConstants.JCR_SCORE).getDouble();
>
Thanks.
But I don't find JCR_SCORE in spec 283 ? Is it my mistake, or is there
some other spec ?
>
>>
>> Is there a tutorial about plain text search with jackrabbit ?
>
> You can take a look at the specs (170/283) : the search part is pretty
> well readable and explanatory
>
Please, a tutorial with some exemples and images :-)
Thanks.
Re: Newbee search text
Posted by Ard Schrijvers <a....@onehippo.com>.
Hello,
On Thu, Sep 30, 2010 at 11:06 AM, Ista Pouss <is...@gmail.com> wrote:
> Hi,
>
> Some newbee questions about text search in a jackrabbit repository.
>
> On a result, is it possible to get the worlds around the result ? (I
> have a property with "The beautiful dog is black and white", I search
> "dog", I want "... beautiful DOG is black...")
see [1]
>
> Is it possible to get some cloud tag automatically ?
No
>
> Is it possible to have some score / pertinence in result ?
double score = row.getValue(JCRConstants.JCR_SCORE).getDouble();
>
> Is there a tutorial about plain text search with jackrabbit ?
You can take a look at the specs (170/283) : the search part is pretty
well readable and explanatory
>
> Thanks.
>
Regards Ard
[1] http://wiki.apache.org/jackrabbit/ExcerptProvider
--
Hippo
Europe • Amsterdam Oosteinde 11 • 1017 WT Amsterdam • +31 (0)20 522 4466
USA • San Francisco 185 H Street Suite B • Petaluma CA 94952-5100
• +1 (707) 773 4646
Canada • Montréal 5369 Boulevard St-Laurent • Montréal QC H2T
1S5 • +1 (514) 316 8966
www.onehippo.com • www.onehippo.org • info@onehippo.com