Jackrabbit 2.10.1 using Lucene 3.6 but internally there are Lucene 2.4 , ok?
Just curious, but would have to be Version.LUCENE_36 instead of Version.LUCENE_24, would not? I am digging in search the "why" my phrase search is not working as it should, since no one in these lists could helped me so far |-( ... and the debug stopped by these lines and, although is not related with my problem I got this doubt. Cheers, Helio. -- View this message in context: http://jackrabbit.510166.n4.nabble.com/Jackrabbit-2-10-1-using-Lucene-3-6-but-internally-there-are-Lucene-2-4-ok-tp4663567.html Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
Re: 2.* release plans, was: [ANNOUNCE] Apache Jackrabbit 2.10.1 released
Hi, There is a NPE problem in jack 2.10 . in line at org.apache.jackrabbit.core.query.lucene.NodeIndexer.isSupportedMediaType(NodeIndexer.java:934) supportedMediaTypes = parser.getSupportedTypes(null); would be supportedMediaTypes = parser.getSupportedTypes(new ParseContext()); -- View this message in context: http://jackrabbit.510166.n4.nabble.com/ANNOUNCE-Apache-Jackrabbit-2-10-1-released-tp4662462p4662501.html Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
Re: [jira] [Created] (JCR-3871) POI Vulnerabilities
We have upgraded the tika dependency to 1.7 and poi is 3.11. No problem was found with indexes after this, so the jackrabbit official release should be with some dependency upgrades too. -- View this message in context: http://jackrabbit.510166.n4.nabble.com/jira-Created-JCR-3871-POI-Vulnerabilities-tp4662313p4662315.html Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
Re: Adding further filtering capabilities to JackrabbitEventFilter
That is: I have a case where it should be monitored when updating the value of a property occur in nodes of a certain type. Nowadays the event listener is triggered in any update in nodes of that type. I wonder if would be possible to configure to just trigger when updating certain property. Regards Helio. -- View this message in context: http://jackrabbit.510166.n4.nabble.com/Adding-further-filtering-capabilities-to-JackrabbitEventFilter-tp4661094p4661190.html Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
Re: Adding further filtering capabilities to JackrabbitEventFilter
I wonder if would possible to set an filter directly to a node property if modified. Cheers Helio -- View this message in context: http://jackrabbit.510166.n4.nabble.com/Adding-further-filtering-capabilities-to-JackrabbitEventFilter-tp4661094p4661130.html Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
Re: [ANNOUNCE] Apache Jackrabbit 2.8.0 released
Jukka; In my code, after upgrade to 2.8.0, it is highlighted " The type org.apache.jackrabbit.core.config.ConfigurationException cannot be resolved. It is indirectly referenced from required .class files " in RepositoryConfig.create(x,y) It seems the .class ConfigurationException disappeared from path where RepositoryConfig is Have this changed in some way? Regards. Helio. -- View this message in context: http://jackrabbit.510166.n4.nabble.com/ANNOUNCE-Apache-Jackrabbit-2-8-0-released-tp4660832p4660841.html Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
Re: [RESULT] [VOTE] Release Apache Jackrabbit 2.6.5
About the release notes, where is it? Regards Helio. -- View this message in context: http://jackrabbit.510166.n4.nabble.com/RESULT-VOTE-Release-Apache-Jackrabbit-2-6-5-tp465p4660060.html Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
search with axis child support
Hi all; I would to get some help with this; I need to search nodes that have child nodes of certain type. For example, let's suppose I have the following hierarchy of node type: x:base | x:file | x:atach So, the nodetype x:file has a child of nt:resource mandatory (jcr:content) and the x:atach inherits the child definition of your supernode, ok. So, I want to know the x:base, or whatever, that have any child node of type x:file (and descendents), because x:file and descents have the child jcr:content for sure, in xpath or sql, I would appreciate very much. Follow some explanation about: |Node1(x:base)| |__| | | | ___|___ | |Node2(x:base)| | |__| ___|___ |___ |Node3(x:base)| |___ |__| |Node4(x:file) | | |__| ___| |Node5(x:atach)| |__| This hierarchy of nodes created can represent my need. So, with a search up to Node1, I would like to get Node3 and Node2, because both have child nodes like type x:file. In time, I need the child nodes of type x:file in results too. Hope this could do the right explanation. Helio.
Re: Apache Jackrabbit 1.1.1 release plan
Could you maybe consider applying the patch from JCR-584 for 1.1.1? Tks Helio
Errors on production environment, help.
Hi all; Please another time I get back here to your help. I am using jackrabbit in a solution of content manager, ok. It's happening some errors on the log of jboss that are hardly for us to detect the cause. The repository suddenly gets to shutdows (as you will see in the log) without a request to it, so the error starts. After the error the application doesn't get any nodes more from jackrabbit. It will only back works (jackrabbit) with a redeploy. We are using postgresql for database. Sorry about the size of this message. You are the mainly support I can get. I dont know if I was clearly about, but I hope the messages in the log will show you what could be. Follow the log error: 14:29:41,285 INFO [STDOUT] 14:29:41,284 INFO [RepositoryImpl] Shutting down repository... 14:29:41,289 INFO [STDOUT] 14:29:41,289 INFO [RepositoryImpl] shutting down workspace 'default'... 14:29:41,290 INFO [STDOUT] 14:29:41,290 INFO [ObservationManagerFactory] Notification of EventListeners stopped. 14:29:41,395 INFO [STDOUT] 14:29:41,394 INFO [IndexMerger] IndexMerger terminated 14:29:41,397 INFO [STDOUT] 14:29:41,397 INFO [SearchIndex] Index closed: /p/jboss4/server/default/data/gtf-escriba/teste005/workspaces/default/index 14:29:41,418 INFO [STDOUT] 14:29:41,415 ERROR [DbFileSystem] failed to check existence of folder: / org.postgresql.util.PSQLException: The core (backend) closed the connection. Probably an action you tooked is the guilty by the closed. at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:168) at org.postgresql.core.QueryExecutor.executeV3(QueryExecutor.java:127) at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:100) at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:43) at org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:517) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:50) at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.execute(WrappedPreparedStatement.java:259) at org.apache.jackrabbit.core.fs.db.DbFileSystem.isFolder(DbFileSystem.java:614) at org.apache.jackrabbit.core.fs.db.DbFileSystem.getOutputStream(DbFileSystem.java:960) at org.apache.jackrabbit.core.fs.FileSystemResource.getOutputStream(FileSystemResource.java:178) at org.apache.jackrabbit.core.lock.LockManagerImpl.save(LockManagerImpl.java:210) at org.apache.jackrabbit.core.lock.LockManagerImpl.close(LockManagerImpl.java:133) at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.dispose(RepositoryImpl.java:1592) at org.apache.jackrabbit.core.RepositoryImpl.shutdown(RepositoryImpl.java:851) at org.apache.jackrabbit.core.jndi.BindableRepository.shutdown(BindableRepository.java:261) at org.apache.jackrabbit.core.jndi.BindableRepository$1.run(BindableRepository.java:139) 14:29:41,419 INFO [STDOUT] 14:29:41,419 WARN [LockManagerImpl] I/O error while saving locks to '/locks': failed to check existence of folder: / 14:29:41,419 INFO [STDOUT] 14:29:41,419 INFO [RepositoryImpl] workspace 'default' has been shutdown 14:29:41,420 INFO [STDOUT] 14:29:41,420 INFO [IndexMerger] IndexMerger terminated 14:29:41,424 INFO [STDOUT] 14:29:41,424 INFO [SearchIndex] Index closed: /p/jboss4/server/default/data/gtf-escriba/teste005/repository/index 14:29:41,426 INFO [STDOUT] 14:29:41,425 ERROR [DbFileSystem] failed to check existence of file system entry: /meta org.postgresql.util.PSQLException: The core (backend) closed the connection. Probably an action you tooked is the guilty by the closed. at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:168) at org.postgresql.core.QueryExecutor.executeV3(QueryExecutor.java:127) at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:100) at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:43) at org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:517) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:50) at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.execute(WrappedPreparedStatement.java:259) at org.apache.jackrabbit.core.fs.db.DbFileSystem.exists(DbFileSystem.java:543) at org.apache.jackrabbit.core.fs.BasedFileSystem.exists(BasedFileSystem.java:120) at org.apache.jackrabbit.core.fs.FileSystemResource.makeParentDirs(FileSystemResource.java:99) at org.apache.jackrabbit.core.RepositoryImpl.storeRepProps(RepositoryImpl.java:994) at org.apache.jackrabbit.core.RepositoryImpl.shutdown(RepositoryImpl.java:869) at org.apache.jackrabbit.core.jndi.BindableRepository.shutdown(BindableRepository.java:261) at org.apache.jackrabbit.core.jndi.BindableRepository$1.run(BindableRepository.java:139) 14:29:41,427 INFO [STDOUT] 14:29:41,4
compacting (zipping) contents.
Hi; Another doubt I bet you could help me again. I am afraid that the size of the database will grow very fast for us. How could I do to put compact the binaries contents in the jcr:content (nt:resource, jcr:data) and do the indexes keeping doing like it already does for documents? Some ideas? The solution I am looking for is kind of superfluous resource for you guys? Thanks in advance. Helio.
Nodes without certain mix
Hello; How could I know whose nodes existing in the repository without a certain kind of mix assigned to it? (in sql and xpath, please). Thanks. Helio.
Some ideas to a function.
Hello; I'm in need to do a search by documents (like nt:file) that are duplicated in the workspace. I tought to compare the jcr:data in first. But I would to get some ideas from any of you because I don't mind from where begin the query to do such function. Any suggestions? Is it possible in a simple way? Thanks by help, Helio.
Re: Multiple inheritance
Tobias, I'm Glad by your answer. I would to complete this question with the following: If I mix a node with mymix:example, and when I search by "mymix:example", would I get the node I have mixed with? Thanks Helio
Multiple inheritance
Hi; If this question was already answered, my apologies, but I don't find such answer and need to know if Jackrabbit is ready for multiple inheritance. For instance, if I have declared the following structure of node types: nt:base | node:base | | || node:file node:folder node:added |__| | node:final So, the xml for the node:final would be like: node:folder node:added ... Will it work in Jackrabbit? I saw some declarations that use two supertypes but one of them is mixin, is the same thing putting more than one supertype of custom node type? If it is ok for Jackrabbit, so when I query for node:base I will get node:final too? Thanks for your Help. Helio.
Re: event listener not getting any events..
>hsp wrote: >> session.getWorkspace().getObservationManager().addEventListener( >> ListenerNodeAddEscribaBase.getInstance(), >> Event.NODE_ADDED, >> "/", >> true, >> null, >> new String[] {"nt:base"}, >> false >> ); >> >> Node nodeGrupo = (Node)session.getItem("/"); >> nodeGrupo.addNode(nomeNode, "nt:folder"); >> session.save(); >> session.logout(); > >Events are delivered with an asynchronous background thread. This way >the internals of jackrabbit do not have to wait for listener >implementations to complete the commit of changes. > >because your code logs out the session immediately after save() it may >happen that the notification of your listener does not happen within >that short period of time. As soon as a session is logged out all its >associated EventListeners are invalidated and are not notified >anymore. This is because the Event instances are bound to the >namespace mappings of the current session. Event.getPath() must return >the namespace prefixes according to the currently set mapping in the >Session. When the session is gone, Event.getPath() would not be able >to return any sensible value anymore. > >I doubt there is a practical use case, which requires what you are >doing in your code. > >If you really need such a functionality, which I doubt, you may write >an event listener that implements >org.apache.jackrabbit.core.observation.SynchronousEventListener > >Implementing classes are guaranteed to get events before save() returns. > >regards > marcel > Many thanks Marcel. I need to log out all operations in all nodes of certains types, to do an audit trail. So, It must log in every operations for all nodes affected by the session. I did the test for implementing SynchronousEventListener and it was ok. In this situation I can even do some operations such charge a value in properties in thes situations (behaviour I hoped to work in onParentVersion=COMPUTE...), and log the audit. By the way, about the assyncronous, for me it is not interesting, but could you tell me in what kind of situations this funcionallity would be appreciate? Hsp.
Re: event listener not getting any events..
>hsp wrote: >> But, the node I create is kind of type "esc:base" and it is > > inside the iterator, and its child (autocreated) that is kind > > of type "nt:hierarchyNode" also is inside the iterator, why? > >this has been discussed already extensively on the user list. See: >http://thread.gmane.org/gmane.comp.apache.jackrabbit.user/408 > >> Another doubt, the absPath is relative to the root of the >> workspace, or it means the root of the parent node that > > generates the event? > >it's the absolute path to a node in the workspace. > >> I configured the isDeep as "false" and it didn't fired anymore. > >with an absPath of "/" you will only get events when the root node is >modified. > >> Is the event Listener stable? Because it seens some times not >> firing the listener class. > >Can you please provide a test case that shows this behaviour? Thank you. > >regards > marcel > Hi Marcel. There is attached a class test for the comment I did ">> Is the event Listener stable? Because it seens some times not >> firing the listener class." In this test, the listener is not firing in each node creation. There is a loop that creates nt:folder nodes some times, and in the log the class was not called for all nodes creation. I hope that its could be some easy to fix, thanks. import javax.jcr.observation.EventIterator; import javax.jcr.observation.EventListener; import org.apache.jackrabbit.core.observation.EventImpl; public class ListenerNodeAddEscribaBase implements EventListener { private static ListenerNodeAddEscribaBase instance = null; private ListenerNodeAddEscribaBase() { } public static ListenerNodeAddEscribaBase getInstance(){ if(instance == null){ instance = new ListenerNodeAddEscribaBase(); } return instance; } public void onEvent(EventIterator arg0) { System.out.println("Estou no ListenerNodeAddEscribaBase"); while(arg0.hasNext()){ EventImpl e = (EventImpl)arg0.nextEvent(); try { System.out.println("Path: " + e.getPath()); System.out.println("Tipo: " + e.getType()); System.out.println("UserId: " + e.getUserID()); } catch (Exception e0) { e0.printStackTrace(); } } } } public class TestObserver { private static void criaNode(String nomeNode){ try { Repository rep = RepositorioEscriba.getRepository(); Session session = null; SimpleCredentials creds = null; creds = new SimpleCredentials("thiago", "".toCharArray()); session = rep.login(creds); session.getWorkspace().getObservationManager().addEventListener( ListenerNodeAddEscribaBase.getInstance(), Event.NODE_ADDED, "/", true, null, new String[] {"nt:base"}, false ); Node nodeGrupo = (Node)session.getItem("/"); nodeGrupo.addNode(nomeNode, "nt:folder"); session.save(); session.logout(); logger.info(nomeNode + " gravado com sucesso"); } catch (Exception e) { e.printStackTrace(); } } public static void main(String[] args){ try { logger.info("Testando Observer"); /*Primeira tentativa*/ for(int i=0 ; i<20 ; i++){ criaNode("nodeX" + i); } } catch (Exception e) { e.printStackTrace(); } } } and the log. 10:29:21,686 INFO [STDOUT] 10:29:21,686 INFO [RepositoryStartupServlet] Testando Observer 10:29:21,915 INFO [STDOUT] Estou no ListenerNodeAddEscribaBase 10:29:21,915 INFO [STDOUT] Path: /nodeX0 10:29:21,916 INFO [ST
Re: event listener not getting any events..
I have some doubts about the listeners. In my case I am registering per session (it works only per session, ok) the listener, like this: "... eSession.getWorkspace().getObservationManager().addEventListener( new ListenerNodeAddEscribaBase(eSession.getSession()), Event.NODE_ADDED, "/", true, null, new String[] {"esc:base"}, false ); logger.info("checking registered Listeners"); EventListenerIterator eli = eSession.getWorkspace().getObservationManager().getRegisteredEventListeners(); while(eli.hasNext()){ eli.nextEventListener(); logger.info("has listener"); } ..." So, when I save the session, the class ListenerNodeAddEscBase() is called. But, the node I create is kind of type "esc:base" and it is inside the iterator, and its child (autocreated) that is kind of type "nt:hierarchyNode" also is inside the iterator, why? There are some other autocreated nodes under the child of node I created that there is not inside the iterator...I want only to get the nodes of kind of type "esc:base", how to do it? Another doubt, the absPath is relative to the root of the workspace, or it means the root of the parent node that generates the event? I configured the isDeep as "false" and it didn't fired anymore. Is the event Listener stable? Because it seens some times not firing the listener class. Glad by the help I hope get, thanks. Hsp.
COMPUTE for onParentVersion
Hi; I've searched in forum the following post: http://www.nabble.com/OnParentVersion-meaning-in-JackRabbit---tf7772.html#a21946 "Hi all, I'm wondering about the meaning and the use cases of the OnParentVersion attribute on Nodes and Properties in JackRabbit, in particular concerning INITIALIZE and COMPUTE values. According to the JCR spec, it may exist a "way" to dynamically set values during versioning operations, but the spec does not say much more. And searching in the Jackrabbit source code did not help me either... Are these features implemented ? Can someone point me to the right " The doubt is the same I have. I need to charge a property automatically in its creation, like occurs with jcr:primaryType. I saw there is a class that does this implementation, but only for properties known by jackrabbit. Could I configure some properties to be charged by the same way those that are with the atribute onParentVersion=COMPUTE ??? Its very important for me, thanks. Hsp
Contains searches in sql sintax.
Hi; I want to know if the fulltext searches returns the child nodes of the nodes that are the same type I put in sql. For example, I have the following tree: / |_File1 (my:file) | |__jcr:content (nt:resource) If I run the sql : SELECT * FROM my:file WHERE CONTAINS(*,'text'); there is no result, But if I run the sql : SELECT * FROM nt:resource WHERE CONTAINS(*,'text'); there is a result, Is there a way to do a search and get the kind of results like I need? (Specifying a kind of node type, that is not nt:resource but has a child nt:resource). Thanks Helio
Searching with like over the path
Hi; I am doing a search in sql with the following: "SELECT * FROM my:base WHERE jcr:path LIKE '/Folder1/%' " + " AND NOT jcr:path LIKE '/Folder1/%/%' " And the result will be only the nodes under the Folder1 but not their subnodes, OK, it works. But if I put the following: "SELECT * FROM my:base WHERE jcr:path LIKE '/Folder1/F%' " I want the nodes under Folder1 and begining the name with F, but there is no results. Why, is this an issue or it is out of the spec of jcr? Is there another way to get the nodes in such situation? Thanks Helio.
Re: Searching....
>hsp wrote: >> What could be the warning message about LazyReader? Even after >> rebuild the indexes, I just find only one .doc file, that is the file >> I put separated (it is the same that is inside the zip file with the >> same properties inside a nt:resouce node). > >It seems that the underlying text filter has difficulties reading the >word document. the warning indicates that the binary data could not be >converted into a text representation. hence a fulltext query for that >document will not work. Really, thanks by advice, the file was unzipped incorrectly in some situation. The bug was resolved and the indexes now are creating for all the files currently in the session. Thank you very much by your help. > >iirc we are using apache poi to extract text from word documents. to >further track down the problem I suggest you try to read the word >document using the plain poi library without jackrabbit. If it doesn't >work that way either it's not a jackrabbit core issue. > >regards > marcel >
Re: Searching....
>hsp wrote: >> Normally I put the file inside a node (nt:resource) that is inside a >> nt:folder, and do the query: >> SELECT * FROM nt:folder WHERE CONTAINS(*,'TEXTSEARCHINGFOR') > >this will do a fulltext search on nt:folder nodes but not on the resources >that are under those nodes, therefore it will never return results. Ok, but I did for nt:resource too. > >> My repository xml does reference to >> textfilters. The textfilters are based on the information in the >> jcr:mimetype to build the index, no? > >yes, this is correct. > >> Is there no way to rebuild the indexes without have to restart the >> jboss? I am not seeing this funcionallity works, but I need it working, >> what are the best pratice for that (if it exists). > >no this is not possible. if you think your index becomes inconsistent >during normal operation then it is a bug. please post a jira issue with >steps how to reproduce. if you see any errors or warnings in your log >files, please also post those. Thanks I inserted a file.zip tree, and inside it has two files .doc. I can't get the files .doc searching by sql. Otherwise, if I insert just one file .doc per time the sql results the file containg the text. The operation I do with the zip file is unzip it and insert nt:folder/nt:file like they are in the zip file. If I delete the tree files of repository to rebuild the indexes, appears the following log: 11:49:46,803 INFO [STDOUT] 11:49:46,803 INFO [RepositoryImpl] Starting repository... 11:49:48,022 INFO [STDOUT] 11:49:48,022 INFO [RepositoryImpl] initializing workspace 'default'... 11:49:48,247 INFO [STDOUT] 11:49:48,247 INFO [RepositoryImpl] workspace 'default' initialized 11:49:53,502 INFO [STDOUT] 11:49:53,502 INFO [SearchIndex] Index initialized: escriba_virtual_dir/repository/index 11:50:05,469 INFO [STDOUT] 11:50:05,469 INFO [IndexMerger] merged 1000 documents in 322 ms into _a. 11:50:23,597 INFO [STDOUT] 11:50:23,597 WARN [LazyReader] exception initializing reader org.apache.jackrabbit.core.query.MsWordTextFilter$1: java.io.IOException: block[ 0 ] already removed 11:50:46,179 INFO [STDOUT] 11:50:46,178 INFO [IndexMerger] merged 1000 documents in 159 ms into _l. 11:51:03,001 INFO [STDOUT] 11:51:03,001 INFO [IndexMerger] merged 1000 documents in 112 ms into _w. 11:51:23,566 INFO [STDOUT] 11:51:23,566 WARN [LazyReader] exception initializing reader org.apache.jackrabbit.core.query.MsWordTextFilter$1: java.io.IOException: block[ 0 ] already removed 11:51:23,905 INFO [STDOUT] 11:51:23,904 INFO [IndexMerger] merged 1000 documents in 92 ms into _17. 11:51:39,166 INFO [STDOUT] 11:51:39,166 INFO [IndexMerger] merged 1000 documents in 124 ms into _1i. 11:51:48,953 INFO [STDOUT] 11:51:48,953 INFO [IndexMerger] merged 1000 documents in 126 ms into _1t. 11:51:59,477 INFO [STDOUT] 11:51:59,477 INFO [IndexMerger] merged 1000 documents in 88 ms into _24. 11:52:10,130 INFO [STDOUT] 11:52:10,130 INFO [IndexMerger] merged 1000 documents in 85 ms into _2f. 11:52:30,731 INFO [STDOUT] 11:52:30,731 INFO [SearchIndex] Index initialized: escriba_virtual_dir/workspaces/default/index 11:52:30,731 INFO [STDOUT] 11:52:30,731 INFO [RepositoryImpl] Repository started What could be the warning message about LazyReader? Even after rebuild the indexes, I just find only one .doc file, that is the file I put separated (it is the same that is inside the zip file with the same properties inside a nt:resouce node). > >regards > marcel >
Re: Searching....
I am doing a classification of the mimetype by comparing the end of the file name, like this: public static String getMimeType(String nomeArquivo) { String ret = null; if(nomeArquivo.endsWith(".avi")) { ret = "video/x-msvideo"; } else if (nomeArquivo.endsWith(".doc")) { ret = "application/msword"; } else if (nomeArquivo.endsWith(".htm")) { ret = "text/html"; } else if (nomeArquivo.endsWith(".html")) { ret = "text/html"; } else if (nomeArquivo.endsWith(".mht")) { ret = "text/html"; } else if (nomeArquivo.endsWith(".cfm")) { ret = "text/html"; } else if (nomeArquivo.endsWith(".jsp")) { ret = "text/html"; } else if (nomeArquivo.endsWith(".jspx")) { ret = "text/html"; } else if (nomeArquivo.endsWith(".pdf")) { ret = "application/pdf"; } else if (nomeArquivo.endsWith(".ppt")) { ret = "application/mspowerpoint"; } else if (nomeArquivo.endsWith(".rtf")) { ret = "application/rtf"; } else if (nomeArquivo.endsWith(".sxc")) { ret = "application/vnd.sun.xml.calc"; } else if (nomeArquivo.endsWith(".sxi")) { ret = "application/vnd.sun.xml.impress"; } else if (nomeArquivo.endsWith(".sxw")) { ret = "application/vnd.sun.xml.writer"; } else if (nomeArquivo.endsWith(".txt")) { ret = "text/plain"; } else if (nomeArquivo.endsWith(".xls")) { ret = "application/msexcel"; } else if (nomeArquivo.endsWith(".xml")) { ret = "text/xml"; } else if (nomeArquivo.endsWith(".xsl")) { ret = "text/xml"; } else if (nomeArquivo.endsWith(".java")) { ret = "text/plain"; } else if (nomeArquivo.endsWith(".bat")) { ret = "text/plain"; } else if (nomeArquivo.endsWith(".ods")) { ret = "application/vnd.oasis.opendocument.spreadsheet"; } else if (nomeArquivo.endsWith(".odt")) { ret = "application/vnd.oasis.opendocument.text"; } else if (nomeArquivo.endsWith(".odf")) { ret = "application/vnd.oasis.opendocument.formula"; } else if (nomeArquivo.endsWith(".odg")) { ret = "application/vnd.oasis.opendocument.graphics"; } else if (nomeArquivo.endsWith(".odd")) { ret = "application/vnd.oasis.opendocument.database"; } else if (nomeArquivo.endsWith(".odp")) { ret = "application/vnd.oasis.opendocument.presentation"; } return ret; } So, the jcr:mimeType gets the "correct" value when I am saving the nt:resource node. But I am searching any document I put there and there is no result, or if there is it is unstable for all the extensions the textfilters assume that it does. Normally I put the file inside a node (nt:resource) that is inside a nt:folder, and do the query: SELECT * FROM nt:folder WHERE CONTAINS(*,'TEXTSEARCHINGFOR') My repository xml does reference to textfilters. The textfilters are based on the information in the jcr:mimetype to build the index, no? Is there no way to rebuild the indexes without have to restart the jboss? I am not seeing this funcionallity works, but I need it working, what are the best pratice for that (if it exists). Thanks Helio >hsp wrote: >> I don't mind what could be happen, but my application doesn't search any >> values (properties or binary contents). If I do the simple query in >> XPath: //*[jcr:contains(.,'lidando')] > >can you provide a small test case that reproduces this behaviour? Thanks. > >> or the other: >> >> //*[jcr:like(@jcr:primaryType,'%nt:folder%')] > >JSR 170 specifies that jcr:like() does not work with properties of type >NAME. you should rather use the equals operator or the element node test: > >//[EMAIL PROTECTED]:primaryType == 'nt:folder'] > (returns nodes that are of type nt:folder) > >//element(*, nt:folder) > (returns nodes that are of type nt:folder or of types that are derived >from nt:folder) > >regards > marcel >
Searching....
I don't mind what could be happen, but my application doesn't search any values (properties or binary contents). If I do the simple query in XPath: //*[jcr:contains(.,'lidando')] or the other: //*[jcr:like(@jcr:primaryType,'%nt:folder%')] there is no result in both, but there is node with the values I am searching for. what could it be?? All the jars are in the lib. Thanks
Refreshing the indexes.
Hi How the indexes can be rebuid (refresh)? If I remove the indexes files manually, can I recreate them without have to stop/start jackrabbit? Thanks Helio
About Item events.
Hi all; We are building a security module for jackrabbit implementing an AccessManager interface. I realized that when I ask to jackrabbit like "node.remove()" there are several calls to the AccesManager by the permission 1 (read) on nodes tree above the node I want to remove. The interesting thing I found is that only when I call session.save(), jackrabbit calls to the AccessManager by the permission 4 (remove) on nodes I already remove with "node.remove()". (so my implementation wont find the nodes and will cause exceptions). Is this the normal behavior of jackrabbit? Why it doesn't ask by permission 4 in the moment I call "node.remove()", it only do that when I call "session.save()".? Is there a need for jackrabbit calls the permission on session.save again (or only in this event in the case I described)? Is it configurable or something? I am doing these questions because I depend on the nodes existing to get the user permissions, so if jackrabbit only ask for the permission level after the operation did , I wont have any nodes more because they are already removed, understand? Hope your help, thanks Helio
CND x XML compatibility for custom node definition.
In the following xml definition: nt:hierarchyNode xxx:user xxx:security I defined that the prop:creator is a property that may only refers to a node of type xxx:user (restriction), and a node with the name "Permission" of type xxx:security will autocreate with the creation of the node of type xxx:base. Registering this file, the repository works as expected. I have defined the same structure in a file with the cnd format, so the file is like this: http://www.e/1.0'> http://www.p/1.0'> [xxx:base] > nt:hierarchyNode - prop:creatir (reference) version < 'xxx:user' + Permission (xxx:security) = xxx:security autocreated version [xxx:user] > nt:hierarchyNode [xxx:security] > nt:hierarchyNode Why when trying to register the nodetype, it gets me two errors ?: 1 - About to the restriction for the value in the prop:creator only may refers to xxx:user: javax.jcr.RepositoryException: [{http://www.e/1.0}base#{http://www.e/1.0}creator] invalid REFERENCE value constraint '{http://www.e/1.0}user' (unknown node type) 2 - About the name the node will autocreate, if I keep like "Permission" it says me that the name is invalid for jcr, it must be "xxx:Permission". How to do the register in cnd format recognize all I declared like I did in xml format? I thought the cnd format has all the parameters that xml format has. Helio
Multi-values Properties.
I want to understand the way to handle the values for multi values properties. (specially referenced...). Please, could someone send a tip, example code, for operations over such properties (putting and updating values in a multi valued property). I want to know if I always have to get all the values the property already has before add some more value into the array, to put them together the new value, and other related things. This will help me a lot, and hope many other developers too, thanks. Helio.
ItemId for Nodes nonreferenceable
I am intercepting the flowof code, and printing the ItemId in each time have the call in inGranted method. I don't mind what happens when is printing the id for a node that isn't referenceable. The program prints that id, but I don't get the node by the UUID printed... How does Jackrabbit find that ItemId for nodes that aren't referenceable? Tks Helio
Re: About child Nodes
Tobias; I hope not anoying you with these questions. I did the setProperty, but only got success in simple valued reference properties. If a propertie is multivalued it doesn't work. Thats the code I did for mysetProperty: Session session=referNode.getSession(); Node referenced = session.getNodeByUUID(id); Value referencedValue=session.getValueFactory().createValue(referenced); referNode.setProperty(xxx:categ, referencedValue); session.save(); Could you give an example of how it would be in case of 'xxx:categ' is multivalued? Thanks again Helio >> >> I've notice this is happen with the propertie of >> >> "requiredType=Reference". I can't assign a value to this propertie this >> >> way: Node.setPropertie(prop:Reference,"uuid")...The others are ok to set. >> > >> >because Reference properties can only be set using this siganture: >> >Node.setProperty(String, Node) >> Tobias, this is for set single valued reference, how to set this propertie >> when it is reference and multivalued? > >this signature does not exist. you need to generate a Value[] array, >using the session.getValueFactory().createValue(Node) signature, and >then pass this array to the setProperty(String, Value[]) method. > >regards, toby >-- > >Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel >T +41 61 226 98 98, F +41 61 226 98 97 >-- >
Re: About child Nodes
:-) I did realize the meaning of mixin types, many thanks Tobias. >> I've notice this is happen with the propertie of "requiredType=Reference". I >> can't assign a value to this propertie this way: >> Node.setPropertie(prop:Reference,"uuid")...The others are ok to set. > >because Reference properties can only be set using this siganture: >Node.setProperty(String, Node) Tobias, this is for set single valued reference, how to set this propertie when it is reference and multivalued? Thanks, Helio
Re: About child Nodes
>Hi Helio, > >On 4/20/06, hsp wrote: >> >> >your 'esc:categ' is defined as mixin nodetype. do you mix-it in to >> >something? or do you use it as a primary nodetype? >> The nodes with this type will be under nt:folder nodes or some other kind >> that is its child. >> Under a node 'esc:categ' must be only another(s) node 'esc:categ'. >> I defined it as mixin because I thought this way when the esc:categ is >> created, it also will >> have the property defined for nt:folder types like 'jcr:primaryType' and >> 'jcr:created', >> because 'nt:folder' is its supertype. > >All esc:categ nodes will have those properties anyway, simply because >nt:folder is declared as a supertype of esc:categ. Judging from your >description I think you should not define esc:categ as a mixin. I >think what you want is a primary type: then you can assign it on node >creation with addNode("mynode","esc:categ"). Ok, really it is what I want to do now, thanks. By the way, I almost know all about mixin types, I think this kind is for extend some primary type, but it is not what the declaration supertype does?? What is the difference between two same node types where in one "isMixin=true" and in another "isMixin=false" ? > >Also notice that if you want esc:categ nodes to only allow esc:categ >children, then you should not make nt:folder a supertype of esc:categ. >As it is, esc:categ inherits the child node defs of nt:folder, which >allows any child nodes of type nt:hierarchy...so this means that >esc:categ nodes can have child nodes of type esc:categ AND child nodes >of type nt:hierarchy. Ok, now its more clear for me, thanks. > >> >> >furthermore, the nt:folder supertype already defined a childnode >> >definition for 'nt:hierarchyNode'. so you at least can add those. >> > >> >how do you create your property? >> > >> I thought that declaring properties inside the nodetype declaration would >> register them >> like that nodetype properties. Is not this way? > >Yes this is correct. You declare the property in the node type, and >then you make a node of that type and then you do a setProperty on >that node with a property name and value type that matches the one you >defined in the node type. I've notice this is happen with the propertie of "requiredType=Reference". I can't assign a value to this propertie this way: Node.setPropertie(prop:Reference,"uuid")...The others are ok to set. Why? Tks Peter Helio
Re: About child Nodes
>your 'esc:categ' is defined as mixin nodetype. do you mix-it in to >something? or do you use it as a primary nodetype? The nodes with this type will be under nt:folder nodes or some other kind that is its child. Under a node 'esc:categ' must be only another(s) node 'esc:categ'. I defined it as mixin because I thought this way when the esc:categ is created, it also will have the property defined for nt:folder types like 'jcr:primaryType' and 'jcr:created', because 'nt:folder' is its supertype. But no more node types in my model have 'esc:categ' as supertype. >furthermore, the nt:folder supertype already defined a childnode >definition for 'nt:hierarchyNode'. so you at least can add those. > >how do you create your property? > I thought that declaring properties inside the nodetype declaration would register them like that nodetype properties. Is not this way? Glad by your help Tobias. Helio.
About child Nodes
In the custom_nodetype.xml, I defined a node type like this: nt:folder mix:referenceable esc:categ So, in my mind, the node of type esc:categ will only permit child nodes of type esc:categ, but I can create whatever kind of type node under a node of type esc:categ. How to restrict this rule? Another doubt, when I try to define the property prop:descCateg, in the creation of a node of type esc:categ, I got an error: javax.jcr.nodetype.ConstraintViolationException: no matching property definition found for {http://www.esc.org/prop/1.0}descCateg What could it be? Hope get some help, thanks Helio.
Listing of node types registered
Hi; I am trying to register some custom node types in Jackrabbit, but when I try to create some node of some kind of node type I have registered (I think of) occurs an error saying that the node type doesn't exists, but the namespace have been registered because it is showing resolved. I am trying to register the custom node types by an custom_nodetypes.xml file. If you prefer I can send this file. It seems ok, without sintax error. The piece of code that register it is like: try { FileInputStream is=new FileInputStream(NODETYPES_RESOURCE); if (is != null) { try { NodeTypeReader ntReader = new NodeTypeReader(is); registerNamespaces(ntReader.getNamespaces(), session); NodeTypeManagerImpl ntMgr = session.getNodeTypeManager(); NodeTypeDef[] nodeTypes = ntReader.getNodeTypeDefs(); List unregisteredNTs = new ArrayList(); for (int i = 0; i < nodeTypes.length; i++) { try { ntMgr.getNodeType(nodeTypes[i].getName()); } catch (NoSuchNodeTypeException e) { // register the node type unregisteredNTs.add(nodeTypes[i]); } } ntMgr.getNodeTypeRegistry().registerNodeTypes(unregisteredNTs); } catch (BaseException e) { throw new RepositoryException(e.getMessage()); } catch (IOException e) { throw new RepositoryException(e.getMessage()); } finally { try { is.close(); } catch (IOException e1) { // ignore } } } } catch (Exception e) { // TODO: handle exception } }
nt:unstructured under another node type.
Hello all; I saw that can't insert an nt:unstructured node under an nt:folder node. I want to know if if I declare a new custom node type of nt:folder (mynew:ntfolder), is there a way to do that this kind of node will allow to insert a nt:unstructured under it? + | Node| (mynew:ntfolder) |A | + | |___ | +++ | Node B | (nt:unstructured) +++ | (whatever propertie I need at run time) | (whatever propertie I need at run time) How would be the customnodetype.xml for this case? Regards Helio
jcr-rmi / jcr-server
Which would be more appropriate to use? Is it enough to use only jcr-rmi to do a client to call the methods available in the application looked by JNDI? Must I use jcr-server together? Using the jcr-rmi I have to implement the stubs, .? I am new in such configuration. Thankx Helio.
Re: Location for binary contents
That's exactly what I tryied to meaning for. All the process of document retrieval, not only the indexer, because are separated things, thanks by clarification. But I remains with my doubt if is it possible to store the blob files in another machine that is not where is running the application server, like I can do with the db. Cheers Helio >Miro Walker wrote: >> I can't see why a blob on the FS would be faster to search - searching >> should happen against the lucene index, no? Retrieval and streaming of >> large blobs are likely to be faster from the FS, but I don't think >> search itself would be. > >that's correct. query performance primarily depends on the lucene index >and not how blobs are stored. > >regards > marcel >
Re: Indexes for contents outside the repository.
Extending this thread, while have anyone to opine it. I know that only the content (properties and binary under nt:resource) are automatically indexed by jackrabbit for searches, and of course these contents must have be in the repository for the method get works... I would to know if its possible to extend the jackrabbit (core maybe?), to do an index for contents that in fact are represented by a link to. Maybe the implementation get the real content of the file (represented by link) locally for reasons to run the indexer and not store this content into the repository. In case of a query search, in the results will be the value under jcr:data with the link to the file. Like google, you know... Tks Helio >Let me share my dilema with you. >We have an CVS repository, where we put the project files and documentation in. >I have to make a repository that will have the contents the applications will >need, but for reason to do not duplicate the files already in CVS and that >have got to be available in the repository (visible by the application like >the files were in the repository, but they are in CVS). >If the problem was only this, ok, only just creating a propertie with the link >to file in CVS will at first solve it. But these files that is visible by >application repository and in fact are in CVS, must be fulltext searcheable >Any thoughts for this case? Can I do a index for these files, as like they >were in repository, and by a query in jackrabbit I would find the files that >has the content I am looking for? > >If the case was not clear for you I can rebuild it. I am not soo good for >explain, you know... > >Thanks >Helio. >
Re: Location for binary contents
So, the place for the blob files must be, or only can be, in the same tree of jboss files where is the Repository Server. About the db, ok, it can be on another independent machine. The only issue I think in store blob outside the db is referente to backup methods. The blob in filesystem is faster to search and manipulate than if it is stored in a db. >Hi again Helio. > >I think is possible to separate: > >- Web container in a machine >- Repository and Data Storage in another machine >- MetaData about the Nodes and properties in a DataBase in another machine > >With JCRServer, you can configure a remote repository, with a workspace >with SimpleDBPersister for metadata. You can store this metadata in a >DataBase in the same or in another machine setting the parameters. For >example: > > > > >In the workspace.xml configuration file, you can set "externalBLOBs" >parameter true. Then you could have: > >*Web >Container with JCRServerDataBase >applications*(Where you >*Server* >(Configured to -->save binary files --> >(MetaData) >connect within a file System) >JCRServer) > >Regards > >>Here I go again, another question to clarify my mind about jackrabbit >>configuration. >>In a workspace I can configure the content to be stored parcial in a db >>(metadata) and the binary files in a filesystem. In this case the directory >>with the indexes and also with the blob files will be locate in some like >>this: /usr/lib/jboss4/bin/myrepository... >>I would to know if the structure, starting in "myrepository" would be in >>another location, such as a storage system in another machine, thats is not >>the same the machine running the container web where the repository >>application server is. >> >>This will help me a lot, thanks. >>Helio. >> >> >> >> > >
Location for binary contents
Here I go again, another question to clarify my mind about jackrabbit configuration. In a workspace I can configure the content to be stored parcial in a db (metadata) and the binary files in a filesystem. In this case the directory with the indexes and also with the blob files will be locate in some like this: /usr/lib/jboss4/bin/myrepository... I would to know if the structure, starting in "myrepository" would be in another location, such as a storage system in another machine, thats is not the same the machine running the container web where the repository application server is. This will help me a lot, thanks. Helio.
About jcr-rmi in deployment model3.
Have anyone experienced to build an application using the jcr-rmi for jackrabbit deployment model 3? Is there any issue, limitation, or something to avoid using such model? To do this kind of model possible to run, both side application must be implemented (client and server)? Or, all the implementation must be in the client side and in the server side will be only the configuration to make up the repository visible, provided by jackrabbit? Or would be the server side implemented with all needs and the client side only requests the services? Well, to sumarize, I would to know how must the application be made (refering to client and server sides in deployment model 3). Now I am querying you a lot, but consider that I want to contribute back after get better knows about. Thanks Helio
Indexes for contents outside the repository.
Let me share my dilema with you. We have an CVS repository, where we put the project files and documentation in. I have to make a repository that will have the contents the applications will need, but for reason to do not duplicate the files already in CVS and that have got to be available in the repository (visible by the application like the files were in the repository, but they are in CVS). If the problem was only this, ok, only just creating a propertie with the link to file in CVS will at first solve it. But these files that is visible by application repository and in fact are in CVS, must be fulltext searcheable Any thoughts for this case? Can I do a index for these files, as like they were in repository, and by a query in jackrabbit I would find the files that has the content I am looking for? If the case was not clear for you I can rebuild it. I am not soo good for explain, you know... Thanks Helio.
Re: Mixin values.
It is not the answer I expected, but ok. Have someone another hint about how to implement the security? Thanks Helio >hsp wrote: >> Sorry if my question is so obvious, is a shame that it is not for me. >> The acl you said is like 'access control list' ? How could I >> implement it? Is there a ready support in jackrabbit for this? > >no, jackrabbit just defines the interface that you must implement: >org.apache.jackrabbit.core.security.AccessManager >where authorization information is retrieved from or stored is up to the >implementation. > >regards > marcel >
Re: Mixin values.
Sorry if my question is so obvious, is a shame that it is not for me. The acl you said is like 'access control list' ? How could I implement it? Is there a ready support in jackrabbit for this? How many information must have in this key. I would mind this better, please help me about it. I'm a begginer. Thanks Helio >On Tue, 2006-04-04 at 10:07 -0300, hsp wrote: > >> Anyway, following your example, when I want to give access to a node >> with id=XXX to an user USER, I must create a new propertie, called XXX >> into the node the USER belongs to, for ex: > >> >On Tue, 2006-04-04 at 10:26 +0200, Marcel Reutegger wrote: >> >> >> >> Using the node id as a property name allows you to use the regular >> >> api >> >> to get the access control you are looking for. > >Marcel is talking about storing the acl in a map keyed on the nodeid. >That map would then be externally to the repository itself and you don't >have to do any repository query / lookup to retrieve the acl. > >It's still possible to store acl's in the repository and just update an >external map using a listerener on the repository. This listener would >then read the data in the way you suggest and update the map. > >-- >Torgeir Veimo > >
Re: Multiple workspaces
Sorry if my question wasn't clear...so, I would to enable a repository server (running in a especific machine with configuration for all workspaces needed, one per webapp using the repository) with a application running like a engine for all different webapp running in another webcontainner of another machines. But, if there is the possibility to make a repository with only one workspace for different applications use, I think it is so less complex, then I'll re-think about it. It's so confusing for me understang such configuration, sorry. Thanks by your help Helio >Hi hsp! > >>I want to know if is there possible that , in model 3 of deployment, I can >>have only one repository that has one workspace per each webapp that is in >>another web container. >> >> >I can't understand very well your first question. You can have a >repository which several workspaces, each one in a different machine. It >depends of the persister you use. For instance you can have a repository >with 2 workspaces. You can use a "SimpleDBPersister" in a remote >database server for a workspace, and a "fileSistemPersister" in your >machine for another workspace. > >>Another doubt is if it is possible to make a search that searches in all >>workspaces the repository has. >>Many Tks. >>Helio >> >When you search nodes and properties in a repository, first, you have to >connect to this. To connect is necesary to call Repository.login, and >then you get the session object. > >The session object is tied to a workspace in the repository. Then you >only can search nodes in a workspace per session. > >Regards >
Re: Mixin values.
That is a question I want to do too. Anyway, following your example, when I want to give access to a node with id=XXX to an user USER, I must create a new propertie, called XXX into the node the USER belongs to, for ex: USER (nodetype my:user (nt:folder)) prop1:value1 (property defined in the custom node type definition) XXX: read(property created to assign rights to USER access the node with this id (XXX)) Is it ok? Would the propertie named XXX be into another subfolder into the USER folder, named as the right access (READ, WRITE,...)? Please, you are very welcome with these helps for me, thanks. Helio. >On Tue, 2006-04-04 at 10:26 +0200, Marcel Reutegger wrote: >> >> Using the node id as a property name allows you to use the regular >> api >> to get the access control you are looking for. > >How would yuou store these in the repository to make the repository >'self contained'? > >-- >Torgeir Veimo > >
Multiple workspaces
I want to know if is there possible that , in model 3 of deployment, I can have only one repository that has one workspace per each webapp that is in another web container. Another doubt is if it is possible to make a search that searches in all workspaces the repository has. Many Tks. Helio
Re: Mixin values.
Thanks Marcel by your interest to help me. So, let me see if I got what you said. I have to store in the user nodes a propertie per each node the user has rights to access, for ex: Node user=getnode(userid); user.setProperty(nodeid,"read/write"); Would be nearly this way? So the query will test if the usernode has the property with the nodeid name and the value with the right allowed. Please, I need more comments about it. Helio. >hsp wrote: >> Let's supose I need to store in a useraccess propertie of myapp:user >> node type two values: itemId and kindRight (concatenated..., maybe). >> Will I get success using the propertie associating it with mixin >> (multiple values)? So the user Node Helio, has the propertie >> useraccess with the values: '1234,read', '1235,write', ... I must >> store the multi values into the useracess propertie like a row in a >> table, and when test access rights in a node, first I have got to >> find if the id of that node is stored in any value of the propertie >> (useraccess) and in the string that contains the nodeid has the >> proper right too (read, write,...), ok?? I can do this with a query >> by xpath, searching in the node with the id for that user, if >> contains a string in that propertie...Am I right? > > >> So, this way I can do my security verifications, before any >> operations, ok? > >using a query in this case is technically possible, but I doubt that >executing a query on each item access will perform reasonably. > >I rather recommend to re-arrange your access control structure in a way >that allows you to address them directly. e.g. use the item id as a >property name that contains the access right value? > >regards > marcel >
Mixin values.
Let's supose I need to store in a useraccess propertie of myapp:user node type two values: itemId and kindRight (concatenated..., maybe). Will I get success using the propertie associating it with mixin (multiple values)? So the user Node Helio, has the propertie useraccess with the values: '1234,read', '1235,write', ... I must store the multi values into the useracess propertie like a row in a table, and when test access rights in a node, first I have got to find if the id of that node is stored in any value of the propertie (useraccess) and in the string that contains the nodeid has the proper right too (read, write,...), ok?? I can do this with a query by xpath, searching in the node with the id for that user, if contains a string in that propertie...Am I right? So, this way I can do my security verifications, before any operations, ok? Please, do some comments about this. Could someone tell how could be the query too? I need to provide an API for repository contents to any webapplication, and I must have a security police available and implemented, at least. Thanks Helio.
Re: Re: Re: Fulltext search in jackrabbit
I've noticed that the oa.textfilter.jar hasn't the jar libs it depends for. They are: tm-extractors-0.4.jar POI-2.5.1.jar nekohtml-0.9.5.jar slf4j-log4j12-1.0.jar If you put these jar in your classpath (lib) of your application, the errors must desappear. []'s Helio >Ok Martin, I already did the jar, but as I said in the begin of this thread, >the configuration for textsearch in the repository.xml causes an error if I >put the parameter with the classes that belongs to this jar. Then, I would to >know if my jar is corrupted or some like that. >Thanks >Helio > >>Helio, you can build the textfilter.jar just going into the textfilters >>contrib project and running "maven jar" > >>Regards, > >>Martin > >On 3/19/06, hsp wrote: >> >> Could someone that have the textfilter.jar working, send it to me? >> If you prefer I can send my file eigther. >> >> Txs >> Helio >> >> >So, is there a lack of some jar in my lib? If so could you tell me, >> thanks. May be the solution. >> >Thanks >> >Helio >> > >> >>I'm using this and it works perfectly: >> > >> > >> > >> > >> > >> > >> > >> > >> >>Note that you also need some dependencies for the textfilters to run: >> poi, >> >>pdfbox, etc. >> > >> >>Martin >
Re: Trouble with textfilters
I've noticed that the oa.textfilter.jar hasn't the jar libs it depends for. They are: tm-extractors-0.4.jar POI-2.5.1.jar nekohtml-0.9.5.jar slf4j-log4j12-1.0.jar If you put these jar in your classpath (lib) of your application, the errors must desappear. []'s Helio -MENSAGEM ORIGINAL- De: Mats Norén <[EMAIL PROTECTED]> Enviada em: Seg, 20 Mar 2006 14:41:49 Assunto: Res: Trouble with textfilters >Hi, >I'm trying to use the jackrabbit-textfilters. Every time I start my repo > I get the following exception: > >Caused by: javax.jcr.RepositoryException > at >org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:536) > at org.apache.jackrabbit.core.SearchManager.(SearchManager.java:278) > at >org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1430) > at >org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:538) > at >org.apache.jackrabbit.core.RepositoryImpl.(RepositoryImpl.java:245) > at >org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:482) > at >org.jbpm.jcr.impl.JackrabbitJcrService.start(JackrabbitJcrService.java:119) > ... 63 more >Caused by: java.lang.IllegalArgumentException > at org.apache.commons.collections.BeanMap.put(BeanMap.java:374) > at >org.apache.jackrabbit.core.config.BeanConfig.newInstance(BeanConfig.java:97) > at >org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:530) > ... 69 more > >I'm thinking that the IllegalArgumentException in BeanMap.put is caused >by some error in my config but I don't know what :( > >My repository.xml looks like this: > > > > > > > > > > > > > > > > > > > > > > > > >Btw, I'm using Jackrabbit from trunk (today). > >Would appreciate any insight into what I'm doing wrong... > >Regards, >Mats > >
Re: Re: It was working, not now.
Thanks Jukka; I did erase all the repository data (bd and fsystem), so it works again. I wonder what a big problem it will be in another situation like that, with the system in production... I can't do the erase in this situation. By the way, must a backup procedure be done with the database and file system together? If I have only the indexes in the file system and all the repository data in the database, would these indexes be created if I start the repository only with the database, or only the new data included will be indexed (the old data will be without index)? Thanks Helio >Hi, > >On 3/29/06, hsp wrote: >> java.lang.IllegalArgumentException >> at org.apache.commons.collections.BeanMap.put(BeanMap.java:374) > >This seems like a problem in your repository or workspace >configuration file (repository.xml or workspace.xml). Check the >tags inside the element. > >BR, > >Jukka Zitting > >-- >Yukatan - http://yukatan.fi/ - [EMAIL PROTECTED] >Software craftsmanship, JCR consulting, and Java development >
It was working, not now.
I don't mind what is happening. When I try to run a simple application, an error occurs. I debuged and the last code is: try { initWorkspace((WorkspaceInfo) wspInfos.get(wspName)); } catch (RepositoryException e) { // if default workspace failed to initialize, shutdown again log.fatal("Failed to initialize workspace '" + wspName + "'", e); log.fatal("Unable to start repository, forcing shutdown..."); shutdown(); throw e; } I am calling like this: Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.jackrabbit.core.jndi" + ".provider.DummyInitialContextFactory"); env.put(Context.PROVIDER_URL, "localhost"); InitialContext ctx = new InitialContext(env); RegistryHelper.registerRepository(ctx, "repo", configFile, repHomeDir, true); //this is the last line that runs before the error Repository r = (Repository) ctx.lookup("repo"); And the error is: 359634 [main] DEBUG org.apache.jackrabbit.core.query.lucene.Recovery - RedoLog is empty, no recovery needed. 359635 [main] INFO org.apache.jackrabbit.core.query.lucene.SearchIndex - Index initialized: escriba_celepar_teste_2/repository/index INFO: Exception: java.lang.reflect.InvocationTargetException 403663 [main] FATAL org.apache.jackrabbit.core.RepositoryImpl - Failed to initialize workspace 'default' javax.jcr.RepositoryException at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:531) at org.apache.jackrabbit.core.SearchManager.(SearchManager.java:273) at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1438) at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:536) at org.apache.jackrabbit.core.RepositoryImpl.(RepositoryImpl.java:244) at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:480) at org.apache.jackrabbit.core.jndi.BindableRepository.init(BindableRepository.java:130) at org.apache.jackrabbit.core.jndi.BindableRepository.create(BindableRepository.java:116) at org.apache.jackrabbit.core.jndi.RegistryHelper.registerRepository(RegistryHelper.java:57) at br.gov.pr.celepar.escriba.contexto.Repositorio.getRepository(Repositorio.java:157) at FSImport.main(FSImport.java:101) Caused by: java.lang.IllegalArgumentException at org.apache.commons.collections.BeanMap.put(BeanMap.java:374) at org.apache.jackrabbit.core.config.BeanConfig.newInstance(BeanConfig.java:97) at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:525) ... 10 more java.lang.IllegalArgumentException at org.apache.commons.collections.BeanMap.put(BeanMap.java:374) at org.apache.jackrabbit.core.config.BeanConfig.newInstance(BeanConfig.java:97) at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:525) at org.apache.jackrabbit.core.SearchManager.(SearchManager.java:273) at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1438) at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:536) at org.apache.jackrabbit.core.RepositoryImpl.(RepositoryImpl.java:244) at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:480) at org.apache.jackrabbit.core.jndi.BindableRepository.init(BindableRepository.java:130) at org.apache.jackrabbit.core.jndi.BindableRepository.create(BindableRepository.java:116) at org.apache.jackrabbit.core.jndi.RegistryHelper.registerRepository(RegistryHelper.java:57) at br.gov.pr.celepar.escriba.contexto.Repositorio.getRepository(Repositorio.java:157) at FSImport.main(FSImport.java:101) 404432 [main] FATAL org.apache.jackrabbit.core.RepositoryImpl - Unable to start repository, forcing shutdown... 405217 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - Shutting down repository... 405217 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - shutting down workspace 'default'... 405219 [main] INFO org.apache.jackrabbit.core.observation.ObservationManagerFactory - Notification of EventListeners stopped. 405220 [main] DEBUG org.apache.jackrabbit.core.ItemManager - invalidated item cafebabe-cafe-babe-cafe-babecafebabe 405220 [main] DEBUG org.apache.jackrabbit.core.ItemManager - removing item cafebabe-cafe-babe-cafe-babecafebabe from cache 405221 [main] DEBUG org.apache.jack
Search results for properties/internaltexts in nodes in that the user has at least reader rights.
Any thougths about this? I mean, the nt:folder/nt:files containing the propertie (or inside text for binary values) with that string the user is looking for, must have this user allowed to at least read its folder/content. Another doubt refers to where store the user rigths... in a nodetype xx:user containg a multivalued propertie with all the node paths the user can access, or defining a multivalued propertie xx:users bellow the nt:folder node type containing all user that can acces the structure of that node?? Any kind of collaboration will be very appreciate for the security design I have to do. Thanks Helio