Site Navigation


Mobius Software Frequently Asked Questions (FAQs)


Connection Refused Errors on Running Server [top]

Q: I get connection refused when I know my server is running, and it is handling a lot of requests.


org.projectmobius.common.MobiusException: Could not connect to the XML Data Service localhost:3940 using the protocol TCP.

A: Chances are the TCPServerSocket has reached the platform-specific limitation on concurrent pending socket connections. We accept the connections as fast as we can and put them in another thread-handled queue, but it is possible there are too many connections. The limit for windows and linux is usually 5. We have the backlog set to 200, but the platform limit takes precedence over our recommendation.


Packet Too Large MySQL Error [top]

Q: I'm seeing some weird exception, what's the deal?

on client:


Error inserting the element projectmobius.org/1/BookStore:Book, the following error occurred:
Error executing update query: Packet for query is too large (1099980 > 1047552)
at org.projectmobius.client.mako.XMLCollectionHandle.addDocument(XMLCollectionHandle.java:63)
at org.projectmobius.tools.mako.SubmitXML.insertFile(SubmitXML.java:114)
at org.projectmobius.tools.mako.SubmitXML.main(SubmitXML.java:44)

on server:


Error inserting the element projectmobius.org/1/BookStore:Book, the following error occurred:
Error executing update query: Packet for query is too large (1099980 > 1047552)
at org.projectmobius.db.Query.update(Query.java:109)
at org.projectmobius.db.Inserter.insert(Inserter.java:77)
at org.projectmobius.makodb.XMLInsertionManager.insertElementMap(XMLInsertionManager.java:173)
at org.projectmobius.makodb.XMLHandler.endElement(XMLHandler.java:173)
at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
at org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1436)
at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1205)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
at org.projectmobius.makodb.XMLSubmitter.submit(XMLSubmitter.java:36)
at org.projectmobius.makodb.handlers.SubmitXMLHandlerImpl.submitXML(SubmitXMLHandlerImpl.java:44)
at org.projectmobius.services.mako.handlers.SubmitXMLHandler.processHandler(SubmitXMLHandler.java:42)
at org.projectmobius.services.common.ServiceProtocolHandler.run(ServiceProtocolHandler.java:42)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727)
at java.lang.Thread.run(Thread.java:534)

A: MySQL limits the size of packets a driver can send to it (the default is 1M). Chances are you are inserting an instance document that has a really large (read: bigger than the limit) text element. A workaround is to increase "max_allowed_packet" parameter of MySQL server.

  1. Edit "my.cnf" file to contain a line like this (see MySQL documentation for details): set-variable = max_allowed_packet=16M
  2. Restart mysqld

MySQL Refusing Connection (config problem) [top]

Q: I see the follow exception on linux using mysql:


SEVERE: Could not establish database exception: Server configuration denies access to data source
java.sql.SQLException: Server configuration denies access to data source
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:522)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1734)
at com.mysql.jdbc.Connection.(Connection.java:562)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:361)
at java.sql.DriverManager.getConnection(DriverManager.java:523)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at org.projectmobius.db.ConnectionManager.establishConnection(ConnectionManager.java:185)
at org.projectmobius.db.ConnectionManager.inititalizePool(ConnectionManager.java:239)
at org.projectmobius.db.ConnectionManager.(ConnectionManager.java:133)
....

Whats the deal?

A: Try issuing the following statements to MySQL (changing usernames and passwords as appropriate):


GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY '' WITH GRANT OPTION; 
GRANT ALL PRIVILEGES ON *.* TO root@localhost.localdomain IDENTIFIED BY '' WITH GRANT OPTION; 
GRANT ALL PRIVILEGES ON *.* TO root@127.0.0.1 IDENTIFIED BY '' WITH GRANT OPTION; 
FLUSH PRIVILEGES; 


Large Document Parser Error [top]

Q: When I submit large documents, sometimes I see this error:


org.xml.sax.SAXParseException: Parser has reached the entity expansion limit "64,000" set by the Application

What does this mean and how can I fix it?

A: This is a limitation of SAX parsers, not Mobius. Basically, this is the SAX Parser complaining about the number of entities in an Element. Some mobius protocol messages transmit XML documents by encoding them (for example: '<' becomes 'lt;'). Large documents (lots of elements), mean lots of entities. Some parsers have a default limit set, usually 64,000. If you have a need to submit such documents, you'll need to increase this limit, and use a parser that acknowledges your new limit. One way would be to add the following to the commandline arguments used to start your clients and servers:


 -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser -DentityExpansionLimit=1000000

You can replace 1000000 with whatever is a large enough number for your applications.