Building OWS from src

The public knowledge pool and discussion forum of the OWS community. Do not post confidential information here!
hilalkale
Posts: 33
Joined: 09 Mar 2022, 09:23

Building OWS from src

Post by hilalkale »

Hi all,

I wanted to build OWS from source code. I fetched the repo from github and made a successful maven build (OWS-1.6). But the question is how can I generate an installer? Or just replacing the openwebstart.jar under the installation directory is enough?

Janak Mulani
Posts: 726
Joined: 24 Mar 2020, 13:37

Re: Building OWS from src

Post by Janak Mulani »

Installer is not open source. It is built using Install4J. You may replace the jar in current install dir. OWS will work except that the Installer Update feature may still think it is an old version.

hilalkale
Posts: 33
Joined: 09 Mar 2022, 09:23

Re: Building OWS from src

Post by hilalkale »

Hi Janak,

Thanks for your reply. When I copy the generated jar file under the current installation directory, on stage-1 logs I still see the line stating that the OWS version is 1.5.2.
Attachments
install_dir.png
install_dir.png (10.86 KiB) Viewed 10566 times
stage-1_log_ows_version.png
stage-1_log_ows_version.png (2.79 KiB) Viewed 10566 times

hilalkale
Posts: 33
Joined: 09 Mar 2022, 09:23

Re: Building OWS from src

Post by hilalkale »

I guess it takes version info from install4j config, right?

Janak Mulani
Posts: 726
Joined: 24 Mar 2020, 13:37

Re: Building OWS from src

Post by Janak Mulani »

yes. that is what I said, i4J still believes it is an old version.

Janak Mulani
Posts: 726
Joined: 24 Mar 2020, 13:37

Re: Building OWS from src

Post by Janak Mulani »

May I ask what change did you make? Would you like to provide a PR so that the change can be shared with the community?

hilalkale
Posts: 33
Joined: 09 Mar 2022, 09:23

Re: Building OWS from src

Post by hilalkale »

Hi Janak,

I haven't done any change yet, but I am planning to get the branch "1.8-linkageerror" from icedtea-web repo, where there is a classloader patch is applied and then I want to use that one in the ows. That's why I wanted to fetch and build both ows and icedtea-web. So may be it would be a solution to our problem I mentioned in the log4j thread.

Janak Mulani
Posts: 726
Joined: 24 Mar 2020, 13:37

Re: Building OWS from src

Post by Janak Mulani »

Do you want to apply the fix of https://github.com/AdoptOpenJDK/IcedTea-Web/pull/856 to OWS?

I checked that there is similar code in ITW-2.0.0-alphaX which is used by OWS..

> problem I mentioned in the log4j thread

Will it be possible for you to make a small example that reproduces the log4j issue? Then we can debug OWS and try to fix it.

hilalkale
Posts: 33
Joined: 09 Mar 2022, 09:23

Re: Building OWS from src

Post by hilalkale »

Hi Janak,

Yes I checked later and saw the same. To be honest, I want to share a simple example to reproduce to problem but i am not sure if I can prepare something in short time but as soon as I can, I am going to share it with you. In the meantime I tried building OWS master branch (1.6.0) using ITW3.0.0-alpha2, I made some little code changes to make it work as you may guess (Actually in this way I made something like OWS 3.0.0alpha2 version). And it works very well with log4j updates as we expected. And I know that you tried a new classloader on 3.0.0-alpha2. May I ask why you abandoned that branch?

Janak Mulani
Posts: 726
Joined: 24 Mar 2020, 13:37

Re: Building OWS from src

Post by Janak Mulani »

You can just take OWS-3.0.0-alpha2 and test the log4j issue. Let me know if it works out of the box.

We tried new class loader in OWS-3.0.0-alpha2 but it is not complete yet, it is missing the sandbox and some other features.

hilalkale
Posts: 33
Joined: 09 Mar 2022, 09:23

Re: Building OWS from src

Post by hilalkale »

Hi Janak,

As I stated in logj4 thread, OWS3.0.0-alpha2 version works very well with log4j update. Actually with OWS3.0.0-alpha2 I also don't face the PluginAliases problem too. For me it seems using OWS3.0.0-alpha2 would solve all problems, but I just can't say to the customers use this abandoned version instead of the official one.

Janak Mulani
Posts: 726
Joined: 24 Mar 2020, 13:37

Re: Building OWS from src

Post by Janak Mulani »

OWS 3.0.0-alpha2 is not complete. Features like Sandbox are missing. It does have an improved classloader. We gave it up for lack of resources. After all this is an opensource project and we have limited budgets.

hilalkale
Posts: 33
Joined: 09 Mar 2022, 09:23

Re: Building OWS from src

Post by hilalkale »

Hi Janak,

I realized that, if I change the order of the jar files inside the JNLP file, the class that is not found changes or sometimes it gives IllegalStateException. During the debug (on icedtea-web master branch) I noticed that, inside the loasClass(...), it searches and adds the class in the order: findLoadedClassAll, loadClassFromParentClassloader, loadClassExt, loadClassFromInternalManifestClasspath, loadFromJarIndexes. But the list entry is a functional interface. And before loading from parent ends, loading from ext, manifets and jar indexes resulted and thus giving the exception. Trying to load from parent takes longer than the others. And I assume the other three should start actually after finishing the parent check? In the attached screenshot you can see my debug prints. Can you please have a look and share your opinion?
Attachments
loadClass_debug.png
loadClass_debug.png (92.24 KiB) Viewed 10492 times

Janak Mulani
Posts: 726
Joined: 24 Mar 2020, 13:37

Re: Building OWS from src

Post by Janak Mulani »

> I realized that, if I change the order of the jar files inside the JNLP file,

Yes, I too have noticed this.

> During the debug (on icedtea-web master branch) I noticed that, inside the loasClass(...),

Since it is not reproducible and since we are short of resources we did not get around to step through the code. Also we had to make a new release with the latest version of bundled JRE. Just yesterday we were looking at the JnlpClassloader again and started putting some log statements. Thanks for your hints. We will surely have a look and come back but allow me some time as all of us are busy with other projects.

Post Reply