Better error messages when web-buindles fail to start cleanly.
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@3392 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
82902b49eb
commit
8d18642311
|
@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
|
|||
Bundle-Name: Jetty OSGi bootstrap
|
||||
Bundle-SymbolicName: org.eclipse.jetty.osgi.boot;singleton:=true
|
||||
Bundle-Vendor: Mort Bay Consulting
|
||||
Bundle-Version: 7.4.1.qualifier
|
||||
Bundle-Version: 7.4.3.qualifier
|
||||
Bundle-Activator: org.eclipse.jetty.osgi.boot.JettyBootstrapActivator
|
||||
Import-Package: javax.mail;version="1.4.0";resolution:=optional,
|
||||
javax.mail.event;version="1.4.0";resolution:=optional,
|
||||
|
|
|
@ -152,7 +152,10 @@ public class WebBundleTrackerCustomizer implements BundleTrackerCustomizer {
|
|||
String contextPath = getWebContextPath(bundle, dic, false);//(String)dic.get(OSGiWebappConstants.RFC66_WEB_CONTEXTPATH);
|
||||
if (contextPath == null || !contextPath.startsWith("/"))
|
||||
{
|
||||
throw new IllegalArgumentException();
|
||||
Log.warn("The manifest header '" + OSGiWebappConstants.JETTY_WAR_FOLDER_PATH +
|
||||
": " + warFolderRelativePath + "' in the bundle " + bundle.getSymbolicName() +
|
||||
" is not valid: there is no Web-ContextPath defined in the manifest.");
|
||||
return false;
|
||||
}
|
||||
// create the corresponding service and publish it in the context of
|
||||
// the contributor bundle.
|
||||
|
@ -163,8 +166,7 @@ public class WebBundleTrackerCustomizer implements BundleTrackerCustomizer {
|
|||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
Log.warn("Staring the web-bundle " + bundle.getSymbolicName() + " threw an exception.", e);
|
||||
return true;//maybe it did not work maybe it did. safer to track this bundle.
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue