Author: rmannibucau Date: Sat Jan 25 17:44:17 2014 New Revision: 1561344 URL: http://svn.apache.org/r1561344 Log: ignoring failed parsing for taglibs
Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/config/ReadDescriptors.java Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java?rev=1561344&r1=1561343&r2=1561344&view=diff ============================================================================== --- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java (original) +++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java Sat Jan 25 17:44:17 2014 @@ -1232,9 +1232,11 @@ public class DeploymentLoader implements // load the tld files for (final URL location : tldLocations) { final TldTaglib taglib = ReadDescriptors.readTldTaglib(location); - webModule.getTaglibs().add(taglib); - if ("file".equals(location.getProtocol())) { - webModule.getWatchedResources().add(URLs.toFilePath(location)); + if (taglib != null && taglib != ReadDescriptors.SKIP_TAGLIB) { + webModule.getTaglibs().add(taglib); + if ("file".equals(location.getProtocol())) { + webModule.getWatchedResources().add(URLs.toFilePath(location)); + } } } Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/config/ReadDescriptors.java URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/config/ReadDescriptors.java?rev=1561344&r1=1561343&r2=1561344&view=diff ============================================================================== --- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/config/ReadDescriptors.java (original) +++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/config/ReadDescriptors.java Sat Jan 25 17:44:17 2014 @@ -86,6 +86,8 @@ public class ReadDescriptors implements private static final boolean ROOT_URL_FROM_WEBINF = SystemInstance.get().getOptions().get("openejb.jpa.root-url-from-webinf", false); + public static final TldTaglib SKIP_TAGLIB = new TldTaglib(); + @SuppressWarnings({"unchecked"}) public AppModule deploy(final AppModule appModule) throws OpenEJBException { for (final EjbModule ejbModule : appModule.getEjbModules()) { @@ -754,8 +756,10 @@ public class ReadDescriptors implements public static TldTaglib readTldTaglib(final URL url) throws OpenEJBException { // TOMEE-164 Optimization on reading built-in tld files - if (url.getPath().contains("jstl-1.2.jar")) return new TldTaglib(); - if (url.getPath().contains("myfaces-impl")) { + if (url.getPath().contains("jstl-1.2.jar")) { + return SKIP_TAGLIB; + } + if (url.getPath().contains("myfaces-impl")) { // we should return SKIP_TAGLIB too final TldTaglib taglib = new TldTaglib(); final Listener listener = new Listener(); listener.setListenerClass("org.apache.myfaces.webapp.StartupServletContextListener"); @@ -766,14 +770,23 @@ public class ReadDescriptors implements try { return TldTaglibXml.unmarshal(url); } catch (SAXException e) { - throw new OpenEJBException("Cannot parse the JSP tag library definition file: " + url.toExternalForm(), e); + final String message = "Cannot parse the JSP tag library definition file: " + url.toExternalForm(); + logger.warning(message); + logger.debug(message, e); } catch (JAXBException e) { - throw new OpenEJBException("Cannot unmarshall the JSP tag library definition file: " + url.toExternalForm(), e); + final String message = "Cannot unmarshall the JSP tag library definition file: " + url.toExternalForm(); + logger.warning(message); + logger.debug(message, e); } catch (IOException e) { - throw new OpenEJBException("Cannot read the JSP tag library definition file: " + url.toExternalForm(), e); - } catch (Exception e) { - throw new OpenEJBException("Encountered unknown error parsing the JSP tag library definition file: " + url.toExternalForm(), e); + final String message = "Cannot read the JSP tag library definition file: " + url.toExternalForm(); + logger.warning(message); + logger.debug(message, e); + } catch (Exception e) { + final String message = "Encountered unknown error parsing the JSP tag library definition file: " + url.toExternalForm(); + logger.warning(message); + logger.debug(message, e); } + return SKIP_TAGLIB; } public static FacesConfig readFacesConfig(final URL url) throws OpenEJBException {