orbeon / orbeon-forms

Orbeon Forms is an open source web forms solution. It includes an XForms engine, the Form Builder web-based form editor, and the Form Runner runtime.
http://www.orbeon.com/
GNU Lesser General Public License v2.1
513 stars 221 forks source link

Casbah JARs not committed #880

Closed johanssonlc closed 8 years ago

johanssonlc commented 11 years ago

The casbah JARs has not been committed. This prevents the MongoDB persistence from working. The ones previously used were for Scala 2.8, but the project now uses Scala 2.9.

ebruchez commented 11 years ago

And we'll move to Scala 2.10 really soon. It'd be best to do the work for 2.10.

johanssonlc commented 11 years ago

Ok, what time horizon do you estimate can be expected in round numbers?

ebruchez commented 11 years ago

Upgrade to Scala 2.10.1 is now done 16008708f0024545e4cb2bbf742ba51032e79a56. No specific timeline at the moment for the MongoDB stuff. Are you able to help with this, like submitting a pull request?

johanssonlc commented 11 years ago

I do not really know what that means, but yes, if you could elaborate a bit I would gladly be of service.

ebruchez commented 11 years ago

The main tasks are:

  1. Find out which Scala 2.10-compatible Casbah JAR files are needed.
  2. Figure out whether the code in MongoDBPersistence needs updating for that version of Casbah.

That probably requires setting up compiling Orbeon Forms from source. Normally, that means gettting the source code with git, and running ant orbeon-war to compile the source.

johanssonlc commented 11 years ago

Ok, I will look into this on wednesday.

johanssonlc commented 11 years ago

I did not compile as suggested above but instead I just tried adding the casbah jar to the lib folder of my application as suggested on stackoverflow, because of time constraints. I added casbah-commons_2.9.1-2.5.0.jar to the folder which already contained scala-library-2.9.2.jar but they are supposed to be compliant. Then I visited the url .../fr/service/mongo like the last time. The casbah BaseImports complaint disappeared as expected, but I received the following error in the log:

javax.servlet.ServletException at org.orbeon.oxf.fr.mongdb.MongoDBPersistence.doGet(MongoDBPersistence.scala:89) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619)

The exception could be traced back to method below in MongoDBPersistence.scala and the exception was thrown in the end of the case statement, which means that it didi not find a match with any of the previous statements.

override def doGet(req: HttpServletRequest, resp: HttpServletResponse): Unit =
    req.getPathInfo match {
        case DataPath(app, form, documentId, "data.xml") ⇒
            retrieveDocument(app, form, documentId, resp)
        case DataPath(app, form, documentId, attachmentName) ⇒
            retrieveAttachment(app, form, documentId, attachmentName, resp)
        case FormPath(app, form, "form.xhtml") ⇒
            retrieveForm(app, form, resp)
        case FormPath(app, form, attachmentName) ⇒
            retrieveFormAttachment(app, form, attachmentName, resp)
        case _ ⇒ throw new ServletException
    }

As I looked in your posted configuration ( https://github.com/orbeon/orbeon-forms/commit/877818c3698349b5bdfc7ebcd69160cfa7750647 ), I still did not find any place for a connection string or authentication information. Does the persistence take for granted that I connect to localhost on the standard port with no authentication activated?

ebruchez commented 11 years ago

Thanks for all the work so far. The connection is hardcoded to a local "orbeon" database. For sure, we need the ability to configure this!

However, that doesn't explain a failure in the pattern match above. Can you see in the logs or with an HTTP monitor what the incoming failing URL is?

johanssonlc commented 11 years ago

I received the error below in my Catalina log. Looks like a port issue but I have other services connecting to mongo.

Mar 25, 2013 9:28:09 AM com.mongodb.DBPortPool gotError WARNING: emptying DBPortPool to sawhost:27017 b/c of error java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:168) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read1(BufferedInputStream.java:258) at java.io.BufferedInputStream.read(BufferedInputStream.java:317) at org.bson.io.Bits.readFully(Bits.java:35) at org.bson.io.Bits.readFully(Bits.java:28) at com.mongodb.Response.(Response.java:39) at com.mongodb.DBPort.go(DBPort.java:128) at com.mongodb.DBPort.call(DBPort.java:79) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:218) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:305) at com.mongodb.DB.command(DB.java:160) at com.mongodb.DB.command(DB.java:183) at com.mongodb.DB.command(DB.java:144) at com.mongodb.DBCollection.mapReduce(DBCollection.java:1066) at com.jaspersoft.mongodb.query.MongoDbQueryWrapper.createIterator(MongoDbQueryWrapper.java:267) at com.jaspersoft.mongodb.query.MongoDbQueryWrapper.processQuery(MongoDbQueryWrapper.java:123) at com.jaspersoft.mongodb.query.MongoDbQueryWrapper.(MongoDbQueryWrapper.java:99) at com.jaspersoft.mongodb.query.MongoDbQueryExecuter.createDatasource(MongoDbQueryExecuter.java:114) at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRQueryExecuterAdapter.executeQuery(JRQueryExecuterAdapter.java:94) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.executeQuery(EngineServiceImpl.java:2041) at com.jaspersoft.jasperserver.war.cascade.CachedEngineService.executeQuery(CachedEngineService.java:87) at com.jaspersoft.jasperserver.war.cascade.handlers.QueryValuesLoader.loadValues(QueryValuesLoader.java:83) at com.jaspersoft.jasperserver.war.cascade.handlers.SingleSelectListInputControlHandler.fillStateValue(SingleSelectListInputControlHandler.java:106) at com.jaspersoft.jasperserver.war.cascade.handlers.BasicInputControlHandler.getState(BasicInputControlHandler.java:115) at com.jaspersoft.jasperserver.war.cascade.GenericInputControlLogic.getValuesForInputControls(GenericInputControlLogic.java:197) at com.jaspersoft.jasperserver.war.cascade.GenericInputControlLogic.getValuesForInputControlsFromRawData(GenericInputControlLogic.java:233) at com.jaspersoft.jasperserver.war.cascade.InputControlsLogicServiceImpl$4.callByContainer(InputControlsLogicServiceImpl.java:112) at com.jaspersoft.jasperserver.war.cascade.InputControlsLogicServiceImpl$4.callByContainer(InputControlsLogicServiceImpl.java:104) at com.jaspersoft.jasperserver.war.cascade.InputControlsLogicServiceImpl.callControlLogic(InputControlsLogicServiceImpl.java:146) at com.jaspersoft.jasperserver.war.cascade.InputControlsLogicServiceImpl.getValuesForInputControls(InputControlsLogicServiceImpl.java:104) at com.jaspersoft.jasperserver.remote.services.impl.RunReportServiceImpl.getInputControlsForReport(RunReportServiceImpl.java:535) at com.jaspersoft.jasperserver.remote.services.impl.RunReportServiceImpl$$FastClassByCGLIB$$2b741728.invoke() at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) at com.jaspersoft.jasperserver.remote.services.impl.RunReportServiceImpl$$EnhancerByCGLIB$$89c605b2.getInputControlsForReport() at com.jaspersoft.jasperserver.jaxrs.report.RunReportsJaxrsService$1.call(RunReportsJaxrsService.java:94) at com.jaspersoft.jasperserver.jaxrs.report.RunReportsJaxrsService$1.call(RunReportsJaxrsService.java:91) at com.jaspersoft.jasperserver.jaxrs.report.ReportsServiceCallTemplate.callRemoteService(ReportsServiceCallTemplate.java:50) at com.jaspersoft.jasperserver.jaxrs.report.ReportsServiceCallTemplate.callRemoteService(ReportsServiceCallTemplate.java:43) at com.jaspersoft.jasperserver.remote.common.RemoteServiceWrapper.callRemoteService(RemoteServiceWrapper.java:44) at com.jaspersoft.jasperserver.jaxrs.report.RunReportsJaxrsService.internalGetReportInputParameters(RunReportsJaxrsService.java:91) at com.jaspersoft.jasperserver.jaxrs.report.RunReportsJaxrsService.getReportInputParametersViaPost(RunReportsJaxrsService.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1483) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1414) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1363) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1353) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:399) at com.jaspersoft.jasperserver.api.security.IPadSupportFilter.doFilter(IPadSupportFilter.java:67) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at com.jaspersoft.jasperserver.api.security.JSSwitchUserProcessingFilter.doFilterHttp(JSSwitchUserProcessingFilter.java:154) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at com.jaspersoft.jasperserver.api.metadata.user.service.impl.MetadataAuthenticationProcessingFilter.doFilter(MetadataAuthenticationProcessingFilter.java:139) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at com.jaspersoft.jasperserver.war.util.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:96) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:192) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:192) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at com.jaspersoft.jasperserver.api.logging.filter.BasicLoggingFilter.doFilter(BasicLoggingFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at com.jaspersoft.jasperserver.api.security.JSCsrfGuardFilter.doFilter(JSCsrfGuardFilter.java:101) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at com.jaspersoft.jasperserver.api.security.WebAppSecurityFilter.doFilter(WebAppSecurityFilter.java:76) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at com.jaspersoft.jasperserver.api.security.encryption.EncryptionFilter.doFilter(EncryptionFilter.java:130) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:188) at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.jaspersoft.jasperserver.war.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:67) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.jaspersoft.jasperserver.war.P3PFilter.doFilter(P3PFilter.java:43) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:558) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619)

ebruchez commented 8 years ago

Closing as we don't support MongoDB right now.