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   [ 1 2 3 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 1248 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 
SweetHome3DJS - Porting plugin - ARM architecture support

Hello,

I managed to port my SweetHome3D plugin to a personal custom web site based on SweetHome3DJS.

As my plugin is based on a modified OBJWriter to preserve the object names across exports, I need to import the J3D libraries.

I have noticed that J3D libraries come with some binaries and I did not find binaries compiled for ARM architecture.

My Web Site will run as an add-on to Home Assistant: most of the users are running home assistant on ARM architectures (raspberry and similar).

Is there a way to have those libraries in armv7 or armv8 architectures ?

I will soon post my source in GitHub.

Thanks in advance for the support

Andrea
[Feb 16, 2024, 4:25:40 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: 9181
Status: Offline
Reply to this Post  Reply with Quote 
Re: SweetHome3DJS - Porting plugin - ARM architecture support

You’ll find the libraries in the JAR files at https://jogamp.org/deployment/jogamp-current/jar/
Pick up the files prefixed by gluegen-rt-natives and jogl-all-natives, probably gluegen-rt-natives-linux-armv6hf.jar and jogl-all-natives-linux-armv6hf.jar.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 16, 2024, 5:52:56 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: 9181
Status: Offline
Reply to this Post  Reply with Quote 
Re: SweetHome3DJS - Porting plugin - ARM architecture support

By the way, you should choose a license for your plug-in project.
If you plan to distribute it along with Sweet Home 3D in the same package, it should be under GNU GPL, otherwise if you distribute it separately, any license will be ok.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 16, 2024, 5:58: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

Thanks, I'll test.
Added a GNU-GPL license file to the github repository for the plugin (it contains the SweetHome3d portable jar).
I will do the same for the Home Assistant add-on
[Feb 16, 2024, 6:42:28 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: 9181
Status: Offline
Reply to this Post  Reply with Quote 
Re: SweetHome3DJS - Porting plugin - ARM architecture support

Don’t hesitate to ask questions if needed. If all goes well and you want to run Sweet Home 3D from a JAR executable file, you should have to update SweetHome3DBootstrap class and jarExecutable target in build.xml file.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 16, 2024, 7:28:56 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

I have the impression that those libraries require a desktop environment: Root Cause is the lack of a X!! Display, but the libraries will have to run headless in a server like environment inside a container.


Type Exception Report

Message An exception occurred processing [/exportToHA.jsp] at line [89]

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.apache.jasper.JasperException: An exception occurred processing
[/exportToHA.jsp] at line [89]

86: }
87: }
88:
89: BranchGroup root = new BranchGroup();
90: Object3DBranchFactory objectFactory = new Object3DBranchFactory();
91:
92: // Add 3D ground, walls, rooms and labels


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:610)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:489)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:380)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:328)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:777)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause

jakarta.servlet.ServletException: java.lang.ExceptionInInitializerError
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:667)
org.apache.jsp.exportToHA_jsp._jspService(exportToHA_jsp.java:383)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:777)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:380)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:328)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:777)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause

java.lang.ExceptionInInitializerError
javax.media.j3d.GroupRetained.<init>(GroupRetained.java:155)
javax.media.j3d.BranchGroupRetained.<init>(BranchGroupRetained.java:50)
javax.media.j3d.BranchGroup.createRetained(BranchGroup.java:72)
javax.media.j3d.SceneGraphObject.<init>(SceneGraphObject.java:114)
javax.media.j3d.Node.<init>(Node.java:172)
javax.media.j3d.Group.<init>(Group.java:551)
javax.media.j3d.BranchGroup.<init>(BranchGroup.java:63)
org.apache.jsp.exportToHA_jsp._jspService(exportToHA_jsp.java:278)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:777)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:380)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:328)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:777)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause

java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:854)
javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:267)
javax.media.j3d.GroupRetained.<init>(GroupRetained.java:155)
javax.media.j3d.BranchGroupRetained.<init>(BranchGroupRetained.java:50)
javax.media.j3d.BranchGroup.createRetained(BranchGroup.java:72)
javax.media.j3d.SceneGraphObject.<init>(SceneGraphObject.java:114)
javax.media.j3d.Node.<init>(Node.java:172)
javax.media.j3d.Group.<init>(Group.java:551)
javax.media.j3d.BranchGroup.<init>(BranchGroup.java:63)
org.apache.jsp.exportToHA_jsp._jspService(exportToHA_jsp.java:278)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:777)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:380)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:328)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:777)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Note The full stack trace of the root cause is available in the server logs.


[Feb 16, 2024, 7:59: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

To explain better what I'm doing:


  • Building a container that will run SweetHome3D JS with Tomcat
  • Encapsulate the home editor inside a Web Site that manages the sh3d files
  • Provide an export feature that replicates the function of my plugin ExportToHASS which is similar to Export To Obj but preserves the object names across exports
  • Deploy the container as Home Assistant add-on


I was assuming that the SweetHome3D could run headless. It seems that the Home class and Homerecorder class can run headless, but as soon as I reference the J3D class, the exception is raised for lack of a display. This is a pity as I only use J3D to serialize the home into Waterfront format (based on a modified ObjWriter class). This is an operation that wouldn't require any visualization.
[Feb 16, 2024, 8:18:33 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

I've tried to do it using the jogl-noawt library, same error.
Then I stumbled across this forum thread: https://forum.jogamp.org/Java3D-in-batch-mode-td4039415.html
And this seems pretty much a final word: my idea is not feasible.

I think that your effort to keep the code within a MVC model is nullified by an external library.

Maybe I can port the OBJWriter to JavaScript but this is kind of another size....
[Feb 16, 2024, 8:42:17 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: 9181
Status: Offline
Reply to this Post  Reply with Quote 
Re: SweetHome3DJS - Porting plugin - ARM architecture support

Sweet Home 3D can run headless if you set the Java property java.awt.headless to true (which is probably the default value in Tomcat) and set the Java property j3d.rend to noop.
You may even need no library in that case but I’m not sure.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 16, 2024, 9:08: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 
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. It worked. When I will be more stable I will test it without ogl and gluegen libraries....
[Feb 16, 2024, 10:01:54 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   [ 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