You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Jonathan Gallimore <jo...@gmail.com> on 2011/03/06 22:19:38 UTC

JSTL problem?

Hi,

I'm deploying a sample application which uses JSTL (just a single entity
application with a JSTL CRUD web interface generated with the wizards in
Netbeans). I'm getting this stack trace:

java.lang.NoClassDefFoundError:
javax/servlet/jsp/jstl/core/ConditionalTagSupport
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at
org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:139)
at
org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:66)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:953)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:715)
at
org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:236)
at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:234)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:654)
at
org.apache.openejb.tomcat.catalina.TomcatWebAppBuilder.start(TomcatWebAppBuilder.java:308)
at
org.apache.openejb.tomcat.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:101)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:343)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:323)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5198)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:925)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:723)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1302)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:343)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:323)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1043)
at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1035)
at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:724)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:304)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: java.lang.ClassNotFoundException:
javax.servlet.jsp.jstl.core.ConditionalTagSupport
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at
org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:94)
at
org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:66)
... 48 more

What's really frustrating is that wrapping the deploy method in
AnnotationDeployer like so:

   public AppModule deploy(AppModule appModule) throws OpenEJBException {

        setModule(appModule);

        try {

            appModule = discoverAnnotatedBeans.deploy(appModule);

            appModule = envEntriesPropertiesDeployer.deploy(appModule);

            appModule = processAnnotatedBeans.deploy(appModule);

            return appModule;

        } catch (Exception e) {

        e.printStackTrace();

        throw new OpenEJBException(e);

        } finally {

            removeModule();

        }

    }


doesn't seem to stop on my e.printStackTrace();. I also don't see why we can
pick up this class, I'm including jstl.jar in my war file. I'm going to dig
further tomorrow, but thought I'd post up in case anyone had any ideas.

Cheers

Jon

Re: JSTL problem?

Posted by Jonathan Gallimore <jo...@gmail.com>.
Thanks for the reply David. I feel pretty daft now, I was pretty tired went
I sent that :)

I'll check out what in javaee-api and whether we can fiddle with
TempClassLoader to make this work.

Jon

On Sun, Mar 6, 2011 at 11:15 PM, David Blevins <da...@gmail.com>wrote:

>
> On Mar 6, 2011, at 1:19 PM, Jonathan Gallimore wrote:
>
> > Hi,
> >
> > I'm deploying a sample application which uses JSTL (just a single entity
> > application with a JSTL CRUD web interface generated with the wizards in
> > Netbeans). I'm getting this stack trace:
> >
> > java.lang.NoClassDefFoundError:
> > javax/servlet/jsp/jstl/core/ConditionalTagSupport
> > at java.lang.ClassLoader.defineClass1(Native Method)
>
> Maybe we need to include that spec in the javaee-api jar?
>
> >
> org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:139)
>
> I know the TempClassLoader has some logic to specially handle "javax"
> packages.  Might be something here causing the issue.
>
> If that is the case, we might have to be clever with that logic or do some
> really good logging or both.
>
> > What's really frustrating is that wrapping the deploy method in
> > AnnotationDeployer like so:
> >
> >   public AppModule deploy(AppModule appModule) throws OpenEJBException {
> >
> >        setModule(appModule);
> >
> >        try {
> >
> >            appModule = discoverAnnotatedBeans.deploy(appModule);
> >
> >            appModule = envEntriesPropertiesDeployer.deploy(appModule);
> >
> >            appModule = processAnnotatedBeans.deploy(appModule);
> >
> >            return appModule;
> >
> >        } catch (Exception e) {
> >
> >        e.printStackTrace();
> >
> >        throw new OpenEJBException(e);
> >
> >        } finally {
> >
> >            removeModule();
> >
> >        }
> >
> >    }
> >
> >
> > doesn't seem to stop on my e.printStackTrace()
>
> Error doesn't subclass from Exception.  Frustration and lack of sleep does
> that to us all :)
>
>
> -David
>
>

Re: JSTL problem?

Posted by David Blevins <da...@gmail.com>.
On Mar 6, 2011, at 1:19 PM, Jonathan Gallimore wrote:

> Hi,
> 
> I'm deploying a sample application which uses JSTL (just a single entity
> application with a JSTL CRUD web interface generated with the wizards in
> Netbeans). I'm getting this stack trace:
> 
> java.lang.NoClassDefFoundError:
> javax/servlet/jsp/jstl/core/ConditionalTagSupport
> at java.lang.ClassLoader.defineClass1(Native Method)

Maybe we need to include that spec in the javaee-api jar?

> org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:139)

I know the TempClassLoader has some logic to specially handle "javax" packages.  Might be something here causing the issue.

If that is the case, we might have to be clever with that logic or do some really good logging or both.

> What's really frustrating is that wrapping the deploy method in
> AnnotationDeployer like so:
> 
>   public AppModule deploy(AppModule appModule) throws OpenEJBException {
> 
>        setModule(appModule);
> 
>        try {
> 
>            appModule = discoverAnnotatedBeans.deploy(appModule);
> 
>            appModule = envEntriesPropertiesDeployer.deploy(appModule);
> 
>            appModule = processAnnotatedBeans.deploy(appModule);
> 
>            return appModule;
> 
>        } catch (Exception e) {
> 
>        e.printStackTrace();
> 
>        throw new OpenEJBException(e);
> 
>        } finally {
> 
>            removeModule();
> 
>        }
> 
>    }
> 
> 
> doesn't seem to stop on my e.printStackTrace()

Error doesn't subclass from Exception.  Frustration and lack of sleep does that to us all :)


-David