Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 27
Posts: 27   Pages: 3   [ Previous Page | 1 2 3 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 1261 times and has 26 replies Next Thread
adizanni
Newbie



France
Joined: Feb 6, 2024
Post Count: 19
Status: Offline
Reply to this Post  Reply with Quote 
Re: SweetHome3DJS - Porting plugin - ARM architecture support

Always related to this project. I think that I got from other posts that the JSP code is only compatible with JAVA 1.8. When I tried JAVA 21 I found only one problem:

Unable to make field protected static final java.lang.String javax.swing.undo.AbstractUndoableEdit.UndoName accessible: module java.desktop does not "opens javax.swing.undo" to unnamed module @1cc19e8a


in the WriteHomeEdits.jsp file. Even following all stackoverflow suggestions to change some JVM parameters and allow reflect action, it does not work.

I have a problem with the fact to stay in 1.8: I'm packaging a container with tomcat and jdk, the only based image still supporting 1.8 is quite outdated and brings a lot of vulnerabilities.

Is there any workaround to make your code compatible with recent versions of Java ? (or maybe it is already but I'm doing the things wrong). I

Thanks in advance for your support.

Andrea
[Feb 18, 2024, 12:12:53 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
adizanni
Newbie



France
Joined: Feb 6, 2024
Post Count: 19
Status: Offline
Reply to this Post  Reply with Quote 
Re: SweetHome3DJS - Porting plugin - ARM architecture support

By the way, this is the link to the Home Assistant addon repository with the customized WAR: https://github.com/adizanni/sh3d-ha.
I will soon publish the WAR project behind to make the code visible.
[Feb 18, 2024, 1:57:36 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9182
Status: Offline
Reply to this Post  Reply with Quote 
Re: SweetHome3DJS - Porting plugin - ARM architecture support

Being compatible with Java 1.8 doesn't mean it won't work with further versions.
sweethome3d.com JSP server works with Java 11 and you can probably fix your issue by setting the right --add-opens JVM option (try --add-opens=java.desktop/javax.swing.undo=ALL-UNNAMED).
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 18, 2024, 6:33:57 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
adizanni
Newbie



France
Joined: Feb 6, 2024
Post Count: 19
Status: Offline
Reply to this Post  Reply with Quote 
Re: SweetHome3DJS - Porting plugin - ARM architecture support

Again thanks, I did not know what was the class to apply the ALL-UNNAMED even if the error was saying all.
You are debugging my project almost line by line :). I've not yet donated for your project but I'm going to do it now.
Hope that my projects are a little contribution to enlarge your community.

Merci Encore.
Andrea
[Feb 18, 2024, 8:52:37 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9182
Status: Offline
Reply to this Post  Reply with Quote 
Re: SweetHome3DJS - Porting plugin - ARM architecture support

Translating the Java error you reported to the right Java option is not straightforward and I had to make some searches me too.

Thanks for your donation Andrea smile
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 19, 2024, 1:54:08 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
adizanni
Newbie



France
Joined: Feb 6, 2024
Post Count: 19
Status: Offline
Reply to this Post  Reply with Quote 
Re: SweetHome3DJS - Porting plugin - ARM architecture support

Hello,

it was not a lot of money but unfortunately I'm not rich, hope that I bring you new donations via my project....

I have another problem/question. I kind of understood that whenever the model brings new resources (furniture, textures, etc), you save those to the lib/resources library using the WriteResource jsp, is it correct ? As I'm packaging the webapp in a docker environment whenever I recreate the image the resources get lost. I have to find a way to save them outside the webapp folder (as I do for the saved models and the exports).

Are you interested in having a docker image for SweetHome3D ? I know this was not in your initial vision, but now the libraries are in the public domain so it could be a plus..... I can study a way to industrialize the deployment each time you have a new version. Just an idea.

Andrea.
[Feb 19, 2024, 8:54:32 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9182
Status: Offline
Reply to this Post  Reply with Quote 
Re: SweetHome3DJS - Porting plugin - ARM architecture support

You should adapt to your needs the parameters writeResourceURL and readResourceURL in SweetHome3DJSApplication initialization.
These parameters and other ones with a URL can be equal to the URLs of your choice to customize the services which manage the storage of homes, resources and preferences. These services may store resources in a folder different from userResources in the web space of the server. It may depend on the logged user and use a database for example.
This is the case for Sweet Home 3D Online version. If you look at the source code of SweetHome3DJSOnline.jsp displayed when you edit a home in the Online version, you'll see that SweetHome3DJSOnlineApplication, a subclass of SweetHome3DJSApplication, is initialized with parameters different from the version in SweetHome3DJS public code.

Thanks for proposing a docker image, but I prefer not to make the delivery of Sweet Home 3D new versions more complex at this time. Creating this image could be automated in a script but the result must always be checked manually, and I don't want to make the delivery checking time last longer. But feel free to program it in your project.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 20, 2024, 11:35:05 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
adizanni
Newbie



France
Joined: Feb 6, 2024
Post Count: 19
Status: Offline
Reply to this Post  Reply with Quote 
Re: SweetHome3DJS - Porting plugin - ARM architecture support

Thanks again: for the persistency architecture I will need to dedicate more time, for the moment I'm resolving with a "not so clean" folder linking. Of course these are mainly solution that will stay local, protected by the home network, but I prefer not to open breaches and vulnerabilities, as much as possible.

This brings me to another question, home assistant can shield the add-ons using an internal proxy that rewrite the URLs. All the portal jsp pages are properly rewritten but when I open the sweethome.jsp it seems that all server calls are not getting rewritten and target the original URLs. It is a complex problem, I'm not expecting an answer or an analysis from your side; maybe you have already stumbled upon the issue and got a solution. The rewritten leading URL parts are passed on by the proxy via a header field.

I have another question related to your previous answer: how can the end user load additional furnitures and object to the catalogue ? There seem to be no function to achieve that, there is one to import texture though.

Thanks in advance for your support.

Andrea.
[Feb 20, 2024, 11:09:23 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9182
Status: Offline
Reply to this Post  Reply with Quote 
Re: SweetHome3DJS - Porting plugin - ARM architecture support

I'm not sure at all but did you set the URL base used at different places in application initialization, so it correctly indicates the redirection you mentioned?

Even though I found a way to import a 3D model in the Mobile version using existing code, importing additional furniture is not completely programmed. The Import furniture wizard and saving imported furniture in preferences is missing in current version.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 22, 2024, 2:29:47 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
adizanni
Newbie



France
Joined: Feb 6, 2024
Post Count: 19
Status: Offline
Reply to this Post  Reply with Quote 
Re: SweetHome3DJS - Porting plugin - ARM architecture support

Hello Emmanuel, I've spent significant time but I could no make SweetHome3DJS to work behind a Proxy: there are many places where URL are configured for WriteHomeEdidts, userPreferences, etc. I have the impression that, sometimes the URLs are used in the frontend (those require the URL rewrite to reach the proxy), sometimes they are used in the backend (those cannot go through the proxy which is out of reach of the tomcat server). Result, when I rewrite with proxy URLs, I break something in the backend, when I rewrite with tomcat URLs, I break something in the frontend. I have tried many combinations of things that I can do in the JSP, but I have no control on the Javascript and on the Java libraries (recorders, user preferences management, etc.), so I have abandoned. If you have any ideas, they are welcome.

Andrea
[Feb 24, 2024, 10:57:50 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 27   Pages: 3   [ Previous Page | 1 2 3 | Next Page ]
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2024 eTeks - All rights reserved