Friday, December 19, 2008

How to Recover from Portlet Error: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name

If you get the following error in a portlet (this one is from pluto 1.0.1):
ERROR [main] Dec/18 10:49:31,858 digester.Digester.[] - End event threw exception
java.lang.reflect.InvocationTargetException
 at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.apache.tomcat.util.IntrospectionUtils.callMethodN(IntrospectionUtils.java:929)
 at org.apache.tomcat.util.digester.CallMethodRule.end(CallMethodRule.java:578)
 at org.apache.tomcat.util.digester.Rule.end(Rule.java:228)
 at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1057)
 at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
 at org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown Source)
 at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
 at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
 at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
 at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
 at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
 at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
 at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:351)
 at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1041)
 at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:260)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4143)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
 at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
 at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
 at org.apache.catalina.core.StandardService.start(StandardService.java:450)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name eventsportlet
 at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:2322)
 at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:2302)
 ... 46 more
It more than likely means that the portlet was not "plutofied" (web.xml altered by Pluto). For information on how to plutofy a portlet in uPortal, see http://stufftohelpyouout.blogspot.com/2008/09/automate-uportal-deployportletapp.html!

No comments: