Closed johanssonlc closed 8 years ago
And we'll move to Scala 2.10 really soon. It'd be best to do the work for 2.10.
Ok, what time horizon do you estimate can be expected in round numbers?
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?
I do not really know what that means, but yes, if you could elaborate a bit I would gladly be of service.
The main tasks are:
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.
Ok, I will look into this on wednesday.
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?
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?
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.
Closing as we don't support MongoDB right now.
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.