You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(22) |
Nov
(85) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(47) |
Feb
(127) |
Mar
(268) |
Apr
(78) |
May
(47) |
Jun
(38) |
Jul
(131) |
Aug
(221) |
Sep
(187) |
Oct
(54) |
Nov
(111) |
Dec
(84) |
2011 |
Jan
(152) |
Feb
(106) |
Mar
(94) |
Apr
(90) |
May
(53) |
Jun
(20) |
Jul
(24) |
Aug
(37) |
Sep
(32) |
Oct
(70) |
Nov
(22) |
Dec
(15) |
2012 |
Jan
(33) |
Feb
(110) |
Mar
(24) |
Apr
(1) |
May
(11) |
Jun
(8) |
Jul
(12) |
Aug
(37) |
Sep
(39) |
Oct
(81) |
Nov
(38) |
Dec
(50) |
2013 |
Jan
(23) |
Feb
(53) |
Mar
(23) |
Apr
(5) |
May
(19) |
Jun
(16) |
Jul
(16) |
Aug
(9) |
Sep
(21) |
Oct
(1) |
Nov
(2) |
Dec
(8) |
2014 |
Jan
(16) |
Feb
(6) |
Mar
(27) |
Apr
(1) |
May
(10) |
Jun
(1) |
Jul
(4) |
Aug
(10) |
Sep
(19) |
Oct
(22) |
Nov
(4) |
Dec
(6) |
2015 |
Jan
(3) |
Feb
(6) |
Mar
(9) |
Apr
|
May
(11) |
Jun
(23) |
Jul
(14) |
Aug
(10) |
Sep
(10) |
Oct
(9) |
Nov
(18) |
Dec
(4) |
2016 |
Jan
(5) |
Feb
(5) |
Mar
|
Apr
(2) |
May
(15) |
Jun
(2) |
Jul
(8) |
Aug
(2) |
Sep
(6) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
(2) |
Feb
(12) |
Mar
(22) |
Apr
(6) |
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(5) |
Oct
(2) |
Nov
|
Dec
|
2018 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(3) |
Aug
|
Sep
(7) |
Oct
(19) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Dmitriy S. <sha...@gm...> - 2011-02-24 03:17:41
|
On Thu, Feb 24, 2011 at 1:53 AM, Loren Cahlander <lor...@gm...>wrote: > Here is the solution that I was able to create thanks to the pointers. I > do need to change this to create the document as a specific user instead of > the system user. > > broker = brokerPool.get(systemSubject); > Change this to "broker = brokerPool.get(*null*);" and you will get current authenticated user. -- Dmitriy Shabanov |
From: Loren C. <lor...@gm...> - 2011-02-23 20:53:30
|
Here is the solution that I was able to create thanks to the pointers. I do need to change this to create the document as a specific user instead of the system user. import org.apache.log4j.Logger; import org.exist.collections.Collection; import org.exist.collections.IndexInfo; import org.exist.memtree.DocumentImpl; import org.exist.memtree.MemTreeBuilder; import org.exist.security.*; import org.exist.security.SecurityManager; import org.exist.security.xacml.AccessContext; import org.exist.storage.BrokerPool; import org.exist.storage.DBBroker; import org.exist.storage.lock.Lock; import org.exist.storage.txn.TransactionManager; import org.exist.storage.txn.Txn; import org.exist.xmldb.XmldbURI; String identity = (String) stringMap.get(IDENTITY_RECORD_PARAMETER); LOG.info("Identity: " + identity); String documentCollection = identity.substring(0, identity.lastIndexOf(".xml")); LOG.info("Collection: " + documentCollection); DBBroker broker = null; TransactionManager transact = brokerPool.getTransactionManager(); Txn txn = transact.beginTransaction(); try { IndexInfo info = null; SecurityManager securityManager = brokerPool.getSecurityManager(); Subject systemSubject = securityManager.getSystemSubject(); LOG.info("SystemSubject: " + systemSubject.getName() + " : " + systemSubject.toString()); broker = brokerPool.get(systemSubject); if (broker == null) { LOG.error("No system subject"); return; } if (!isValidStatus(identity, broker)) return; DocumentImpl document = createDocument(brokerPool); LOG.info("node = " + document); if (document == null) { LOG.info("Failure to create document"); return; } Collection collection = null; try { XmldbURI collectionURI = XmldbURI.xmldbUriFor(documentCollection); XmldbURI docURI = XmldbURI.xmldbUriFor(documentCollection + "/mydoc.xml"); collection = broker.openCollection(collectionURI, Lock.WRITE_LOCK); LOG.info("collection: " + collection); if (collection == null) { transact.abort(txn); return; } info = collection.validateXMLResource(txn, broker, docURI, document); } finally { if (collection != null) collection.release(Lock.WRITE_LOCK); } collection.store(txn, broker, info, document, false); transact.commit(txn); } catch (Exception e) { LOG.error("Failure to create document", e); return; } finally { brokerPool.release(broker); } On Feb 23, 2011, at 1:41 PM, Adam Retter wrote: > On 23 February 2011 20:34, Adam Retter <ad...@ex...> wrote: >> You should be able to use code similar to that in the xmldb:store function... > > But dont use the XMLDB stuff itself, look at the underlying > implementation e.g. > org.exist.xmldb.LocalCollection::storeXMLResource(...) is a good place > to start. It basically shows you how to call > org.exist.collections.Collection::validateXMLResource(...) and > org.exist.collections.Collection::store(...) > When using the Internal API though please be very careful with your > transactions and locks. > >> On 23 February 2011 18:57, Loren Cahlander <lor...@gm...> wrote: >>> Hello folks, >>> >>> It has been a while since I was doing some Java work on eXist. I am working a JavaJob the generates an XML document through org.exist.memtree.MemTreeBuilder. I have a DBBroker and an XmldbURI for the collection and the document where I wish to store the XML document. >>> >>> Is there an existing API that is simple for me to use to do this? >>> >>> Cheers, >>> Loren >>> >>> >>> ------------------------------------------------------------------------------ >>> Free Software Download: Index, Search & Analyze Logs and other IT data in >>> Real-Time with Splunk. Collect, index and harness all the fast moving IT data >>> generated by your applications, servers and devices whether physical, virtual >>> or in the cloud. Deliver compliance at lower cost and gain new business >>> insights. http://p.sf.net/sfu/splunk-dev2dev >>> _______________________________________________ >>> Exist-development mailing list >>> Exi...@li... >>> https://lists.sourceforge.net/lists/listinfo/exist-development >>> >> >> >> >> -- >> Adam Retter >> >> eXist Developer >> { United Kingdom } >> ad...@ex... >> irc://irc.freenode.net/existdb >> > > > > -- > Adam Retter > > eXist Developer > { United Kingdom } > ad...@ex... > irc://irc.freenode.net/existdb |
From: Adam R. <ad...@ex...> - 2011-02-23 19:41:13
|
On 23 February 2011 20:34, Adam Retter <ad...@ex...> wrote: > You should be able to use code similar to that in the xmldb:store function... But dont use the XMLDB stuff itself, look at the underlying implementation e.g. org.exist.xmldb.LocalCollection::storeXMLResource(...) is a good place to start. It basically shows you how to call org.exist.collections.Collection::validateXMLResource(...) and org.exist.collections.Collection::store(...) When using the Internal API though please be very careful with your transactions and locks. > On 23 February 2011 18:57, Loren Cahlander <lor...@gm...> wrote: >> Hello folks, >> >> It has been a while since I was doing some Java work on eXist. I am working a JavaJob the generates an XML document through org.exist.memtree.MemTreeBuilder. I have a DBBroker and an XmldbURI for the collection and the document where I wish to store the XML document. >> >> Is there an existing API that is simple for me to use to do this? >> >> Cheers, >> Loren >> >> >> ------------------------------------------------------------------------------ >> Free Software Download: Index, Search & Analyze Logs and other IT data in >> Real-Time with Splunk. Collect, index and harness all the fast moving IT data >> generated by your applications, servers and devices whether physical, virtual >> or in the cloud. Deliver compliance at lower cost and gain new business >> insights. http://p.sf.net/sfu/splunk-dev2dev >> _______________________________________________ >> Exist-development mailing list >> Exi...@li... >> https://lists.sourceforge.net/lists/listinfo/exist-development >> > > > > -- > Adam Retter > > eXist Developer > { United Kingdom } > ad...@ex... > irc://irc.freenode.net/existdb > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |
From: Adam R. <ad...@ex...> - 2011-02-23 19:34:25
|
You should be able to use code similar to that in the xmldb:store function... On 23 February 2011 18:57, Loren Cahlander <lor...@gm...> wrote: > Hello folks, > > It has been a while since I was doing some Java work on eXist. I am working a JavaJob the generates an XML document through org.exist.memtree.MemTreeBuilder. I have a DBBroker and an XmldbURI for the collection and the document where I wish to store the XML document. > > Is there an existing API that is simple for me to use to do this? > > Cheers, > Loren > > > ------------------------------------------------------------------------------ > Free Software Download: Index, Search & Analyze Logs and other IT data in > Real-Time with Splunk. Collect, index and harness all the fast moving IT data > generated by your applications, servers and devices whether physical, virtual > or in the cloud. Deliver compliance at lower cost and gain new business > insights. http://p.sf.net/sfu/splunk-dev2dev > _______________________________________________ > Exist-development mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-development > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |
From: Loren C. <lor...@gm...> - 2011-02-23 17:58:00
|
Hello folks, It has been a while since I was doing some Java work on eXist. I am working a JavaJob the generates an XML document through org.exist.memtree.MemTreeBuilder. I have a DBBroker and an XmldbURI for the collection and the document where I wish to store the XML document. Is there an existing API that is simple for me to use to do this? Cheers, Loren |
From: Jason S. <js...@in...> - 2011-02-22 16:45:50
|
Out of curiousity, how are you initially calling the XQuery? REST, XMLDB, XML:RPC, etc.??? eXist should not be shutting down as a result, it should handle the Java exception. But how it handles it depends, I believe, on how you have called the XQuery in the first place. Jason Smith ________________________________ From: Lauri Hyttinen [lau...@ho...] Sent: Tuesday, February 22, 2011 12:35 AM To: exi...@li... Subject: [Exist-development] Java exceptions crash the server Hello all, I have a java module inside exist doing various things and I've across some problems with it. Granted my java code is behaving badly and causing exceptions, which I am in the process of addressing but still I wonder whether eXist is behaving properly as well. My code causes an org.w3c.dom.DOMException with a HIERACHY REQUEST ERROR being the cause and this causes eXist to shut down. Earlier I had a null pointer exception which also caused the same effect. The null pointer exception is fixed and I am in the process of addressing the DOMException. But regardless of the exception is eXist supposed to shut down when a java module does these things? I know I have to write better java code :) but still it would be easier on the mind when I did not crash the server with my faulty java module. Best regards, Lauri Hyttinen |
From: Jason S. <js...@in...> - 2011-02-22 16:41:07
|
It looks like you have an XQuery that is calling back into your own code, into a command called "enrich." Inside that method, you make a call to addAineistoKuvaus, which in turn is trying to do something with a Xerces DOM document. You are attempting to insert a node where it is not permitted. There isn't really any eXist code involved in the error at this point - it's all MetariV2 and Xerces. Maybe you are trying to do something directly to the document, when you mean to use the documentElement??? Jason Smith ________________________________ From: Lauri Hyttinen [lau...@ho...] Sent: Tuesday, February 22, 2011 5:44 AM To: exi...@li... Subject: Re: [Exist-development] Java exceptions crash the server This is the tailend of the stacktrace + end of the exist output (from startup.sh). The metariv2.MetariV2 stuff is my code. org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. at org.apache.xerces.dom.CoreDocumentImpl.insertBefore(Unknown Source) at org.apache.xerces.dom.NodeImpl.appendChild(Unknown Source) at metariv2.MetariV2.addAineistoKuvaus(MetariV2.java:664) at metariv2.MetariV2.enrich(MetariV2.java:1339) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.exist.xquery.JavaCall.eval(JavaCall.java:266) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.LetExpr.eval(LetExpr.java:155) at org.exist.xquery.BindingExpression.eval(BindingExpression.java:158) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:100) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.DynamicCardinalityCheck.eval(DynamicCardinalityCheck.java:71) at org.exist.xquery.functions.util.CatchFunction.eval(CatchFunction.java:83) at org.exist.xquery.InternalFunctionCall.eval(InternalFunctionCall.java:55) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:56) at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:63) at org.exist.xquery.LetExpr.eval(LetExpr.java:208) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.BindingExpression.eval(BindingExpression.java:158) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.UserDefinedFunction.eval(UserDefinedFunction.java:137) at org.exist.xquery.FunctionCall.evalFunction(FunctionCall.java:274) at org.exist.xquery.FunctionCall.eval(FunctionCall.java:201) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:100) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:56) at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.DynamicCardinalityCheck.eval(DynamicCardinalityCheck.java:71) at org.exist.xquery.functions.util.CatchFunction.eval(CatchFunction.java:83) at org.exist.xquery.InternalFunctionCall.eval(InternalFunctionCall.java:55) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:56) at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:63) at org.exist.xquery.LetExpr.eval(LetExpr.java:208) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.BindingExpression.eval(BindingExpression.java:158) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.UserDefinedFunction.eval(UserDefinedFunction.java:137) at org.exist.xquery.FunctionCall.evalFunction(FunctionCall.java:274) at org.exist.xquery.FunctionCall.eval(FunctionCall.java:201) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.XQuery.execute(XQuery.java:228) at org.exist.xquery.XQuery.execute(XQuery.java:183) at org.exist.http.RESTServer.executeXQuery(RESTServer.java:1233) at org.exist.http.RESTServer.doGet(RESTServer.java:435) at org.exist.http.servlets.EXistServlet.doGet(EXistServlet.java:323) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473) at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:263) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:171) at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:44) at org.exist.http.urlrewrite.XQueryURLRewrite.doFilter(XQueryURLRewrite.java:203) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568) at org.mortbay.http.HttpContext.handle(HttpContext.java:1530) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.http.HttpServer.service(HttpServer.java:909) at org.mortbay.http.HttpConnection.service(HttpConnection.java:820) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534) 22 helmi 2011 13:58:59,906 [Shutdown] INFO (Server.java [run]:555) - Shutdown hook executing 22 helmi 2011 13:58:59,907 [Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080]] INFO (ThreadedServer.java [run]:659) - Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080] 22 helmi 2011 13:59:00,026 [Shutdown] INFO (SocketListener.java [stop]:213) - Stopped SocketListener on 0.0.0.0:8080 22 helmi 2011 13:59:00,053 [Shutdown] INFO (Container.java [stop]:156) - Stopped org.mortbay.jetty.servlet.WebApplicationHandler@22ce00 22 helmi 2011 13:59:00,379 [Shutdown] INFO (Container.java [stop]:156) - Stopped WebApplicationContext[/exist,eXist XML Database] 22 helmi 2011 13:59:00,380 [Shutdown] INFO (Container.java [stop]:156) - Stopped org.mortbay.jetty.Server@1c297a3 22 helmi 2011 13:59:00,380 [Shutdown] INFO (Server.java [run]:565) - Shutdown hook complete Failed to release query result on server: Failed to create input stream: Connection refused Failed to release query result on server: Failed to read server's response: Connection refused Failed to release query result on server: Failed to read server's response: Connection refused Failed to release query result on server: Failed to read server's response: Connection refused Failed to release query result on server: Failed to read server's response: Connection refused Failed to release query result on server: Failed to read server's response: Connection refused 22 helmi 2011 14:01:00,131 [Shutdown] ERROR (JettyStart.java [shutdown]:241) - Database shutdown: stopping server in 1sec ... Afterwards when I restart the server: user@server:~/bin/startup.sh Using locale: fi_FI.UTF-8 22 helmi 2011 14:02:58,453 [main] INFO (JettyStart.java [run]:90) - Configuring eXist from /usr/local/exist/conf.xml 22 helmi 2011 14:02:58,454 [main] INFO (JettyStart.java [run]:91) - 22 helmi 2011 14:02:58,454 [main] INFO (JettyStart.java [run]:92) - Running with Java 1.6.0 [Sun Microsystems Inc. (Java HotSpot(TM) Server VM) in /usr/lib/jvm/java-6-sun-1.6.0.00/jre] 22 helmi 2011 14:02:58,455 [main] INFO (JettyStart.java [run]:97) - 22 helmi 2011 14:02:58,456 [main] INFO (JettyStart.java [run]:101) - [eXist Version : 1.4.0] 22 helmi 2011 14:02:58,456 [main] INFO (JettyStart.java [run]:103) - [eXist Build : 20091111] 22 helmi 2011 14:02:58,457 [main] INFO (JettyStart.java [run]:105) - [eXist Home : /usr/local/exist] 22 helmi 2011 14:02:58,457 [main] INFO (JettyStart.java [run]:107) - [SVN Revision : 10440] 22 helmi 2011 14:02:58,458 [main] INFO (JettyStart.java [run]:115) - [Operating System : Linux 2.6.15-53-server i386] 22 helmi 2011 14:02:58,458 [main] INFO (JettyStart.java [run]:118) - [jetty.home : /usr/local/exist/tools/jetty] 22 helmi 2011 14:02:58,459 [main] INFO (JettyStart.java [run]:120) - [log4j.configuration : file:/usr/local/exist/log4j.xml] Redo [=============================================== ] (94 %)= ] (94 %) It gets stuck here. Nothing happens for minutes, until I get bored and ctrl+c it. I may have jumped the gun on this one though, because the the next time server starts the index is broken. PS. I have zeroed on the offending code on my metariv2 stuff to be this part if it helps in any way. while(i2.hasMoreResources()) { XMLResource s = (XMLResource)i2.nextResource(); Node node = s.getContentAsDOM(); Node statmeta_import = node.getFirstChild(); for (int j = 0; j < statmeta_old_classifications.getLength(); j++) { Element link = (Element)statmeta_old_classifications.item(j); if (link.getAttribute("classificationId").equals(luokitusID)) { //Replace the old empty classfication with the one retrieved Node korvattava = statmeta_old_classifications.item(j); Node korvattavan_parent = korvattava.getParentNode(); korvattavan_parent.replaceChild(statmeta_docu.importNode(statmeta_import, true),korvattava); } } } Best regards, Lauri Hyttinen ________________________________ From: da...@ex... Date: Tue, 22 Feb 2011 09:28:01 +0100 Subject: Re: [Exist-development] Java exceptions crash the server To: lau...@ho... CC: exi...@li... Hi, On Tue, Feb 22, 2011 at 8:35 AM, Lauri Hyttinen <lau...@ho...<mailto:lau...@ho...>> wrote: My code causes an org.w3c.dom.DOMException with a HIERACHY REQUEST ERROR being the cause and this causes eXist to shut down. Earlier I had a null pointer exception which also caused the same effect. The null pointer exception is fixed and I am in the process of addressing the DOMException. But regardless of the exception is eXist supposed to shut down when a java module does these things? I know I have to write better java code :) but still it would be easier on the mind when I did not crash the server with my faulty java module. it is unlikely that such an exception crashes the database. To understand your issue better I'd need to see the stacktraces. In general: if the databases stops to respond, in many cases the 'broker' is never returned to the 'brokerpool'. This is fatal since there is just a limited number of brokers available. regards Dannes -- eXist-db Native XML Database - http://exist-db.org Join us on linked-in: http://www.linkedin.com/groups?gid=35624 |
From: Lauri H. <lau...@ho...> - 2011-02-22 12:44:50
|
This is the tailend of the stacktrace + end of the exist output (from startup.sh). The metariv2.MetariV2 stuff is my code. org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. at org.apache.xerces.dom.CoreDocumentImpl.insertBefore(Unknown Source) at org.apache.xerces.dom.NodeImpl.appendChild(Unknown Source) at metariv2.MetariV2.addAineistoKuvaus(MetariV2.java:664) at metariv2.MetariV2.enrich(MetariV2.java:1339) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.exist.xquery.JavaCall.eval(JavaCall.java:266) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.LetExpr.eval(LetExpr.java:155) at org.exist.xquery.BindingExpression.eval(BindingExpression.java:158) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:100) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.DynamicCardinalityCheck.eval(DynamicCardinalityCheck.java:71) at org.exist.xquery.functions.util.CatchFunction.eval(CatchFunction.java:83) at org.exist.xquery.InternalFunctionCall.eval(InternalFunctionCall.java:55) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:56) at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:63) at org.exist.xquery.LetExpr.eval(LetExpr.java:208) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.BindingExpression.eval(BindingExpression.java:158) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.UserDefinedFunction.eval(UserDefinedFunction.java:137) at org.exist.xquery.FunctionCall.evalFunction(FunctionCall.java:274) at org.exist.xquery.FunctionCall.eval(FunctionCall.java:201) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:100) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:56) at org.exist.xquery.ConditionalExpression.eval(ConditionalExpression.java:102) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.DynamicCardinalityCheck.eval(DynamicCardinalityCheck.java:71) at org.exist.xquery.functions.util.CatchFunction.eval(CatchFunction.java:83) at org.exist.xquery.InternalFunctionCall.eval(InternalFunctionCall.java:55) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:56) at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:63) at org.exist.xquery.LetExpr.eval(LetExpr.java:208) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.LetExpr.eval(LetExpr.java:206) at org.exist.xquery.BindingExpression.eval(BindingExpression.java:158) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.UserDefinedFunction.eval(UserDefinedFunction.java:137) at org.exist.xquery.FunctionCall.evalFunction(FunctionCall.java:274) at org.exist.xquery.FunctionCall.eval(FunctionCall.java:201) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.XQuery.execute(XQuery.java:228) at org.exist.xquery.XQuery.execute(XQuery.java:183) at org.exist.http.RESTServer.executeXQuery(RESTServer.java:1233) at org.exist.http.RESTServer.doGet(RESTServer.java:435) at org.exist.http.servlets.EXistServlet.doGet(EXistServlet.java:323) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473) at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:263) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:171) at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:44) at org.exist.http.urlrewrite.XQueryURLRewrite.doFilter(XQueryURLRewrite.java:203) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568) at org.mortbay.http.HttpContext.handle(HttpContext.java:1530) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.http.HttpServer.service(HttpServer.java:909) at org.mortbay.http.HttpConnection.service(HttpConnection.java:820) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534) 22 helmi 2011 13:58:59,906 [Shutdown] INFO (Server.java [run]:555) - Shutdown hook executing 22 helmi 2011 13:58:59,907 [Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080]] INFO (ThreadedServer.java [run]:659) - Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080] 22 helmi 2011 13:59:00,026 [Shutdown] INFO (SocketListener.java [stop]:213) - Stopped SocketListener on 0.0.0.0:8080 22 helmi 2011 13:59:00,053 [Shutdown] INFO (Container.java [stop]:156) - Stopped org.mortbay.jetty.servlet.WebApplicationHandler@22ce00 22 helmi 2011 13:59:00,379 [Shutdown] INFO (Container.java [stop]:156) - Stopped WebApplicationContext[/exist,eXist XML Database] 22 helmi 2011 13:59:00,380 [Shutdown] INFO (Container.java [stop]:156) - Stopped org.mortbay.jetty.Server@1c297a3 22 helmi 2011 13:59:00,380 [Shutdown] INFO (Server.java [run]:565) - Shutdown hook complete Failed to release query result on server: Failed to create input stream: Connection refused Failed to release query result on server: Failed to read server's response: Connection refused Failed to release query result on server: Failed to read server's response: Connection refused Failed to release query result on server: Failed to read server's response: Connection refused Failed to release query result on server: Failed to read server's response: Connection refused Failed to release query result on server: Failed to read server's response: Connection refused 22 helmi 2011 14:01:00,131 [Shutdown] ERROR (JettyStart.java [shutdown]:241) - Database shutdown: stopping server in 1sec ... Afterwards when I restart the server: user@server:~/bin/startup.sh Using locale: fi_FI.UTF-8 22 helmi 2011 14:02:58,453 [main] INFO (JettyStart.java [run]:90) - Configuring eXist from /usr/local/exist/conf.xml 22 helmi 2011 14:02:58,454 [main] INFO (JettyStart.java [run]:91) - 22 helmi 2011 14:02:58,454 [main] INFO (JettyStart.java [run]:92) - Running with Java 1.6.0 [Sun Microsystems Inc. (Java HotSpot(TM) Server VM) in /usr/lib/jvm/java-6-sun-1.6.0.00/jre] 22 helmi 2011 14:02:58,455 [main] INFO (JettyStart.java [run]:97) - 22 helmi 2011 14:02:58,456 [main] INFO (JettyStart.java [run]:101) - [eXist Version : 1.4.0] 22 helmi 2011 14:02:58,456 [main] INFO (JettyStart.java [run]:103) - [eXist Build : 20091111] 22 helmi 2011 14:02:58,457 [main] INFO (JettyStart.java [run]:105) - [eXist Home : /usr/local/exist] 22 helmi 2011 14:02:58,457 [main] INFO (JettyStart.java [run]:107) - [SVN Revision : 10440] 22 helmi 2011 14:02:58,458 [main] INFO (JettyStart.java [run]:115) - [Operating System : Linux 2.6.15-53-server i386] 22 helmi 2011 14:02:58,458 [main] INFO (JettyStart.java [run]:118) - [jetty.home : /usr/local/exist/tools/jetty] 22 helmi 2011 14:02:58,459 [main] INFO (JettyStart.java [run]:120) - [log4j.configuration : file:/usr/local/exist/log4j.xml] Redo [=============================================== ] (94 %)= ] (94 %) It gets stuck here. Nothing happens for minutes, until I get bored and ctrl+c it. I may have jumped the gun on this one though, because the the next time server starts the index is broken. PS. I have zeroed on the offending code on my metariv2 stuff to be this part if it helps in any way. while(i2.hasMoreResources()) { XMLResource s = (XMLResource)i2.nextResource(); Node node = s.getContentAsDOM(); Node statmeta_import = node.getFirstChild(); for (int j = 0; j < statmeta_old_classifications.getLength(); j++) { Element link = (Element)statmeta_old_classifications.item(j); if (link.getAttribute("classificationId").equals(luokitusID)) { //Replace the old empty classfication with the one retrieved Node korvattava = statmeta_old_classifications.item(j); Node korvattavan_parent = korvattava.getParentNode(); korvattavan_parent.replaceChild(statmeta_docu.importNode(statmeta_import, true),korvattava); } } } Best regards, Lauri Hyttinen From: da...@ex... Date: Tue, 22 Feb 2011 09:28:01 +0100 Subject: Re: [Exist-development] Java exceptions crash the server To: lau...@ho... CC: exi...@li... Hi, On Tue, Feb 22, 2011 at 8:35 AM, Lauri Hyttinen <lau...@ho...> wrote: My code causes an org.w3c.dom.DOMException with a HIERACHY REQUEST ERROR being the cause and this causes eXist to shut down. Earlier I had a null pointer exception which also caused the same effect. The null pointer exception is fixed and I am in the process of addressing the DOMException. But regardless of the exception is eXist supposed to shut down when a java module does these things? I know I have to write better java code :) but still it would be easier on the mind when I did not crash the server with my faulty java module. it is unlikely that such an exception crashes the database. To understand your issue better I'd need to see the stacktraces. In general: if the databases stops to respond, in many cases the 'broker' is never returned to the 'brokerpool'. This is fatal since there is just a limited number of brokers available. regards Dannes -- eXist-db Native XML Database - http://exist-db.org Join us on linked-in: http://www.linkedin.com/groups?gid=35624 |
From: Dannes W. <da...@ex...> - 2011-02-22 08:28:29
|
Hi, On Tue, Feb 22, 2011 at 8:35 AM, Lauri Hyttinen <lau...@ho...>wrote: > My code causes an org.w3c.dom.DOMException with a HIERACHY REQUEST ERROR > being the cause and this causes eXist to shut down. > Earlier I had a null pointer exception which also caused the same effect. > The null pointer exception is fixed and I am in the process of addressing > the DOMException. > But regardless of the exception is eXist supposed to shut down when a java > module does these things? > > I know I have to write better java code :) but still it would be easier on > the mind when I did not crash the server with my faulty java module. > it is unlikely that such an exception crashes the database. To understand your issue better I'd need to see the stacktraces. In general: if the databases stops to respond, in many cases the 'broker' is never returned to the 'brokerpool'. This is fatal since there is just a limited number of brokers available. regards Dannes -- eXist-db Native XML Database - http://exist-db.org Join us on linked-in: http://www.linkedin.com/groups?gid=35624 |
From: Lauri H. <lau...@ho...> - 2011-02-22 07:35:08
|
Hello all, I have a java module inside exist doing various things and I've across some problems with it. Granted my java code is behaving badly and causing exceptions, which I am in the process of addressing but still I wonder whether eXist is behaving properly as well. My code causes an org.w3c.dom.DOMException with a HIERACHY REQUEST ERROR being the cause and this causes eXist to shut down. Earlier I had a null pointer exception which also caused the same effect. The null pointer exception is fixed and I am in the process of addressing the DOMException. But regardless of the exception is eXist supposed to shut down when a java module does these things? I know I have to write better java code :) but still it would be easier on the mind when I did not crash the server with my faulty java module. Best regards, Lauri Hyttinen |
From: Dmitriy S. <sha...@gm...> - 2011-02-21 17:16:39
|
Is it remote client connection? On Mon, Feb 21, 2011 at 10:10 PM, Casey Jordan <cas...@jo...>wrote: > Hi all, > > I recently did a full backup from one 1.4.1 system using a 1.4.0 (Revision > 10440) java client. > > The backup I got had random errors in the permissions of the files. For > instance this file easyDITA Overview.xml with the following owner, and > permissions: > > FIle Owner Group > (omitted) Permissions > > easyDITA Overview.xml da...@ea... (Too many to list) > rwurwu-- > > produced the following output in the __contents__.xml; > > <resource type="XMLResource" name="easyDITA%20Overview.xml" *owner="admin" > group="dba" mode="700"* > created="2011-01-18T20:45:11-05:00" > modified="2011-01-18T20:51:26-05:00" > filename="easyDITA Overview.xml" mimetype="text/xml"/> > > These problems seem to be random and are throughout our database of about > 5000 files. Before I go trying random things to fix this I'd like to know if > this is a known problem. > -- Dmitriy Shabanov |
From: Casey J. <cas...@jo...> - 2011-02-21 17:10:40
|
Hi all, I recently did a full backup from one 1.4.1 system using a 1.4.0 (Revision 10440) java client. The backup I got had random errors in the permissions of the files. For instance this file easyDITA Overview.xml with the following owner, and permissions: FIle Owner Group (omitted) Permissions easyDITA Overview.xml da...@ea... (Too many to list) rwurwu-- produced the following output in the __contents__.xml; <resource type="XMLResource" name="easyDITA%20Overview.xml" *owner="admin" group="dba" mode="700"* created="2011-01-18T20:45:11-05:00" modified="2011-01-18T20:51:26-05:00" filename="easyDITA Overview.xml" mimetype="text/xml"/> These problems seem to be random and are throughout our database of about 5000 files. Before I go trying random things to fix this I'd like to know if this is a known problem. Cheers, Casey -- -- Casey Jordan easyDITA a product of Jorsek LLC "CaseyDJordan" on LinkedIn, Twitter & Facebook Cell (585) 348 7399 Office (585) 239 6060 easydita.com This message is intended only for the use of the Addressee(s) and may contain information that is privileged, confidential, and/or exempt from disclosure under applicable law. If you are not the intended recipient, please be advised that any disclosure copying, distribution, or use of the information contained herein is prohibited. If you have received this communication in error, please destroy all copies of the message, whether in electronic or hard copy format, as well as attachments, and immediately contact the sender by replying to this e-mail or by phone. Thank you. |
From: Leif-Jöran O. <lj...@ex...> - 2011-02-21 10:21:45
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Den 2011-02-18 16:03, Joe Wicentowski skrev: > I wasn't able to make the last call and probably won't be able to in > general (due to restrictions on VOIP etc here at work), but I did want > everyone to know: > > I really appreciated Dannes's notes on the IRC transcript last time - > I was able to read them a few days afterward and found them very > informative. If it would be possible for notes to be taken again, I, > for one, would greatly appreciate it! I'm sure it was tough to talk > and type at the same time, so I appreciate it all the more! Yes, I did it the previous meeting too, but unfortunately my voip connection was too bad this time (so I could only write...) since I was on the train. Leif-Jöran -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iD8DBQFNYjyuhcIn5aVXOPIRAjTaAJ4hXpjBizC8wt3jWb24poIzT7EJWwCfZb7q nFtXXdrOX2PqO+wfzsJfKyk= =HV+O -----END PGP SIGNATURE----- |
From: Adam R. <ad...@ex...> - 2011-02-18 16:44:09
|
It should be no different form using Saxon HE as far as calling an XSLT transform from eXist-db goes, just replace the Saxon jar in $EXIST_HOME/lib/endorsed 2011/2/18 Вячеслав Седов <sch...@gm...>: > Look like my customer can get Saxon EE - is someone have experience > with Saxon EE in eXist? > > with best wishes, > Slav > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > Exist-development mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-development > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |
From: Вячеслав С. <sch...@gm...> - 2011-02-18 15:43:02
|
Look like my customer can get Saxon EE - is someone have experience with Saxon EE in eXist? with best wishes, Slav |
From: Joe W. <jo...@gm...> - 2011-02-18 15:04:07
|
I wasn't able to make the last call and probably won't be able to in general (due to restrictions on VOIP etc here at work), but I did want everyone to know: I really appreciated Dannes's notes on the IRC transcript last time - I was able to read them a few days afterward and found them very informative. If it would be possible for notes to be taken again, I, for one, would greatly appreciate it! I'm sure it was tough to talk and type at the same time, so I appreciate it all the more! Joe |
From: Wolfgang M. <wol...@ex...> - 2011-02-18 10:43:49
|
The topic for today's developer teleconference at 4pm UTC will be runtime configuration changes and the redesign of the configuration package. The discussion is open to everyone. I know a few people are in holiday or away, so it might just be Dmitryi and myself in the chat. If anyone else wants to listen or contribute, just send me a skype message short before 4pm, so I can invite you. Wolfgang |
From: Dmitriy S. <sha...@gm...> - 2011-02-18 09:25:24
|
Yeap, with pleasure :-) On Fri, Feb 18, 2011 at 1:48 PM, Wolfgang Meier <wol...@ex...>wrote: > Good idea. It would help to hear more. Dmitriy, would you be available for > a chat today? If yes, I'll announce a teleconf. > > Wolfgang > > Am 18.02.2011 09:25 schrieb "Dannes Wessels" <di...@ex...>: > > > In all, a nice subject for a dev telecon? > > > -- Dmitriy Shabanov |
From: Wolfgang M. <wol...@ex...> - 2011-02-18 08:49:05
|
Good idea. It would help to hear more. Dmitriy, would you be available for a chat today? If yes, I'll announce a teleconf. Wolfgang Am 18.02.2011 09:25 schrieb "Dannes Wessels" <di...@ex...>: > In all, a nice subject for a dev telecon? > > Sent from my iPhone > > On 17 feb. 2011, at 12:54, Dmitriy Shabanov <sha...@gm...> wrote: > >> >> >> On Thu, Feb 17, 2011 at 3:04 PM, Stefan Majewski < ste...@un...> wrote: >> On 17/02/11 09:26, Adam Retter wrote: >> I really feel that this *must* go in /db/system. As a user I dont >> really want my databases becoming polluted with configuration files >> that are not part of my application. >> >> I really do second this. I use the collection name "etc" in several/most applications, as I usually need a place to put my App's configuration. Then, in case I deploy the application to my top-level database directory (what I rarely do, but nonetheless) I would probably face a conflict. From a user perspective this seems to be just another name to avoid. >> >> That is what it for .... mean pluggable applications ... what permissions do you set to this collection? and it should not generate any conflicts, because on restore permissions can be changed any way. >> >> All I need is collection that exist by default and pluggings don't need to worry about. >> >> -- >> Dmitriy Shabanov >> ------------------------------------------------------------------------------ >> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: >> Pinpoint memory and threading errors before they happen. >> Find and fix more than 250 security defects in the development cycle. >> Locate bottlenecks in serial and parallel code that limit performance. >> http://p.sf.net/sfu/intel-dev2devfeb >> _______________________________________________ >> Exist-development mailing list >> Exi...@li... >> https://lists.sourceforge.net/lists/listinfo/exist-development |
From: Dannes W. <di...@ex...> - 2011-02-18 08:25:49
|
In all, a nice subject for a dev telecon? Sent from my iPhone On 17 feb. 2011, at 12:54, Dmitriy Shabanov <sha...@gm...> wrote: > > > On Thu, Feb 17, 2011 at 3:04 PM, Stefan Majewski <ste...@un...> wrote: > On 17/02/11 09:26, Adam Retter wrote: > I really feel that this *must* go in /db/system. As a user I dont > really want my databases becoming polluted with configuration files > that are not part of my application. > > I really do second this. I use the collection name "etc" in several/most applications, as I usually need a place to put my App's configuration. Then, in case I deploy the application to my top-level database directory (what I rarely do, but nonetheless) I would probably face a conflict. From a user perspective this seems to be just another name to avoid. > > That is what it for .... mean pluggable applications ... what permissions do you set to this collection? and it should not generate any conflicts, because on restore permissions can be changed any way. > > All I need is collection that exist by default and pluggings don't need to worry about. > > -- > Dmitriy Shabanov > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > Exist-development mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-development |
From: Dmitriy S. <sha...@gm...> - 2011-02-17 11:54:16
|
On Thu, Feb 17, 2011 at 3:04 PM, Stefan Majewski < ste...@un...> wrote: > On 17/02/11 09:26, Adam Retter wrote: > >> I really feel that this *must* go in /db/system. As a user I dont >> really want my databases becoming polluted with configuration files >> that are not part of my application. >> > > I really do second this. I use the collection name "etc" in several/most > applications, as I usually need a place to put my App's configuration. Then, > in case I deploy the application to my top-level database directory (what I > rarely do, but nonetheless) I would probably face a conflict. From a user > perspective this seems to be just another name to avoid. > That is what it for .... mean pluggable applications ... what permissions do you set to this collection? and it should not generate any conflicts, because on restore permissions can be changed any way. All I need is collection that exist by default and pluggings don't need to worry about. -- Dmitriy Shabanov |
From: Stefan M. <ste...@un...> - 2011-02-17 10:04:48
|
On 17/02/11 09:26, Adam Retter wrote: > I really feel that this *must* go in /db/system. As a user I dont > really want my databases becoming polluted with configuration files > that are not part of my application. I really do second this. I use the collection name "etc" in several/most applications, as I usually need a place to put my App's configuration. Then, in case I deploy the application to my top-level database directory (what I rarely do, but nonetheless) I would probably face a conflict. From a user perspective this seems to be just another name to avoid. > What was the issue with using /db/system? And can it be solved? Wouldn't it be equally safe to set more restrictive permissions on the individual resources below /db/system? That means the collections - /db/system/repo - /db/system/security - /db/system/config and then additionally? - /db/system/config as far as I can see, haven't checked though, the configuration in /db/system/config is all collection-centric, so why not choose a base-layout like this: - /db/system/etc/ - /db/system/etc/collection and move the configuration from /db/system/config to the latter. Obviously we would have to be very careful to set the right and sufficiently restrictive permissions. Sure, this would *break* backwards compatibility esp. thinking about backup/restore of full databases, but maybe it pays off in the long run. Maybe I misunderstood completely what /etc should be all about, but I assumed that it would be configuration relevant to the database product (ie not specifically for a user's applications). cheers, Stefan -- | Stefan Majewski | Department of English, University of Vienna | | VOICE Corpus | Spitalgasse 2-4, Universitätscampus AAKH, Hof 8 | | | A-1090 Vienna | | Research Ass.(IT)| Phone: +43 1 4277 424 46 | |
From: Evgeny G. <gaz...@gm...> - 2011-02-17 09:00:49
|
2011/2/17 Adam Retter <ad...@ex...> > I really feel that this *must* go in /db/system. As a user I dont > really want my databases becoming polluted with configuration files > that are not part of my application. > > Say this to the sandbox app ;) -- Evgeny |
From: Adam R. <ad...@ex...> - 2011-02-17 08:55:46
|
I really feel that this *must* go in /db/system. As a user I dont really want my databases becoming polluted with configuration files that are not part of my application. What was the issue with using /db/system? And can it be solved? On 17 February 2011 04:59, Dmitriy Shabanov <sha...@gm...> wrote: > settings files ... plugins one as example, but also it will be used for > others eXist settings files, like backup, serialize ... > > On Wed, Feb 16, 2011 at 11:23 PM, Adam Retter <ad...@ex...> wrote: >> >> Whats it for? >> >> On 16 February 2011 16:33, Dmitriy Shabanov <sha...@gm...> wrote: >> > Wolfgang did ask to do not use '/db/system' because it have 'rwurwu---', >> > but >> > 'etc' 'rwurwuR--'. >> > >> > On Wed, Feb 16, 2011 at 7:29 PM, Adam Retter <ad...@ex...> wrote: >> >> >> >> What is /db/etc? Should this not be /db/system/etc if anything? >> >> >> >> >> >> On 16 February 2011 14:13, <sha...@us...> wrote: >> >> > Revision: 13782 >> >> > http://exist.svn.sourceforge.net/exist/?rev=13782&view=rev >> >> > Author: shabanovd >> >> > Date: 2011-02-16 13:13:58 +0000 (Wed, 16 Feb 2011) >> >> > >> >> > Log Message: >> >> > ----------- >> >> > [feature] create '/db/etc' collection. >> >> > >> >> > Owner: SYSTEM with permissions: rwu; >> >> > Group: DBA with permissions: rwu; >> >> > Other's permissions: r--; >> >> > >> >> > It will be monitored by configuration trigger and it must/should be >> >> > used >> >> > for settings which must/should be readable by world. >> >> > >> >> > Modified Paths: >> >> > -------------- >> >> > trunk/eXist/src/org/exist/storage/BrokerPool.java >> >> > >> >> > Modified: trunk/eXist/src/org/exist/storage/BrokerPool.java >> >> > =================================================================== >> >> > --- trunk/eXist/src/org/exist/storage/BrokerPool.java 2011-02-16 >> >> > 13:03:39 UTC (rev 13781) >> >> > +++ trunk/eXist/src/org/exist/storage/BrokerPool.java 2011-02-16 >> >> > 13:13:58 UTC (rev 13782) >> >> > @@ -961,25 +961,23 @@ >> >> > }*/ >> >> > >> >> > /** >> >> > - * Initialise system collections, if it doesnt exist yet >> >> > + * Initialise system collections, if it doesn't exist yet >> >> > * >> >> > * @param sysBroker The system broker from before the brokerpool >> >> > is >> >> > populated >> >> > * @param sysCollectionUri XmldbURI of the collection to create >> >> > - * @param permissions The persmissions to set on the created >> >> > collection >> >> > + * @param permissions The permissions to set on the created >> >> > collection >> >> > */ >> >> > - private void initialiseSystemCollection(DBBroker sysBroker, >> >> > XmldbURI sysCollectionUri, int permissions) throws EXistException { >> >> > - //create /db/system >> >> > - Collection sysCollection = >> >> > sysBroker.getCollection(sysCollectionUri); >> >> > - if (sysCollection == null) >> >> > - { >> >> > + private Collection initialiseSystemCollection(DBBroker >> >> > sysBroker, >> >> > XmldbURI sysCollectionUri, int permissions) throws EXistException { >> >> > + Collection collection = >> >> > sysBroker.getCollection(sysCollectionUri); >> >> > + if (collection == null) { >> >> > TransactionManager transact = getTransactionManager(); >> >> > Txn txn = transact.beginTransaction(); >> >> > try { >> >> > - sysCollection = sysBroker.getOrCreateCollection(txn, >> >> > sysCollectionUri); >> >> > - if (sysCollection == null) >> >> > + collection = sysBroker.getOrCreateCollection(txn, >> >> > sysCollectionUri); >> >> > + if (collection == null) >> >> > throw new IOException("Could not create system >> >> > collection: " + sysCollectionUri); >> >> > - sysCollection.setPermissions(permissions); >> >> > - sysBroker.saveCollection(txn, sysCollection); >> >> > + collection.setPermissions(permissions); >> >> > + sysBroker.saveCollection(txn, collection); >> >> > >> >> > transact.commit(txn); >> >> > } catch (Exception e) { >> >> > @@ -990,19 +988,36 @@ >> >> > throw new EXistException(msg, e); >> >> > } >> >> > } >> >> > + >> >> > + return collection; >> >> > } >> >> > >> >> > /** >> >> > - * Initialise required system collections, if they dont exist >> >> > yet >> >> > + * Initialize required system collections, if they don't exist >> >> > yet >> >> > * >> >> > * @param sysBroker - The system broker from before the >> >> > brokerpool >> >> > is populated >> >> > * >> >> > * @throws EXistException If a system collection cannot be >> >> > created >> >> > */ >> >> > - private void initialiseSystemCollections(DBBroker sysBroker) >> >> > throws >> >> > EXistException >> >> > + private void initialiseSystemCollections(DBBroker broker) throws >> >> > EXistException >> >> > { >> >> > //create /db/system >> >> > - initialiseSystemCollection(sysBroker, >> >> > XmldbURI.SYSTEM_COLLECTION_URI, 0770); >> >> > + initialiseSystemCollection(broker, >> >> > XmldbURI.SYSTEM_COLLECTION_URI, 0770); >> >> > + //create /db/etc >> >> > + Collection collection = initialiseSystemCollection(broker, >> >> > XmldbURI.ETC_COLLECTION_URI, 0774); >> >> > + >> >> > + //initialize configurations watcher trigger >> >> > + if (collection != null) { >> >> > + CollectionConfigurationManager manager = >> >> > broker.getBrokerPool().getConfigurationManager(); >> >> > + CollectionConfiguration collConf = >> >> > manager.getOrCreateCollectionConfiguration(broker, collection); >> >> > + try { >> >> > + collConf.registerTrigger(broker, >> >> > + >> >> > "store,update,remove", >> >> > + >> >> > "org.exist.config.ConfigurationDocumentTrigger", null); >> >> > + } catch (CollectionConfigurationException e) >> >> > { >> >> > + //LOG.error("Configuration changers >> >> > watcher could not the initialized.", e); >> >> > + } >> >> > + } >> >> > } >> >> > >> >> > public long getReservedMem() { >> >> > >> >> > >> >> > This was sent by the SourceForge.net collaborative development >> >> > platform, >> >> > the world's largest Open Source development site. >> >> > >> >> > >> >> > >> >> > ------------------------------------------------------------------------------ >> >> > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio >> >> > XE: >> >> > Pinpoint memory and threading errors before they happen. >> >> > Find and fix more than 250 security defects in the development cycle. >> >> > Locate bottlenecks in serial and parallel code that limit >> >> > performance. >> >> > http://p.sf.net/sfu/intel-dev2devfeb >> >> > _______________________________________________ >> >> > Exist-commits mailing list >> >> > Exi...@li... >> >> > https://lists.sourceforge.net/lists/listinfo/exist-commits >> >> > >> >> >> >> >> >> >> >> -- >> >> Adam Retter >> >> >> >> eXist Developer >> >> { United Kingdom } >> >> ad...@ex... >> >> irc://irc.freenode.net/existdb >> > >> > >> > >> > -- >> > Dmitriy Shabanov >> > >> >> >> >> -- >> Adam Retter >> >> eXist Developer >> { United Kingdom } >> ad...@ex... >> irc://irc.freenode.net/existdb > > > > -- > Dmitriy Shabanov > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |
From: Dmitriy S. <sha...@gm...> - 2011-02-17 08:47:40
|
On Thu, Feb 17, 2011 at 1:26 PM, Adam Retter <ad...@ex...> wrote: > I really feel that this *must* go in /db/system. As a user I dont > really want my databases becoming polluted with configuration files > that are not part of my application. > > What was the issue with using /db/system? And can it be solved? > Issue around last 'r' in permissions. Some configurations should/must be readable by 'guest' account. The background idea is linux '/etc' folder. -- Dmitriy Shabanov |