0 Replies Latest reply on Mar 29, 2002 1:12 AM by boram

    (In deploying war)Failed to setup web app. ENC

    boram Newbie

      I tried to deploy war file using JBuilder and found error messages like this.

      ___________
      [ERROR,EmbeddedCatalinaServiceSX] Failed to setup web application ENC
      java.lang.ClassCastException: org.jboss.naming.java.javaURLContextFactory
      at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:573)
      at javax.naming.spi.NamingManager.getURLContext(NamingManager.java:531)
      at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:278)
      at javax.naming.InitialContext.lookup(InitialContext.java:350)
      at org.jboss.web.AbstractWebContainer.parseWebAppDescriptors(AbstractWebContainer.java:317)
      at org.jboss.web.AbstractWebContainer$DescriptorParser.parseWebAppDescriptors(AbstractWebCon
      tainer.java:471)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.contextInit(EmbeddedCatalinaServiceSX.ja
      va:484)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.access$100(EmbeddedCatalinaServiceSX.jav
      a:74)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX$1.lifecycleEvent(EmbeddedCatalinaService
      SX.java:420)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3334)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:454)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.createWebContext(EmbeddedCatalinaService
      SX.java:428)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.performDeploy(EmbeddedCatalinaServiceSX.
      java:282)
      at org.jboss.web.AbstractWebContainer.deploy(AbstractWebContainer.java:191)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:505)
      at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:459)
      at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:190)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:395)
      at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:233)
      at org.jboss.deployment.AutoDeployer.startService(AutoDeployer.java:371)
      at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:103)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.jav
      a:967)
      at $Proxy0.start(Unknown Source)
      at org.jboss.util.ServiceControl.start(ServiceControl.java:79)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.Main.(Main.java:208)
      at org.jboss.Main$1.run(Main.java:110)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.Main.main(Main.java:106)
      __________

      and web.xml like this
      _________
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
      <web-app>

      <servlet-name>StringLengthServlet</servlet-name>
      <jsp-file>/StringLengthJSP.jsp</jsp-file>

      <ejb-ref>
      <ejb-ref-name>ejb/StringLength</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      StringLengthHome
      StringLength
      </ejb-ref>
      </web-app>
      ___________

      Did I omit something in web.xml? As I am a beginner in EJB, it's so hard to know what is my problem.