9 Replies Latest reply on Oct 24, 2006 4:03 AM by Albert Sarazer

    Deployment problem : project doesn't appear in the web conso

    Albert Sarazer Newbie

      Hello,

      I tried to deploy my J2EE project in the "default/deploy/" directory in three différent ways :
      - exploded directory without ".war" suffix : JBoss ignore it...
      - exploded directory with ".war" suffix : JBoss find it, show it in the web console, but only if the "web.xml" file contains only JSP files definitions...
      - a classic WAR file : JBoss ignore it if there's other things than JSP defined, nad if there's only JSP defined in th "web.xml" file, JBoss doesn't give access to the JSPs...

      It's seems that JBoss is also really intolerant with well-formed XML tags that he doesn't recognize in his DTDs when reading the "web.xml" file.

      Well, I'm puzzled with that strange thing... :/

      Can someone tell me what rules have to be respected to assum that a J2EE project wil be deployable on JBoss ?

      Regards.

        • 1. Re: Deployment problem : project doesn't appear in the web c
          Albert Sarazer Newbie

          Reading the http://wiki.jboss.org/wiki/Wiki.jsp?page=ExplodedDeployment page, it seems that suffixing an exploded directory with ".war" is mandatory.
          Ok for that point.

          But still, I do no understand why when I'm trying to map a servlet plus a JSP it doesn't work on my JBoss instance, while the same file with only the JSP indicated works...

          The "web.xml" which works :

          <?xml version="1.0"?>
          <web-app version="2.4"
           xmlns="http://java.sun.com/xml/ns/j2ee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
           <servlet>
           <servlet-name>ClientTest</servlet-name>
           <jsp-file>/client.jsp</jsp-file>
           </servlet>
          </web-app>


          The one which doesn't work... :
          <?xml version="1.0"?>
          <web-app version="2.4"
           xmlns="http://java.sun.com/xml/ns/j2ee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
           <servlet>
           <servlet-name>ClientTest</servlet-name>
           <jsp-file>/client.jsp</jsp-file>
           </servlet>
           <servlet>
           <servlet-name>ControlerServlet</servlet-name>
           <servlet-class>com.mydomain.myappli.common.ControlerServlet</servlet-class>
           </servlet>
          </web-app>


          Regards

          • 2. Re: Deployment problem : project doesn't appear in the web c
            Peter Johnson Master

            Your first way did not work because without an extension, JBoss doesn't know what to deploy (a war, an ear, as sar, the list goes on).

            For the second and third way, what things do you have defined in your web.xml that you think are causing the problem. I have successfully deployed war files with all kinds of things in web.xml (servlets, filters, ejb refs, etc).

            Was there an error printed on the console when you deployed the war? If so, could you post it.

            • 3. Re: Deployment problem : project doesn't appear in the web c
              Peter Johnson Master

              I think I was in the middle of replying to your first post when you made your second post.

              I think you need to add a servlet mapping section (I made up a url pattern, you can use any pattern you like):

              <servlet-mapping>
               <servlet-name>ControllerServlet</servlet-name>
               <url-pattern>/controller</url-pattern>
               </servlet-mapping>


              • 4. Re: Deployment problem : project doesn't appear in the web c
                Albert Sarazer Newbie

                Thanks for your reply PeterJ.

                I tried that too but unfortunately adding the <servlet-mapping> makes no change :/

                No error is shown in the application console :

                ===============================================================================
                .
                 JBoss Bootstrap Environment
                .
                 JBOSS_HOME: D:\PLATEFORMES\jboss\bin\\..
                .
                 JAVA: C:\j2sdk1.4.2_10\bin\java
                .
                 JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcIn
                terval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
                .
                 CLASSPATH: C:\j2sdk1.4.2_10\lib\tools.jar;D:\PLATEFORMES\jboss\bin\\run.jar
                .
                ===============================================================================
                .
                16:56:19,304 INFO [Embedded] Catalina naming disabled
                16:56:19,444 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in
                the classpath. Will load the default rule set.
                16:56:19,444 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in
                the classpath. Will load the default rule set.
                16:56:19,896 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0
                .0.0-8080
                16:56:19,896 INFO [Catalina] Initialization processed in 436 ms
                16:56:19,912 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.1
                7
                16:56:19,958 INFO [StandardHost] XML validation disabled
                16:56:19,989 INFO [Catalina] Server startup in 93 ms
                16:56:20,504 INFO [WebappLoader] Dual registration of jndi stream handler: factory already defined
                16:56:28,624 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
                16:56:28,764 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
                16:56:28,780 INFO [JkMain] Jk running ID=0 time=0/94 config=null
                


                Maybe I have to configure Jboss to show me more things at start-up ? But how can I do that ?

                Have the classes files to be deployed elsewhere than the /WEB-INF/classes/ directory of my "application.war" directory ?

                Regards.

                • 5. Re: Deployment problem : project doesn't appear in the web c
                  Albert Sarazer Newbie

                  The application partly works.
                  Partly, because I can't define any reference or mapping to a servlet as shwon before.
                  And I suppose I'll have problems too for configuring CICS access...

                  • 6. Re: Deployment problem : project doesn't appear in the web c
                    Peter Johnson Master

                    I think I know what the issue is. Your controller class has no package. A seem to recall that there is an issue with accessing packageless classes within the web-inf/clases directory (tried looking for the post, but could not find it). I suggest adding a package to your controller class, modify the web.xml accordingly, and try again.

                    • 7. Re: Deployment problem : project doesn't appear in the web c
                      Albert Sarazer Newbie

                      Sorry for my late answer, two days of work spent in training for another subject.

                      Well, the controler class is defined with an associated package.

                      But maybe we're not talking about the same "controler class" ?

                      Moreover, we are using Axis web services. If we can't define servlet mapping in the web.xml, it will be difficult to make them working.

                      • 8. Re: Deployment problem : project doesn't appear in the web c
                        Peter Johnson Master

                        My mistake. I see controller class (servlet) is in a package, not sure why I missed that earlier.

                        I am curious about the console output you posted earlier. Is this all of the output? If it is, I am surpirsed because I usually get 3 or 4 times as much output as that. So let's go back to a few basic questions:

                        1) What version of JBoss AS are you working with?

                        2) How did you install JBoss? By running the installer jar file or by downloading and unzipping the zip file? If the former, what installation options did you choose?

                        • 9. Re: Deployment problem : project doesn't appear in the web c
                          Albert Sarazer Newbie

                          It's all of the output... I may have to configure something but had no time to check that since last thursday.

                          1/ JBoss Application Server 4.04

                          2/ Downloading the zip file. I use the "run.bat" file to start my JBoss instance.