-
Notifications
You must be signed in to change notification settings - Fork 35
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
Generating site on windows, exception - file referencing incorrect? #463
Comments
Hi @chipbite, Unfortunately I don't have easy access to a Windows machine. I have made a little change that might fix your issue. You can download the binaries containing this change using the following link: potential fix. Could you try if this fixes your issue? Thanks in advance! |
This is a workaround for an issue with the generated .bat file, reported in #463. Instead of listing each and every .jar file in the lib directory, we just use a wildcard to include everything in the lib directory in the classpath.
Hi @dirkgroot, that is great news! - I have now tried this. Sadly, I get an error directly when attempting to execute - an error that I did not get before, it seems there is some java version issue... First I try with java version 20, and then with 17, just to try. BR! /marcus
|
@chipbite This tool needs Java 21 to function. So yes, you need to upgrade 😄. |
We don't use Java 21 specific features (yet), just changing https://github.com/avisi-cloud/structurizr-site-generatr/blob/main/build.gradle.kts#L54 to e g. |
I have not built the source myself, but looking at the file you reference, @jp7677, it seems there are references to both v 21 and v 17: structurizr-site-generatr/build.gradle.kts Lines 55 to 64 in 5ed6670
Theoretically, would it suffice to edit the jvmtoolchain value to 17 and run gradle? (I will try adding java 21 to my system as well, I already have a few versions installed... ) |
I've rebased the |
Tested. I installed java 21 and then it built the site without error ✔️ - with both the binaries you sent April 9th and now April 10th. So, the error is gone, I run and it builds:
I also tried one of our own workspaces and the build process completes without error. Fix works.The potential fix you have implemented solves this issue, and build runs without error on windows ([Version 10.0.19045.4170]). Java 17 using binaries from april 10thI also tried running using So, thanks for this, now I got a locally built site... but I found a small link problem when browsing off of disk, #487. |
`Path.of` uses OS-specific directory separators to generate a complete path. This causes the problem reported in #463. This commit changes this to use the `File` constructor instead of `Path.of`.
@dirkgroot : This issue is still there in the latest release I discovered (a colleague instaled and tested and got the same error). Should I reopen this issue until it is fixed or open a new issue as a regression? ( Also, thinking about if there could be a github runner to test on win32/64 |
Could you please open a new issue, refer to this issue and also include details about what exactly goes wrong? |
Sure, will do. Its the same issue - same exception, like in the OP above.
Created a new issue #499 for it. |
Hi! Very interesting tool.
I downloaded and ran this on windows.
It started building the site tree and files, and got pretty far but after a while it throws the exception found here:
java.nio.file.InvalidPathException: UNC path is missing sharename: /\index.html
I looked briefly into it, but it was a while I coded java and have never coded kotlin, so I figured I'd let someone else with better familiarity look into it. Some file reference error it seems.
ℹ️ Note: The thing is, it has at this point succeeded in generating alot. (But links between the pages are not working at this point, at all.) So, it seems likely that there is a specific problem that is causing the file to not be referenced correctly. It is not failing in general, much has been completed at this point.
BR! /marcus
PS
Executing on windows, and in general
So I ran it with a wildcard to lib folder instead, which works fine. The rest of the .bat file is just boilerplate/red tape and does not do anything. So this works, for example (I extracted to a folder in temp):
Maybe the .bat script can be simplified. I could help and propose, if I get past the errors and get it to work... :-)
Which was successful in starting execution and started to generate the site.
The text was updated successfully, but these errors were encountered: