java.io.FileNotFoundException [message #1833189] |
Tue, 06 October 2020 10:02 |
z232 I Messages: 48 Registered: February 2016 |
Member |
|
|
Hi,
recently i have installed eclipse Version: 2019-12 (4.14.0) with Build id: 20191212-1212 . The Xtext plugin is 2.20.0.v20191202-1256
On the creation of a new xtext project i select the web integration support and gradle as prefered build system.
The artifacts of the hello world example language are generated successful. The problem comes after i try to run the jetty server.
The following message appears on the console log .
[main] INFO org.eclipse.jetty.util.log - Logging initialized @235ms to org.eclipse.jetty.util.log.Slf4jLog
[main] INFO org.eclipse.jetty.server.Server - jetty-9.4.22.v20191022; built: 2019-10-22T13:37:13.455Z; git: b1e6b55512e008f7fbdf1cbea4ff8a6446d1073b; jvm 1.8.0_261-b12
[main] WARN org.eclipse.jetty.webapp.WebAppContext - Failed startup of context o.e.j.w.WebAppContext@29774679{/,file:///C:/Users/michael/Desktop/eclipse201912/WorkspaceServer/org.xtext.example.mydsl.parent/org.xtext.example.mydsl.web/WebRoot/,UNAVAILABLE}
java.io.FileNotFoundException: C:\org.xtext.example.mydsl.web\bin\default (The system cannot find the path specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.<init>(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(Unknown Source)
at org.eclipse.jetty.webapp.MetaInfConfiguration.getTlds(MetaInfConfiguration.java:445)
at org.eclipse.jetty.webapp.MetaInfConfiguration.scanForTlds(MetaInfConfiguration.java:361)
at org.eclipse.jetty.webapp.MetaInfConfiguration.scanJars(MetaInfConfiguration.java:172)
at org.eclipse.jetty.webapp.MetaInfConfiguration.preConfigure(MetaInfConfiguration.java:101)
at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:488)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:523)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.server.Server.start(Server.java:407)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:106)
at org.eclipse.jetty.server.Server.doStart(Server.java:371)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.xtext.example.mydsl.web.ServerLauncher.main(ServerLauncher.java:47)
[main] INFO org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@64b8f8f4{HTTP/1.1,[http/1.1]}{localhost:8080}
[main] INFO org.eclipse.jetty.server.Server - Started @828ms
[main] INFO org.xtext.example.mydsl.web.ServerLauncher - Server started http://localhost:8080/...
[Thread-8] INFO org.xtext.example.mydsl.web.ServerLauncher - Press enter to stop the server...
This is the ServerLauncher.xtend file produced by xtext
/*
* generated by Xtext 2.20.0
*/
package org.xtext.example.mydsl.web
import java.net.InetSocketAddress
import org.eclipse.jetty.annotations.AnnotationConfiguration
import org.eclipse.jetty.server.Server
import org.eclipse.jetty.util.log.Slf4jLog
import org.eclipse.jetty.webapp.MetaInfConfiguration
import org.eclipse.jetty.webapp.WebAppContext
import org.eclipse.jetty.webapp.WebInfConfiguration
import org.eclipse.jetty.webapp.WebXmlConfiguration
/**
* This program starts an HTTP server for testing the web integration of your DSL.
* Just execute it and point a web browser to http://localhost:8080/
*/
class ServerLauncher {
def static void main(String[] args) {
val server = new Server(new InetSocketAddress('localhost', 8080))
server.handler = new WebAppContext => [
resourceBase = 'WebRoot'
welcomeFiles = #["index.html"]
contextPath = "/"
configurations = #[
new AnnotationConfiguration,
new WebXmlConfiguration,
new WebInfConfiguration,
new MetaInfConfiguration
]
setAttribute(WebInfConfiguration.CONTAINER_JAR_PATTERN, '.*/org\\.xtext\\.example\\.mydsl\\.web/.*,.*\\.jar')
setInitParameter("org.mortbay.jetty.servlet.Default.useFileMappedBuffer", "false")
]
val log = new Slf4jLog(ServerLauncher.name)
try {
server.start
log.info('Server started ' + server.getURI + '...')
new Thread[
log.info('Press enter to stop the server...')
val key = System.in.read
if (key != -1) {
server.stop
} else {
log.warn('Console input is not available. In order to stop the server, you need to cancel process manually.')
}
].start
server.join
} catch (Exception exception) {
log.warn(exception.message)
System.exit(1)
}
}
}
As expexted after visiting http://localhost:8080 i get the following error HTTP ERROR 503 Service Unavailable
Is this a bug ?
Thanks
|
|
|
|
|
Re: java.io.FileNotFoundException [message #1833193 is a reply to message #1833191] |
Tue, 06 October 2020 10:45 |
z232 I Messages: 48 Registered: February 2016 |
Member |
|
|
Hi Christian
My projects src folders build path configuration is exactly the same as shown in the image. Also no errors are present in any of my projects.
I haven' t installed inside eclipse any extra toolchain for the building system .
I use the build ship provided by the official release of this eclipse version.
The build ship information is the following
Eclipse Buildship Buildship, Eclipse Plug-ins for Gradle 3.1.3.v20191118-1057 org.eclipse.buildship
i have also installed Gradle version 6.6.1. in my pc
After running thru the console the jetty Server, i don't get any errors at all.
Should i update the build ship inside eclipse ? And if yes witch version is preferable ?
Thanks again
[Updated on: Thu, 20 May 2021 14:59] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03736 seconds