4 Replies Latest reply on Jul 18, 2002 4:52 PM by juha

    jboss is likely not hype, but where should i get working sam

    jshen

      while it is a bit cruel to be angry at someone like the jboss team who have worked hard
      to bring us this great product, i must say that i do share a similar experience with
      the "hype" topic author, because in all the app servers i have used or evaluated
      (weblogic, silverstream, j2ee ref, enhydra), jboss is the only one that fails to deploy its own example.
      i also hope that he will finally get it working despite all the problems.

      i realize that the error is also from crimson, and it must be something
      very simple, but i also think that something is not matching very well or is not
      documented well enough if a simple sample ear like this would fail.

      i am newbie at the jboss but heard a lot of good things from friends so i wanted to give it a
      try.

      my question probably should be more general than this error:

      are there a few simple working examples (jsp with cmp entity bean, etc.)?

      i realize that there are posted code to patch the petstore and get it working, but i really
      want to have some simple examples. it would be great if the distribution itself
      comes with an examples directory that work out of box (such a thing must
      exist, because i believe jboss goes through rigorous testing and at least some
      in your organization must have gone through the trouble of running some sample programs. for
      a major release).

      thanks,

      --john

      i am running linux (rh 7.3)

      i downloaded

      jboss-3.0.0_tomcat-4.0.3.zip

      http://www.jboss.org/docs/manual/files/documentation-example.tar.gz

      (for unix)

      now i build an ear with no problem,

      ant intro-interest-ear

      but when i deployed it, this is what i got:
      2002-07-18 10:33:35,356 ERROR [org.jboss.web.localhost.Engine] ContextConfig[/interest] Parse error in application web.xml
      org.xml.sax.SAXParseException: Element type "web-app" is not declared.
      at org.apache.crimson.parser.Parser2.error(Parser2.java:3160)
      at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1322)
      at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
      at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
      at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
      at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:314)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:89)
      at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:275)
      at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:256)
      at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:824)
      at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:224)
      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:3345)
      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(EmbeddedCatalinaServiceSX.java:321)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.performDeploy(EmbeddedCatalinaServiceSX.java:238)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:300)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:678)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:671)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:513)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:586)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:465)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:237)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:162)
      at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:894)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:340)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy3.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:243)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:678)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:513)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:465)
      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:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:314)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:216)
      at org.jboss.Main.boot(Main.java:142)
      at org.jboss.Main$1.run(Main.java:375)
      at java.lang.Thread.run(Thread.java:536)

        • 1. Re: jboss is likely not hype, but where should i get working
          benw

          Hi John,

          From the error message, it said that it cannot find the element tag <web-app> is missing in your web.xml file. Double check that file. If necessary, post the file on this thread and we can try to help you out.

          Ben

          • 2. Re: jboss is likely not hype, but where should i get working

            Hehe,

            This example is written for the 2.4 book.
            JBoss3 is more strict with the xml validation.

            In file examples/org/jboss/docs/interest/web.xml
            add the dtd

            <?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>
            ...

            Regards,
            Adrian

            • 3. Re: jboss is likely not hype, but where should i get working
              jshen

              thanks, warjort, for the quick help. that did it and now the example work perfectly.

              i must admit that i have relied mostly on the deploy tools that came with other app servers, but
              with jboss, one big change would be to start to editing xml files.

              this may not be that bad, but to those who are used to point and click, i can see
              that it would be a problem because editing raw xml files are quite error-prone (at one point in a previous
              life, i used to write xlst templates and it was quite painful to have typos or
              misaligned stuff).

              it would be great to have is a tool, not too fancy, just similar to the sun j2ee deploytool.

              now i will attempt more things.

              the forum does seem to have loads of things already so hopefully i won't run into too many
              more problems.

              • 4. Re: jboss is likely not hype, but where should i get working

                xdoclet + ant tends to work better than any point and click GUI tool

                -- Juha