-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BIRT 4.14: After "Jetty 12" migration the web-viewer of the HTML-preview is crashed in design and functionality #1466
Comments
My guess is that the OSGI BundleException is because axis 1.4.0 and axis.ant 1.4.0 isn't selected in the debug configuration. (.launch file) |
I need to find time in the coming days to look closely at the current state. I hope later in this week. @claesrosell Did any test get disabled because of the circularity issue? |
No tests were disabled. I removed the circular dependency instead. |
Currently I have the effect on every report. Here is my report of my xlsx-fix. |
It looks like I missed updating one Jetty entry in the birt feature. It still points to 10.0.15 which can of cause create problems. |
Forget about what I wrote about the 10.0.15 version in the feature. I looked at the wrong place. |
The viewer looks correct on your side. |
Can you confirm that you have run the "Perform Setup Tasks -> Modular Target" thing? I do not know if that one updates the debug configuration as well, but probably not. You will need to make sure that the axis 1.4.0 and axis.ant 1.4.0 is selected. To be sure, also check the jetty plugins and check out any 10.0.15 bundles if you still have such bundles in your bundle pool. After that you should be able to do a "Select Required" to add any missing required bundles. |
I have checked the plugins on the run configuration and added the axis-part (axis 1.4.0 and axis.ant 1.4.0) but without success. The jetty 10.0.15 bundles are noted as missing on the plugin validation. So the plugins are marked like required but will be missed on my side. Do you mean this can cause the issue. axis-pluginsjetty missing |
Yes. You shouldn't have any jetty 10 bundles selected in your debug configuration. |
I have removed all 10.0.15 jetty plugins. The validation of the plugins is fine but the viewer starts like before as the crashed-version. |
Which versions of |
I will fire up a dev environment on my windows machine and see if I can reproduce the problem there. Jetty has some security settings that prevents access to files that uses::.... paths , which has caused problems in dev-enviroment before. Back then it worked in Windows but nor in Linux though. |
@speckyspooky I get the same error as you when I am running from my windows dev environment. I'll be back with more information soon. |
So, the problem was indeed, or at least in part, relative paths, or "alias" as Jetty calls them. Can you test this in your dev-environment @speckyspooky : In ViewerWebApp.java, line 58 and 59 switch:
to
... and see if that helps. I think it will since it solved the problem on my end. |
Alright, @claesrosell you are the "master of the day". I understand you change. But do you know wich change had such (strange) effect to change URL-to-URL and therefore we got the issue? |
If you want to understand why this solution "works" you can change back those lines and set a breakpoint in org.eclipse.jetty.ee8.nested.ContextHandler.checkAlias() . You will see that Jetty refuses the request to resources which are not direct. This includes symlinks and "relative" directories. The magic here is the .normalize() call, which does not exist on URL, hence the conversion to URI and back. What I really would like to do is use an URLResource to the bundleentry as baseResource on the WebAppContext. That used to work in Jetty-10 but does not work any longer. I suspect that line 650 in org.eclipse.jetty.server.handler.ContextHandler
is wrong. Think that it should be
instead. I have not checked with the Jetty guys though. |
@claesrosell the URL<>URI fix breaks report preview (not sure what else) in installs with a space in the path, at least on Windows. Can be reproduced with the BIRT 4.15 All-in-one distribution.
java.net.URISyntaxException: Illegal character in path at index 34: file:/C:/EclipseInstalls/birt-4.15 AIO/eclipse/plugins/org.eclipse.birt.report.viewer_4.15.0.v202403270652/birt/ Workspace error log |
A bit OT, but... If using an installation path without spaces is a workaround, then I wonder if fixing this is worth the effort. Those who use spaces in directory names (at least on Windows) are looking for trouble. OTOH, errors like this always smell like a security issue (missing or wrong or double escaping when writing or parsing data). |
Hi. |
I had a quick look but it's super annoying that one gets back a URL from the framework but then it turns out a valid URL is not necessarily a valid URI. And, instead of encoding a space when calling toURI, let's just throw an exception. Go figure that out... |
I'm with Ed, yes we could check if an unescaped "space" is given into the URL and we can escape it. |
Good to know about |
Hello @claesrosell & @merks
I started directly after the master update the update of my fork and the result is mixed situation.
The good thing is we can start from eclipse-designer now the output-creation like xlsx, pdf, etc.
But the BIRT-viewer is crashed and I'm not sure is it an issue on my side with the project update or is there a topic with the Jetty-migration. What is the result if you start the BIRT-viewer on your eclipse version?
BIRT-viewer based on the latest changes
Console of missing osgi-component:
Unresolved requirement: Require-Bundle: org.eclipse.jst.ws.axis.consumption.core; bundle-version="[1.1.0,2.0.0)"
View into the browser console
The text was updated successfully, but these errors were encountered: