Skip to main content



      Home
Home » Language IDEs » Eclipse Web Tools Platform Project (WTP) » Run on Server(Trying to open file and fails, NPE)
Run on Server [message #1858165] Sat, 18 March 2023 05:22 Go to next message
Eclipse UserFriend
Hello, I've been using Eclipse for more than 10 years but recently start using Idea.

I hade some smaller projects though using only Java and a static web project and thought of using Eclipse.

In my static web project I have a folder with html css and javascript files. I have never got "Run on Server" to work but thought I might give it a try.

Right-clicking, selecting "Run on Server" gives option to "Manually define a new server" and I selected "HTTP Server at localhost". Added my project to resources.

When running it tries to open a file but cannot find the path

There is also an error in the error log (see below). I think it's VERY strange that it's this hard to even run static web files. Have nothing happened in 10 years?

The server is running with my resource but visiting the address returns nothing

eclipse.buildId=4.27.0.20230309-1200
java.version=17.0.6
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=sv_SE
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

org.eclipse.jface.text
Error
Sat Mar 18 10:12:03 CET 2023
java.lang.NullPointerException: Cannot invoke "java.util.concurrent.CompletionStage.toCompletableFuture()" because the return value of "java.util.function.Function.apply(Object)" is null

java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot invoke "java.util.concurrent.CompletionStage.toCompletableFuture()" because the return value of "java.util.function.Function.apply(Object)" is null
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1159)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.concurrent.CompletionStage.toCompletableFuture()" because the return value of "java.util.function.Function.apply(Object)" is null
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
... 6 more

Re: Run on Server [message #1858170 is a reply to message #1858165] Sun, 19 March 2023 12:02 Go to previous message
Eclipse UserFriend
I think that's going to need more log output, as it's unclear from this what it was that it failed to do. It certainly doesn't mention an invalid URL in the request.

[Updated on: Sun, 19 March 2023 12:02] by Moderator

Previous Topic:How to check the syntax of HTML files
Next Topic:Cannot add web project to Tomcat
Goto Forum:
  


Current Time: Tue Jul 01 01:58:24 EDT 2025

Powered by FUDForum. Page generated in 0.10795 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top