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: 34
Posts: 34   Pages: 4   [ Previous Page | 1 2 3 4 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 34804 times and has 33 replies Next Thread
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 7988
Status: Offline
Reply to this Post  Reply with Quote 
Re: Sweet Home 3D JS Online

Finally, the error under Windows can be fixed easily: in build.xml Ant file, just replace colons (:) in the two following lines
<arg value="../SweetHome3D/src:tools/JSweet/src" />
<arg value="def:com/eteks/sweethome3d/model:com/eteks/sweethome3d/tools:com/eteks/sweethome3d/viewcontroller:com/eteks/sweethome3d/io" />
by ${path.separator} (see fix here).

By the way, if you want to generate SweetHome3DJS.war file, don't forget to run Ant default target in SweetHome3D project too. SweetHome3D.jar is required to generate the war file.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jun 18, 2021, 11:57:17 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
chukwu
Newbie



Nigeria
Joined: Jun 25, 2021
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: Sweet Home 3D JS Online

Hello, AMAZING STUFF Puybaret.

I have been having issues building the war file for SweetHome3DJS.

the .jar for SweetHome3D builds successfully, but all the ant commands fail for SweetHome3DJS

BUILD FAILED
/Users/sweethome3d-code-r7868-trunk/SweetHome3DJS/build.xml:88: The following error occurred while executing this line:
[Jul 6, 2021, 7:25:54 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 7988
Status: Offline
Reply to this Post  Reply with Quote 
Re: Sweet Home 3D JS Online

As you didn't report the error, it's difficult to help you.
Did you read the discussion with emirhanbskc which might help you?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jul 7, 2021, 2:16:30 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
chukwu
Newbie



Nigeria
Joined: Jun 25, 2021
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: Sweet Home 3D JS Online

Hello, yes, I read the discussion, i have done everything in the readme, everything else builds, am I meant to put the sweethome3d.jar in any particular folder after building it?

How do i report the error, can i put a log here?

this is where the error starts:

transpiledLibraries:
[javac] /Users/Downloads/sweethome3d-code-r7868-trunk/SweetHome3DJS/build.xml:30: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[java] INFO: JSweet transpiler version 2.4.0-RC1 (build date: 2020-07-21 17:21:35)
[java] 2021-07-07 18:13:40.040 ERROR JSweetConfig:149 - class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
[java] java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
[java] at org.jsweet.JSweetConfig.initClassPath(JSweetConfig.java:86)
[java] at org.jsweet.JSweetCommandLineLauncher.transpileWithArgs(JSweetCommandLineLauncher.java:270)
[java] at org.jsweet.JSweetCommandLineLauncher.main(JSweetCommandLineLauncher.java:239)
[java] 2021-07-07 18:13:40.040 INFO JSweetCommandLineLauncher:671 - input dirs: [../SweetHome3D/src, tools/JSweet/src]
[java] 2021-07-07 18:13:40.040 INFO JSweetCommandLineLauncher:682 - classpath: null
[java] 2021-07-07 18:13:40.040 INFO JSweetCommandLineLauncher:697 - included: [def.*, com/eteks/sweethome3d/model.*, com/eteks/sweethome3d/tools.*, com/eteks/sweethome3d/viewcontroller.*, com/eteks/sweethome3d/io.*]
[java] 2021-07-07 18:13:40.040 INFO JSweetCommandLineLauncher:698 - excluded: []
[java] 2021-07-07 18:13:40.040 INFO JSweetCommandLineLauncher:747 - ts output dir: tools/JSweet/build/ts
[java] 2021-07-07 18:13:40.040 INFO JSweetCommandLineLauncher:754 - js output dir: tools/JSweet/build/js
[java] java.lang.IllegalAccessError: superclass access check failed: class org.jsweet.transpiler.util.AbstractTreeScanner (in unnamed module @0x2eb231a6) cannot access class com.sun.tools.javac.tree.TreeScanner (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.tree to unnamed module @0x2eb231a6

warm regards
[Jul 7, 2021, 6:16:16 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 7988
Status: Offline
Reply to this Post  Reply with Quote 
Re: Sweet Home 3D JS Online

Building Sweet Home 3D JS project requires JDK 8, and not a further version. Is it your case?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jul 8, 2021, 11:43:29 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
chukwu
Newbie



Nigeria
Joined: Jun 25, 2021
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: Sweet Home 3D JS Online

yes please, my mac uses jdk 8. Do I have to put the sweethome3d.jar in any specific folder to aid the building?
[Jul 10, 2021, 12:23:08 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 7988
Status: Offline
Reply to this Post  Reply with Quote 
Re: Sweet Home 3D JS Online

I'm pretty sure you're not using JDK 8 to build the project. I just tried with JDK 15 and got the same error. If you use Terminal, set JAVA_HOME environment variable to ensure Ant uses the right JDK.
Do I have to put the sweethome3d.jar in any specific folder to aid the building?
No, just leave it in its default place, but SweetHome3D and SweetHom3DJS projects must be in the same folder.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jul 12, 2021, 3:21:30 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
chukwu
Newbie



Nigeria
Joined: Jun 25, 2021
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: Sweet Home 3D JS Online

Thanks alot, I eventually used my windows compartment to build it. It works!
[Jul 15, 2021, 8:43:29 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
son87a
Newbie




Joined: Oct 28, 2021
Post Count: 11
Status: Offline
Reply to this Post  Reply with Quote 
Re: Sweet Home 3D JS Online

Hello,
I try to deploy sweethome3djs online. But i got error:

HTTP Status 500 - Unable to compile class for JSP:
type Exception report

message Unable to compile class for JSP:

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 51 in the jsp file: /readHome.jsp
Resource specification not allowed here for source level below 1.7
48: }
49:
50: synchronized (homeFile.getAbsolutePath().intern()) {
51: try (InputStream input = new FileInputStream(homeFile);
52: ByteArrayOutputStream output = new ByteArrayOutputStream()) {
53: byte[] buffer = new byte[8096];
54: int size;


An error occurred at line: 67 in the jsp file: /readHome.jsp
Resource specification not allowed here for source level below 1.7
64:
65: response.setIntHeader("Content-length", homeFileContent.length);
66: response.setHeader("Content-Disposition", "attachment; filename=" + homeFile.getName());
67: try (OutputStream servletOut = response.getOutputStream()) {
68: servletOut.write(homeFileContent);
69: }
70: } %>


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:494)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:379)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:662)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

My java version:

java -version
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (build 1.8.0_312-b07)
OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)


My Tomcat version:

Server version: Apache Tomcat/7.0.76
Server built: Nov 16 2020 16:51:26 UTC
Server number: 7.0.76.0
OS Name: Linux
OS Version: 3.10.0-1160.36.2.el7.x86_64
Architecture: amd64
JVM Version: 1.8.0_312-b07
JVM Vendor: Red Hat, Inc.

Can you help me ?
[Oct 29, 2021, 11:18:11 AM] 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: 7988
Status: Offline
Reply to this Post  Reply with Quote 
Re: Sweet Home 3D JS Online

It's strange because even if try (resource) { } syntax is allowed only from Java 7, your server seems to a JDK 8. Maybe try to run the server with JDK 11.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Oct 29, 2021, 12:06:17 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 34   Pages: 4   [ Previous Page | 1 2 3 4 | 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-2022 eTeks - All rights reserved