On Thursday, May 2, 2013 at 12:37 PM, Christian Grün wrote:
Dear Sean,sorry for the delay, and thanks for your report. Some hints:– did you manage to connect to localhost with Tomcat?– the .basex configuration file won’t be parsed if BaseX is deployedas servlet container [1]. Instead, you’ll have to specify all optionsin the web.xml configuration fileIf this doesn't help, don’t hesitate and ask again; I’ll then try torebuild your scenario.All the best,Christian___________________________On Wed, May 1, 2013 at 9:23 PM, Sean Healy <sjh@seanjhealy.com> wrote:Ubuntu Server 12.10Tomcat 7BaseX 7.6We are using the client module to make the following call:client:connect($app:feedback-server-host, 1984, $session-user,$session-password). Port 1984 successfully connects within a client/serverapplication; however, when we deploy as a web application to Tomcat, eitherBaseX Server is not starting up or port 1984 is not available. We added<param-name>org.basex.debug</param-name> to Tomcat's web.xml. The output of…/tomcat7/logs/catalina.out follows:...INFO: Deploying web application archive /var/lib/tomcat7/webapps/bxApp.warMay 1, 2013 4:22:17 PM org.apache.catalina.startup.HostConfig deployWARINFO: Deploying web application archive /var/lib/tomcat7/webapps/ROOT.warMay 1, 2013 4:22:17 PM org.apache.coyote.AbstractProtocol startINFO: Starting ProtocolHandler ["http-bio-8984"]May 1, 2013 4:22:17 PM org.apache.coyote.AbstractProtocol startINFO: Starting ProtocolHandler ["http-bio-8443"]May 1, 2013 4:22:17 PM org.apache.catalina.startup.Catalina startINFO: Server startup in 52056 msorg.basex.http.HTTPException: No function found that matches the request.org.basex.http.HTTPErr.thrw(HTTPErr.java:56)org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:26)org.basex.http.BaseXServlet.service(BaseXServlet.java:39)javax.servlet.http.HttpServlet.service(HttpServlet.java:722)org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)java.lang.Thread.run(Thread.java:662)_ REQUEST _________________________________org.apache.catalina.connector.RequestFacade@6f45959c- host: ouripaddress:8984- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0)Gecko/20100101 Firefox/20.0- accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8- accept-language: en-US,en;q=0.5- accept-encoding: gzip, deflate- cookie: JSESSIONID=XXXXXXX- connection: keep-alive_ RESPONSE ________________________________Connection refusedjava.net.PlainSocketImpl.socketConnect(Native Method)java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)java.net.Socket.connect(Socket.java:529)org.basex.server.ClientSession.<init>(ClientSession.java:107)org.basex.server.ClientSession.<init>(ClientSession.java:85)org.basex.query.func.FNClient.connect(FNClient.java:81)org.basex.query.func.FNClient.item(FNClient.java:61)org.basex.query.expr.ParseExpr.value(ParseExpr.java:70)org.basex.query.func.FNClient.value(FNClient.java:53)org.basex.query.QueryContext.value(QueryContext.java:296)org.basex.query.expr.Try.value(Try.java:69)org.basex.query.QueryContext.value(QueryContext.java:296)org.basex.query.flwor.Let$1.next(Let.java:85)org.basex.query.flwor.FLWR$1.next(FLWR.java:63)org.basex.query.expr.ParseExpr.item(ParseExpr.java:53)org.basex.query.expr.ParseExpr.value(ParseExpr.java:70)org.basex.query.QueryContext.value(QueryContext.java:296)org.basex.query.func.UserFunc.value(UserFunc.java:175)org.basex.query.QueryContext.value(QueryContext.java:296)org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68)org.basex.query.QueryContext.value(QueryContext.java:296)org.basex.query.flwor.Let$1.next(Let.java:85)org.basex.query.flwor.FLWR$1.next(FLWR.java:63)org.basex.query.expr.ParseExpr.item(ParseExpr.java:53)org.basex.query.expr.ParseExpr.value(ParseExpr.java:70)org.basex.query.QueryContext.value(QueryContext.java:296)org.basex.query.func.UserFunc.value(UserFunc.java:175)org.basex.query.QueryContext.value(QueryContext.java:296)org.basex.query.func.BaseFuncCall.value(BaseFuncCall.java:68)org.basex.query.QueryContext.value(QueryContext.java:296)org.basex.http.restxq.RestXqResponse.create(RestXqResponse.java:102)org.basex.http.restxq.RestXqModule.process(RestXqModule.java:99)org.basex.http.restxq.RestXqFunction.process(RestXqFunction.java:89)org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:28)org.basex.http.BaseXServlet.service(BaseXServlet.java:39)javax.servlet.http.HttpServlet.service(HttpServlet.java:722)org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)java.lang.Thread.run(Thread.java:662)_ REQUEST _________________________________org.apache.catalina.connector.RequestFacade@6f45959c- host: ouripaddress:8984- connection: keep-alive- cache-control: max-age=0- accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3)AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31- dnt: 1- accept-encoding: gzip,deflate,sdch- accept-language: en-US,en;q=0.8- accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3_ RESPONSE ________________________________org.apache.catalina.connector.ResponseFacade@63721e22_ REQUEST_________________________________org.apache.catalina.connector.RequestFacade@ac0b3d1- host: ouripaddress:8984- connection: keep-alive- accept: */*- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3)AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31- dnt: 1- referer: http://ouripaddress:8984/bxApp/restxq/etc- accept-encoding: gzip,deflate,sdch- accept-language: en-US,en;q=0.8- accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3- cookie: JSESSIONID=XXXXXXXXX_ RESPONSE ________________________________…I ran netstat -an | grep "LISTEN ". Port 1984 was not listed. Thinking that1984 was closed, I ran iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 1984-j ACCEPT. However after running netstat -lnp | grep 1984 -- still nothing.The file .basex is at the root of our webapp and looks like this:...# Client/Server ArchitectureHOST = ouripaddressPORT = 1984SERVERPORT = 1984EVENTPORT = 1985USER = userPASSWORD = userpasswordSERVERHOST = ouripaddressPROXYHOST =PROXYPORT = 80NONPROXYHOSTS =TIMEOUT = 30KEEPALIVE = 600PARALLEL = 8LOG = trueLOGMSGMAXLEN = 1000...Any help as to why we are not able to connect would be much appreciated!-SeanOn Wednesday, May 1, 2013 at 11:57 AM, France Baril wrote:On Tue, Apr 30, 2013 at 3:55 AM, Christian Grün <christian.gruen@gmail.com>wrote:Dear France,Works perfectly well on my Mac.Returns a BXCL0001 when used on the Linux production server.could you additionally tell us what error message is attached to the errorcode?The only reason I can find is that the production server is deployedthrougha servlet. Could this affect the behaviour?Could the fact that the production server is using TomCat have an impactonthe client:connect function?As your code seems to work on your Mac, I indeed assume it has to dowith the servlet configuration. You could try to add the followingsnippet to the web.xml configuration file:<context-param><param-name>org.basex.debug</param-name><param-value>true</param-value></context-param>This way, some additional debugging information such as Java stacktraces will be output to STDERR, which you could send us as well (thisinformation may e. g. end up on command line or in logs/catalina.out,depending on your Tomcat configuration).Hope this helps?Christian--France BarilArchitecte documentaire / Documentation architect(514) 572-0341