Community
Participate
Working Groups
When trying to register tags from the tag registry, the tag analyzer experiences an error because the IDE remote VM fails to find a dependent class for the tag. This can occur when a project uses a tag library that has a tag implementation extending from something like javax.faces.webapp.UIComponentELTag, which in turn depends on the existence of javax.servlet.jsp.tagext.JspIdConsumer on the classpath. Here's the stack trace... !ENTRY org.eclipse.jem.proxy 2 0 2010-05-10 16:47:58.984 !MESSAGE !STACK 0 java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/JspIdConsumer at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.eclipse.jem.internal.proxy.ide.IDEProxyFactoryRegistry$IDESpecialClassLoader.findClass(IDEProxyFactoryRegistry.java:79) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.eclipse.jem.internal.proxy.ide.IDEProxyFactoryRegistry$IDESpecialClassLoader.findClass(IDEProxyFactoryRegistry.java:79) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.eclipse.jem.internal.proxy.ide.IDEProxyFactoryRegistry$IDESpecialClassLoader.findClass(IDEProxyFactoryRegistry.java:79) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.eclipse.jem.internal.proxy.ide.IDEProxyFactoryRegistry.loadClass(IDEProxyFactoryRegistry.java:145) at org.eclipse.jem.internal.proxy.ide.IDEStandardBeanTypeProxyFactory.getBeanTypeProxy(IDEStandardBeanTypeProxyFactory.java:212) at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.analyzer.TagAnalyzer.findComponentType(TagAnalyzer.java:158) at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.analyzer.TagAnalyzer.createComponentTagElement(TagAnalyzer.java:669) at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.analyzer.TagAnalyzer.createTLDTagElement(TagAnalyzer.java:601) at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TagIntrospectingStrategy.resolve(TagIntrospectingStrategy.java:69) at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.JSPTagResolvingStrategy.resolve(JSPTagResolvingStrategy.java:1) at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.AbstractTagResolvingStrategy.perform(AbstractTagResolvingStrategy.java:42) at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.AbstractTagResolvingStrategy.perform(AbstractTagResolvingStrategy.java:1) at org.eclipse.jst.jsf.common.internal.strategy.StrategyComposite$DefaultCompositionStrategy.compose(StrategyComposite.java:180) at org.eclipse.jst.jsf.common.internal.strategy.StrategyComposite.perform(StrategyComposite.java:66) at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.CompositeTagResolvingStrategy.resolve(CompositeTagResolvingStrategy.java:64) at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TLDNamespace$DocumentTLDNamespaceData.createTagElement(TLDNamespace.java:162) at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TLDNamespace$DocumentTLDNamespaceData.getViewElement(TLDNamespace.java:206) at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TLDNamespace.getViewElement(TLDNamespace.java:78) at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteHelper.verifyPresentInContentModel(PaletteHelper.java:430) at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteHelper.internalCreateTagEntry(PaletteHelper.java:414) at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteHelper.createTagEntry(PaletteHelper.java:374) at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteHelper.loadTags(PaletteHelper.java:642) at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteHelper.getOrCreateTaglibPaletteDrawer(PaletteHelper.java:581) at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteHelper.configPaletteItemsByNamespace(PaletteHelper.java:559) at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteItemManager.registerTagsFromTagRegistry(PaletteItemManager.java:322) ... Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.JspIdConsumer at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.eclipse.jem.internal.proxy.ide.IDEProxyFactoryRegistry$IDESpecialClassLoader.findClass(IDEProxyFactoryRegistry.java:79) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) This then causes a NPE downstream in the BeanProxyWrapper that the TagAnalyzer constructs... !ENTRY org.eclipse.jst.jsf.common 4 0 2010-05-10 16:47:59.000 !MESSAGE Caught exception !STACK 0 java.lang.NullPointerException at org.eclipse.jst.jsf.core.internal.jem.BeanProxyUtil$BeanProxyWrapper.findMethodInList(BeanProxyUtil.java:378) at org.eclipse.jst.jsf.core.internal.jem.BeanProxyUtil$BeanProxyWrapper.getMethodProxy(BeanProxyUtil.java:357) at org.eclipse.jst.jsf.core.internal.jem.BeanProxyUtil$BeanProxyWrapper.call(BeanProxyUtil.java:128) at org.eclipse.jst.jsf.core.internal.jem.BeanProxyUtil$BeanProxyWrapper.call(BeanProxyUtil.java:161) at org.eclipse.jst.jsf.core.internal.jem.BeanProxyUtil$BeanProxyWrapper.callStringMethod(BeanProxyUtil.java:178) at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.analyzer.TagAnalyzer.findComponentType(TagAnalyzer.java:165) at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.analyzer.TagAnalyzer.createComponentTagElement(TagAnalyzer.java:669) at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.analyzer.TagAnalyzer.createTLDTagElement(TagAnalyzer.java:601) at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TagIntrospectingStrategy.resolve(TagIntrospectingStrategy.java:69)
Created attachment 168547 [details] patch to contribute required class to classpath This patch alters the existing ServletBeanProxyContributor to always append javax.servlet.jsp.tagext.JspIdConsumer to the user classpath. There's also a change in BeanProxyWrapper.getMethodProxy() to check for null declared methods and avoid the additional NPE.
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. The bug results in too many NPE's in the log file. * Is there a work-around? If so, why do you believe the work-around is insufficient? No reasonable workaround * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? Manual testing * Give a brief technical overview. Who has reviewed this fix? See comment 1. * What is the risk associated with this fix? low-medium
Checked the patch into HEAD for 3.2RC2