You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Geevarghese, Koshy" <kg...@hoovers.com> on 2007/07/27 20:34:26 UTC

NamingContextBindingsEnumeration error from Tomcat 5.5 on Eclipse 3.3

Hi,

  I'm trying to run a web application on Eclipse 3.3 with Tomcat 5.5.

  I configured the Tomcat 5.5 server in  the eclipse server view and
added my project to the server.

  I'm starting tomcat through the eclipse server view and get the
following error -

 

 

java.lang.reflect.InvocationTargetException

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)

      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)

      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

Caused by: java.lang.NoSuchMethodError:
org.apache.naming.NamingContextBindingsEnumeration.<init>(Ljava/util/Enu
meration;)V

      at
org.apache.naming.NamingContext.listBindings(NamingContext.java:389)

      at
org.apache.naming.NamingContext.listBindings(NamingContext.java:418)

      at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans
(GlobalResourcesLifecycleListener.java:135)

      at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans
(GlobalResourcesLifecycleListener.java:109)

      at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEve
nt(GlobalResourcesLifecycleListener.java:81)

      at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:120)

      at
org.apache.catalina.core.StandardServer.start(StandardServer.java:693)

      at org.apache.catalina.startup.Catalina.start(Catalina.java:552)

      ... 6 more

 

If anyone knows how to solve this, please let me know.

 

 

Thank you,

Koshy Geevarghese

 


Re: NamingContextBindingsEnumeration error from Tomcat 5.5 on Eclipse 3.3

Posted by Len Popp <le...@gmail.com>.
To expand on Chris's comment,
With Eclipse it is possible to compile for a newer version of Java and
run with an older JRE, which will fail. Make sure it's both compiling
and running the version of Java you want to use.

I always have a hard time finding anything in the maze of Eclipse
settings, so here's how to check this:
To see which JRE you're running with, open the server from the Servers
view, find the Runtime item and click Edit next to it. (This is in
Eclipse 3.2 with WST 1.5, hopefully it's the same in your version.)
To see which version of Java it's compiling for, look in Project >
Properties > Java Compiler; if it's not there, try Preferences > Java
> Compiler.
-- 
Len


On 7/27/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Koshy,
>
> Geevarghese, Koshy wrote:
> > I'm trying to run a web application on Eclipse 3.3 with Tomcat 5.5.
> >
> > I configured the Tomcat 5.5 server in  the eclipse server view and
> > added my project to the server.
> >
> > I'm starting tomcat through the eclipse server view and get the
> > following error -
>
> [snip]
>
> > java.lang.reflect.InvocationTargetException
>
> [snip]
>
> > Caused by: java.lang.NoSuchMethodError:
> > org.apache.naming.NamingContextBindingsEnumeration.<init>(Ljava/util/Enu
> > meration;)V
>
> It looks like you are compiling your application with one Java API and
> running it on another. Is that possible? It's one of the only reasons
> you might get a NSME like this.
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGqj0s9CaO5/Lv0PARAjF/AJ47QiK4tRLPEHk+DHJC5fhobVvDEgCdEDjh
> WH/CgxN+CUw5u4uR2RcWRcg=
> =tYDg
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: NamingContextBindingsEnumeration error from Tomcat 5.5 on Eclipse 3.3

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Koshy,

Geevarghese, Koshy wrote:
> I'm trying to run a web application on Eclipse 3.3 with Tomcat 5.5.
> 
> I configured the Tomcat 5.5 server in  the eclipse server view and
> added my project to the server.
> 
> I'm starting tomcat through the eclipse server view and get the
> following error -

[snip]

> java.lang.reflect.InvocationTargetException

[snip]

> Caused by: java.lang.NoSuchMethodError:
> org.apache.naming.NamingContextBindingsEnumeration.<init>(Ljava/util/Enu
> meration;)V

It looks like you are compiling your application with one Java API and
running it on another. Is that possible? It's one of the only reasons
you might get a NSME like this.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGqj0s9CaO5/Lv0PARAjF/AJ47QiK4tRLPEHk+DHJC5fhobVvDEgCdEDjh
WH/CgxN+CUw5u4uR2RcWRcg=
=tYDg
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org