Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMFStore] Feature request: ability to configure compression for XML-RPC requests and responses
[EMFStore] Feature request: ability to configure compression for XML-RPC requests and responses [message #1287541] Mon, 07 April 2014 22:10 Go to next message
Scott Dybiec is currently offline Scott DybiecFriend
Messages: 148
Registered: July 2009
Senior Member
My application needs to work over a cellular network where bandwidth is
quite constrained, so I'd like to be able configure the XML-RPC layer to
use GZIP compression.

Based on the instructions from the Apache XML-RPC site
(http://ws.apache.org/xmlrpc/client.html), I tried setting the XML-RPC
config in
org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.
initConnection() by adding these two lines:

config.setGzipCompressing(true); config.setGzipRequesting(true);

but that ended with exceptions on both the client and server. Is it
possible to turn on compression for EMFStore requests and responses? If
so, how?


First the server exception:

Apr 07, 2014 5:33:49 PM org.apache.xmlrpc.server.XmlRpcErrorLogger log
SEVERE: Failed to read XML-RPC request: Invalid byte 1 of 1-byte UTF-8
sequence.
org.apache.xmlrpc.XmlRpcException: Failed to read XML-RPC request:
Invalid byte 1 of 1-byte UTF-8 sequence.
at
org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:73)
at
org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
Caused by:
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
Invalid byte 1 of 1-byte UTF-8 sequence.
at
com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
at
org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
... 3 more
Caused by:
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
Invalid byte 1 of 1-byte UTF-8 sequence.
at
com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
at
org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
at
org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)




And here is the client exception:

org.eclipse.emf.emfstore.internal.server.exceptions.ConnectionException:
Server could not be reached.
Failed to read XML-RPC request: Invalid byte 1 of 1-byte UTF-8 sequence.
at
org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.executeCall(XmlRpcClientManager.java:168)
at
org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.callWithResult(XmlRpcClientManager.java:114)
at
org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcConnectionManager.logIn(XmlRpcConnectionManager.java:61)
at
org.eclipse.emf.emfstore.internal.client.model.impl.UsersessionImpl.logIn(UsersessionImpl.java:590)
at
org.eclipse.emf.emfstore.internal.client.model.impl.api.ESServerImpl$5.doRun(ESServerImpl.java:227)
at
org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommand.commandBody(EMFStoreCommand.java:51)
at
org.eclipse.emf.emfstore.internal.client.model.util.AbstractEMFStoreCommand.execute(AbstractEMFStoreCommand.java:64)
at
com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack$1.doExecute(EMFStoreTransactionalCommandStack.java:61)
at
org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
at
org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:78)
at
org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.basicExecute(AbstractTransactionalCommandStack.java:241)
at
com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.basicExecute(EMFStoreTransactionalCommandStack.java:163)
at
org.eclipse.emf.transaction.impl.TransactionalCommandStackImpl.doExecute(TransactionalCommandStackImpl.java:63)
at
org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
at
org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
at
com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.runEMFStoreCommand(EMFStoreTransactionalCommandStack.java:64)
at
com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.execute(EMFStoreTransactionalCommandStack.java:49)
at
org.eclipse.emf.emfstore.internal.client.model.util.AbstractEMFStoreCommand.aRun(AbstractEMFStoreCommand.java:108)
at
org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommand.run(EMFStoreCommand.java:60)
at
org.eclipse.emf.emfstore.internal.client.model.impl.api.ESServerImpl.login(ESServerImpl.java:236)
at
com.humanfactor.rw.timing.simulation.ui.TimerSimulation.setup(TimerSimulation.java:201)
at
com.humanfactor.rw.timing.simulation.SimulationClient.runSimulation(SimulationClient.java:88)
at
com.humanfactor.rw.timing.simulation.ui.action.RunSimulationAction.run(RunSimulationAction.java:25)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at
org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at
com.humanfactor.rw.timing.simulation.ui.Application.start(Application.java:20)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Caused by: org.apache.xmlrpc.XmlRpcException: Failed to read XML-RPC
request: Invalid byte 1 of 1-byte UTF-8 sequence.
at
org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:73)
at
org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
Caused by:
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
Invalid byte 1 of 1-byte UTF-8 sequence.
at
com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
at
org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
... 3 more
Re: [EMFStore] Feature request: ability to configure compression for XML-RPC requests and responses [message #1291795 is a reply to message #1287541] Fri, 11 April 2014 08:13 Go to previous messageGo to next message
Maximilian Koegel is currently offline Maximilian KoegelFriend
Messages: 253
Registered: July 2009
Senior Member
Hi Scott,

there is a similar class on the server side: XmlRpcWebserverManager
I guess you could configure the XML-RPC layer there to also use
compression on the receiving end and it should work then.
I would be happy to accept a contribution to make both configurations
API also.
Hope this helps!

Best regards,
Maximilian


Am 08.04.2014 00:10, schrieb scott@xxxxxxxx:
> My application needs to work over a cellular network where bandwidth is
> quite constrained, so I'd like to be able configure the XML-RPC layer to
> use GZIP compression.
>
> Based on the instructions from the Apache XML-RPC site
> (http://ws.apache.org/xmlrpc/client.html), I tried setting the XML-RPC
> config in
> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.
> initConnection() by adding these two lines:
>
> config.setGzipCompressing(true); config.setGzipRequesting(true);
>
> but that ended with exceptions on both the client and server. Is it
> possible to turn on compression for EMFStore requests and responses? If
> so, how?
>
>
> First the server exception:
>
> Apr 07, 2014 5:33:49 PM org.apache.xmlrpc.server.XmlRpcErrorLogger log
> SEVERE: Failed to read XML-RPC request: Invalid byte 1 of 1-byte UTF-8
> sequence.
> org.apache.xmlrpc.XmlRpcException: Failed to read XML-RPC request:
> Invalid byte 1 of 1-byte UTF-8 sequence.
> at
> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:73)
>
> at
> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>
> at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
> at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
> Caused by:
> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
> Invalid byte 1 of 1-byte UTF-8 sequence.
> at
> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown Source)
>
> at
> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
> Source)
> at
> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>
> ... 3 more
> Caused by:
> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
> Invalid byte 1 of 1-byte UTF-8 sequence.
> at
> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown Source)
>
> at
> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
> Source)
> at
> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>
> at
> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>
> at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
> at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
>
>
>
>
> And here is the client exception:
>
> org.eclipse.emf.emfstore.internal.server.exceptions.ConnectionException:
> Server could not be reached.
> Failed to read XML-RPC request: Invalid byte 1 of 1-byte UTF-8 sequence.
> at
> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.executeCall(XmlRpcClientManager.java:168)
>
> at
> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.callWithResult(XmlRpcClientManager.java:114)
>
> at
> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcConnectionManager.logIn(XmlRpcConnectionManager.java:61)
>
> at
> org.eclipse.emf.emfstore.internal.client.model.impl.UsersessionImpl.logIn(UsersessionImpl.java:590)
>
> at
> org.eclipse.emf.emfstore.internal.client.model.impl.api.ESServerImpl$5.doRun(ESServerImpl.java:227)
>
> at
> org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommand.commandBody(EMFStoreCommand.java:51)
>
> at
> org.eclipse.emf.emfstore.internal.client.model.util.AbstractEMFStoreCommand.execute(AbstractEMFStoreCommand.java:64)
>
> at
> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack$1.doExecute(EMFStoreTransactionalCommandStack.java:61)
>
> at
> org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
>
> at
> org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:78)
>
> at
> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.basicExecute(AbstractTransactionalCommandStack.java:241)
>
> at
> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.basicExecute(EMFStoreTransactionalCommandStack.java:163)
>
> at
> org.eclipse.emf.transaction.impl.TransactionalCommandStackImpl.doExecute(TransactionalCommandStackImpl.java:63)
>
> at
> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
>
> at
> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
>
> at
> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.runEMFStoreCommand(EMFStoreTransactionalCommandStack.java:64)
>
> at
> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.execute(EMFStoreTransactionalCommandStack.java:49)
>
> at
> org.eclipse.emf.emfstore.internal.client.model.util.AbstractEMFStoreCommand.aRun(AbstractEMFStoreCommand.java:108)
>
> at
> org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommand.run(EMFStoreCommand.java:60)
>
> at
> org.eclipse.emf.emfstore.internal.client.model.impl.api.ESServerImpl.login(ESServerImpl.java:236)
>
> at
> com.humanfactor.rw.timing.simulation.ui.TimerSimulation.setup(TimerSimulation.java:201)
>
> at
> com.humanfactor.rw.timing.simulation.SimulationClient.runSimulation(SimulationClient.java:88)
>
> at
> com.humanfactor.rw.timing.simulation.ui.action.RunSimulationAction.run(RunSimulationAction.java:25)
>
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
>
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
>
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
>
> at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
>
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
> at
> com.humanfactor.rw.timing.simulation.ui.Application.start(Application.java:20)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
> Caused by: org.apache.xmlrpc.XmlRpcException: Failed to read XML-RPC
> request: Invalid byte 1 of 1-byte UTF-8 sequence.
> at
> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:73)
>
> at
> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>
> at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
> at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
> Caused by:
> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
> Invalid byte 1 of 1-byte UTF-8 sequence.
> at
> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown Source)
>
> at
> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
> Source)
> at
> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>
> ... 3 more


--
Maximilian Kögel

Get Professional Eclipse Support: http://eclipsesource.com/munich
Re: [EMFStore] Feature request: ability to configure compression for XML-RPC requests and responses [message #1295896 is a reply to message #1291795] Mon, 14 April 2014 17:18 Go to previous messageGo to next message
Scott Dybiec is currently offline Scott DybiecFriend
Messages: 148
Registered: July 2009
Senior Member
After some investigation, it turns out that the simple XML-RPC WebServer
implementation that EMFStore is based on doesn't support gzip
compression. I traced it down to
org.apache.xmlrpc.webserver.Connection.getRequestConfig(), which doesn't
have the logic needed to extract the request data (Content-Encoding
header) telling the server whether the request is gzipped or not --- or
whether the response back to the client should be gzipped
(Accept-Encoding header). Perhaps there are others parts missing, too,
but I didn't check.

XML-RPC supports compression if it's deployed into a standard web
container using XmlRpcServlet or using XmlRpcServletServer. Moving from
the WebServer-based to XmlRpcServlet-based implementation is a bit too
much for me given my limited understanding of EMFStore server internals.
How difficult would it be to migrate to XmlRpcServer or XmlRpcServletServer?

One possible way forward is to compress/uncompress the message payloads
in the EObjectSerializer and EObjectTypeParser. I inserted a few lines
of code in both of these classes and the results are promising. Typical
commits include several changes my log file shows around 20:1
compression ratio for change package payloads. Here's a typical change
payload:

Bytes before uncompress = 3185
Bytes after uncompress = 62736

Sounds like a good approach?

$cott



On 4/11/2014 4:13 AM, Maximilian Koegel wrote:
> Hi Scott,
>
> there is a similar class on the server side: XmlRpcWebserverManager
> I guess you could configure the XML-RPC layer there to also use
> compression on the receiving end and it should work then.
> I would be happy to accept a contribution to make both configurations
> API also.
> Hope this helps!
>
> Best regards,
> Maximilian
>
>
> Am 08.04.2014 00:10, schrieb scott@xxxxxxxx:
>> My application needs to work over a cellular network where bandwidth is
>> quite constrained, so I'd like to be able configure the XML-RPC layer to
>> use GZIP compression.
>>
>> Based on the instructions from the Apache XML-RPC site
>> (http://ws.apache.org/xmlrpc/client.html), I tried setting the XML-RPC
>> config in
>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.
>> initConnection() by adding these two lines:
>>
>> config.setGzipCompressing(true); config.setGzipRequesting(true);
>>
>> but that ended with exceptions on both the client and server. Is it
>> possible to turn on compression for EMFStore requests and responses? If
>> so, how?
>>
>>
>> First the server exception:
>>
>> Apr 07, 2014 5:33:49 PM org.apache.xmlrpc.server.XmlRpcErrorLogger log
>> SEVERE: Failed to read XML-RPC request: Invalid byte 1 of 1-byte UTF-8
>> sequence.
>> org.apache.xmlrpc.XmlRpcException: Failed to read XML-RPC request:
>> Invalid byte 1 of 1-byte UTF-8 sequence.
>> at
>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:73)
>>
>> at
>> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>>
>> at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
>> at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
>> Caused by:
>> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
>> Invalid byte 1 of 1-byte UTF-8 sequence.
>> at
>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown Source)
>>
>> at
>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>> Source)
>> at
>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>>
>> ... 3 more
>> Caused by:
>> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
>> Invalid byte 1 of 1-byte UTF-8 sequence.
>> at
>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown Source)
>>
>> at
>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>> Source)
>> at
>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>>
>> at
>> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>>
>> at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
>> at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
>>
>>
>>
>>
>> And here is the client exception:
>>
>> org.eclipse.emf.emfstore.internal.server.exceptions.ConnectionException:
>> Server could not be reached.
>> Failed to read XML-RPC request: Invalid byte 1 of 1-byte UTF-8 sequence.
>> at
>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.executeCall(XmlRpcClientManager.java:168)
>>
>> at
>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.callWithResult(XmlRpcClientManager.java:114)
>>
>> at
>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcConnectionManager.logIn(XmlRpcConnectionManager.java:61)
>>
>> at
>> org.eclipse.emf.emfstore.internal.client.model.impl.UsersessionImpl.logIn(UsersessionImpl.java:590)
>>
>> at
>> org.eclipse.emf.emfstore.internal.client.model.impl.api.ESServerImpl$5.doRun(ESServerImpl.java:227)
>>
>> at
>> org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommand.commandBody(EMFStoreCommand.java:51)
>>
>> at
>> org.eclipse.emf.emfstore.internal.client.model.util.AbstractEMFStoreCommand.execute(AbstractEMFStoreCommand.java:64)
>>
>> at
>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack$1.doExecute(EMFStoreTransactionalCommandStack.java:61)
>>
>> at
>> org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
>>
>> at
>> org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:78)
>>
>> at
>> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.basicExecute(AbstractTransactionalCommandStack.java:241)
>>
>> at
>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.basicExecute(EMFStoreTransactionalCommandStack.java:163)
>>
>> at
>> org.eclipse.emf.transaction.impl.TransactionalCommandStackImpl.doExecute(TransactionalCommandStackImpl.java:63)
>>
>> at
>> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
>>
>> at
>> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
>>
>> at
>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.runEMFStoreCommand(EMFStoreTransactionalCommandStack.java:64)
>>
>> at
>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.execute(EMFStoreTransactionalCommandStack.java:49)
>>
>> at
>> org.eclipse.emf.emfstore.internal.client.model.util.AbstractEMFStoreCommand.aRun(AbstractEMFStoreCommand.java:108)
>>
>> at
>> org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommand.run(EMFStoreCommand.java:60)
>>
>> at
>> org.eclipse.emf.emfstore.internal.client.model.impl.api.ESServerImpl.login(ESServerImpl.java:236)
>>
>> at
>> com.humanfactor.rw.timing.simulation.ui.TimerSimulation.setup(TimerSimulation.java:201)
>>
>> at
>> com.humanfactor.rw.timing.simulation.SimulationClient.runSimulation(SimulationClient.java:88)
>>
>> at
>> com.humanfactor.rw.timing.simulation.ui.action.RunSimulationAction.run(RunSimulationAction.java:25)
>>
>> at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
>> at
>> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
>>
>> at
>> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
>>
>> at
>> org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
>>
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
>> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
>> at
>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
>>
>> at
>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>
>> at
>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
>>
>> at
>> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
>>
>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
>> at
>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
>> at
>> com.humanfactor.rw.timing.simulation.ui.Application.start(Application.java:20)
>>
>> at
>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>>
>> at
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>>
>> at
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
>> at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
>> at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
>> Caused by: org.apache.xmlrpc.XmlRpcException: Failed to read XML-RPC
>> request: Invalid byte 1 of 1-byte UTF-8 sequence.
>> at
>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:73)
>>
>> at
>> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>>
>> at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
>> at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
>> Caused by:
>> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
>> Invalid byte 1 of 1-byte UTF-8 sequence.
>> at
>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown Source)
>>
>> at
>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>> Source)
>> at
>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>>
>> ... 3 more
>
>
Re: [EMFStore] Feature request: ability to configure compression for XML-RPC requests and responses [message #1296931 is a reply to message #1295896] Tue, 15 April 2014 09:54 Go to previous messageGo to next message
Maximilian Koegel is currently offline Maximilian KoegelFriend
Messages: 253
Registered: July 2009
Senior Member
Yes, this is a good idea! If this works it could be a nice contribution,
but it should be configurable somehow, since I would not like to change
the default at this time.

Cheers,
Maximilian

Am 14.04.2014 19:18, schrieb scott@xxxxxxxx:
>
> After some investigation, it turns out that the simple XML-RPC WebServer
> implementation that EMFStore is based on doesn't support gzip
> compression. I traced it down to
> org.apache.xmlrpc.webserver.Connection.getRequestConfig(), which doesn't
> have the logic needed to extract the request data (Content-Encoding
> header) telling the server whether the request is gzipped or not --- or
> whether the response back to the client should be gzipped
> (Accept-Encoding header). Perhaps there are others parts missing, too,
> but I didn't check.
>
> XML-RPC supports compression if it's deployed into a standard web
> container using XmlRpcServlet or using XmlRpcServletServer. Moving from
> the WebServer-based to XmlRpcServlet-based implementation is a bit too
> much for me given my limited understanding of EMFStore server internals.
> How difficult would it be to migrate to XmlRpcServer or
> XmlRpcServletServer?
>
> One possible way forward is to compress/uncompress the message payloads
> in the EObjectSerializer and EObjectTypeParser. I inserted a few lines
> of code in both of these classes and the results are promising. Typical
> commits include several changes my log file shows around 20:1
> compression ratio for change package payloads. Here's a typical change
> payload:
>
> Bytes before uncompress = 3185
> Bytes after uncompress = 62736
>
> Sounds like a good approach?
>
> $cott
>
>
>
> On 4/11/2014 4:13 AM, Maximilian Koegel wrote:
>> Hi Scott,
>>
>> there is a similar class on the server side: XmlRpcWebserverManager
>> I guess you could configure the XML-RPC layer there to also use
>> compression on the receiving end and it should work then.
>> I would be happy to accept a contribution to make both configurations
>> API also.
>> Hope this helps!
>>
>> Best regards,
>> Maximilian
>>
>>
>> Am 08.04.2014 00:10, schrieb scott@xxxxxxxx:
>>> My application needs to work over a cellular network where bandwidth is
>>> quite constrained, so I'd like to be able configure the XML-RPC layer to
>>> use GZIP compression.
>>>
>>> Based on the instructions from the Apache XML-RPC site
>>> (http://ws.apache.org/xmlrpc/client.html), I tried setting the XML-RPC
>>> config in
>>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.
>>>
>>> initConnection() by adding these two lines:
>>>
>>> config.setGzipCompressing(true);
>>> config.setGzipRequesting(true);
>>>
>>> but that ended with exceptions on both the client and server. Is it
>>> possible to turn on compression for EMFStore requests and responses? If
>>> so, how?
>>>
>>>
>>> First the server exception:
>>>
>>> Apr 07, 2014 5:33:49 PM org.apache.xmlrpc.server.XmlRpcErrorLogger log
>>> SEVERE: Failed to read XML-RPC request: Invalid byte 1 of 1-byte UTF-8
>>> sequence.
>>> org.apache.xmlrpc.XmlRpcException: Failed to read XML-RPC request:
>>> Invalid byte 1 of 1-byte UTF-8 sequence.
>>> at
>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:73)
>>>
>>>
>>> at
>>> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>>>
>>>
>>> at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
>>> at
>>> org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
>>> Caused by:
>>> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
>>>
>>> Invalid byte 1 of 1-byte UTF-8 sequence.
>>> at
>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown
>>> Source)
>>>
>>> at
>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>>>
>>> Source)
>>> at
>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>>>
>>>
>>> ... 3 more
>>> Caused by:
>>> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
>>>
>>> Invalid byte 1 of 1-byte UTF-8 sequence.
>>> at
>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown
>>> Source)
>>>
>>> at
>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>>>
>>> Source)
>>> at
>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>>>
>>>
>>> at
>>> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>>>
>>>
>>> at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
>>> at
>>> org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
>>>
>>>
>>>
>>>
>>> And here is the client exception:
>>>
>>> org.eclipse.emf.emfstore.internal.server.exceptions.ConnectionException:
>>> Server could not be reached.
>>> Failed to read XML-RPC request: Invalid byte 1 of 1-byte UTF-8 sequence.
>>> at
>>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.executeCall(XmlRpcClientManager.java:168)
>>>
>>>
>>> at
>>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.callWithResult(XmlRpcClientManager.java:114)
>>>
>>>
>>> at
>>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcConnectionManager.logIn(XmlRpcConnectionManager.java:61)
>>>
>>>
>>> at
>>> org.eclipse.emf.emfstore.internal.client.model.impl.UsersessionImpl.logIn(UsersessionImpl.java:590)
>>>
>>>
>>> at
>>> org.eclipse.emf.emfstore.internal.client.model.impl.api.ESServerImpl$5.doRun(ESServerImpl.java:227)
>>>
>>>
>>> at
>>> org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommand.commandBody(EMFStoreCommand.java:51)
>>>
>>>
>>> at
>>> org.eclipse.emf.emfstore.internal.client.model.util.AbstractEMFStoreCommand.execute(AbstractEMFStoreCommand.java:64)
>>>
>>>
>>> at
>>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack$1.doExecute(EMFStoreTransactionalCommandStack.java:61)
>>>
>>>
>>> at
>>> org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
>>>
>>>
>>> at
>>> org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:78)
>>>
>>>
>>> at
>>> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.basicExecute(AbstractTransactionalCommandStack.java:241)
>>>
>>>
>>> at
>>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.basicExecute(EMFStoreTransactionalCommandStack.java:163)
>>>
>>>
>>> at
>>> org.eclipse.emf.transaction.impl.TransactionalCommandStackImpl.doExecute(TransactionalCommandStackImpl.java:63)
>>>
>>>
>>> at
>>> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
>>>
>>>
>>> at
>>> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
>>>
>>>
>>> at
>>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.runEMFStoreCommand(EMFStoreTransactionalCommandStack.java:64)
>>>
>>>
>>> at
>>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.execute(EMFStoreTransactionalCommandStack.java:49)
>>>
>>>
>>> at
>>> org.eclipse.emf.emfstore.internal.client.model.util.AbstractEMFStoreCommand.aRun(AbstractEMFStoreCommand.java:108)
>>>
>>>
>>> at
>>> org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommand.run(EMFStoreCommand.java:60)
>>>
>>>
>>> at
>>> org.eclipse.emf.emfstore.internal.client.model.impl.api.ESServerImpl.login(ESServerImpl.java:236)
>>>
>>>
>>> at
>>> com.humanfactor.rw.timing.simulation.ui.TimerSimulation.setup(TimerSimulation.java:201)
>>>
>>>
>>> at
>>> com.humanfactor.rw.timing.simulation.SimulationClient.runSimulation(SimulationClient.java:88)
>>>
>>>
>>> at
>>> com.humanfactor.rw.timing.simulation.ui.action.RunSimulationAction.run(RunSimulationAction.java:25)
>>>
>>>
>>> at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
>>> at
>>> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
>>>
>>>
>>> at
>>> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
>>>
>>>
>>> at
>>> org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
>>>
>>>
>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
>>> at
>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
>>> at
>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
>>> at
>>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
>>>
>>>
>>> at
>>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>>
>>>
>>> at
>>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
>>>
>>>
>>> at
>>> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
>>>
>>>
>>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
>>> at
>>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>>
>>>
>>> at
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
>>>
>>> at
>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
>>> at
>>> com.humanfactor.rw.timing.simulation.ui.Application.start(Application.java:20)
>>>
>>>
>>> at
>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>>>
>>>
>>> at
>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>>>
>>>
>>> at
>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>>>
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
>>>
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
>>>
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>> at java.lang.reflect.Method.invoke(Unknown Source)
>>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
>>> Caused by: org.apache.xmlrpc.XmlRpcException: Failed to read XML-RPC
>>> request: Invalid byte 1 of 1-byte UTF-8 sequence.
>>> at
>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:73)
>>>
>>>
>>> at
>>> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>>>
>>>
>>> at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
>>> at
>>> org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
>>> Caused by:
>>> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
>>>
>>> Invalid byte 1 of 1-byte UTF-8 sequence.
>>> at
>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown
>>> Source)
>>>
>>> at
>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>>>
>>> Source)
>>> at
>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>>>
>>>
>>> ... 3 more
>>
>>
>


--
Maximilian Kögel

Get Professional Eclipse Support: http://eclipsesource.com/munich
Re: [EMFStore] Feature request: ability to configure compression for XML-RPC requests and responses [message #1297077 is a reply to message #1296931] Tue, 15 April 2014 11:56 Go to previous messageGo to next message
Scott Dybiec is currently offline Scott DybiecFriend
Messages: 148
Registered: July 2009
Senior Member
Great. I agree it should be configurable and the default should be no
compression. For configuration here are two options:

1. Extension point
org.eclipse.emf.emfstore.common.model.serializationOptions
2. A new variable and method in Configuration.getXMLRPC()

In the first option serialization options would need to be shared across
both EObjectSerializer and EObjectTypeParser. Today only
EObjectSerializer uses these options. Also, a reboot of the server and
client would be required to change the setting.

In the second option compression could be turned off and on dynamically.

Which do you prefer? Or maybe you prefer another place for this
configuration info. Let me know.

If you ever intend on moving the code base to support
XmlRpcServletServer, then adding these two additional variables and
methods would make compression a client-side decision w/o having to
configure the server:

1. Configuration.getXMLRPC().isXmlRPCGzipCompressing()
2. Configuration.getXMLRPC().isXmlRPCGzipRequesting()

Thanks,

Scott

On 4/15/2014 5:54 AM, Maximilian Koegel wrote:
> Yes, this is a good idea! If this works it could be a nice contribution,
> but it should be configurable somehow, since I would not like to change
> the default at this time.
>
> Cheers,
> Maximilian
>
> Am 14.04.2014 19:18, schrieb scott@xxxxxxxx:
>>
>> After some investigation, it turns out that the simple XML-RPC WebServer
>> implementation that EMFStore is based on doesn't support gzip
>> compression. I traced it down to
>> org.apache.xmlrpc.webserver.Connection.getRequestConfig(), which doesn't
>> have the logic needed to extract the request data (Content-Encoding
>> header) telling the server whether the request is gzipped or not --- or
>> whether the response back to the client should be gzipped
>> (Accept-Encoding header). Perhaps there are others parts missing, too,
>> but I didn't check.
>>
>> XML-RPC supports compression if it's deployed into a standard web
>> container using XmlRpcServlet or using XmlRpcServletServer. Moving from
>> the WebServer-based to XmlRpcServlet-based implementation is a bit too
>> much for me given my limited understanding of EMFStore server internals.
>> How difficult would it be to migrate to XmlRpcServer or
>> XmlRpcServletServer?
>>
>> One possible way forward is to compress/uncompress the message payloads
>> in the EObjectSerializer and EObjectTypeParser. I inserted a few lines
>> of code in both of these classes and the results are promising. Typical
>> commits include several changes my log file shows around 20:1
>> compression ratio for change package payloads. Here's a typical change
>> payload:
>>
>> Bytes before uncompress = 3185
>> Bytes after uncompress = 62736
>>
>> Sounds like a good approach?
>>
>> $cott
>>
>>
>>
>> On 4/11/2014 4:13 AM, Maximilian Koegel wrote:
>>> Hi Scott,
>>>
>>> there is a similar class on the server side: XmlRpcWebserverManager
>>> I guess you could configure the XML-RPC layer there to also use
>>> compression on the receiving end and it should work then.
>>> I would be happy to accept a contribution to make both configurations
>>> API also.
>>> Hope this helps!
>>>
>>> Best regards,
>>> Maximilian
>>>
>>>
>>> Am 08.04.2014 00:10, schrieb scott@xxxxxxxx:
>>>> My application needs to work over a cellular network where bandwidth is
>>>> quite constrained, so I'd like to be able configure the XML-RPC layer to
>>>> use GZIP compression.
>>>>
>>>> Based on the instructions from the Apache XML-RPC site
>>>> (http://ws.apache.org/xmlrpc/client.html), I tried setting the XML-RPC
>>>> config in
>>>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.
>>>>
>>>> initConnection() by adding these two lines:
>>>>
>>>> config.setGzipCompressing(true);
>>>> config.setGzipRequesting(true);
>>>>
>>>> but that ended with exceptions on both the client and server. Is it
>>>> possible to turn on compression for EMFStore requests and responses? If
>>>> so, how?
>>>>
>>>>
>>>> First the server exception:
>>>>
>>>> Apr 07, 2014 5:33:49 PM org.apache.xmlrpc.server.XmlRpcErrorLogger log
>>>> SEVERE: Failed to read XML-RPC request: Invalid byte 1 of 1-byte UTF-8
>>>> sequence.
>>>> org.apache.xmlrpc.XmlRpcException: Failed to read XML-RPC request:
>>>> Invalid byte 1 of 1-byte UTF-8 sequence.
>>>> at
>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:73)
>>>>
>>>>
>>>> at
>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>>>>
>>>>
>>>> at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
>>>> at
>>>> org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
>>>> Caused by:
>>>> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
>>>>
>>>> Invalid byte 1 of 1-byte UTF-8 sequence.
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown
>>>> Source)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>>>>
>>>> Source)
>>>> at
>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>>>>
>>>>
>>>> ... 3 more
>>>> Caused by:
>>>> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
>>>>
>>>> Invalid byte 1 of 1-byte UTF-8 sequence.
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown
>>>> Source)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>>>>
>>>> Source)
>>>> at
>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>>>>
>>>>
>>>> at
>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>>>>
>>>>
>>>> at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
>>>> at
>>>> org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
>>>>
>>>>
>>>>
>>>>
>>>> And here is the client exception:
>>>>
>>>> org.eclipse.emf.emfstore.internal.server.exceptions.ConnectionException:
>>>> Server could not be reached.
>>>> Failed to read XML-RPC request: Invalid byte 1 of 1-byte UTF-8 sequence.
>>>> at
>>>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.executeCall(XmlRpcClientManager.java:168)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.callWithResult(XmlRpcClientManager.java:114)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcConnectionManager.logIn(XmlRpcConnectionManager.java:61)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.emfstore.internal.client.model.impl.UsersessionImpl.logIn(UsersessionImpl.java:590)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.emfstore.internal.client.model.impl.api.ESServerImpl$5.doRun(ESServerImpl.java:227)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommand.commandBody(EMFStoreCommand.java:51)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.emfstore.internal.client.model.util.AbstractEMFStoreCommand.execute(AbstractEMFStoreCommand.java:64)
>>>>
>>>>
>>>> at
>>>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack$1.doExecute(EMFStoreTransactionalCommandStack.java:61)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:78)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.basicExecute(AbstractTransactionalCommandStack.java:241)
>>>>
>>>>
>>>> at
>>>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.basicExecute(EMFStoreTransactionalCommandStack.java:163)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.transaction.impl.TransactionalCommandStackImpl.doExecute(TransactionalCommandStackImpl.java:63)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
>>>>
>>>>
>>>> at
>>>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.runEMFStoreCommand(EMFStoreTransactionalCommandStack.java:64)
>>>>
>>>>
>>>> at
>>>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.execute(EMFStoreTransactionalCommandStack.java:49)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.emfstore.internal.client.model.util.AbstractEMFStoreCommand.aRun(AbstractEMFStoreCommand.java:108)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommand.run(EMFStoreCommand.java:60)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.emfstore.internal.client.model.impl.api.ESServerImpl.login(ESServerImpl.java:236)
>>>>
>>>>
>>>> at
>>>> com.humanfactor.rw.timing.simulation.ui.TimerSimulation.setup(TimerSimulation.java:201)
>>>>
>>>>
>>>> at
>>>> com.humanfactor.rw.timing.simulation.SimulationClient.runSimulation(SimulationClient.java:88)
>>>>
>>>>
>>>> at
>>>> com.humanfactor.rw.timing.simulation.ui.action.RunSimulationAction.run(RunSimulationAction.java:25)
>>>>
>>>>
>>>> at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
>>>> at
>>>> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
>>>>
>>>>
>>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
>>>> at
>>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
>>>> at
>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
>>>> at
>>>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
>>>>
>>>>
>>>> at
>>>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>>>
>>>>
>>>> at
>>>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
>>>>
>>>>
>>>> at
>>>> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
>>>>
>>>>
>>>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
>>>> at
>>>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>>>
>>>>
>>>> at
>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
>>>>
>>>> at
>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
>>>> at
>>>> com.humanfactor.rw.timing.simulation.ui.Application.start(Application.java:20)
>>>>
>>>>
>>>> at
>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>>>>
>>>>
>>>> at
>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>>>>
>>>>
>>>> at
>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>>>>
>>>>
>>>> at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
>>>>
>>>>
>>>> at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
>>>>
>>>>
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>>> at java.lang.reflect.Method.invoke(Unknown Source)
>>>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
>>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
>>>> Caused by: org.apache.xmlrpc.XmlRpcException: Failed to read XML-RPC
>>>> request: Invalid byte 1 of 1-byte UTF-8 sequence.
>>>> at
>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:73)
>>>>
>>>>
>>>> at
>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>>>>
>>>>
>>>> at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
>>>> at
>>>> org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
>>>> Caused by:
>>>> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
>>>>
>>>> Invalid byte 1 of 1-byte UTF-8 sequence.
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown
>>>> Source)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>>>>
>>>> Source)
>>>> at
>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>>>>
>>>>
>>>> ... 3 more
>>>
>>>
>>
>
>
Re: [EMFStore] Feature request: ability to configure compression for XML-RPC requests and responses [message #1297187 is a reply to message #1297077] Tue, 15 April 2014 13:38 Go to previous messageGo to next message
Scott Dybiec is currently offline Scott DybiecFriend
Messages: 148
Registered: July 2009
Senior Member
Here are the core changes to EObjectSerializer and EObjectTypeParser:

Changes in EObjectTypeParser:

In EObjectTypeParser.getResult() insert 7 lines of code:

InputStream bais;
if (useCompression()) {
logCompressionStats(res);
bais = new GZIPInputStream(new ByteArrayInputStream(res));
} else {
bais = new ByteArrayInputStream(res);
}

between these two lines of code:

final byte[] res = (byte[]) super.getResult();
reader = new BufferedReader(new InputStreamReader(bais,
CommonUtil.getEncoding()));

And add these three methods (logging methods just in case you need them):

private boolean useCompression() {
return true;
}

private void logCompressionStats(byte[] compressedByteArray) throws
IOException {
final byte[] uncompressedByteArray =
decompressGzipByteArray(compressedByteArray, 1024);
final double compressionRatio = new
Double(uncompressedByteArray.length) / compressedByteArray.length;
final DecimalFormat df = new DecimalFormat("#.#");
System.out.println("Uncompressed from " + compressedByteArray.length +
" --> " + uncompressedByteArray.length
+ " bytes. Compression ratio = " + df.format(compressionRatio) + ":1");
}

private byte[] decompressGzipByteArray(byte[] compressedByteArray, int
bufferlength)
throws IOException {
final ByteArrayOutputStream uncompressedStream = new
ByteArrayOutputStream();
final GZIPInputStream compressedStream = new GZIPInputStream(new
ByteArrayInputStream(compressedByteArray));
final byte[] buffer = new byte[bufferlength];
int index = -1;

while ((index = compressedStream.read(buffer)) != -1) {
uncompressedStream.write(buffer, 0, index);
}

return uncompressedStream.toByteArray();
}

Changes in EObjectSerializer

In EObjectSerializer.write() insert:

BufferedOutputStream bos;
if (useCompression()) {
bos = new BufferedOutputStream(new GZIPOutputStream(ostream));
} else {
bos = new BufferedOutputStream(ostream);
}

after this line:

final OutputStream ostream = new EncoderOutputStream(encoder);

And add this method:

private boolean useCompression() {
return true;
}

When you decide how to configure compression, update the
useCompression() methods.

FYI, here's the complete set of decompressions for a commit in my
application:

Uncompressed from 198 --> 283 bytes. Compression ratio = 1.4:1
Uncompressed from 198 --> 283 bytes. Compression ratio = 1.4:1
Uncompressed from 182 --> 293 bytes. Compression ratio = 1.6:1
Uncompressed from 198 --> 283 bytes. Compression ratio = 1.4:1
Uncompressed from 198 --> 283 bytes. Compression ratio = 1.4:1
Uncompressed from 182 --> 293 bytes. Compression ratio = 1.6:1
Uncompressed from 198 --> 283 bytes. Compression ratio = 1.4:1
Uncompressed from 198 --> 283 bytes. Compression ratio = 1.4:1
Uncompressed from 236 --> 356 bytes. Compression ratio = 1.5:1
Uncompressed from 3282 --> 65115 bytes. Compression ratio = 19.8:1
Uncompressed from 245 --> 371 bytes. Compression ratio = 1.5:1

!ENTRY org.eclipse.emf.emfstore.common.model 1 1 2014-04-15 09:07:16.247
!MESSAGE Total time for commit: 758
Total time for commit: 758

Thanks,

Scott


On 4/15/2014 7:56 AM, scott@xxxxxxxx wrote:
> Great. I agree it should be configurable and the default should be no
> compression. For configuration here are two options:
>
> 1. Extension point
> org.eclipse.emf.emfstore.common.model.serializationOptions
> 2. A new variable and method in Configuration.getXMLRPC()
>
> In the first option serialization options would need to be shared across
> both EObjectSerializer and EObjectTypeParser. Today only
> EObjectSerializer uses these options. Also, a reboot of the server and
> client would be required to change the setting.
>
> In the second option compression could be turned off and on dynamically.
>
> Which do you prefer? Or maybe you prefer another place for this
> configuration info. Let me know.
>
> If you ever intend on moving the code base to support
> XmlRpcServletServer, then adding these two additional variables and
> methods would make compression a client-side decision w/o having to
> configure the server:
>
> 1. Configuration.getXMLRPC().isXmlRPCGzipCompressing()
> 2. Configuration.getXMLRPC().isXmlRPCGzipRequesting()
>
> Thanks,
>
> Scott
>
> On 4/15/2014 5:54 AM, Maximilian Koegel wrote:
>> Yes, this is a good idea! If this works it could be a nice contribution,
>> but it should be configurable somehow, since I would not like to change
>> the default at this time.
>>
>> Cheers,
>> Maximilian
>>
>> Am 14.04.2014 19:18, schrieb scott@xxxxxxxx:
>>>
>>> After some investigation, it turns out that the simple XML-RPC WebServer
>>> implementation that EMFStore is based on doesn't support gzip
>>> compression. I traced it down to
>>> org.apache.xmlrpc.webserver.Connection.getRequestConfig(), which doesn't
>>> have the logic needed to extract the request data (Content-Encoding
>>> header) telling the server whether the request is gzipped or not --- or
>>> whether the response back to the client should be gzipped
>>> (Accept-Encoding header). Perhaps there are others parts missing, too,
>>> but I didn't check.
>>>
>>> XML-RPC supports compression if it's deployed into a standard web
>>> container using XmlRpcServlet or using XmlRpcServletServer. Moving from
>>> the WebServer-based to XmlRpcServlet-based implementation is a bit too
>>> much for me given my limited understanding of EMFStore server internals.
>>> How difficult would it be to migrate to XmlRpcServer or
>>> XmlRpcServletServer?
>>>
>>> One possible way forward is to compress/uncompress the message payloads
>>> in the EObjectSerializer and EObjectTypeParser. I inserted a few lines
>>> of code in both of these classes and the results are promising. Typical
>>> commits include several changes my log file shows around 20:1
>>> compression ratio for change package payloads. Here's a typical change
>>> payload:
>>>
>>> Bytes before uncompress = 3185
>>> Bytes after uncompress = 62736
>>>
>>> Sounds like a good approach?
>>>
>>> $cott
>>>
>>>
>>>
>>> On 4/11/2014 4:13 AM, Maximilian Koegel wrote:
>>>> Hi Scott,
>>>>
>>>> there is a similar class on the server side: XmlRpcWebserverManager
>>>> I guess you could configure the XML-RPC layer there to also use
>>>> compression on the receiving end and it should work then.
>>>> I would be happy to accept a contribution to make both configurations
>>>> API also.
>>>> Hope this helps!
>>>>
>>>> Best regards,
>>>> Maximilian
>>>>
>>>>
>>>> Am 08.04.2014 00:10, schrieb scott@xxxxxxxx:
>>>>> My application needs to work over a cellular network where
>>>>> bandwidth is
>>>>> quite constrained, so I'd like to be able configure the XML-RPC
>>>>> layer to
>>>>> use GZIP compression.
>>>>>
>>>>> Based on the instructions from the Apache XML-RPC site
>>>>> (http://ws.apache.org/xmlrpc/client.html), I tried setting the XML-RPC
>>>>> config in
>>>>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.
>>>>>
>>>>>
>>>>> initConnection() by adding these two lines:
>>>>>
>>>>> config.setGzipCompressing(true);
>>>>> config.setGzipRequesting(true);
>>>>>
>>>>> but that ended with exceptions on both the client and server. Is it
>>>>> possible to turn on compression for EMFStore requests and
>>>>> responses? If
>>>>> so, how?
>>>>>
>>>>>
>>>>> First the server exception:
>>>>>
>>>>> Apr 07, 2014 5:33:49 PM org.apache.xmlrpc.server.XmlRpcErrorLogger log
>>>>> SEVERE: Failed to read XML-RPC request: Invalid byte 1 of 1-byte UTF-8
>>>>> sequence.
>>>>> org.apache.xmlrpc.XmlRpcException: Failed to read XML-RPC request:
>>>>> Invalid byte 1 of 1-byte UTF-8 sequence.
>>>>> at
>>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:73)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
>>>>> at
>>>>> org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
>>>>> Caused by:
>>>>> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
>>>>>
>>>>>
>>>>> Invalid byte 1 of 1-byte UTF-8 sequence.
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown
>>>>>
>>>>> Source)
>>>>>
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>>>>>
>>>>>
>>>>>
>>>>> ... 3 more
>>>>> Caused by:
>>>>> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
>>>>>
>>>>>
>>>>> Invalid byte 1 of 1-byte UTF-8 sequence.
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown
>>>>>
>>>>> Source)
>>>>>
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
>>>>> at
>>>>> org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> And here is the client exception:
>>>>>
>>>>> org.eclipse.emf.emfstore.internal.server.exceptions.ConnectionException:
>>>>>
>>>>> Server could not be reached.
>>>>> Failed to read XML-RPC request: Invalid byte 1 of 1-byte UTF-8
>>>>> sequence.
>>>>> at
>>>>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.executeCall(XmlRpcClientManager.java:168)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.callWithResult(XmlRpcClientManager.java:114)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcConnectionManager.logIn(XmlRpcConnectionManager.java:61)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.emfstore.internal.client.model.impl.UsersessionImpl.logIn(UsersessionImpl.java:590)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.emfstore.internal.client.model.impl.api.ESServerImpl$5.doRun(ESServerImpl.java:227)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommand.commandBody(EMFStoreCommand.java:51)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.emfstore.internal.client.model.util.AbstractEMFStoreCommand.execute(AbstractEMFStoreCommand.java:64)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack$1.doExecute(EMFStoreTransactionalCommandStack.java:61)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:78)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.basicExecute(AbstractTransactionalCommandStack.java:241)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.basicExecute(EMFStoreTransactionalCommandStack.java:163)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.transaction.impl.TransactionalCommandStackImpl.doExecute(TransactionalCommandStackImpl.java:63)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.runEMFStoreCommand(EMFStoreTransactionalCommandStack.java:64)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.execute(EMFStoreTransactionalCommandStack.java:49)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.emfstore.internal.client.model.util.AbstractEMFStoreCommand.aRun(AbstractEMFStoreCommand.java:108)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommand.run(EMFStoreCommand.java:60)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.emfstore.internal.client.model.impl.api.ESServerImpl.login(ESServerImpl.java:236)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> com.humanfactor.rw.timing.simulation.ui.TimerSimulation.setup(TimerSimulation.java:201)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> com.humanfactor.rw.timing.simulation.SimulationClient.runSimulation(SimulationClient.java:88)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> com.humanfactor.rw.timing.simulation.ui.action.RunSimulationAction.run(RunSimulationAction.java:25)
>>>>>
>>>>>
>>>>>
>>>>> at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
>>>>> at
>>>>> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
>>>>> at
>>>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
>>>>> at
>>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
>>>>> at
>>>>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
>>>>>
>>>>>
>>>>>
>>>>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
>>>>> at
>>>>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
>>>>> at
>>>>> com.humanfactor.rw.timing.simulation.ui.Application.start(Application.java:20)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
>>>>>
>>>>>
>>>>>
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
>>>>> Source)
>>>>> at java.lang.reflect.Method.invoke(Unknown Source)
>>>>> at
>>>>> org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
>>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
>>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
>>>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
>>>>> Caused by: org.apache.xmlrpc.XmlRpcException: Failed to read XML-RPC
>>>>> request: Invalid byte 1 of 1-byte UTF-8 sequence.
>>>>> at
>>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:73)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
>>>>> at
>>>>> org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
>>>>> Caused by:
>>>>> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
>>>>>
>>>>>
>>>>> Invalid byte 1 of 1-byte UTF-8 sequence.
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown
>>>>>
>>>>> Source)
>>>>>
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>>>>>
>>>>>
>>>>> Source)
>>>>> at
>>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>>>>>
>>>>>
>>>>>
>>>>> ... 3 more
>>>>
>>>>
>>>
>>
>>
>
Re: [EMFStore] Feature request: ability to configure compression for XML-RPC requests and responses [message #1311024 is a reply to message #1297187] Wed, 23 April 2014 14:53 Go to previous message
Edgar Mueller is currently offline Edgar MuellerFriend
Messages: 89
Registered: March 2011
Member
Hi Scott,

first of all, sorry for delay, we all were on holidays.
The changes you made look good. Regarding the configuration:
I think on the server side the compression method should be specified
within the es.properties file, since this file contains all relevant
server configuration options, whereas the client could use the
serializationOptions extension point.

Did you test this with a server that does not support compression
(option turned off) and a client sending a compressed request (option
turned on) and vice versa?

Also, would you mind opening a bug report for your changes and attaching
them as a patch (see
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMFStore)?

Thanks for your work so far!

Cheers,
Edgar


Am 15.04.2014 15:38, schrieb scott@xxxxxxxx:
> Here are the core changes to EObjectSerializer and EObjectTypeParser:
>
> Changes in EObjectTypeParser:
>
> In EObjectTypeParser.getResult() insert 7 lines of code:
>
> InputStream bais;
> if (useCompression()) {
> logCompressionStats(res);
> bais = new GZIPInputStream(new ByteArrayInputStream(res));
> } else {
> bais = new ByteArrayInputStream(res);
> }
>
> between these two lines of code:
>
> final byte[] res = (byte[]) super.getResult();
> reader = new BufferedReader(new InputStreamReader(bais,
> CommonUtil.getEncoding()));
>
> And add these three methods (logging methods just in case you need them):
>
> private boolean useCompression() {
> return true;
> }
>
> private void logCompressionStats(byte[] compressedByteArray) throws
> IOException {
> final byte[] uncompressedByteArray =
> decompressGzipByteArray(compressedByteArray, 1024);
> final double compressionRatio = new
> Double(uncompressedByteArray.length) / compressedByteArray.length;
> final DecimalFormat df = new DecimalFormat("#.#");
> System.out.println("Uncompressed from " + compressedByteArray.length
> + " --> " + uncompressedByteArray.length
> + " bytes. Compression ratio = " +
> df.format(compressionRatio) + ":1");
> }
>
> private byte[] decompressGzipByteArray(byte[] compressedByteArray, int
> bufferlength)
> throws IOException {
> final ByteArrayOutputStream uncompressedStream = new
> ByteArrayOutputStream();
> final GZIPInputStream compressedStream = new GZIPInputStream(new
> ByteArrayInputStream(compressedByteArray));
> final byte[] buffer = new byte[bufferlength];
> int index = -1;
>
> while ((index = compressedStream.read(buffer)) != -1) {
> uncompressedStream.write(buffer, 0, index);
> }
>
> return uncompressedStream.toByteArray();
> }
>
> Changes in EObjectSerializer
>
> In EObjectSerializer.write() insert:
>
> BufferedOutputStream bos;
> if (useCompression()) {
> bos = new BufferedOutputStream(new GZIPOutputStream(ostream));
> } else {
> bos = new BufferedOutputStream(ostream);
> }
>
> after this line:
>
> final OutputStream ostream = new EncoderOutputStream(encoder);
>
> And add this method:
>
> private boolean useCompression() {
> return true;
> }
>
> When you decide how to configure compression, update the
> useCompression() methods.
>
> FYI, here's the complete set of decompressions for a commit in my
> application:
>
> Uncompressed from 198 --> 283 bytes. Compression ratio = 1.4:1
> Uncompressed from 198 --> 283 bytes. Compression ratio = 1.4:1
> Uncompressed from 182 --> 293 bytes. Compression ratio = 1.6:1
> Uncompressed from 198 --> 283 bytes. Compression ratio = 1.4:1
> Uncompressed from 198 --> 283 bytes. Compression ratio = 1.4:1
> Uncompressed from 182 --> 293 bytes. Compression ratio = 1.6:1
> Uncompressed from 198 --> 283 bytes. Compression ratio = 1.4:1
> Uncompressed from 198 --> 283 bytes. Compression ratio = 1.4:1
> Uncompressed from 236 --> 356 bytes. Compression ratio = 1.5:1
> Uncompressed from 3282 --> 65115 bytes. Compression ratio = 19.8:1
> Uncompressed from 245 --> 371 bytes. Compression ratio = 1.5:1
>
> !ENTRY org.eclipse.emf.emfstore.common.model 1 1 2014-04-15 09:07:16.247
> !MESSAGE Total time for commit: 758
> Total time for commit: 758
>
> Thanks,
>
> Scott
>
>
> On 4/15/2014 7:56 AM, scott@xxxxxxxx wrote:
>> Great. I agree it should be configurable and the default should be no
>> compression. For configuration here are two options:
>>
>> 1. Extension point
>> org.eclipse.emf.emfstore.common.model.serializationOptions
>> 2. A new variable and method in Configuration.getXMLRPC()
>>
>> In the first option serialization options would need to be shared across
>> both EObjectSerializer and EObjectTypeParser. Today only
>> EObjectSerializer uses these options. Also, a reboot of the server and
>> client would be required to change the setting.
>>
>> In the second option compression could be turned off and on dynamically.
>>
>> Which do you prefer? Or maybe you prefer another place for this
>> configuration info. Let me know.
>>
>> If you ever intend on moving the code base to support
>> XmlRpcServletServer, then adding these two additional variables and
>> methods would make compression a client-side decision w/o having to
>> configure the server:
>>
>> 1. Configuration.getXMLRPC().isXmlRPCGzipCompressing()
>> 2. Configuration.getXMLRPC().isXmlRPCGzipRequesting()
>>
>> Thanks,
>>
>> Scott
>>
>> On 4/15/2014 5:54 AM, Maximilian Koegel wrote:
>>> Yes, this is a good idea! If this works it could be a nice contribution,
>>> but it should be configurable somehow, since I would not like to change
>>> the default at this time.
>>>
>>> Cheers,
>>> Maximilian
>>>
>>> Am 14.04.2014 19:18, schrieb scott@xxxxxxxx:
>>>>
>>>> After some investigation, it turns out that the simple XML-RPC
>>>> WebServer
>>>> implementation that EMFStore is based on doesn't support gzip
>>>> compression. I traced it down to
>>>> org.apache.xmlrpc.webserver.Connection.getRequestConfig(), which
>>>> doesn't
>>>> have the logic needed to extract the request data (Content-Encoding
>>>> header) telling the server whether the request is gzipped or not --- or
>>>> whether the response back to the client should be gzipped
>>>> (Accept-Encoding header). Perhaps there are others parts missing, too,
>>>> but I didn't check.
>>>>
>>>> XML-RPC supports compression if it's deployed into a standard web
>>>> container using XmlRpcServlet or using XmlRpcServletServer. Moving from
>>>> the WebServer-based to XmlRpcServlet-based implementation is a bit too
>>>> much for me given my limited understanding of EMFStore server
>>>> internals.
>>>> How difficult would it be to migrate to XmlRpcServer or
>>>> XmlRpcServletServer?
>>>>
>>>> One possible way forward is to compress/uncompress the message payloads
>>>> in the EObjectSerializer and EObjectTypeParser. I inserted a few lines
>>>> of code in both of these classes and the results are promising. Typical
>>>> commits include several changes my log file shows around 20:1
>>>> compression ratio for change package payloads. Here's a typical change
>>>> payload:
>>>>
>>>> Bytes before uncompress = 3185
>>>> Bytes after uncompress = 62736
>>>>
>>>> Sounds like a good approach?
>>>>
>>>> $cott
>>>>
>>>>
>>>>
>>>> On 4/11/2014 4:13 AM, Maximilian Koegel wrote:
>>>>> Hi Scott,
>>>>>
>>>>> there is a similar class on the server side: XmlRpcWebserverManager
>>>>> I guess you could configure the XML-RPC layer there to also use
>>>>> compression on the receiving end and it should work then.
>>>>> I would be happy to accept a contribution to make both configurations
>>>>> API also.
>>>>> Hope this helps!
>>>>>
>>>>> Best regards,
>>>>> Maximilian
>>>>>
>>>>>
>>>>> Am 08.04.2014 00:10, schrieb scott@xxxxxxxx:
>>>>>> My application needs to work over a cellular network where
>>>>>> bandwidth is
>>>>>> quite constrained, so I'd like to be able configure the XML-RPC
>>>>>> layer to
>>>>>> use GZIP compression.
>>>>>>
>>>>>> Based on the instructions from the Apache XML-RPC site
>>>>>> (http://ws.apache.org/xmlrpc/client.html), I tried setting the
>>>>>> XML-RPC
>>>>>> config in
>>>>>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.
>>>>>>
>>>>>>
>>>>>>
>>>>>> initConnection() by adding these two lines:
>>>>>>
>>>>>> config.setGzipCompressing(true);
>>>>>> config.setGzipRequesting(true);
>>>>>>
>>>>>> but that ended with exceptions on both the client and server. Is it
>>>>>> possible to turn on compression for EMFStore requests and
>>>>>> responses? If
>>>>>> so, how?
>>>>>>
>>>>>>
>>>>>> First the server exception:
>>>>>>
>>>>>> Apr 07, 2014 5:33:49 PM org.apache.xmlrpc.server.XmlRpcErrorLogger
>>>>>> log
>>>>>> SEVERE: Failed to read XML-RPC request: Invalid byte 1 of 1-byte
>>>>>> UTF-8
>>>>>> sequence.
>>>>>> org.apache.xmlrpc.XmlRpcException: Failed to read XML-RPC request:
>>>>>> Invalid byte 1 of 1-byte UTF-8 sequence.
>>>>>> at
>>>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:73)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
>>>>>> at
>>>>>> org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
>>>>>> Caused by:
>>>>>> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
>>>>>>
>>>>>>
>>>>>>
>>>>>> Invalid byte 1 of 1-byte UTF-8 sequence.
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>>
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ... 3 more
>>>>>> Caused by:
>>>>>> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
>>>>>>
>>>>>>
>>>>>>
>>>>>> Invalid byte 1 of 1-byte UTF-8 sequence.
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>>
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
>>>>>> at
>>>>>> org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> And here is the client exception:
>>>>>>
>>>>>> org.eclipse.emf.emfstore.internal.server.exceptions.ConnectionException:
>>>>>>
>>>>>>
>>>>>> Server could not be reached.
>>>>>> Failed to read XML-RPC request: Invalid byte 1 of 1-byte UTF-8
>>>>>> sequence.
>>>>>> at
>>>>>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.executeCall(XmlRpcClientManager.java:168)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcClientManager.callWithResult(XmlRpcClientManager.java:114)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcConnectionManager.logIn(XmlRpcConnectionManager.java:61)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.emfstore.internal.client.model.impl.UsersessionImpl.logIn(UsersessionImpl.java:590)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.emfstore.internal.client.model.impl.api.ESServerImpl$5.doRun(ESServerImpl.java:227)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommand.commandBody(EMFStoreCommand.java:51)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.emfstore.internal.client.model.util.AbstractEMFStoreCommand.execute(AbstractEMFStoreCommand.java:64)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack$1.doExecute(EMFStoreTransactionalCommandStack.java:61)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:78)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.basicExecute(AbstractTransactionalCommandStack.java:241)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.basicExecute(EMFStoreTransactionalCommandStack.java:163)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.transaction.impl.TransactionalCommandStackImpl.doExecute(TransactionalCommandStackImpl.java:63)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.runEMFStoreCommand(EMFStoreTransactionalCommandStack.java:64)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> com.humanfactor.emf.edocument.editingdomain.EMFStoreTransactionalCommandStack.execute(EMFStoreTransactionalCommandStack.java:49)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.emfstore.internal.client.model.util.AbstractEMFStoreCommand.aRun(AbstractEMFStoreCommand.java:108)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommand.run(EMFStoreCommand.java:60)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.emfstore.internal.client.model.impl.api.ESServerImpl.login(ESServerImpl.java:236)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> com.humanfactor.rw.timing.simulation.ui.TimerSimulation.setup(TimerSimulation.java:201)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> com.humanfactor.rw.timing.simulation.SimulationClient.runSimulation(SimulationClient.java:88)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> com.humanfactor.rw.timing.simulation.ui.action.RunSimulationAction.run(RunSimulationAction.java:25)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
>>>>>> at
>>>>>> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>>>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
>>>>>> at
>>>>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
>>>>>> at
>>>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
>>>>>> at
>>>>>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
>>>>>> at
>>>>>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
>>>>>> at
>>>>>> com.humanfactor.rw.timing.simulation.ui.Application.start(Application.java:20)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
>>>>>> Source)
>>>>>> at java.lang.reflect.Method.invoke(Unknown Source)
>>>>>> at
>>>>>> org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
>>>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
>>>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
>>>>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
>>>>>> Caused by: org.apache.xmlrpc.XmlRpcException: Failed to read XML-RPC
>>>>>> request: Invalid byte 1 of 1-byte UTF-8 sequence.
>>>>>> at
>>>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:73)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
>>>>>> at
>>>>>> org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
>>>>>> Caused by:
>>>>>> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
>>>>>>
>>>>>>
>>>>>>
>>>>>> Invalid byte 1 of 1-byte UTF-8 sequence.
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>>
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>>>>>>
>>>>>>
>>>>>>
>>>>>> Source)
>>>>>> at
>>>>>> org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ... 3 more
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>


--
Edgar Mueller

Get Professional Eclipse Support: http://eclipsesource.com/munich
Previous Topic:[EMF Client Platform] Multi-Page Editor
Next Topic:[ECP] Support for Non XMI File Extensions
Goto Forum:
  


Current Time: Mon Mar 08 10:16:00 GMT 2021

Powered by FUDForum. Page generated in 0.02622 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top