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

plugin fails to start jetty when there's no internet connection #13

Closed
morgwai opened this issue May 17, 2015 · 2 comments
Closed

plugin fails to start jetty when there's no internet connection #13

morgwai opened this issue May 17, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@morgwai
Copy link

morgwai commented May 17, 2015

console output:

2015-05-18 01:29:15.973:INFO::main: Logging initialized @274ms
   Configuration: /tmp/eclipseJettyPlugin.config.myProject_jetty.xml
                  /var/home/morgwai/kotar/eclipse/myProjectWebApp/src/main/webapp/WEB-INF/jetty-web.xml
Exception in thread "main" java.io.IOException: Failed to read /var/home/morgwai/kotar/eclipse/myProjectWebApp/src/main/webapp/WEB-INF/jetty-web.xml
    at net.sourceforge.eclipsejetty.starter.common.AbstractJettyLauncherMain.determineClass(AbstractJettyLauncherMain.java:207)
    at net.sourceforge.eclipsejetty.starter.common.AbstractJettyLauncherMain.configure(AbstractJettyLauncherMain.java:140)
    at net.sourceforge.eclipsejetty.starter.common.AbstractJettyLauncherMain.launch(AbstractJettyLauncherMain.java:76)
    at net.sourceforge.eclipsejetty.starter.jetty9.Jetty9LauncherMain.main(Jetty9LauncherMain.java:42)
Caused by: java.net.UnknownHostException: www.eclipse.org
...

header of the mentioned xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
...

The problem is apparently caused by the fact that the plugin tries to verify xml config files with their schemas if declarations are present. This is a good thing in general, but in case the schema cannot be downloaded it should just display a warning instead of exiting fatally.
Even better solution would be to cache schemas somewhere on disk so they can be used when offline.
It would be even more better to use schema files cached by Eclipse.
For now I'm removing schema declarations from xml files when offline and it works ok then.

@derkoe
Copy link
Contributor

derkoe commented Jun 10, 2015

I have used the Jetty plugin many times without Internet connection and just tried it again - no problem there. Do you have any special settings? Can you attach the launch config?

@morgwai
Copy link
Author

morgwai commented Jun 10, 2015

are you sure you have schema links in your config files? I don't think I'm doing anything unusual, at least nothing I'm aware of ;) below is my launch config:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="net.sourceforge.eclipsejetty.launchConfigurationType">
<intAttribute key="net.sourceforge.eclipsejetty.launcher.acceptor.limit.count" value="8"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.acceptor.limit.enabled" value="false"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.ajp.enabled" value="false"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.annotations.enabled" value="true"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.cache.client.enabled" value="true"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.cache.server.enabled" value="true"/>
<intAttribute key="net.sourceforge.eclipsejetty.launcher.configVersion" value="1"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.console.enabled" value="true"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.context" value="/"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.customWebDefaults.enabled" value="false"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.customWebDefaults.resource" value=""/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.gracefulShutdown.override.enabled" value="false"/>
<intAttribute key="net.sourceforge.eclipsejetty.launcher.gracefulShutdown.override.timeout" value="1000"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.httpsEnabled" value="false"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.httpsPort" value="8443"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.jetty.config.active.0" value="true"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.jetty.config.active.1" value="true"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.jetty.config.active.2" value="true"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.jetty.config.path.0" value=""/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.jetty.config.path.1" value="../../../../../../../../jetty/etc/myProjectDS.xml"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.jetty.config.path.2" value="../../../../../../../../myProjectWebApp/src/main/webapp/WEB-INF/jetty-web.xml"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.jetty.config.type.0" value="DEFAULT"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.jetty.config.type.1" value="WORKSPACE"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.jetty.config.type.2" value="WORKSPACE"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.jetty.embedded" value="false"/>
<intAttribute key="net.sourceforge.eclipsejetty.launcher.jetty.microVersion" value="0"/>
<intAttribute key="net.sourceforge.eclipsejetty.launcher.jetty.minorVersion" value="3"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.jetty.path" value="${jetty_home}"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.jetty.version" value="JETTY_9"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.jmx.enabled" value="true"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.jndi.enabled" value="true"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.jsp.enabled" value="false"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.launcher.excludeGenericIds" value=""/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.launcher.excludeLibs" value=""/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.launcher.globalGenericIds" value="org.jboss.logging:jboss-logging-annotations:1.2.0.Beta1::, org.hibernate:hibernate-entitymanager:4.3.8.Final::, com.google.inject.extensions:guice-persist:3.0::, com.google.gwt:gwt-servlet:2.6.1::, javax.validation:validation-api:1.0.0.GA::, com.google.inject.extensions:guice-servlet:3.0::, org.jboss.logging:jboss-logging:3.1.3.GA::, antlr:antlr:2.7.7::, com.google.gwt:gwt-user:2.6.1::, org.javassist:javassist:3.18.1-GA::, org.postgresql:postgresql:9.3-1103-jdbc41::, com.google.inject:guice:3.0::, xml-apis:xml-apis:1.0.b2::, org.hibernate:hibernate-core:4.3.8.Final::, org.json:json:20090211::, pl.morgwai.gwt:guice-request-factory:1.0-SNAPSHOT::, org.hibernate.common:hibernate-commons-annotations:4.0.5.Final::, javax.inject:javax.inject:1::, org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final::, pl.morgwai.guiceServletJPA:guice-servlet-jpa:1.0-SNAPSHOT::, org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.0.0.Final::, org.jboss:jandex:1.1.0.Final::, org.hibernate:hibernate-validator:4.3.2.Final::, com.google.web.bindery:requestfactory-server:2.6.1::, aopalliance:aopalliance:1.0::, dom4j:dom4j:1.6.1::"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.launcher.globalLibs" value=".*/antlr-2\.7\.7\.jar, .*/aopalliance-1\.0\.jar, .*/dom4j-1\.6\.1\.jar, .*/guice-3\.0\.jar, .*/guice-persist-3\.0\.jar, .*/guice-request-factory-1\.0-SNAPSHOT\.jar, .*/guice-servlet-3\.0\.jar, .*/guice-servlet-jpa-1\.0-SNAPSHOT\.jar, .*/gwt-servlet-2\.6\.1\.jar, .*/gwt-user-2\.6\.1\.jar, .*/hibernate-commons-annotations-4\.0\.5\.Final\.jar, .*/hibernate-core-4\.3\.8\.Final\.jar, .*/hibernate-entitymanager-4\.3\.8\.Final\.jar, .*/hibernate-jpa-2\.1-api-1\.0\.0\.Final\.jar, .*/hibernate-validator-4\.3\.2\.Final\.jar, .*/jandex-1\.1\.0\.Final\.jar, .*/javassist-3\.18\.1-GA\.jar, .*/javax\.inject-1\.jar, .*/jboss-logging-3\.1\.3\.GA\.jar, .*/jboss-logging-annotations-1\.2\.0\.Beta1\.jar, .*/jboss-transaction-api_1\.2_spec-1\.0\.0\.Final\.jar, .*/json-20090211\.jar, .*/postgresql-9\.3-1103-jdbc41\.jar, .*/requestfactory-server-2\.6\.1\.jar, .*/validation-api-1\.0\.0\.GA\.jar, .*/xml-apis-1\.0\.b2\.jar"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.launcher.includeGenericIds" value=""/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.launcher.includeLibs" value=""/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.launcher.info" value="true"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.port" value="8888"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.scope.compile.exclude" value="false"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.scope.import.exclude" value="true"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.scope.none.exclude" value="true"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.scope.provided.exclude" value="false"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.scope.runtime.exclude" value="false"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.scope.system.exclude" value="false"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.scope.test.exclude" value="true"/>
<intAttribute key="net.sourceforge.eclipsejetty.launcher.threadPool.limit.count" value="16"/>
<booleanAttribute key="net.sourceforge.eclipsejetty.launcher.threadPool.limit.enabled" value="false"/>
<stringAttribute key="net.sourceforge.eclipsejetty.launcher.webappdir" value="target/myProjectWebApp-1.0-SNAPSHOT"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/myProjectWebApp"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="net.sourceforge.eclipsejetty.launcher.JettyLaunchClassPathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="net.sourceforge.eclipsejetty.starter.jetty9.Jetty9LauncherMain"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="myProjectWebApp"/>
</launchConfiguration>

@derkoe derkoe added this to the 3.8.1 milestone Jun 27, 2015
@derkoe derkoe self-assigned this Jun 27, 2015
@derkoe derkoe added the bug label Jun 27, 2015
@derkoe derkoe closed this as completed in 8944e31 Jun 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants