problem accessing resources

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

problem accessing resources

Pietro Liuzzo-2

Dear all,

I have removed my exist 2.2 and replaced it with exist 3.1. It is behind a nginx proxy on a Linux 3.13.0-110-generic amd64 operating system.

I had backed up my apps in .xar files from exide and then I imported them in the new installation with the package manager. I also have a zip backup of the apps from exist 2.2.

For some of my collections all goes as before, but some others report the error below. 

In the console all goes nicely and the functions return what they should.

Any suggestion on how to see what is wrong here?

thanks a lot

Pietro


Problem accessing /exist/apps/BetMas/manuscripts. Reason:

    Server Error

Caused by:

javax.servlet.ServletException: An error occurred while processing request to /exist/apps/BetMas/manuscripts: An unknown error occurred: null
	at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
	at de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:524)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:745)
Caused by: javax.servlet.ServletException: An unknown error occurred: null
	at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
	at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
	at org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
	at org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
	at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
	... 30 more
Caused by: java.lang.NullPointerException

Caused by:

javax.servlet.ServletException: An unknown error occurred: null
	at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
	at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
	at org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
	at org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
	at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
	at de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:524)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException

Caused by:

java.lang.NullPointerException

Powered by Jetty:// 9.3.9.v20160517

--
Hiob Ludolf Centre for Ethiopian Studies
Room: 136
Alsterterrasse 1
20354 Hamburg
Tel: +49 40 42838-8381

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Fwd: problem accessing resources

Pietro Liuzzo

---------- Forwarded message ----------
From: Pietro Liuzzo <[hidden email]>
Date: 2017-03-21 10:49 GMT+01:00
Subject: problem accessing resources
To: eXist-open ML <[hidden email]>


Dear all,

I have removed my exist 2.2 and replaced it with exist 3.1. It is behind a nginx proxy on a Linux 3.13.0-110-generic amd64 operating system.

I had backed up my apps in .xar files from exide and then I imported them in the new installation with the package manager. I also have a zip backup of the apps from exist 2.2.

For some of my collections all goes as before, but some others report the error below. 

In the console all goes nicely and the functions return what they should.

Any suggestion on how to see what is wrong here?

thanks a lot

Pietro


Problem accessing /exist/apps/BetMas/manuscripts. Reason:

    Server Error

Caused by:

javax.servlet.ServletException: An error occurred while processing request to /exist/apps/BetMas/manuscripts: An unknown error occurred: null
	at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:<a href="tel:1689" value="+491689" target="_blank">1689)
	at de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:524)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:745)
Caused by: javax.servlet.ServletException: An unknown error occurred: null
	at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
	at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
	at org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
	at org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
	at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
	... 30 more
Caused by: java.lang.NullPointerException

Caused by:

javax.servlet.ServletException: An unknown error occurred: null
	at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
	at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
	at org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
	at org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
	at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
	at de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:524)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException

Caused by:

java.lang.NullPointerException

Powered by Jetty:// 9.3.9.v20160517

--
Hiob Ludolf Centre for Ethiopian Studies
Room: 136
Alsterterrasse 1
20354 Hamburg
Tel: <a href="tel:040%20428388381" value="+4940428388381" target="_blank">+49 40 42838-8381



--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: problem accessing resources

wsalesky
I also had this error when migrating to 3.0. I found in my case it was caused by my XSLT stylesheets not using the full 'xmldb:exist://' path when using fn:doc() to processes internal xml files. 

ex:

<xsl:value-of select="concat($data-root,'/bibl/tei/28.xml')"/>

had to be changed to:

<xsl:value-of select="concat('xmldb:exist://',$data-root,'/bibl/tei/28.xml')"/>

-Winona





On Tue, Mar 21, 2017 at 4:55 PM, Pietro Liuzzo <[hidden email]> wrote:

---------- Forwarded message ----------
From: Pietro Liuzzo <[hidden email]>
Date: 2017-03-21 10:49 GMT+01:00
Subject: problem accessing resources
To: eXist-open ML <[hidden email]>


Dear all,

I have removed my exist 2.2 and replaced it with exist 3.1. It is behind a nginx proxy on a Linux 3.13.0-110-generic amd64 operating system.

I had backed up my apps in .xar files from exide and then I imported them in the new installation with the package manager. I also have a zip backup of the apps from exist 2.2.

For some of my collections all goes as before, but some others report the error below. 

In the console all goes nicely and the functions return what they should.

Any suggestion on how to see what is wrong here?

thanks a lot

Pietro


Problem accessing /exist/apps/BetMas/manuscripts. Reason:

    Server Error

Caused by:

javax.servlet.ServletException: An error occurred while processing request to /exist/apps/BetMas/manuscripts: An unknown error occurred: null
	at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:<a href="tel:1689" value="+491689" target="_blank">1689)
	at de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:524)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:745)
Caused by: javax.servlet.ServletException: An unknown error occurred: null
	at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
	at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
	at org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
	at org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
	at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
	... 30 more
Caused by: java.lang.NullPointerException

Caused by:

javax.servlet.ServletException: An unknown error occurred: null
	at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
	at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
	at org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
	at org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
	at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
	at de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:524)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException

Caused by:

java.lang.NullPointerException

Powered by Jetty:// 9.3.9.v20160517

--
Hiob Ludolf Centre for Ethiopian Studies
Room: 136
Alsterterrasse 1
20354 Hamburg
Tel: <a href="tel:040%20428388381" value="+4940428388381" target="_blank">+49 40 42838-8381



--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: problem accessing resources

Joe Wicentowski
In reply to this post by Pietro Liuzzo
Hi Pietro,

Winona's idea sounds promising.

Failing that, do you see anything corresponding to this error in exist.log?

Are you using controller.xql or restxq to handle these requests that
generate errors?  Is the source to those files available for us to
see?

Joe

On Tue, Mar 21, 2017 at 4:55 PM, Pietro Liuzzo <[hidden email]> wrote:

>
> ---------- Forwarded message ----------
> From: Pietro Liuzzo <[hidden email]>
> Date: 2017-03-21 10:49 GMT+01:00
> Subject: problem accessing resources
> To: eXist-open ML <[hidden email]>
>
>
> Dear all,
>
> I have removed my exist 2.2 and replaced it with exist 3.1. It is behind a
> nginx proxy on a Linux 3.13.0-110-generic amd64 operating system.
>
> I had backed up my apps in .xar files from exide and then I imported them in
> the new installation with the package manager. I also have a zip backup of
> the apps from exist 2.2.
>
> For some of my collections all goes as before, but some others report the
> error below.
>
> In the console all goes nicely and the functions return what they should.
>
> Any suggestion on how to see what is wrong here?
>
> thanks a lot
>
> Pietro
>
>
> Problem accessing /exist/apps/BetMas/manuscripts. Reason:
>
>     Server Error
>
> Caused by:
>
> javax.servlet.ServletException: An error occurred while processing request
> to /exist/apps/BetMas/manuscripts: An unknown error occurred: null
> at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
> at
> de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
> at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
> at
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
> at org.eclipse.jetty.server.Server.handle(Server.java:524)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
> at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
> at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
> at
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
> at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
> at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
> at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.servlet.ServletException: An unknown error occurred: null
> at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
> at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
> at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
> at
> org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
> at
> org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
> at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
> ... 30 more
> Caused by: java.lang.NullPointerException
>
> Caused by:
>
> javax.servlet.ServletException: An unknown error occurred: null
> at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
> at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
> at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
> at
> org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
> at
> org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
> at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
> at
> de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
> at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
> at
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
> at org.eclipse.jetty.server.Server.handle(Server.java:524)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
> at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
> at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
> at
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
> at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
> at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
> at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NullPointerException
>
> Caused by:
>
> java.lang.NullPointerException
>
> ________________________________
> Powered by Jetty:// 9.3.9.v20160517
>
> --
> Hiob Ludolf Centre for Ethiopian Studies
> Room: 136
> Alsterterrasse 1
> 20354 Hamburg
> Tel: +49 40 42838-8381
>
>
>
> --
> Pietro Maria Liuzzo
> cel (DE): +49 (0) 176 61 000 606
> Skype: pietro.liuzzo (Quingentole)
> https://uk.linkedin.com/in/pietroliuzzo
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: problem accessing resources

Pietro Liuzzo
Thanks a lot for the replies!

I have this in a XQuery file producing a list of items. This used to work in 2.2 without problems. 

I use both controller and restxq. I have not figured out how I can use only restxq and benefit from the template structure which is very useful. The app is built around controller.xql, but I load few things with ajax calls to restxq. I am very happy to hear suggestions on how to improve this.

indeed I found that removing the following query, which worked fine before, I get something and the error is not shown.

let $doc := doc($item/@uri)

  if ($doc//t:div[@type = 'edition']) then
                    <a
                        href="{('/text/' || $item/@id)}"
                        target="_blank">{
                        switch ($app:collection)
                                case 'manuscripts'
                                    return
                                        'transcription'
                                case 'works'
                                    return
                                        'edition'
                                default return
                                    'text'
                    }</a>
            else
                ()


$item is a temporary xml element with the base uri of a retrieved resource in @uri. Unfortunately changing the doc function to add 'xmldb:exist://' did not improve the situation.

But this is just an example and I cannot remove all if statements...

In exist.log I can see that the following message is recorded (looks to me the same as the one shown by the app).


Thanks a lot!

Pietro



2017-03-21 22:45:02,489 [qtp388436342-75] ERROR (EXistServlet.java [doPost]:459) - java.lang.NullPointerException

2017-03-21 22:45:02,491 [qtp388436342-75] WARN  (ServletHandler.java [doHandle]:623) -

javax.servlet.ServletException: An error occurred while processing request to /exist/apps/BetMas/works: An unknown error occurred: null

        at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378) ~[exist-optional.jar:3.1.0]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[servlet-api-3.1.jar:3.1.0]

        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]

        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) [jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) [jetty-security-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) [jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.Server.handle(Server.java:524) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]

Caused by: javax.servlet.ServletException: An unknown error occurred: null

        at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460) ~[exist-optional.jar:3.1.0]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) ~[servlet-api-3.1.jar:3.1.0]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[servlet-api-3.1.jar:3.1.0]

        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) ~[jetty-security-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50) ~[exist-optional.jar:3.1.0]

        at org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545) ~[exist-optional.jar:3.1.0]

        at org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410) ~[exist-optional.jar:3.1.0]

        at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356) ~[exist-optional.jar:3.1.0]

        ... 30 more

Caused by: java.lang.NullPointerException


 

2017-03-21 22:13 GMT+01:00 Joe Wicentowski <[hidden email]>:
Hi Pietro,

Winona's idea sounds promising.

Failing that, do you see anything corresponding to this error in exist.log?

Are you using controller.xql or restxq to handle these requests that
generate errors?  Is the source to those files available for us to
see?

Joe

On Tue, Mar 21, 2017 at 4:55 PM, Pietro Liuzzo <[hidden email]> wrote:
>
> ---------- Forwarded message ----------
> From: Pietro Liuzzo <[hidden email]>
> Date: 2017-03-21 10:49 GMT+01:00
> Subject: problem accessing resources
> To: eXist-open ML <[hidden email]>
>
>
> Dear all,
>
> I have removed my exist 2.2 and replaced it with exist 3.1. It is behind a
> nginx proxy on a Linux 3.13.0-110-generic amd64 operating system.
>
> I had backed up my apps in .xar files from exide and then I imported them in
> the new installation with the package manager. I also have a zip backup of
> the apps from exist 2.2.
>
> For some of my collections all goes as before, but some others report the
> error below.
>
> In the console all goes nicely and the functions return what they should.
>
> Any suggestion on how to see what is wrong here?
>
> thanks a lot
>
> Pietro
>
>
> Problem accessing /exist/apps/BetMas/manuscripts. Reason:
>
>     Server Error
>
> Caused by:
>
> javax.servlet.ServletException: An error occurred while processing request
> to /exist/apps/BetMas/manuscripts: An unknown error occurred: null
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
>       at
> de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
>       at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
>       at
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
>       at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
>       at org.eclipse.jetty.server.Server.handle(Server.java:524)
>       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
>       at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
>       at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
>       at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
>       at
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.servlet.ServletException: An unknown error occurred: null
>       at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
>       at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
>       ... 30 more
> Caused by: java.lang.NullPointerException
>
> Caused by:
>
> javax.servlet.ServletException: An unknown error occurred: null
>       at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
>       at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
>       at
> de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
>       at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
>       at
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
>       at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
>       at org.eclipse.jetty.server.Server.handle(Server.java:524)
>       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
>       at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
>       at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
>       at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
>       at
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NullPointerException
>
> Caused by:
>
> java.lang.NullPointerException
>
> ________________________________
> Powered by Jetty:// 9.3.9.v20160517
>
> --
> Hiob Ludolf Centre for Ethiopian Studies
> Room: 136
> Alsterterrasse 1
> 20354 Hamburg
> Tel: +49 40 42838-8381
>
>
>
> --
> Pietro Maria Liuzzo
> cel (DE): +49 (0) 176 61 000 606
> Skype: pietro.liuzzo (Quingentole)
> https://uk.linkedin.com/in/pietroliuzzo
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>



--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: problem accessing resources

Joe Wicentowski
Hi Pietro,

Any chance changing this:

   if ($doc//t:div[@type = 'edition']) 

... to this:

   if (exists($doc//t:div[@type = 'edition']))

... helps?

Joe 

On Tue, Mar 21, 2017 at 5:49 PM Pietro Liuzzo <[hidden email]> wrote:
Thanks a lot for the replies!

I have this in a XQuery file producing a list of items. This used to work in 2.2 without problems. 

I use both controller and restxq. I have not figured out how I can use only restxq and benefit from the template structure which is very useful. The app is built around controller.xql, but I load few things with ajax calls to restxq. I am very happy to hear suggestions on how to improve this.

indeed I found that removing the following query, which worked fine before, I get something and the error is not shown.

let $doc := doc($item/@uri)

  if ($doc//t:div[@type = 'edition']) then
                    <a
                        href="{('/text/' || $item/@id)}"
                        target="_blank">{
                        switch ($app:collection)
                                case 'manuscripts'
                                    return
                                        'transcription'
                                case 'works'
                                    return
                                        'edition'
                                default return
                                    'text'
                    }</a>
            else
                ()


$item is a temporary xml element with the base uri of a retrieved resource in @uri. Unfortunately changing the doc function to add 'xmldb:exist://' did not improve the situation.

But this is just an example and I cannot remove all if statements...

In exist.log I can see that the following message is recorded (looks to me the same as the one shown by the app).


Thanks a lot!

Pietro



2017-03-21 22:45:02,489 [qtp388436342-75] ERROR (EXistServlet.java [doPost]:459) - java.lang.NullPointerException

2017-03-21 22:45:02,491 [qtp388436342-75] WARN  (ServletHandler.java [doHandle]:623) -

javax.servlet.ServletException: An error occurred while processing request to /exist/apps/BetMas/works: An unknown error occurred: null

        at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378) ~[exist-optional.jar:3.1.0]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[servlet-api-3.1.jar:3.1.0]

        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]

        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) [jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) [jetty-security-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) [jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.Server.handle(Server.java:524) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]

Caused by: javax.servlet.ServletException: An unknown error occurred: null

        at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460) ~[exist-optional.jar:3.1.0]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) ~[servlet-api-3.1.jar:3.1.0]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[servlet-api-3.1.jar:3.1.0]

        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) ~[jetty-security-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50) ~[exist-optional.jar:3.1.0]

        at org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545) ~[exist-optional.jar:3.1.0]

        at org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410) ~[exist-optional.jar:3.1.0]

        at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356) ~[exist-optional.jar:3.1.0]

        ... 30 more

Caused by: java.lang.NullPointerException


2017-03-21 22:13 GMT+01:00 Joe Wicentowski <[hidden email]>:
Hi Pietro,

Winona's idea sounds promising.

Failing that, do you see anything corresponding to this error in exist.log?

Are you using controller.xql or restxq to handle these requests that
generate errors?  Is the source to those files available for us to
see?

Joe

On Tue, Mar 21, 2017 at 4:55 PM, Pietro Liuzzo <[hidden email]> wrote:
>
> ---------- Forwarded message ----------
> From: Pietro Liuzzo <[hidden email]>
> Date: 2017-03-21 10:49 GMT+01:00
> Subject: problem accessing resources
> To: eXist-open ML <[hidden email]>
>
>
> Dear all,
>
> I have removed my exist 2.2 and replaced it with exist 3.1. It is behind a
> nginx proxy on a Linux 3.13.0-110-generic amd64 operating system.
>
> I had backed up my apps in .xar files from exide and then I imported them in
> the new installation with the package manager. I also have a zip backup of
> the apps from exist 2.2.
>
> For some of my collections all goes as before, but some others report the
> error below.
>
> In the console all goes nicely and the functions return what they should.
>
> Any suggestion on how to see what is wrong here?
>
> thanks a lot
>
> Pietro
>
>
> Problem accessing /exist/apps/BetMas/manuscripts. Reason:
>
>     Server Error
>
> Caused by:
>
> javax.servlet.ServletException: An error occurred while processing request
> to /exist/apps/BetMas/manuscripts: An unknown error occurred: null
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
>       at
> de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
>       at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
>       at
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
>       at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
>       at org.eclipse.jetty.server.Server.handle(Server.java:524)
>       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
>       at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
>       at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
>       at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
>       at
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.servlet.ServletException: An unknown error occurred: null
>       at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
>       at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
>       ... 30 more
> Caused by: java.lang.NullPointerException
>
> Caused by:
>
> javax.servlet.ServletException: An unknown error occurred: null
>       at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
>       at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
>       at
> de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
>       at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
>       at
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
>       at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
>       at org.eclipse.jetty.server.Server.handle(Server.java:524)
>       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
>       at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
>       at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
>       at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
>       at
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NullPointerException
>
> Caused by:
>
> java.lang.NullPointerException
>
> ________________________________
> Powered by Jetty:// 9.3.9.v20160517
>
> --
> Hiob Ludolf Centre for Ethiopian Studies
> Room: 136
> Alsterterrasse 1
> 20354 Hamburg
> Tel: +49 40 42838-8381
>
>
>
> --
> Pietro Maria Liuzzo
> cel (DE): +49 (0) 176 61 000 606
> Skype: pietro.liuzzo (Quingentole)
> https://uk.linkedin.com/in/pietroliuzzo
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>



--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)
--
Sent from my iPhone

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: problem accessing resources

Joe Wicentowski
Hi Pietro,

Stepping back, are you sure this conditional block is the triggering the error? I'd test by replacing the conditional with a hard coded element - to see if it's really the conditional or not.

Can you develop a reproducible test that produces this error on 3.0? I think that may be the best route. We shouldn't be getting NPEs, so even if you "fixed" your app there is some underlying error condition that needs to be caught and handled without raising an NPE.

Joe

On Tue, Mar 21, 2017 at 5:59 PM Pietro Liuzzo <[hidden email]> wrote:
yes, I had tried this one as well, with no luck. 
Not sure it helps, but if I run it from oXygen using exists() it works.

2017-03-21 22:54 GMT+01:00 Joe Wicentowski <[hidden email]>:
Hi Pietro,

Any chance changing this:

   if ($doc//t:div[@type = 'edition']) 

... to this:

   if (exists($doc//t:div[@type = 'edition']))

... helps?

Joe 

On Tue, Mar 21, 2017 at 5:49 PM Pietro Liuzzo <[hidden email]> wrote:
Thanks a lot for the replies!

I have this in a XQuery file producing a list of items. This used to work in 2.2 without problems. 

I use both controller and restxq. I have not figured out how I can use only restxq and benefit from the template structure which is very useful. The app is built around controller.xql, but I load few things with ajax calls to restxq. I am very happy to hear suggestions on how to improve this.

indeed I found that removing the following query, which worked fine before, I get something and the error is not shown.

let $doc := doc($item/@uri)

  if ($doc//t:div[@type = 'edition']) then
                    <a
                        href="{('/text/' || $item/@id)}"
                        target="_blank">{
                        switch ($app:collection)
                                case 'manuscripts'
                                    return
                                        'transcription'
                                case 'works'
                                    return
                                        'edition'
                                default return
                                    'text'
                    }</a>
            else
                ()


$item is a temporary xml element with the base uri of a retrieved resource in @uri. Unfortunately changing the doc function to add 'xmldb:exist://' did not improve the situation.

But this is just an example and I cannot remove all if statements...

In exist.log I can see that the following message is recorded (looks to me the same as the one shown by the app).


Thanks a lot!

Pietro



2017-03-21 22:45:02,489 [qtp388436342-75] ERROR (EXistServlet.java [doPost]:459) - java.lang.NullPointerException

2017-03-21 22:45:02,491 [qtp388436342-75] WARN  (ServletHandler.java [doHandle]:623) -

javax.servlet.ServletException: An error occurred while processing request to /exist/apps/BetMas/works: An unknown error occurred: null

        at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378) ~[exist-optional.jar:3.1.0]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[servlet-api-3.1.jar:3.1.0]

        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:<a href="tel:1689" value="+491689" class="gmail_msg" target="_blank">1689) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]

        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) [jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) [jetty-security-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) [jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.Server.handle(Server.java:524) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]

Caused by: javax.servlet.ServletException: An unknown error occurred: null

        at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460) ~[exist-optional.jar:3.1.0]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) ~[servlet-api-3.1.jar:3.1.0]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[servlet-api-3.1.jar:3.1.0]

        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) ~[jetty-security-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50) ~[exist-optional.jar:3.1.0]

        at org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545) ~[exist-optional.jar:3.1.0]

        at org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410) ~[exist-optional.jar:3.1.0]

        at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356) ~[exist-optional.jar:3.1.0]

        ... 30 more

Caused by: java.lang.NullPointerException


2017-03-21 22:13 GMT+01:00 Joe Wicentowski <[hidden email]>:
Hi Pietro,

Winona's idea sounds promising.

Failing that, do you see anything corresponding to this error in exist.log?

Are you using controller.xql or restxq to handle these requests that
generate errors?  Is the source to those files available for us to
see?

Joe

On Tue, Mar 21, 2017 at 4:55 PM, Pietro Liuzzo <[hidden email]> wrote:
>
> ---------- Forwarded message ----------
> From: Pietro Liuzzo <[hidden email]>
> Date: 2017-03-21 10:49 GMT+01:00
> Subject: problem accessing resources
> To: eXist-open ML <[hidden email]>
>
>
> Dear all,
>
> I have removed my exist 2.2 and replaced it with exist 3.1. It is behind a
> nginx proxy on a Linux 3.13.0-110-generic amd64 operating system.
>
> I had backed up my apps in .xar files from exide and then I imported them in
> the new installation with the package manager. I also have a zip backup of
> the apps from exist 2.2.
>
> For some of my collections all goes as before, but some others report the
> error below.
>
> In the console all goes nicely and the functions return what they should.
>
> Any suggestion on how to see what is wrong here?
>
> thanks a lot
>
> Pietro
>
>
> Problem accessing /exist/apps/BetMas/manuscripts. Reason:
>
>     Server Error
>
> Caused by:
>
> javax.servlet.ServletException: An error occurred while processing request
> to /exist/apps/BetMas/manuscripts: An unknown error occurred: null
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:<a href="tel:1689" value="+491689" class="gmail_msg" target="_blank">1689)
>       at
> de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
>       at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
>       at
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
>       at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
>       at org.eclipse.jetty.server.Server.handle(Server.java:524)
>       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
>       at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
>       at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
>       at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
>       at
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.servlet.ServletException: An unknown error occurred: null
>       at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
>       at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
>       ... 30 more
> Caused by: java.lang.NullPointerException
>
> Caused by:
>
> javax.servlet.ServletException: An unknown error occurred: null
>       at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
>       at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:<a href="tel:1689" value="+491689" class="gmail_msg" target="_blank">1689)
>       at
> de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
>       at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
>       at
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
>       at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
>       at org.eclipse.jetty.server.Server.handle(Server.java:524)
>       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
>       at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
>       at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
>       at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
>       at
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NullPointerException
>
> Caused by:
>
> java.lang.NullPointerException
>
> ________________________________
> Powered by Jetty:// 9.3.9.v20160517
>
> --
> Hiob Ludolf Centre for Ethiopian Studies
> Room: 136
> Alsterterrasse 1
> 20354 Hamburg
> Tel: <a href="tel:040%20428388381" value="+4940428388381" class="gmail_msg" target="_blank">+49 40 42838-8381
>
>
>
> --
> Pietro Maria Liuzzo
> cel (DE): +49 (0) 176 61 000 606
> Skype: pietro.liuzzo (Quingentole)
> https://uk.linkedin.com/in/pietroliuzzo
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>



--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)
--
Sent from my iPhone



--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)
--
Sent from my iPhone

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: problem accessing resources

Pietro Liuzzo
I probably found the problem. 

I had in my app range index definitions like this:

<create qname="tei:title" type="xs:string"/>

 <create qname="tei:title">
                <field name="lang" match="@xml:lang" type="xs:string"/>
                <field name="type" match="@type" type="xs:string"/>
                <field name="corresp" match="@corresp" type="xs:string"/>
                <field name="id" match="@xml:id" type="xs:string"/>
                <field name="ref" match="@ref" type="xs:string"/>
            </create>

<create qname="tei:div" type="xs:string"/>
           
<create qname="tei:div" type="xs:string">
                <field name="lang" match="@xml:lang" type="xs:string"/>
                <field name="type" match="@type" type="xs:string"/>
                <field name="corresp" match="@corresp" type="xs:string"/>
                <field name="id" match="@xml:id" type="xs:string"/>
                <field name="ref" match="@ref" type="xs:string"/>
            </create>

removing those with fields the app is back to working normally. As said this did not give any error in 2.2. 

Did I misunderstand something of how these combined indexes should work?

I intended them to speed up frequent query like the one in the example above div[@type='edition'] or title[@lang='ar'][@corresp='#t']

thanks a lot for your continued support!






2017-03-21 23:08 GMT+01:00 Joe Wicentowski <[hidden email]>:
Hi Pietro,

Stepping back, are you sure this conditional block is the triggering the error? I'd test by replacing the conditional with a hard coded element - to see if it's really the conditional or not.

Can you develop a reproducible test that produces this error on 3.0? I think that may be the best route. We shouldn't be getting NPEs, so even if you "fixed" your app there is some underlying error condition that needs to be caught and handled without raising an NPE.

Joe

On Tue, Mar 21, 2017 at 5:59 PM Pietro Liuzzo <[hidden email]> wrote:
yes, I had tried this one as well, with no luck. 
Not sure it helps, but if I run it from oXygen using exists() it works.

2017-03-21 22:54 GMT+01:00 Joe Wicentowski <[hidden email]>:
Hi Pietro,

Any chance changing this:

   if ($doc//t:div[@type = 'edition']) 

... to this:

   if (exists($doc//t:div[@type = 'edition']))

... helps?

Joe 

On Tue, Mar 21, 2017 at 5:49 PM Pietro Liuzzo <[hidden email]> wrote:
Thanks a lot for the replies!

I have this in a XQuery file producing a list of items. This used to work in 2.2 without problems. 

I use both controller and restxq. I have not figured out how I can use only restxq and benefit from the template structure which is very useful. The app is built around controller.xql, but I load few things with ajax calls to restxq. I am very happy to hear suggestions on how to improve this.

indeed I found that removing the following query, which worked fine before, I get something and the error is not shown.

let $doc := doc($item/@uri)

  if ($doc//t:div[@type = 'edition']) then
                    <a
                        href="{('/text/' || $item/@id)}"
                        target="_blank">{
                        switch ($app:collection)
                                case 'manuscripts'
                                    return
                                        'transcription'
                                case 'works'
                                    return
                                        'edition'
                                default return
                                    'text'
                    }</a>
            else
                ()


$item is a temporary xml element with the base uri of a retrieved resource in @uri. Unfortunately changing the doc function to add 'xmldb:exist://' did not improve the situation.

But this is just an example and I cannot remove all if statements...

In exist.log I can see that the following message is recorded (looks to me the same as the one shown by the app).


Thanks a lot!

Pietro



2017-03-21 22:45:02,489 [qtp388436342-75] ERROR (EXistServlet.java [doPost]:459) - java.lang.NullPointerException

2017-03-21 22:45:02,491 [qtp388436342-75] WARN  (ServletHandler.java [doHandle]:623) -

javax.servlet.ServletException: An error occurred while processing request to /exist/apps/BetMas/works: An unknown error occurred: null

        at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378) ~[exist-optional.jar:3.1.0]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[servlet-api-3.1.jar:3.1.0]

        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:<a href="tel:1689" value="+491689" class="m_7371401435002915353gmail_msg" target="_blank">1689) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]

        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) [jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) [jetty-security-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) [jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.Server.handle(Server.java:524) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]

Caused by: javax.servlet.ServletException: An unknown error occurred: null

        at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460) ~[exist-optional.jar:3.1.0]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) ~[servlet-api-3.1.jar:3.1.0]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[servlet-api-3.1.jar:3.1.0]

        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) ~[jetty-security-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50) ~[exist-optional.jar:3.1.0]

        at org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545) ~[exist-optional.jar:3.1.0]

        at org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410) ~[exist-optional.jar:3.1.0]

        at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356) ~[exist-optional.jar:3.1.0]

        ... 30 more

Caused by: java.lang.NullPointerException


2017-03-21 22:13 GMT+01:00 Joe Wicentowski <[hidden email]>:
Hi Pietro,

Winona's idea sounds promising.

Failing that, do you see anything corresponding to this error in exist.log?

Are you using controller.xql or restxq to handle these requests that
generate errors?  Is the source to those files available for us to
see?

Joe

On Tue, Mar 21, 2017 at 4:55 PM, Pietro Liuzzo <[hidden email]> wrote:
>
> ---------- Forwarded message ----------
> From: Pietro Liuzzo <[hidden email]>
> Date: 2017-03-21 10:49 GMT+01:00
> Subject: problem accessing resources
> To: eXist-open ML <[hidden email]>
>
>
> Dear all,
>
> I have removed my exist 2.2 and replaced it with exist 3.1. It is behind a
> nginx proxy on a Linux 3.13.0-110-generic amd64 operating system.
>
> I had backed up my apps in .xar files from exide and then I imported them in
> the new installation with the package manager. I also have a zip backup of
> the apps from exist 2.2.
>
> For some of my collections all goes as before, but some others report the
> error below.
>
> In the console all goes nicely and the functions return what they should.
>
> Any suggestion on how to see what is wrong here?
>
> thanks a lot
>
> Pietro
>
>
> Problem accessing /exist/apps/BetMas/manuscripts. Reason:
>
>     Server Error
>
> Caused by:
>
> javax.servlet.ServletException: An error occurred while processing request
> to /exist/apps/BetMas/manuscripts: An unknown error occurred: null
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:<a href="tel:1689" value="+491689" class="m_7371401435002915353gmail_msg" target="_blank">1689)
>       at
> de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
>       at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
>       at
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
>       at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
>       at org.eclipse.jetty.server.Server.handle(Server.java:524)
>       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
>       at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
>       at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
>       at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
>       at
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.servlet.ServletException: An unknown error occurred: null
>       at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
>       at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
>       ... 30 more
> Caused by: java.lang.NullPointerException
>
> Caused by:
>
> javax.servlet.ServletException: An unknown error occurred: null
>       at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
>       at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:<a href="tel:1689" value="+491689" class="m_7371401435002915353gmail_msg" target="_blank">1689)
>       at
> de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
>       at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
>       at
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
>       at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
>       at org.eclipse.jetty.server.Server.handle(Server.java:524)
>       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
>       at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
>       at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
>       at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
>       at
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NullPointerException
>
> Caused by:
>
> java.lang.NullPointerException
>
> ________________________________
> Powered by Jetty:// 9.3.9.v20160517
>
> --
> Hiob Ludolf Centre for Ethiopian Studies
> Room: 136
> Alsterterrasse 1
> 20354 Hamburg
> Tel: <a href="tel:040%20428388381" value="+4940428388381" class="m_7371401435002915353gmail_msg" target="_blank">+49 40 42838-8381
>
>
>
> --
> Pietro Maria Liuzzo
> cel (DE): +49 (0) 176 61 000 606
> Skype: pietro.liuzzo (Quingentole)
> https://uk.linkedin.com/in/pietroliuzzo
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>



--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)
--
Sent from my iPhone



--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)
--
Sent from my iPhone



--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: problem accessing resources

Pietro Liuzzo
In reply to this post by wsalesky
This helped me solve another problem of this kind, thanks a lot!

2017-03-21 22:10 GMT+01:00 Winona Salesky <[hidden email]>:
I also had this error when migrating to 3.0. I found in my case it was caused by my XSLT stylesheets not using the full 'xmldb:exist://' path when using fn:doc() to processes internal xml files. 

ex:

<xsl:value-of select="concat($data-root,'/bibl/tei/28.xml')"/>

had to be changed to:

<xsl:value-of select="concat('xmldb:exist://',$data-root,'/bibl/tei/28.xml')"/>

-Winona





On Tue, Mar 21, 2017 at 4:55 PM, Pietro Liuzzo <[hidden email]> wrote:

---------- Forwarded message ----------
From: Pietro Liuzzo <[hidden email]>
Date: 2017-03-21 10:49 GMT+01:00
Subject: problem accessing resources
To: eXist-open ML <[hidden email]>


Dear all,

I have removed my exist 2.2 and replaced it with exist 3.1. It is behind a nginx proxy on a Linux 3.13.0-110-generic amd64 operating system.

I had backed up my apps in .xar files from exide and then I imported them in the new installation with the package manager. I also have a zip backup of the apps from exist 2.2.

For some of my collections all goes as before, but some others report the error below. 

In the console all goes nicely and the functions return what they should.

Any suggestion on how to see what is wrong here?

thanks a lot

Pietro


Problem accessing /exist/apps/BetMas/manuscripts. Reason:

    Server Error

Caused by:

javax.servlet.ServletException: An error occurred while processing request to /exist/apps/BetMas/manuscripts: An unknown error occurred: null
	at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:<a href="tel:1689" value="+491689" target="_blank">1689)
	at de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:524)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:745)
Caused by: javax.servlet.ServletException: An unknown error occurred: null
	at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
	at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
	at org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
	at org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
	at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
	... 30 more
Caused by: java.lang.NullPointerException

Caused by:

javax.servlet.ServletException: An unknown error occurred: null
	at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
	at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
	at org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
	at org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
	at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:<a href="tel:1689" value="+491689" target="_blank">1689)
	at de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:524)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException

Caused by:

java.lang.NullPointerException

Powered by Jetty:// 9.3.9.v20160517

--
Hiob Ludolf Centre for Ethiopian Studies
Room: 136
Alsterterrasse 1
20354 Hamburg
Tel: <a href="tel:040%20428388381" value="+4940428388381" target="_blank">+49 40 42838-8381



--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open





--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: problem accessing resources

Pietro Liuzzo
In reply to this post by Pietro Liuzzo
Dear all,

I still have this issue which I cannot solve. I am on exist 3.1.1 on linux 3.13.0-110-generic amd64 run as a service with yajws. 

I have tested through my rest function and in separate .xql and the problem only occurs for functions called with the templating. I think I am making a radical mistake somewhere...

my template calls a function app:items and a function app:list.

<div class="app:items">

<div class="app:list"/>

</div>

this are, minimized, like this

xquery version "3.0";

module namespace app="https://www.betamasaheft.uni-hamburg.de/BetMas/app";

declare namespace t="http://www.tei-c.org/ns/1.0";

declare function app:items($node as node()*, $model as map(*)) {
let $path := "collection('/db/apps/myapp/data/')"
let $hits := for $item in util:eval($path)
return $item
return map {'hits':=$hits}
}
;

declare
%templates:wrap %templates:default('start', 1) %templates:default("per-page", 20) 

function app:list($node as node()*, $model as map(*), $start as xs:integer, $per-page as xs:integer) {

     let $items-info := $model('hits')

 for $hit at $p in subsequence($items-info, $start, $per-page)

                                    return
                                    console:log($hit//t:title[@xml:id='t1'])

};


having the below mentioned indexes defined 

<create qname="tei:title" type="xs:string"/>

 <create qname="tei:title">
                <field name="lang" match="@xml:lang" type="xs:string"/>
                <field name="type" match="@type" type="xs:string"/>
                <field name="corresp" match="@corresp" type="xs:string"/>
                <field name="id" match="@xml:id" type="xs:string"/>
                <field name="ref" match="@ref" type="xs:string"/>
            </create>

which looks perfectly correct in monex indexes view, I would expect the console to return for the first 20 hits the title with xml:id = t1 as it does if I simply run a example.xql like the one below

xquery version "3.0";

declare namespace t="http://www.tei-c.org/ns/1.0";

for $hit at $p in subsequence(collection('/db/apps/myapp/data/'), 1, 20)
return $item//t:title[@xml:id='t1']

which nicely returns also 3000 records, not just twenty in less then a second. Instead I get simply 20 empty lines...

can anyone help me understand where is my mistake?

I am also a bit puzzled by the profiling app in Monex and the error reports, which sometimes seem to consider my functions as parts of view.xql (e.g. function at line 200 of view.xql, is actually at line 180 of app.xql).

thanks a lot!

Pietro



2017-03-22 6:43 GMT+01:00 Pietro Liuzzo <[hidden email]>:
I probably found the problem. 

I had in my app range index definitions like this:

<create qname="tei:title" type="xs:string"/>

 <create qname="tei:title">
                <field name="lang" match="@xml:lang" type="xs:string"/>
                <field name="type" match="@type" type="xs:string"/>
                <field name="corresp" match="@corresp" type="xs:string"/>
                <field name="id" match="@xml:id" type="xs:string"/>
                <field name="ref" match="@ref" type="xs:string"/>
            </create>

<create qname="tei:div" type="xs:string"/>
           
<create qname="tei:div" type="xs:string">
                <field name="lang" match="@xml:lang" type="xs:string"/>
                <field name="type" match="@type" type="xs:string"/>
                <field name="corresp" match="@corresp" type="xs:string"/>
                <field name="id" match="@xml:id" type="xs:string"/>
                <field name="ref" match="@ref" type="xs:string"/>
            </create>

removing those with fields the app is back to working normally. As said this did not give any error in 2.2. 

Did I misunderstand something of how these combined indexes should work?

I intended them to speed up frequent query like the one in the example above div[@type='edition'] or title[@lang='ar'][@corresp='#t']

thanks a lot for your continued support!






2017-03-21 23:08 GMT+01:00 Joe Wicentowski <[hidden email]>:
Hi Pietro,

Stepping back, are you sure this conditional block is the triggering the error? I'd test by replacing the conditional with a hard coded element - to see if it's really the conditional or not.

Can you develop a reproducible test that produces this error on 3.0? I think that may be the best route. We shouldn't be getting NPEs, so even if you "fixed" your app there is some underlying error condition that needs to be caught and handled without raising an NPE.

Joe

On Tue, Mar 21, 2017 at 5:59 PM Pietro Liuzzo <[hidden email]> wrote:
yes, I had tried this one as well, with no luck. 
Not sure it helps, but if I run it from oXygen using exists() it works.

2017-03-21 22:54 GMT+01:00 Joe Wicentowski <[hidden email]>:
Hi Pietro,

Any chance changing this:

   if ($doc//t:div[@type = 'edition']) 

... to this:

   if (exists($doc//t:div[@type = 'edition']))

... helps?

Joe 

On Tue, Mar 21, 2017 at 5:49 PM Pietro Liuzzo <[hidden email]> wrote:
Thanks a lot for the replies!

I have this in a XQuery file producing a list of items. This used to work in 2.2 without problems. 

I use both controller and restxq. I have not figured out how I can use only restxq and benefit from the template structure which is very useful. The app is built around controller.xql, but I load few things with ajax calls to restxq. I am very happy to hear suggestions on how to improve this.

indeed I found that removing the following query, which worked fine before, I get something and the error is not shown.

let $doc := doc($item/@uri)

  if ($doc//t:div[@type = 'edition']) then
                    <a
                        href="{('/text/' || $item/@id)}"
                        target="_blank">{
                        switch ($app:collection)
                                case 'manuscripts'
                                    return
                                        'transcription'
                                case 'works'
                                    return
                                        'edition'
                                default return
                                    'text'
                    }</a>
            else
                ()


$item is a temporary xml element with the base uri of a retrieved resource in @uri. Unfortunately changing the doc function to add 'xmldb:exist://' did not improve the situation.

But this is just an example and I cannot remove all if statements...

In exist.log I can see that the following message is recorded (looks to me the same as the one shown by the app).


Thanks a lot!

Pietro



2017-03-21 22:45:02,489 [qtp388436342-75] ERROR (EXistServlet.java [doPost]:459) - java.lang.NullPointerException

2017-03-21 22:45:02,491 [qtp388436342-75] WARN  (ServletHandler.java [doHandle]:623) -

javax.servlet.ServletException: An error occurred while processing request to /exist/apps/BetMas/works: An unknown error occurred: null

        at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378) ~[exist-optional.jar:3.1.0]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[servlet-api-3.1.jar:3.1.0]

        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:<a href="tel:1689" value="+491689" class="gmail-m_962852700670906487m_7371401435002915353gmail_msg" target="_blank">1689) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171) ~[betterform-exist-5.1-SNAPSHOT-20160615.jar:?]

        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) [jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) [jetty-security-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) [jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.Server.handle(Server.java:524) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253) [jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [jetty-io-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]

        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]

Caused by: javax.servlet.ServletException: An unknown error occurred: null

        at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460) ~[exist-optional.jar:3.1.0]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) ~[servlet-api-3.1.jar:3.1.0]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[servlet-api-3.1.jar:3.1.0]

        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) ~[jetty-security-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74) ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]

        at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50) ~[exist-optional.jar:3.1.0]

        at org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545) ~[exist-optional.jar:3.1.0]

        at org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410) ~[exist-optional.jar:3.1.0]

        at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356) ~[exist-optional.jar:3.1.0]

        ... 30 more

Caused by: java.lang.NullPointerException


2017-03-21 22:13 GMT+01:00 Joe Wicentowski <[hidden email]>:
Hi Pietro,

Winona's idea sounds promising.

Failing that, do you see anything corresponding to this error in exist.log?

Are you using controller.xql or restxq to handle these requests that
generate errors?  Is the source to those files available for us to
see?

Joe

On Tue, Mar 21, 2017 at 4:55 PM, Pietro Liuzzo <[hidden email]> wrote:
>
> ---------- Forwarded message ----------
> From: Pietro Liuzzo <[hidden email]>
> Date: 2017-03-21 10:49 GMT+01:00
> Subject: problem accessing resources
> To: eXist-open ML <[hidden email]>
>
>
> Dear all,
>
> I have removed my exist 2.2 and replaced it with exist 3.1. It is behind a
> nginx proxy on a Linux 3.13.0-110-generic amd64 operating system.
>
> I had backed up my apps in .xar files from exide and then I imported them in
> the new installation with the package manager. I also have a zip backup of
> the apps from exist 2.2.
>
> For some of my collections all goes as before, but some others report the
> error below.
>
> In the console all goes nicely and the functions return what they should.
>
> Any suggestion on how to see what is wrong here?
>
> thanks a lot
>
> Pietro
>
>
> Problem accessing /exist/apps/BetMas/manuscripts. Reason:
>
>     Server Error
>
> Caused by:
>
> javax.servlet.ServletException: An error occurred while processing request
> to /exist/apps/BetMas/manuscripts: An unknown error occurred: null
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:<a href="tel:1689" value="+491689" class="gmail-m_962852700670906487m_7371401435002915353gmail_msg" target="_blank">1689)
>       at
> de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
>       at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
>       at
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
>       at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
>       at org.eclipse.jetty.server.Server.handle(Server.java:524)
>       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
>       at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
>       at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
>       at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
>       at
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.servlet.ServletException: An unknown error occurred: null
>       at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
>       at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
>       ... 30 more
> Caused by: java.lang.NullPointerException
>
> Caused by:
>
> javax.servlet.ServletException: An unknown error occurred: null
>       at org.exist.http.servlets.EXistServlet.doPost(EXistServlet.java:460)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:159)
>       at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
>       at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:545)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.applyViews(XQueryURLRewrite.java:410)
>       at
> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:356)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:<a href="tel:1689" value="+491689" class="gmail-m_962852700670906487m_7371401435002915353gmail_msg" target="_blank">1689)
>       at
> de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:171)
>       at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
>       at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>       at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
>       at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
>       at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
>       at
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
>       at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
>       at org.eclipse.jetty.server.Server.handle(Server.java:524)
>       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
>       at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
>       at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
>       at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
>       at
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
>       at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
>       at
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NullPointerException
>
> Caused by:
>
> java.lang.NullPointerException
>
> ________________________________
> Powered by Jetty:// 9.3.9.v20160517
>
> --
> Hiob Ludolf Centre for Ethiopian Studies
> Room: 136
> Alsterterrasse 1
> 20354 Hamburg
> Tel: <a href="tel:040%20428388381" value="+4940428388381" class="gmail-m_962852700670906487m_7371401435002915353gmail_msg" target="_blank">+49 40 42838-8381
>
>
>
> --
> Pietro Maria Liuzzo
> cel (DE): +49 (0) 176 61 000 606
> Skype: pietro.liuzzo (Quingentole)
> https://uk.linkedin.com/in/pietroliuzzo
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>



--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)
--
Sent from my iPhone



--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)
--
Sent from my iPhone



--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)



--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem accessing resources

Dannes Wessels-3
Hi,

On 7 Apr 2017, at 14:04 , Pietro Liuzzo <[hidden email]> wrote:

I still have this issue which I cannot solve.

You might have simplified your queries too much, not sure. 


First, you write

declare function app:items($node as node()*, $model as map(*)) {
let $path := "collection('/db/apps/myapp/data/')"
let $hits := for $item in util:eval($path) return $item
return map {'hits':=$hits}
}
;


Why do you use the util:eval() function here?; it is not needed, I’d recommend to never use eval() because it is too complex for most users. eval is evil :=) You can easily write it as the following:

declare function app:items($node as node()*, $model as map(*)) {
let $hits := for $item in collection('/db/apps/myapp/data/‘)" return $item
return map {'hits':=$hits}
}
;

regarding the subsequence question: fn:collection() returns *all* nodes of that collection, as a sequence. So it might be the case that you actually get a sequence of 20 nodes, but…. as nodes contain other nodes, you’ll see these too.

Probably you want to apply the subsequence to the other search in $hit//t:title[@xml:id='t1'] ; this expression is not very selective due to the // , depending on your exact data set, it could return a lot of data.

cheers

Dannes


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem accessing resources

Pietro Liuzzo
Dear Dannes,

thanks for your answer!

yes, sorry... I use util:eval because I take the values in paremeters from a form to build the path, so that in $path there will be a long series of variables appended to what I left there which get evaluated. To isolate my problem I simplified that step too much or perhaps not enough, i.e. I could have removed also util:eval and  and subsequence: I get the above error also in those cases. As for the expression I use that to test because there is in each resource only one element title[@xml:id='t1'] which only contains text. 


Not having found a solution for that at the moment I am restructuring all I can in the app where I mainly had the problem in order to use RESTXQ, which means quite a lot of rewriting but there the indexes are used and the difference made by that is extremely relevant. Calling the functions which should use the indexes from a restxq function makes no problem and the functions work nicely and use the indexes as expected. Still I wonder why this does not happen there and I would be very happy to find out for my other apps which I would be glad to fix and not to restructure entirely. 

Thanks a lot!
Sincerely yours


Pietro



2017-04-08 22:44 GMT+02:00 Dannes Wessels <[hidden email]>:
Hi,

On 7 Apr 2017, at 14:04 , Pietro Liuzzo <[hidden email]> wrote:

I still have this issue which I cannot solve.

You might have simplified your queries too much, not sure. 


First, you write

declare function app:items($node as node()*, $model as map(*)) {
let $path := "collection('/db/apps/myapp/data/')"
let $hits := for $item in util:eval($path) return $item
return map {'hits':=$hits}
}
;


Why do you use the util:eval() function here?; it is not needed, I’d recommend to never use eval() because it is too complex for most users. eval is evil :=) You can easily write it as the following:

declare function app:items($node as node()*, $model as map(*)) {
let $hits := for $item in collection('/db/apps/myapp/data/‘)" return $item
return map {'hits':=$hits}
}
;

regarding the subsequence question: fn:collection() returns *all* nodes of that collection, as a sequence. So it might be the case that you actually get a sequence of 20 nodes, but…. as nodes contain other nodes, you’ll see these too.

Probably you want to apply the subsequence to the other search in $hit//t:title[@xml:id='t1'] ; this expression is not very selective due to the // , depending on your exact data set, it could return a lot of data.

cheers

Dannes




--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Loading...