Hi, I am developing a portlet based on the apache portals bridge and myfaces 1.1.5 on oracle oc4j 10.1.3 from jdeveloper 10.1.3.2.0.
JDeveloper inserts several servlets etc into the web.xml to instrument the portlet for WSRP. It appears that one of the servlets does not have its class available in the classpath when WebXml.java has its getFacesServletMappings method called. This causes an exception to be thrown at line 123. It occurs to me that myfaces really does not need to know about this servlet, therefore, if I surround the appropriate block with a try/catch, and just continue, then everything works, just fine. Modified code snippet follow: try { Class servletClass = org.apache.myfaces.shared_impl.util.ClassUtils.simpleClassForName((String)en try.getValue()); // if (FacesServlet.class.isAssignableFrom(servletClass) || // DelegatedFacesServlet.class.isAssignableFrom(servletClass)) // { List urlPatterns = (List)_servletMappings.get(servletName); if( urlPatterns != null ) { for (Iterator it2 = urlPatterns.iterator(); it2.hasNext(); ) { String urlpattern = (String)it2.next(); _facesServletMappings.add(new org.apache.myfaces.shared_impl.webapp.webxml.ServletMapping(servletName, servletClass, urlpattern)); if (log.isTraceEnabled()) log.trace("adding mapping for servlet + " + servletName + " urlpattern = " + urlpattern); } } // } // else // { // if (log.isTraceEnabled()) log.trace("ignoring servlet + " + servletName + " " + servletClass + " (no FacesServlet)"); // } } catch (Exception cnfe) { log.info("Error loading servlet class " + (String)entry.getValue()); } Thales UK Ltd (Wells) DISCLAIMER: The information contained in this e-mail is confidential. It may also be legally privileged. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this e-mail. Such unauthorised use may be unlawful. We may monitor all e-mail communications through our networks. If you have received this e-mail in error, please inform us immediately on +44 (0) 1749 672081 and delete it and all copies from your system. We accept no responsibility for changes to any e-mail which occur after it has been sent. Attachments to this e-mail may contain software viruses which could damage your system. We therefore recommend you virus-check all attachments before opening. A business of Thales UK Ltd. Registered Office: 2 Dashwood Lang Road, The Bourne Business Park, Addlestone, Weybridge, Surrey KT15 2NX Registered in England No. 868273