Loren Cahlander | 1 May 19:26 2015
Picon

Fwd: Some lucene query help needed




<!-- /* Font Definitions */ <at> font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} <at> font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri","sans-serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} span.EmailStyle17 {mso-style-type:personal-compose; font-family:"Calibri","sans-serif"; color:windowtext;} .MsoChpDefault {mso-style-type:export-only;} <at> page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} -->

Hello Folks,

 

I have a bunch of file in a collection in the following format:

 

<html>
   
<body>
       
<div class="panel panel-default" id="entityAbuseType">
           
<div class="panel-heading" id="headingAbuseType">
               
<h3 class="panel-title">
                   
<a class="entity-title" data-toggle="collapse" href="#collapseAbuseType" aria-expanded="true" aria-controls="collapseAbuseType"></a>
               
</h3>
           
</div>
           
<div id="collapseAbuseType" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingAbuseType">
               
<div class="panel-body">
                   
<p></p>
                   
<p></p>
                   
<p></p>
                   
<p/>
                   
<ul>
                       
<li></li>
                       
<li></li>
                       
<li></li>
                   
</ul>
               
</div>
               
<table class="table">
                   
<thead>
                       
<tr>
                           
<th>Name</th>
                           
<th>Data Type</th>
                           
<th>XSD Type</th>
                           
<th>Description</th>
                       
</tr>
                   
</thead>
                   
<tbody>
                       
<tr>
                           
<td class="attribute-name">abuseTypeId</td>
                            
<td class="attribute-erwin-datatype">CHAR(18)</td>
                           
<td class="attribute-xsd-datatype">xs:string</td>
                           
<td class="attribute-description">
                               
<p>The unique identifier of a type of abuse.</p>
                           
</td>
                       
</tr>
                       
<tr>
                           
<td class="attribute-name">abuseTypeName</td>
                           
<td class="attribute-erwin-datatype">VARCHAR(80)</td>
                           
<td class="attribute-xsd-datatype">xs:string</td>
                           
<td class="attribute-description">
                               
<p>The name of a type of abuse.</p>
                            
</td>
                       
</tr>
                       
<tr>
                           
<td class="attribute-name">abuseTypeDescription</td>
                           
<td class="attribute-erwin-datatype">VARCHAR(255)</td>
                            
<td class="attribute-xsd-datatype">xs:string</td>
                           
<td class="attribute-description">
                               
<p>The description of a type of abuse.</p>
                           
</td>
                       
</tr>
                   
</tbody>
               
</table>
           
</div>
       
</div>
   
</body>
</html>

 

I have a collections.xconf for the collection in the following format:

 

<collection xmlns="http://exist-db.org/collection-config/1.0">
   
<index>
       
<fulltext default="none" attributes="false"/>
       
<!-- Lucene index is configured below -->
       
<lucene>
           
<analyzer class="org.apache.lucene.analysis.standard.StandardAnalyzer"/>
           
<analyzer id="ws" class="org.apache.lucene.analysis.WhitespaceAnalyzer"/>
            
<text match="//*[ <at> class = 'entity-title']" boost="2.0"/>
           
<text match="//*[ <at> class = 'panel-body']//*"/>
           
<text match="//*[ <at> class = 'attribute-name']//*" boost="1.5"/>
           
<text match="//*[ <at> class = 'attribute-description']//*"/>
       
</lucene>
   
</index>
</collection>

 

 

How do I format a query to find some text within the title, body, attribute name or attribute description?

 

 

collection('/db/foo')//* [ft:query(//*, 'member')]

 

Do I need to change the collections.xconf?

 

 

 

 Thanks,

Loren



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Alexander Henket | 30 Apr 21:12 2015
Picon
Picon

Reindexing kidnaps my machine

Hi,

eXist-db 2.2 / OSX. Would it be possible for the eXist-db splash screen to not heist my machine for the duration of a reindex upon boot when it detects an unclean shutdown? For up to 20-25 minutes my screen is unusable because of the splash screen in the middle of it that sits on top of everything else.

The reasons for unclean shutdowns are a different topic. This one was after a force quit this morning after having been at >600% CPU for 5 hours straight while installing a package that triggers reindex.

Thanks

Alexander Henket

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
W.S. Hager | 30 Apr 17:02 2015
Picon

current dashboard not running

Hi,

In the current develop build the dashboard won't launch:


HTTP ERROR 500

Problem accessing /apps/dashboard/. Reason:

    err:XPST0081 error found while loading module restxq: Error while loading module modules/restxq.xql: No namespace defined for prefix text [at line 271, column 40]

Caused by:

org.exist.xquery.XPathException: err:XPST0081 error found while loading module restxq: Error while loading module modules/restxq.xql: No namespace defined for prefix text [at line 271, column 40]
    at org.exist.dom.QName.parse(QName.java:293)
etc...

Thanks.

--

W.S. Hager
Lagua Web Solutions
http://lagua.nl

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Andreas Jung | 30 Apr 13:19 2015

exist-db after restart in read-only mode

Hi there,

I restarted my 2.2 server this morning and suddenly the server is running in read-only mode.

The log file contains:

2015-04-30 11:15:20,430 [main] WARN  (NativeBroker.java [<init>]:252) - dom.dbx is read-only! 
2015-04-30 11:15:20,431 [main] INFO  (BrokerPool.java [setReadOnly]:1343) - Switching to read-only mode!!! 
2015-04-30 11:15:20,432 [main] WARN  (NativeBroker.java [<init>]:262) - collections.dbx is read-only! 
2015-04-30 11:15:20,432 [main] INFO  (BrokerPool.java [setReadOnly]:1343) - Switching to read-only mode!!! 

Why is this happening and how can I revert the database to normal operation?

Full logs below.

Andreas

dgho <at> neu:~/onkopedia_buildout/docker/existdb$ cat  ~/existdb/logs/exist.log
2015-04-30 11:15:18,074 [main] INFO  (XmlLibraryChecker.java [check]:149) - Looking for a valid Parser...
Checking for Xerces, found version Xerces-J 2.11.0
OK!
 
2015-04-30 11:15:18,357 [main] INFO  (XmlLibraryChecker.java [check]:172) - Looking for a valid Transformer...
Checking for Saxon, found version 9.4.0.7
OK!
 
2015-04-30 11:15:18,361 [main] INFO  (XmlLibraryChecker.java [check]:184) - Looking for a valid Resolver...
Checking for Resolver, found version XmlResolver 1.2
OK!
 
2015-04-30 11:15:18,383 [main] INFO  (XmlLibraryChecker.java [check]:191) - Using parser org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser 
2015-04-30 11:15:18,392 [main] INFO  (XmlLibraryChecker.java [check]:192) - Using transformer org.apache.xalan.transformer.TransformerIdentityImpl 
2015-04-30 11:15:18,448 [main] INFO  (JettyStart.java [run]:120) - Configuring eXist from /opt/exist/conf.xml 
2015-04-30 11:15:18,448 [main] INFO  (JettyStart.java [run]:122) - Running with Java 1.8.0_45-internal [Oracle Corporation (OpenJDK 64-Bit Server VM) in /usr/lib/jvm/java-8-openjdk-amd64/jre] 
2015-04-30 11:15:18,449 [main] INFO  (JettyStart.java [run]:128) - Running as user 'exist' 
2015-04-30 11:15:18,517 [main] INFO  (JettyStart.java [run]:131) - [eXist Version : 2.2] 
2015-04-30 11:15:18,525 [main] INFO  (JettyStart.java [run]:133) - [eXist Build : 20141120] 
2015-04-30 11:15:18,525 [main] INFO  (JettyStart.java [run]:135) - [eXist Home : unknown] 
2015-04-30 11:15:18,526 [main] INFO  (JettyStart.java [run]:137) - [Git commmit : master-5c5aadc] 
2015-04-30 11:15:18,526 [main] INFO  (JettyStart.java [run]:140) - [Operating System : Linux 3.13.0-32-generic amd64] 
2015-04-30 11:15:18,528 [main] INFO  (JettyStart.java [run]:145) - [jetty.home : /opt/exist/tools/jetty] 
2015-04-30 11:15:18,528 [main] INFO  (JettyStart.java [run]:147) - [log4j.configuration : file:/opt/exist/log4j.xml] 
2015-04-30 11:15:18,530 [main] INFO  (Configuration.java [<init>]:183) - Reading configuration from file /opt/exist/conf.xml 
2015-04-30 11:15:18,778 [main] INFO  (Configuration.java [configureStartup]:1258) - Registered StartupTrigger: org.exist.extensions.exquery.restxq.impl.RestXqStartupTrigger 
2015-04-30 11:15:18,782 [main] INFO  (Configuration.java [configureStartup]:1258) - Registered StartupTrigger: org.exist.repo.AutoDeploymentTrigger 
2015-04-30 11:15:19,306 [main] ERROR (Configuration.java [lookupModuleClass]:457) - Configuration problem: class not found for module 'http://exist-db.org/xquery/context' (ClassNotFoundException); class:'org.exist.xquery.modules.context.ContextModule'; message:'org.exist.xquery.modules.context.ContextModule' 
2015-04-30 11:15:19,429 [main] ERROR (Configuration.java [lookupModuleClass]:457) - Configuration problem: class not found for module 'http://exist-db.org/xquery/versioning/svn' (ClassNotFoundException); class:'org.exist.versioning.svn.xquery.SVNModule'; message:'org.exist.versioning.svn.xquery.SVNModule' 
2015-04-30 11:15:19,438 [main] INFO  (eXistURLStreamHandlerFactory.java [init]:53) - Succesfully registered eXistURLStreamHandlerFactory. 
2015-04-30 11:15:19,441 [main] INFO  (Configuration.java [configureValidation]:1515) - Add catalog uri file:/opt/exist/webapp//WEB-INF/catalog.xml 
2015-04-30 11:15:19,443 [main] INFO  (GrammarPool.java [<init>]:53) - Initializing GrammarPool. 
2015-04-30 11:15:19,452 [main] INFO  (BrokerPool.java [<init>]:670) - database instance 'exist' will have between 1 and 20 brokers 
2015-04-30 11:15:19,452 [main] INFO  (BrokerPool.java [<init>]:679) - database instance 'exist' will be synchronized every 120,000 ms 
2015-04-30 11:15:19,452 [main] INFO  (BrokerPool.java [<init>]:686) - database instance 'exist' will wait  120,000 ms during shutdown 
2015-04-30 11:15:19,452 [main] INFO  (BrokerPool.java [<init>]:692) - database instance 'exist' is enabled for transactions : true 
2015-04-30 11:15:19,478 [main] INFO  (QuartzSchedulerImpl.java [getQuartzProperties]:114) - Succesfully loaded quartz.properties 
2015-04-30 11:15:19,660 [main] INFO  (FileLock.java [message]:297) - File lock last access timestamp: Apr 30, 2015 /data/exist/dbx_dir.lck 
2015-04-30 11:15:19,660 [main] INFO  (FileLock.java [message]:297) - Found a stale lockfile. Trying to remove it:  /data/exist/dbx_dir.lck 
2015-04-30 11:15:19,661 [main] INFO  (FileLock.java [release]:189) - Deleting lock file: /data/exist/dbx_dir.lck 
2015-04-30 11:15:19,735 [main] INFO  (DefaultCacheManager.java [<init>]:151) - Cache settings: 131,072k; totalPages: 32,768; maxCacheSize: 29,491; cacheShrinkThreshold: 10,000 
2015-04-30 11:15:19,810 [main] INFO  (XQueryPool.java [<init>]:120) - QueryPool: size = 128; maxStackSize = 5; timeout = 120,000; timeoutCheckInterval = 30,000 
2015-04-30 11:15:19,832 [main] INFO  (FileLock.java [message]:297) - File lock last access timestamp: Apr 30, 2015 /data/exist/journal.lck 
2015-04-30 11:15:19,832 [main] INFO  (FileLock.java [message]:297) - Found a stale lockfile. Trying to remove it:  /data/exist/journal.lck 
2015-04-30 11:15:19,833 [main] INFO  (FileLock.java [release]:189) - Deleting lock file: /data/exist/journal.lck 
2015-04-30 11:15:19,960 [main] INFO  (IndexManager.java [initIndex]:99) - Registered index org.exist.indexing.ngram.NGramIndex as ngram-index 
2015-04-30 11:15:20,261 [main] INFO  (IndexManager.java [initIndex]:99) - Registered index org.exist.indexing.lucene.LuceneIndex as lucene-index 
2015-04-30 11:15:20,264 [main] INFO  (IndexManager.java [initIndex]:99) - Registered index org.exist.indexing.sort.SortIndex as sort-index 
2015-04-30 11:15:20,280 [main] INFO  (IndexManager.java [initIndex]:99) - Registered index org.exist.indexing.range.RangeIndex as range-index 
2015-04-30 11:15:20,283 [main] INFO  (IndexManager.java [initIndex]:99) - Registered index org.exist.storage.structural.NativeStructuralIndex as structural-index 
2015-04-30 11:15:20,430 [main] WARN  (NativeBroker.java [<init>]:252) - dom.dbx is read-only! 
2015-04-30 11:15:20,431 [main] INFO  (BrokerPool.java [setReadOnly]:1343) - Switching to read-only mode!!! 
2015-04-30 11:15:20,432 [main] WARN  (NativeBroker.java [<init>]:262) - collections.dbx is read-only! 
2015-04-30 11:15:20,432 [main] INFO  (BrokerPool.java [setReadOnly]:1343) - Switching to read-only mode!!! 
2015-04-30 11:15:20,461 [main] INFO  (NativeBroker.java [<init>]:268) - Database runs in read-only mode 
2015-04-30 11:15:21,138 [main] INFO  (ExistRepository.java [getRepository]:186) - Using directory /data/exist/expathrepo for expath package repository 
2015-04-30 11:15:27,221 [main] INFO  (AutoDeploymentTrigger.java [execute]:51) - Scanning autodeploy directory. Found 12 app packages. 
2015-04-30 11:15:27,729 [main] INFO  (Deployment.java [installAndDeploy]:169) - Application package http://exist-db.org/apps/shared already installed. Skipping. 
2015-04-30 11:15:27,771 [main] INFO  (Deployment.java [installAndDeploy]:169) - Application package http://www.betterfrom.de/apps/xforms already installed. Skipping. 
2015-04-30 11:15:27,793 [main] INFO  (Deployment.java [installAndDeploy]:169) - Application package http://exist-db.org/apps/dashboard already installed. Skipping. 
2015-04-30 11:15:27,869 [main] INFO  (Deployment.java [installAndDeploy]:169) - Application package http://exist-db.org/apps/demo already installed. Skipping. 
2015-04-30 11:15:27,957 [main] INFO  (Deployment.java [installAndDeploy]:169) - Application package http://exist-db.org/apps/doc already installed. Skipping. 
2015-04-30 11:15:27,981 [main] INFO  (Deployment.java [installAndDeploy]:169) - Application package http://exist-db.org/apps/eXide already installed. Skipping. 
2015-04-30 11:15:27,993 [main] INFO  (Deployment.java [installAndDeploy]:169) - Application package http://exist-db.org/apps/fundocs already installed. Skipping. 
2015-04-30 11:15:28,003 [main] INFO  (Deployment.java [installAndDeploy]:169) - Application package http://exist-db.org/apps/markdown already installed. Skipping. 
2015-04-30 11:15:28,017 [main] INFO  (Deployment.java [installAndDeploy]:169) - Application package http://exist-db.org/apps/monex already installed. Skipping. 
2015-04-30 11:15:28,022 [main] INFO  (Deployment.java [installAndDeploy]:169) - Application package http://xqilla.sourceforge.net/pkg/xqjson already installed. Skipping. 
2015-04-30 11:15:28,043 [main] INFO  (Deployment.java [installAndDeploy]:169) - Application package http://exist-db.org/apps/xsltforms already installed. Skipping. 
2015-04-30 11:15:28,075 [main] INFO  (Deployment.java [installAndDeploy]:169) - Application package http://exist-db.org/apps/xsltforms-demo already installed. Skipping. 
2015-04-30 11:15:29,109 [main] INFO  (JettyStart.java [lifeCycleStarting]:413) - Jetty server starting... 
2015-04-30 11:15:34,984 [main] INFO  (AbstractExistHttpServlet.java [getOrCreateBrokerPool]:96) - Database already started. Skipping configuration ... 
2015-04-30 11:15:35,009 [main] INFO  (AbstractExistHttpServlet.java [doGeneralExistServletConfig]:198) - Using default user guest for all unauthorized requests. 
2015-04-30 11:15:35,050 [main] INFO  (XmlLibraryChecker.java [check]:149) - Looking for a valid Parser...
Checking for Xerces, found version Xerces-J 2.11.0
OK!
 
2015-04-30 11:15:35,075 [main] INFO  (XmlLibraryChecker.java [check]:172) - Looking for a valid Transformer...
Checking for Saxon, found version 9.4.0.7
OK!
 
2015-04-30 11:15:35,075 [main] INFO  (XmlLibraryChecker.java [check]:184) - Looking for a valid Resolver...
Checking for Resolver, found version XmlResolver 1.2
OK!
 
2015-04-30 11:15:35,081 [main] INFO  (XmlLibraryChecker.java [check]:191) - Using parser org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser 
2015-04-30 11:15:35,082 [main] INFO  (XmlLibraryChecker.java [check]:192) - Using transformer org.apache.xalan.transformer.TransformerIdentityImpl 
2015-04-30 11:15:38,644 [main] INFO  (JettyStart.java [lifeCycleStarted]:421) - Jetty server started. 
2015-04-30 11:15:38,646 [main] INFO  (JettyStart.java [run]:233) - ----------------------------------------------------- 
2015-04-30 11:15:38,647 [main] INFO  (JettyStart.java [run]:234) - Server has started on ports 8080 8443. Configured contexts: 
2015-04-30 11:15:38,647 [main] INFO  (JettyStart.java [run]:243) - '/exist' 
2015-04-30 11:15:38,648 [main] INFO  (JettyStart.java [run]:281) - ----------------------------------------------------- 

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Alexander Henket | 30 Apr 12:23 2015
Picon
Picon

Search / Lucene OR syntax question

eXist 2.2:

This may be easy as can be, but somehow cannot figure it out:

I'm trying to find a matching element in a collection of XML based on the longest partial match of a string. The search term is equal or longer than the XML terms. The XML term should match "starts-with". The shortest way to say what I want is "$get:colDecorData//baseId[ <at> prefix][starts-with($oid, <at> id)]" but that doesn't perform well at all although I have a new range index.

So I thought of tokenizing the search term which is an OID like '2.16.840.1.113883.2.4.3.11.60.90.77.2.3.4'. So you get an array like '2', '2.16', '2.16.840' etc. However "$get:colDecorData//baseId[ <at> prefix][ <at> id=$oidparts]" doesn't perform well either.

Next thought was Lucene, but cannot get OR logic to work and thus I never get any matches. Example of what should match:
<baseId id="2.16.840.1.113883.2.4.3.11.60.90.77.2" type="DE" prefix="peri-dataelement-"/>

What am I missing, or: how does OR logic work with Lucene?

The code:

let $oid                := '2.16.840.1.113883.2.4.3.11.60.90.77.2.3.4'
let $query            :=
    <query>{
        let $oidt       := tokenize($oid,'\.')
       
        for $i in (1 to count($oidt))
        return <term>{string-join($oidt[position()<=$i],'.')}</term>
    }</query>
let $options            :=
    <options>
        <default-operator>or</default-operator>
        <phrase-slop>0</phrase-slop>
        <leading-wildcard>no</leading-wildcard>
        <filter-rewrite>yes</filter-rewrite>
    </options>
let $baseIds    := for $id in $get:colDecorData//baseId[ <at> prefix][ft:query( <at> id, $query, $options)]
                   order by string-length($id/ <at> id) descending
                   return $id

return
<x><result>{$baseIds[1]}</result>{$query, $options, $get:colDecorData//baseId[ <at> prefix]}</x>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Andreas Jung | 30 Apr 09:50 2015

Clean existdb shutdown with Docker?

Hi there,

I am running existdb 2.2 within a Docker container.

Right now I have no option for shutting down an exist-db container
in a clean way.

By default "docker kill <container>" will send SIGKILL and existdb immediately 
shuts down leaving all lock files in place (which is OK with SIGKILL).

Trying to kill the container using

docker kill --signal=TERM <container>

has no effect (also not with the HUP signal).

Exist-DB itself is started inside the container using 

bin/startup.sh

Any idea how to get a more graceful shutdown of ExistDB
in such a Docker context?

Andreas

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Ivan Lagunov | 30 Apr 00:05 2015
Picon

Preserving session between requests/page reloads

Hi,

I'd like to persist some string values in a session. Specifically, I'd like to set a session attribute in one request and to load it later in another one. However, it does not work for me. Finally I've ended up with a simple XQuery to check if the session is retained:

<session>
<id>{
session:get-id()
}</id><time>{
session:get-creation-time()
}</time>
</session>

Surprisingly, the session ID and the creation time differ on each request (page reload):
<session>
<id>e122dy9w5uwx1mi3zez5ld4sn</id>
<time>2015-04-29T21:52:51.905Z</time>
</session>

<session>
<id>odi234s20cvy1pe3tfr78r4a2</id>
<time>2015-04-29T21:53:02.248Z</time>
</session>

Maybe I do not understand how it's supposed to work. Could anyone clarify this? How can I retain the session and its attributes between requests?

Best regards,
Ivan Lagunov
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Chris Tomlinson | 27 Apr 23:28 2015
Picon

unable to get monex to work in servlet container

Hello,

I’ve returned to the task of trying to migrate from a pre-2.2 (2.2RC2’ish) to eXist-db 2.2, and remain stymied by a class loading problem.

Environment: Mac OS 10.10.3; java 1.8.0_45; Tomcat 8.0.12; eXist version:

  eXist-2.2-master-97bbbdd

When I build and run standalone (./bin/startup.sh) on a virgin database and open the dashboard >> package manager and install MonEx, I then can successfully launch MonEx.

However, when I ./build.sh dist-war and deploy in tomcat on a virgin database and open the dashboard >> package manager and install monex and then launch monex I get the following resutl:

  <exception>
    <path>/db/apps/monex/modules/view.xql</path>
    <message>
      exerr:ERROR error found while loading module app: Error while loading module app.xql: error found while loading module console: Cannot find module class from EXPath repository: org.exist.console.xquery.ConsoleModule
    </message>
  </exception>

I’ve verified that the monex is present in data/expathrepo as expected and that the ConsoleModule is in the exist-monex-0.6.jar in the /db/apps/monex/contents and so on.

The repair:… functions don’t help and would seem to be superfluous any way since this is a fresh clean install.

I’ve tried installing MonEx and restarting the tomcat + db to no avail. I’ve tried running the repair functions at various points to no avail. 

I’ve enabled debug level logging everywhere and there’s nothing in the exist.log or any of the tomcat logs.

I’ve tried cp’ing exist-monex-0.6.jar to WEB-INF/lib but that produces a severe error and the database will not start:

27-Apr-2015 15:34:05.119 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /usr/local/indium/exist/apache-tomcat-8.0.12/webapps/exist.war
27-Apr-2015 15:34:11.604 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 
 org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/exist]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)

With the removal of exist/admin we really need the MonEx functionality on the production system.

Thanks,
Chris
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Peter Stadler | 24 Apr 20:07 2015
Picon

optimizer(?) error


Hi all,

pulled the latest changes from GitHub today and did a clean new build
(running on Ubuntu 14.04). Some queries do not work anymore and it
boils down to collection calls wrapped in a function like so:

declare function local:collection($path as xs:string) {
    collection($path)
};
local:collection('/db/apps/shakespeare')[tei:TEI]

The error I get is "exerr:ERROR cannot convert
xs:string('/db/apps/shakespeare') to a node set"

Am I doing something wrong?

Best
Peter
Andreas Jung | 24 Apr 08:41 2015

DATA_DIR: /data/exist/dbx_dir.lck is running out of disk space. Switching eXist-db to read only to prevent data loss!

Hi there,

we are running exist 2.2 within a Docker container, data directory mounted from the local filesystem.

I tried to restart existdb this morning however it complains:

2015-04-24 06:36:15,793 [DefaultQuartzScheduler_Worker-4] FATAL (BrokerPool.java [isReadOnly]:1334) - Partition containing DATA_DIR: /data/exist/dbx_dir.lck is running out of disk space. Switching eXist-db to read only to prevent data loss! 
2015-04-24 06:36:15,794 [DefaultQuartzScheduler_Worker-4] INFO  (BrokerPool.java [setReadOnly]:1343) - Switching to read-only mode!!! 


However the message about out of disk space is completely wrong:

exist <at> a3d6b9f32a97:/opt/exist$ df -h /data/exist/
Filesystem                                              Size  Used Avail Use% Mounted on
/dev/disk/by-uuid/32af31df-b6b9-4dfc-b0f1-cc43ce28581e  305G   63G  226G  22% /data/exist


How can I get exist-db again up and running?

Andreas
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Immanuel Normann | 23 Apr 16:31 2015
Picon

logout - security issue

Hi,

may be I just don't understand how to implent logout in existdb correctly, but I don't see secure solution.

What I learned so far is that there is no dedicated logout function. The o'Reilly eXist book advises to use one of these functions for that purpose:

- session:remove-attribute("_eXist_xmldb_user")
- session:clear()
- session:invalidate()

A different solution I came accross is to change the logged in user with session:set-current-user or xmldb:login (btw, surprisingly many different approaches for an appearently simple task).

Yet, all these "solutions" are not real solutions the way I would expect (may be I didn't apply them correctly). My problem is: Well, I can invalidate a session or change the current user. But when I return to the page that I visited before logging out I am again logged in a new session without authentification. I would expect, though, that a new authentification would be required after this "logout". This is a security issue in my opinion.

To make a concrete and very simple case, consider two user "ernie" and "bert" being member of the group "sesamstreet". I have two xqueries "info.xql" and "logout.xql" both beeing executable for members of the group "sesamstreet", but not for the rest of the world.

So when I access "info.xql" for the first time I have to login. Let's say I login as "ernie". Then I push the logout button which eventually requests "logout.xql". Now, I observe that the session id remained the same, whereas the user changed to "bert". So far it behaves as I would expect. But now when I request "info.xql" again I am no longer "bert" but "ernie" again even though the session id has changed! I would expect to be now "bert", though. What is going on here behind the scenes?

Cheers,
Immanuel

8<-----------8<-----------8<-----------8<-----------

info.xql:

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Info</title>
    </head>
    <body>
        <div>session id: {session:get-id()}</div>
        <div>account: {session:get-attribute("_eXist_xmldb_user")}</div>
        <form action="logout.xql">
            <button type="submit">logout</button>
        </form>
    </body>
</html>



logout.xql:

let $user := "bert"
let $login := xmldb:login("/db/howto/login",$user,$user,true())
return
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>bye</title>
    </head>
    <body>
        bye! <br/> logged in as {$user || "? " || $login}
        <div>session id: {session:get-id()}</div>
        <div>account: {session:get-attribute("_eXist_xmldb_user")}{session:invalidate()}</div>
        <a href="info.xql">back?</a>
    </body>
</html>


P.S.: Btw. this email is an almost identical copy of an earlier email I sent two wheeks ago as comment to the thread "How can i logout from xmldb?". Since nobody replied on that I opened this new thread.
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open

Gmane