jankrause / idocit

Automatically exported from code.google.com/p/idocit
0 stars 0 forks source link

Restore default ThematicGrids does not work #95

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open the iDocIt! ThematicGrid preference page in Eclipse
2. click on "Restore Defaults"
3. Following error occurs (look into the Eclipse Error Log):

com.thoughtworks.xstream.io.StreamException:  : input contained no data
    at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:80)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:137)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:130)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:109)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractPullReader.java:94)
    at com.thoughtworks.xstream.io.xml.XppReader.<init>(XppReader.java:48)
    at com.thoughtworks.xstream.io.xml.XppDriver.createReader(XppDriver.java:44)
    at com.thoughtworks.xstream.io.xml.XppDriver.createReader(XppDriver.java:49)
    at com.thoughtworks.xstream.XStream.fromXML(XStream.java:869)
    at de.akra.idocit.core.services.impl.EclipsePersistenceService.loadThematicGrids(EclipsePersistenceService.java:521)
    at de.akra.idocit.ui.components.ThematicGridPreferencePage.loadPreferences(ThematicGridPreferencePage.java:88)
    at de.akra.idocit.ui.components.ThematicGridPreferencePage.performDefaults(ThematicGridPreferencePage.java:143)
    at org.eclipse.jface.preference.PreferencePage$1.widgetSelected(PreferencePage.java:267)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.open(WorkbenchPreferenceDialog.java:215)
    at org.eclipse.ui.internal.handlers.ShowPreferencePageHandler.execute(ShowPreferencePageHandler.java:54)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
    at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
    at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
    at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
    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:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
    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:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    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:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Caused by: java.io.EOFException: input contained no data
    at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3003)
    at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
    at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410)
    at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
    at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
    at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:63)
    ... 54 more

What is the expected output? What do you see instead?

The default grids shall be restored, but an error occurs.

Please use labels and text to provide additional information.

The InputStream to the thematicgrids.xml is only initialized once, so you can 
only read from once as well. If you try to read from it more than one time, you 
get exception "input contained no data".

Original issue reported on code.google.com by dirk.mei...@gmail.com on 11 Apr 2012 at 1:04

GoogleCodeExporter commented 9 years ago
Fixed with Revision r581. The InputStream is initialized every time before it 
is used now.

Original comment by dirk.mei...@gmail.com on 11 Apr 2012 at 1:06

GoogleCodeExporter commented 9 years ago
It works for me. I close this issue.

Original comment by krauseda...@web.de on 13 Apr 2012 at 12:52