Skip to content
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

Symja 2.0.0 for Windows #505

Closed
ghost opened this issue Apr 21, 2022 · 15 comments
Closed

Symja 2.0.0 for Windows #505

ghost opened this issue Apr 21, 2022 · 15 comments

Comments

@ghost
Copy link

ghost commented Apr 21, 2022

12 Mar 2022 you released Symja 2.0.0, but without all the necessary files (including the *bat files) to launch it in Windows as a web browser notebook. Why did you stop making releases for Windows?

@axkr
Copy link
Owner

axkr commented Apr 21, 2022

I commited a configuration for the appassembler-maven-plugin Maven plugin which can be used to create the apps.

Assuming the command will be run from the parent pom.xml file location, this command will create a distribution package for the web-interface and the command line apps:

mvn -pl matheclipse-io clean package appassembler:assemble

For Windows the following *.bat files will be generated:
server.bat, mmaserver.bat, symja.bat and mma.bat

The following command will create the JSON API server:

mvn -pl matheclipse-api clean package appassembler:assemble

For Windows a symjaapi.bat file will be generated.

@ghost
Copy link
Author

ghost commented Apr 21, 2022

@axkr I don't have Maven, Maven plugin etc. and I don't understand it at all 😕
I just want to know if you will release the Symja 2.0.0 for Windows or not?

@axkr
Copy link
Owner

axkr commented Apr 21, 2022

I just want to know if you will release the Symja 2.0.0 for Windows or not?

I added the release here:

@ghost
Copy link
Author

ghost commented Apr 21, 2022

I added the release

@axkr thanks.

symja.bat and mma.bat are working correctly.

But I've problem with server.bat and mmaserver.bat

Screenshot

@axkr
Copy link
Owner

axkr commented Apr 21, 2022

Maybe the IP addrees or port is blocked by your windows security system?

Can you try to run it like this:

bin\server.bat -l -p 8080

@ghost
Copy link
Author

ghost commented Apr 21, 2022

@axkr I tried but it didn't solve the problem. Also, I did not see any blocked ports and programs related to the Symja in the firewall list.

@axkr
Copy link
Owner

axkr commented Apr 21, 2022

@axkr I tried but it didn't solve the problem. Also, I did not see any blocked ports and programs related to the Symja in the firewall list.

I`ve no other idea? I use "Windows Powershell" and switch to the installation location in the Powershell command line and run the above command. The Powershell should show the logging of the inputs in the browser app.
image

@ghost
Copy link
Author

ghost commented Apr 21, 2022

@axkr here is the error message in cmd.exe console when I'm trying to evaluate 2+2:

91239 WARN  [XNIO-1 task-1] org.matheclipse.io.servlet.AJAXQueryServlet - (TXvCqiVdvUSchJNjc7Pg9nPSyPxOStpX-kKuNXbM) In::2+2
91716 ERROR [XNIO-1 task-1] io.undertow.request - UT005071: Undertow request failed HttpServerExchange{ POST /ajax/query/}
java.io.IOError: java.io.FileNotFoundException: Invalid file path
        at org.xnio.conduits.Conduits$1.run(Conduits.java:237) ~[xnio-api-3.8.6.Final.jar:3.8.6.Final]
        at org.xnio.conduits.Conduits$1.run(Conduits.java:227) ~[xnio-api-3.8.6.Final.jar:3.8.6.Final]
        at java.security.AccessController.doPrivileged(AccessController.java:318) ~[?:?]
        at org.xnio.conduits.Conduits.<clinit>(Conduits.java:227) ~[xnio-api-3.8.6.Final.jar:3.8.6.Final]
        at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.writeFinal(AbstractFixedLengthStreamSinkConduit.java:175) ~[undertow-core-2.2.16.Final.jar:2.2.16.Final]
        at org.xnio.conduits.ConduitStreamSinkChannel.writeFinal(ConduitStreamSinkChannel.java:104) ~[xnio-api-3.8.6.Final.jar:3.8.6.Final]
        at io.undertow.channels.DetachableStreamSinkChannel.writeFinal(DetachableStreamSinkChannel.java:195) ~[undertow-core-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.server.HttpServerExchange$WriteDispatchChannel.writeFinal(HttpServerExchange.java:2171) ~[undertow-core-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.servlet.spec.ServletOutputStreamImpl.writeBufferBlocking(ServletOutputStreamImpl.java:582) ~[undertow-servlet-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.servlet.spec.ServletOutputStreamImpl.close(ServletOutputStreamImpl.java:619) ~[undertow-servlet-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.servlet.spec.ServletPrintWriter.close(ServletPrintWriter.java:117) ~[undertow-servlet-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.servlet.spec.ServletPrintWriterDelegate.close(ServletPrintWriterDelegate.java:81) ~[undertow-servlet-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.servlet.spec.HttpServletResponseImpl.closeStreamAndWriter(HttpServletResponseImpl.java:492) ~[undertow-servlet-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpServletResponseImpl.java:587) ~[undertow-servlet-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:334) ~[undertow-servlet-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:79) ~[undertow-servlet-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:134) ~[undertow-servlet-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:131) ~[undertow-servlet-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) ~[undertow-servlet-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) ~[undertow-servlet-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:255) ~[undertow-servlet-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:79) ~[undertow-servlet-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:100) ~[undertow-servlet-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.server.Connectors.executeRootHandler(Connectors.java:387) ~[undertow-core-2.2.16.Final.jar:2.2.16.Final]
        at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:852) ~[undertow-core-2.2.16.Final.jar:2.2.16.Final]
        at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) ~[jboss-threads-3.1.0.Final.jar:3.1.0.Final]
        at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2019) ~[jboss-threads-3.1.0.Final.jar:3.1.0.Final]
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1558) ~[jboss-threads-3.1.0.Final.jar:3.1.0.Final]
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1449) ~[jboss-threads-3.1.0.Final.jar:3.1.0.Final]
        at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1280) ~[xnio-api-3.8.6.Final.jar:3.8.6.Final]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.io.FileNotFoundException: Invalid file path
        at java.io.FileOutputStream.<init>(FileOutputStream.java:229) ~[?:?]
        at java.io.FileOutputStream.<init>(FileOutputStream.java:123) ~[?:?]
        at org.xnio.conduits.Conduits$1.run(Conduits.java:232) ~[xnio-api-3.8.6.Final.jar:3.8.6.Final]
        ... 30 more

@ghost
Copy link
Author

ghost commented Apr 21, 2022

cmd.exe also show the logging of the inputs

Screenshot 2022-04-21 213609

@axkr
Copy link
Owner

axkr commented Apr 22, 2022

I guess it has something to do with the new FileOutputStream("NUL:").getChannel() which throws the FileNotFoundException and which is similar to the Linux new FileOutputStream("dev/null").getChannel():

BTW: this version needs a Java 11 runtime and I've tested it under Windows 11.

@ghost
Copy link
Author

ghost commented Apr 22, 2022

@axkr I'm using the latest Oracle's OpenJDK 18.0.1

@masta99wrfvsHsa
Copy link

reference implemnetation jdk 17 worked fine.here.

@masta99wrfvsHsa
Copy link

oh wait you are using server. oops ignore my comment.

@HannesWell
Copy link
Collaborator

For me on Windows-10 using Java-11 GraalVM all four server scripts work fine.

@axkr
Copy link
Owner

axkr commented Sep 13, 2022

This work around may also help?

@axkr axkr closed this as completed Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants