eclipse-birt / birt

Eclipse BIRT™ The open source reporting and data visualization project.
http://www.eclipse.org/birt
Eclipse Public License 2.0
416 stars 385 forks source link

Designer preview not working when installation path contains space(s) #1683

Closed doortokaos closed 2 weeks ago

doortokaos commented 2 weeks ago

On BIRT 4.15 in AllInOne Designer the preview is not working on Windows (I didn't test Linux), when the installation path of the designer contains spaces. I got the following error message in the error log. My eclipse is installed in C:\eclipses\birtUpdate 415

java.lang.IllegalArgumentException: Error creating resource from URL: file:/C:/eclipses/birtUpdate 415/plugins/org.eclipse.birt.report.viewer_4.15.0.v202403270652/jetty/home/etc/jetty.xml
    at org.eclipse.jetty.util.resource.ResourceFactory.newResource(ResourceFactory.java:374)
    at org.eclipse.birt.report.viewer.utilities.ViewerWebServer.startAndConfigure(ViewerWebServer.java:128)
    at org.eclipse.birt.report.viewer.utilities.ViewerWebServer.start(ViewerWebServer.java:74)
    at org.eclipse.birt.report.viewer.utilities.AppServerWrapper.startJettyServer(AppServerWrapper.java:190)
    at org.eclipse.birt.report.viewer.utilities.AppServerWrapper.start(AppServerWrapper.java:135)
    at org.eclipse.birt.report.viewer.utilities.WebappAccessor.start(WebappAccessor.java:68)
    at org.eclipse.birt.report.viewer.utilities.WebViewer.startWebApp(WebViewer.java:673)
    at org.eclipse.birt.report.viewer.utilities.WebViewer.display(WebViewer.java:861)
    at org.eclipse.birt.report.viewer.utilities.WebViewer.display(WebViewer.java:857)
    at org.eclipse.birt.report.designer.ui.actions.PreviewSupport.preview(PreviewSupport.java:348)
    at org.eclipse.birt.report.designer.ui.actions.PreviewSupport$3.widgetSelected(PreviewSupport.java:217)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4274)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4072)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:152)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:639)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:546)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:651)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1459)
Caused by: java.net.URISyntaxException: Illegal character in path at index 28: file:/C:/eclipses/birtUpdate 415/plugins/org.eclipse.birt.report.viewer_4.15.0.v202403270652/jetty/home/etc/jetty.xml
    at java.base/java.net.URI$Parser.fail(URI.java:2976)
    at java.base/java.net.URI$Parser.checkChars(URI.java:3147)
    at java.base/java.net.URI$Parser.parseHierarchical(URI.java:3229)
    at java.base/java.net.URI$Parser.parse(URI.java:3177)
    at java.base/java.net.URI.<init>(URI.java:623)
    at java.base/java.net.URL.toURI(URL.java:1056)
    at org.eclipse.jetty.util.resource.ResourceFactory.newResource(ResourceFactory.java:370)
    ... 37 more

Preview works, when I change birtUpdate 415 to birtUpdate_415 in my installation path. The path to the workspace and design files may contain spaces, that's not a problem.

Should it be possible to install and use the designer in a path containing spaces?

merks commented 2 weeks ago

Please try 4.16 because I’m pretty sure this is fixed

https://download.eclipse.org/birt/updates/nightly/latest

merks commented 2 weeks ago

In particular I think it's fixed by this:

https://github.com/eclipse-birt/birt/pull/1629

So please test with the latest and if there is still a problem, let us know.