jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek" <aklim...@day.com>
Subject [Wiki] Cleanup of QuestionsAndAnswers page
Date Sun, 14 Dec 2008 16:02:40 GMT
Hi all,

I cleaned up the QuestionsAndAnswers wiki page [1] and effectively
removed all content, stopped inviting people to use the page as a way
to ask questions and put some explaining redirects to the mailing
lists (and the various helpful and searchable archives out there) in
the text instead.

The reason for that is that the list of questions was completely
unbalanced: some questions could point people reading them into
completely wrong directions. And a lot of questions were simply
unanswered, because nobody regularly monitors that page. For ongoing
questions and answers we have the mailing lists; with nabble for
example, it is also very easy to start writing mails to a list (if
someone is reluctant to do the normal subscription process, although
that is not that hard). The wiki is simply not an effective forum. For
frequently answered questions we have the official FAQ [2].

As a replacement, I listed links to the mailing list archives of
Jackrabbit (the ones with a proper usability ;-)). The old content is
still available in the history of the page and for the purpose of
mailing list indexing I also added the contents of the old page at the
end of this mail.

[1] http://wiki.apache.org/jackrabbit/QuestionsAndAnswers
[2] http://jackrabbit.apache.org/frequently-asked-questions.html

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

============================

QuestionsAndAnswers
Apache Jackrabbit Questions and Answers

This page is an alternative to the [WWW] Jackrabbit mailing lists for
people who prefer using a web forum instead of a mailing list for
asking questions. Please feel free to add any Jackrabbit questions or
answers here. The best questions will be incorporated into our website
documentation as the [WWW] Jackrabbit FAQ.

Where does the "ObjectPersistenceManager" store its data?

Question: I use
"org.apache.jackrabbit.core.state.obj.ObjectPersistenceManager" for
the PersistenceManager.I create a node, then upload a file.after that
i also success get the file.but i want know where
"ObjectPersistenceManager" save the file.i can't find it in my file
system.En,my system is windows.
Why no node SPI?

Question: I read in the FAQ that the interface was not intended to
provide a SPI for attaching to other storage. Specifically, it says
that you could probably achieve this for a read-only link to an
existing relational database table, but it says you shouldn't/couldn't
do it for read/write relational data.

I am curious why this closed architecture? I am considering this for a
major project bt need the ability to map to relational schemas and
other existing content stores, including other document management
systems, and could even envision using that mechanism to federate
multiple Jackrabit repositories into a central repository. I thought I
might just need to extend VersionImpl or one of the other Node types
and override some of the methods.

I would even envision implementing node types that map to transient
runtime data such as performance counters etc.

Can you elaborate as to what architectural/design issues make this not
possible. Or, is it just a philosophical point of view or ? This is
one of the powerful capabilities that Slide offers. I understand that
putting this abstraction over the RDBMS would have performance issues,
but assuming my use case isn't sensitive to that, what are the reasons
it won't work?

Thank you very much.
Where can I find examples of using the JCR API?

Answer: Please check the following:

    *

      The [WWW] First Hops document
    *

      The ExamplesPage

If you have ideas of good examples you'd like to see, please submit
your ideas as [WWW] Jackrabbit enhancements!
Is there a way to use Jackrabbit without access control, or to get it
working without changing JVM properties?

I'm using/evaluating Apache Jackrabbit for an open source project
(platypuswiki.sf.net). My application is distributable as a War file
(java webapp standard format). My problem is related to the Jackrabbit
authentication. I see, from your examples, the need of the jaas.config
definition. I'd like that my users do not have to change its
tomcat/jetty jvm configuration settings:
-Djava.security.auth.login.config= blah blah/jaas.config.

Answer: The JAAS configuration is no longer required for simple
deployments. Starting from Apache Jackrabbit version 1.0 you do not
need to set the JAAS login configuration options unless you want to
override the default settings. See [WWW] JCR-351 for the background
and resolution of this issue.

Question: Thank you for the response. I have understood, that I have
to use "TransientRepository" in place of "Repository" for omit the
JAAS configuration. Is it true ?

What are others differences (advantages/disavantages) of using
"TransientRepository" in place of "Repository" implmentation ?

Supported operations

Questions:

1. I have saw that NamespaceRegistry.unregisterNamespace(..) is not
supported. Is this feature planned in next releases ? Or there are
other ways to change a namespace URI of a registered namespace ?

Answer: See this mail: [WWW]
http://article.gmane.org/gmane.comp.apache.jackrabbit.devel/6836

2. Also, I have saw that the Xpath function "contains" is not
supported: javax.jcr.query.InvalidQueryException: Unsupported
function: contains. There is a way for searching (full-text keyword
search) into a value of a named property over all the workspace ?

Solved We need to use jcr:contains() function

There is a way for accessing, bypassing JCR pure std api, at lucene Index ?
How do I use Jackrabbit in MY projects with Maven 2 ?

If you are using maven 2, happily the releases of Jackrabbit are kept
in the central maven repo. Put the following into your projects
pom.xml:

       <dependency>
           <groupId>org.apache.jackrabbit</groupId>
           <artifactId>jackrabbit-core</artifactId>
           <version>1.3.3</version>
       </dependency>

As Jackrabbit depends on JCR (of course) you will also need to add:

    <dependency>
      <groupId>javax.jcr</groupId>
      <artifactId>jcr</artifactId>
      <version>1.0</version>
    </dependency>

Syntax errors in CND files

If you get annoying errors like: "Missing ']' delimiter for end of
node type name", the chances are you are using names that have
underscores in them ! (cryptic, I know). Remove the underscores and
you are good to go !

Poor Performance when Implementing Global Revisioning & Content Set

We are in the process of evaluating Jackrabbit as a content repository
for our internal content storage system. The content stored are all
XML documents that are stored as a property in the node. The
repository stores versioned/non-versioned nodes and typically nodes
under certain root nodes are all revisioned. We are implementing full
versioning capabilities similar to Subversion so that every commit
results in a changeset node being created which refers to all the
changed documents during this operation also we have to create a
global revision so that a user can retrieve the repository state at a
particular point in time. So we have implemented a tree walking which
walks the tree and put the global revision reference to all the nodes
in the repository. So our repository looks like the following:

root

    *

      - Root1 - Root2

changeset Root

    *

      - cs1 - cs2

Global Revision Root

    *

      - global revision 1 - global revision 2

Each cs1 is referencable and contains a property of type reference
pointing to global revision. Each global revision is also.
referencable. Each Root1 has two referencable properties pointing to
cs-x and global revision x. The performance is really bad it takes 10
minutes for a repository with 100 documents.

Have anybody tried implementing the concept of global revision &
Change Set in Content Repository??? Any Suggestions???
JAR Files that Work with JackRabbit V1.3.3

First Hops Hop 0: Getting started is outdated when using JackRabbit
1.3.3. In particular you need to use lucene-core-1.9-final.jar rather
than lucene-1.4.3.jar. Also, the latest logging subsystems work fine:
log4j-api-1.4.3.jar, slf4j-log4j12-1.4.3.jar, log4j-1.2.15.jar,
slf4j-api-1.4.3,jar.

Bugs & Known Limitations
IllegalStateException: unread block data

Question: sometimes is thrown an exception in obtaining the stream to
the Object stored in Jackrabbit:

java.lang.IllegalStateException: unread block data

    *

      at java.io.ObjectInputStream$BlockDataInputStream.setBlockDataMode(ObjectInputStream.java:2375)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1361)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at
sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:306) at
sun.rmi.server.UnicastRef.invoke(UnicastRef.java:155) at
org.apache.jackrabbit.rmi.server.ServerProperty_Stub.getValue(Unknown
Source) at org.apache.jackrabbit.rmi.client.ClientProperty.getValue(ClientProperty.java:137)
at org.apache.jackrabbit.rmi.client.ClientProperty.getStream(ClientProperty.java:121)

This happens using version 1.3.3, in unpredictable manner. Is it a bug
or a feature? Any suggestion would be useful.
Extractor dependency not found

Question: I'm a new Jackrabbit user. When I run the "FirstHop.java"
from "[WWW] http://jackrabbit.apache.org/first-hops.html", I get the
following warnings (whole log posted; the person answering should feel
free to edit down to the most important lines.)

 496 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - Starting
repository...
 578 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
LocalFileSystem initialized at path repository/repository
 1218 [main] INFO org.apache.jackrabbit.core.nodetype.NodeTypeRegistry
- no custom node type definitions found
 1236 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem
- LocalFileSystem initialized at path repository/version
 2945 [main] INFO
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- Database: Apache Derby / 10.3.2.1 - (599110)
 2945 [main] INFO
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- Driver: Apache Derby Embedded JDBC Driver / 10.3.2.1 - (599110)
 4607 [main] INFO org.apache.jackrabbit.core.RepositoryImpl -
initializing workspace 'default'...
 4609 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem
- LocalFileSystem initialized at path repository/workspaces/default
 4716 [main] INFO
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- Database: Apache Derby / 10.3.2.1 - (599110)
 4716 [main] INFO
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- Driver: Apache Derby Embedded JDBC Driver / 10.3.2.1 - (599110)
 5515 [main] INFO org.apache.jackrabbit.core.RepositoryImpl -
workspace 'default' initialized
 5860 [main] WARN
org.apache.jackrabbit.core.query.lucene.JackrabbitTextExtractor -
Extractor dependency not found:
org.apache.jackrabbit.extractor.MsWordTextExtractor
 java.lang.NoClassDefFoundError
        at org.apache.jackrabbit.extractor.MsWordTextExtractor.class$(MsWordTextExtractor.java:37)
        at org.apache.jackrabbit.extractor.MsWordTextExtractor.<clinit>(MsWordTextExtractor.java:43)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at org.apache.jackrabbit.core.query.lucene.JackrabbitTextExtractor.<init>(JackrabbitTextExtractor.java:113)
        at org.apache.jackrabbit.core.query.lucene.SearchIndex.createTextExtractor(SearchIndex.java:881)
        at org.apache.jackrabbit.core.query.lucene.SearchIndex.doInit(SearchIndex.java:395)
        at org.apache.jackrabbit.core.query.AbstractQueryHandler.init(AbstractQueryHandler.java:48)
        at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:573)
        at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:255)
        at org.apache.jackrabbit.core.RepositoryImpl.getSystemSearchManager(RepositoryImpl.java:625)
        at org.apache.jackrabbit.core.RepositoryImpl.access$300(RepositoryImpl.java:104)
        at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1613)
        at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:606)
        at org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:415)
        at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:305)
        at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:557)
        at org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:245)
        at org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:265)
        at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:333)
        at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:388)
        at org.lockss.jackrabbit.FirstHop.main(FirstHop.java:26)
 Caused by: java.lang.ClassNotFoundException:
org.textmining.text.extraction.WordExtractor
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        ... 22 more
 5913 [main] WARN
org.apache.jackrabbit.core.query.lucene.JackrabbitTextExtractor -
Extractor dependency not found:
org.apache.jackrabbit.extractor.PdfTextExtractor
 java.lang.NoClassDefFoundError: org/pdfbox/pdmodel/PDDocument
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at org.apache.jackrabbit.core.query.lucene.JackrabbitTextExtractor.<init>(JackrabbitTextExtractor.java:113)
        at org.apache.jackrabbit.core.query.lucene.SearchIndex.createTextExtractor(SearchIndex.java:881)
        at org.apache.jackrabbit.core.query.lucene.SearchIndex.doInit(SearchIndex.java:395)
        at org.apache.jackrabbit.core.query.AbstractQueryHandler.init(AbstractQueryHandler.java:48)
        at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:573)
        at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:255)
        at org.apache.jackrabbit.core.RepositoryImpl.getSystemSearchManager(RepositoryImpl.java:625)
        at org.apache.jackrabbit.core.RepositoryImpl.access$300(RepositoryImpl.java:104)
        at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1613)
        at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:606)
        at org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:415)
        at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:305)
        at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:557)
        at org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:245)
        at org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:265)
        at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:333)
        at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:388)
        at org.lockss.jackrabbit.FirstHop.main(FirstHop.java:26)
 6063 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem
- LocalFileSystem initialized at path repository/repository/index
 6422 [main] INFO org.apache.jackrabbit.core.query.lucene.SearchIndex
- Index initialized: repository/repository/index Version: 2
 6429 [main] WARN
org.apache.jackrabbit.core.query.lucene.JackrabbitTextExtractor -
Extractor dependency not found:
org.apache.jackrabbit.extractor.MsWordTextExtractor
 java.lang.NoClassDefFoundError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at org.apache.jackrabbit.core.query.lucene.JackrabbitTextExtractor.<init>(JackrabbitTextExtractor.java:113)
        at org.apache.jackrabbit.core.query.lucene.SearchIndex.createTextExtractor(SearchIndex.java:881)
        at org.apache.jackrabbit.core.query.lucene.SearchIndex.doInit(SearchIndex.java:395)
        at org.apache.jackrabbit.core.query.AbstractQueryHandler.init(AbstractQueryHandler.java:48)
        at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:573)
        at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:255)
        at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1613)
        at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:606)
        at org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:415)
        at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:305)
        at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:557)
        at org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:245)
        at org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:265)
        at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:333)
        at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:388)
        at org.lockss.jackrabbit.FirstHop.main(FirstHop.java:26)
 6438 [main] WARN
org.apache.jackrabbit.core.query.lucene.JackrabbitTextExtractor -
Extractor dependency not found:
org.apache.jackrabbit.extractor.PdfTextExtractor
 java.lang.NoClassDefFoundError: org/pdfbox/pdmodel/PDDocument
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at org.apache.jackrabbit.core.query.lucene.JackrabbitTextExtractor.<init>(JackrabbitTextExtractor.java:113)
        at org.apache.jackrabbit.core.query.lucene.SearchIndex.createTextExtractor(SearchIndex.java:881)
        at org.apache.jackrabbit.core.query.lucene.SearchIndex.doInit(SearchIndex.java:395)
        at org.apache.jackrabbit.core.query.AbstractQueryHandler.init(AbstractQueryHandler.java:48)
        at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:573)
        at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:255)
        at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1613)
        at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:606)
        at org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:415)
        at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:305)
        at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:557)
        at org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:245)
        at org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:265)
        at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:333)
        at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:388)
        at org.lockss.jackrabbit.FirstHop.main(FirstHop.java:26)
 6448 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem
- LocalFileSystem initialized at path
repository/workspaces/default/index
 6456 [main] INFO org.apache.jackrabbit.core.query.lucene.SearchIndex
- Index initialized: repository/workspaces/default/index Version: 2
 6456 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - Repository started
 6457 [main] INFO org.apache.jackrabbit.core.TransientRepository -
Transient repository initialized
 6532 [main] INFO org.apache.jackrabbit.core.TransientRepository -
Session opened
 Logged in as anonymous to a Jackrabbit repository.
 6550 [main] INFO org.apache.jackrabbit.core.TransientRepository -
Session closed
 6550 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - Shutting
down repository...
 6553 [IndexMerger] INFO
org.apache.jackrabbit.core.query.lucene.IndexMerger - IndexMerger
terminated
 6558 [main] INFO org.apache.jackrabbit.core.query.lucene.SearchIndex
- Index closed: repository/repository/index
 6558 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - shutting
down workspace 'default'...
 6559 [main] INFO
org.apache.jackrabbit.core.observation.ObservationDispatcher -
Notification of EventListeners stopped.
 6559 [IndexMerger] INFO
org.apache.jackrabbit.core.query.lucene.IndexMerger - IndexMerger
terminated
 6606 [main] INFO org.apache.jackrabbit.core.query.lucene.SearchIndex
- Index closed: repository/workspaces/default/index
 6639 [main] INFO
org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager
- Database 'repository/workspaces/default/db' shutdown.
 6643 [main] ERROR
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- failed to close connection, reason: No current connection.,
state/code: 08003/40000
 6645 [main] INFO org.apache.jackrabbit.core.RepositoryImpl -
workspace 'default' has been shutdown
 6661 [main] INFO
org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager
- Database 'repository/version/db' shutdown.
 6661 [main] ERROR
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- failed to close connection, reason: No current connection.,
state/code: 08003/40000
 6678 [main] INFO org.apache.jackrabbit.core.RepositoryImpl -
Repository has been shutdown
 6678 [main] INFO org.apache.jackrabbit.core.TransientRepository -
Transient repository shut down

I'm worried about the "Extractor Dependencies not found". What could
be causing this?

Answer: You have to include in your project the following libraries:

    *

      PDFBox-0.7.3.jar (See PDFBox project [WWW] http://www.pdfbox.org/)
    *

      poi-3.0.2-FINAL-20080204.jar (See POI project [WWW]
http://poi.apache.org/)
    *

      tm-extractors-0.4.jar ([WWW]
http://www.ibiblio.org/maven/org.textmining/jars/tm-extractors-0.4.jar])

Question: I am using Jackrabbit 1.4.5. I parsed a SQL query using
QueryParser.parse() that contains a NOT BETWEEN. I then used
QueryTreeDump to display the query tree. It shows RelationQueryNodes
with >= and <= on the values I passed, as expected for a BETWEEN.
However I would have thought the reverse would have happened since I
specified NOT Between. Is this a bug?

Mime
View raw message