6 Replies Latest reply on May 21, 2014 9:11 AM by hem_jboss

    Deploy Fuse project war on Tomcat 7

    hem_jboss

      Hi,

      i have created a project using apache camel (for routing, error handling, marshalling etc.) and apache cxf (for rest services implementation). This is perfectly deployed in Redhat jboss fuse 6.1 server as bundles and works fine. But, i was trying to deploy the war into Tomcat 7.

      My question is, can we deploy such applications on Tomcat. and if yes, does the org.springframework.web.context.ContextLoaderListener

      would be able  to load camel context files.

        • 1. Re: Deploy Fuse project war on Tomcat 7
          ffang

          Hi,

           

          Yes, you may wanna check out the documentation here[1] to get more details.

           

          [1]http://camel.apache.org/tutorial-on-using-camel-in-a-web-application.html

           

          Freeman

          • 2. Re: Deploy Fuse project war on Tomcat 7
            hem_jboss

            ffang Thanks for the link. But, i am already using the same configuration in web.xml as defined in the provided link. Now, i am getting the "No Spring WebApplicationInitializer types detected on classpath" info in logs. And is not getting any request till Tomcat for services. My current project configuration is like : Project A contains the camel+cxf code,

            there is another project B containing No code. I have provided Project A as dependency to Project B and defined packaging of B as "war". Now, i am trying to deploy project B in tomcat.Whereas, i have directly deployed project A in Fuse server.

            • 3. Re: Deploy Fuse project war on Tomcat 7
              ffang

              Hi,

               

              Could you check  if projectA packaged in your war? That said, the WEB-INF/applicationContext.xml should be in your war.

               

              Freeman

              1 of 1 people found this helpful
              • 4. Re: Deploy Fuse project war on Tomcat 7
                hem_jboss

                ffang : Thanks for the response. Yes, i could see the jar packaged in my war file under WEB-INF/lib folder and all related jar (added as dependency).

                On your second point, are you saying that i should copy my camel/spring context files from Package A (of jar type) to Package B's(of war type) WEB-INF/ folder. As there is no code in my project B. In short, my target is to deploy project A on tomcat. Please show me some light

                • 5. Re: Deploy Fuse project war on Tomcat 7
                  ffang

                  Hi,

                   

                  If your target is to deploy project A on tomcat, why not build projectA as war and use it directly?

                   

                  Freeman

                  • 6. Re: Deploy Fuse project war on Tomcat 7
                    hem_jboss

                    ffang thanks for the guidance. I can't package A as war, as i have modularized my application into several modules packaged as jar. and i need to deploy multiple jars through a single war. Now, i am able to deploy all of my modules, provided as dependencies(into pom.xml) into a war type packaged product.