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: 52
Posts: 52   Pages: 6   [ Previous Page | 1 2 3 4 5 6 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 263358 times and has 51 replies Next Thread
son87a
Newbie




Joined: Oct 28, 2021
Post Count: 12
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: 9426
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 use a JDK 8. Maybe try to run the server with JDK 11.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Oct 29, 2021, 12:06: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 
son87a
Newbie




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

I tried edit code after google. Wrap try in {}
Its working but I don't know write in finally statement.
Sorry, I'm working with PHP, and don't know Java.
Can you fix that ?

try {InputStream input = new FileInputStream(homeFile);
ByteArrayOutputStream output = new ByteArrayOutputStream();
byte[] buffer = new byte[8096];
int size;
while ((size = input.read(buffer)) != -1) {
output.write(buffer, 0, size);
}
homeFileContent = output.toByteArray();
}
finally{
// write something here ?
}



try {OutputStream servletOut = response.getOutputStream();
servletOut.write(homeFileContent);
}
finally{
// write something here ?
}

[Oct 29, 2021, 12:49:44 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: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: Sweet Home 3D JS Online

You don't have to write anything in finally blocks (note that they don't even exist in the released version of readHome.jsp). I guess you should learn Java before going further...
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Oct 29, 2021, 2:12:31 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
son87a
Newbie




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

Thank you for your time !
[Oct 30, 2021, 2:55:30 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: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: Sweet Home 3D JS Online

A new version of Sweet Home 3D JS Online was released last week-end with many new features. See this blog post for more information.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Nov 15, 2021, 8:24:11 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
xato
Newbie



United Kingdom
Joined: Apr 28, 2022
Post Count: 1
Status: Offline
Reply to this Post  Reply with Quote 
Re: Sweet Home 3D JS Online

Hi, first time forum poster, couldn't see a search option to ask about this, I love your software!!

I was just wondering if there was a reason why it runs soo much faster in the browser than natively.

Is there anything I can do on my M1 Mac to speed it up? Is this a Java issue?
[Apr 28, 2022, 12:21:05 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: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: Sweet Home 3D JS Online

For your information, I just changed the user interface of the Online version for large touch devices like tablets, to take profit of the additional space they propose. It now shows the 4 classical resizable panes of the desktop version and a larger choice of models in the catalog, either in landscape format:



or in portrait format:



Note also that from the release of version 7.0, it's now possible to modify openings in Sweet Home 3D JS Online and to select a material directly in the 3D model preview in the furniture materials modification dialog box.




I was just wondering if there was a reason why it runs soo much faster in the browser than natively.
I wonder on which particular point you see such a performance difference because I didn't notice it that much.
Loading 3D models is slower with the Online version because Java threads are more efficient than JavaScript workers when there are a lot of data to retrieve (finally I even didn't use JavaScript workers).
The 3D view might run faster at a given size at screen, probably because the WebGL rendering I programmed is simpler than the Java 3D / JOGL / OpenGL layers.
But I also noticed that computing window holes in the walls is much slower in JavaScript and wonder if it's because JavaScript proposes only high precision decimal numbers (you can see this difference when you try to change level in the large building examples of this tip).
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Aug 11, 2022, 5:04:11 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Paul6552
Newbie



Österreich
Joined: Nov 2, 2022
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
Re: Sweet Home 3D JS Online

I plan everything in the online editor but what is incredibly annoying is that the windows (walkthrough and sketch) cannot be placed in their own tabs.

Please separate these two views so that the sketch is on one screen and the rendering (virtual walkthrough of the house) on the other.

Will this feature be available in the next version?
[Dec 26, 2022, 12:54:30 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: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: Sweet Home 3D JS Online

Sorry, I don’t think so. You can already change their size with the separator between them.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Dec 26, 2022, 10:59: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 
Posts: 52   Pages: 6   [ Previous Page | 1 2 3 4 5 6 | 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 2024 Space Mushrooms - All rights reserved