camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srinivasks22 <srinivask...@gmail.com>
Subject Camel Console - Not able to bring it up
Date Tue, 17 Sep 2013 19:44:56 GMT
I imported camel-example-servlet-tomcat-2.12.1-SNAPSHOT into my workspace and
I am trying to add the webconsole within this web application on a tomcat
server and I am not able to get it through.

pom.xml
--------
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.apache.camel</groupId>
        <artifactId>examples</artifactId>
        <version>2.12.1-SNAPSHOT</version>
    </parent>

    <artifactId>camel-example-servlet-tomcat</artifactId>
    <name>Camel :: Example :: Servlet Tomcat</name>
    <description>An example using Camel Servlet with Apache
Tomcat</description>
    <packaging>war</packaging>

    <dependencies>

        
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-spring</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-servlet</artifactId>
        </dependency>

        
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
        </dependency>

        
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>
        
           		                   
        <dependency> 
			<groupId>org.apache.camel</groupId> 
			<artifactId>camel-web</artifactId> 
			<version>2.8.0</version> 
			<type>war</type> 
			<scope>runtime</scope>
		</dependency>  
		
    </dependencies>
    
<build>
		<defaultGoal>install</defaultGoal>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.camel</groupId>
				<artifactId>camel-maven-plugin</artifactId>
				<version>2.1.0</version>
			</plugin>

			<plugin>			
			        <groupId>org.mortbay.jetty</groupId>
			        <artifactId>maven-jetty-plugin</artifactId>
			        <version>${jetty-version}</version>			
			        <configuration>
			          <webAppConfig>
			            <contextPath>/</contextPath>			
			          </webAppConfig>			
			          <systemProperties>
			            
			            <systemProperty>
			              <name>com.sun.management.jmxremote</name>
			              <value/>
			            </systemProperty>
			          </systemProperties>			
			          <scanIntervalSeconds>10</scanIntervalSeconds>
			        </configuration>
			      </plugin>
		</plugins>
	</build>    
    
	<properties>
		<Camel_Version>2.12.0</Camel_Version>
		<jetty-version>7.2.2.v20101205</jetty-version>
	</properties>    

</project>

web.xml
--------
<?xml version="1.0" encoding="ISO-8859-1"?>



<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">

  <display-name>My Web Application</display-name>

  
  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:camel-config.xml</param-value>
  </context-param>

  
  <listener>
   
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>

  
  <servlet>
    <servlet-name>CamelServlet</servlet-name>
   
<servlet-class>org.apache.camel.component.servlet.CamelHttpTransportServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>

  
  <servlet-mapping>
    <servlet-name>CamelServlet</servlet-name>
    <url-pattern>/camel/*</url-pattern>
  </servlet-mapping>
  
  
<filter> 
    <filter-name>Jersey Filter</filter-name> 

<filter-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</filter-class>

    <init-param> 
               
<param-name>com.sun.jersey.config.property.resourceConfigClass</param-name> 
               
<param-value>org.apache.camel.web.util.CamelResourceConfig</param-value> 
    </init-param> 
    <init-param> 
               
<param-name>com.sun.jersey.config.feature.FilterForwardOn404</param-name> 
      <param-value>true</param-value> 
    </init-param> 
   <init-param> 
               
<param-name>com.sun.jersey.config.property.WebPageContentRegex</param-name> 
      <param-value>/(images|css|js)/.*</param-value> 
    </init-param> 
    <init-param> 
               
<param-name>com.sun.jersey.config.feature.ImplicitViewables</param-name> 
      <param-value>true</param-value> 
    </init-param> 
    <init-param> 
      <param-name>com.sun.jersey.config.feature.Trace</param-name> 
      <param-value>true</param-value> 
    </init-param> 
    <init-param> 
      <param-name>com.sun.jersey.config.feature.Redirect</param-name> 
      <param-value>true</param-value> 
    </init-param> 
    <init-param> 
      <param-name>com.sun.jersey.config.property.packages</param-name> 
      <param-value>org.apache.camel.web:</param-value> 
    </init-param> 
    <init-param> 
               
<param-name>com.sun.jersey.config.property.WadlResourceUri</param-name> 
                <param-value>/api</param-value> 
    </init-param> 
  </filter> 

  <filter-mapping> 
    <filter-name>Jersey Filter</filter-name> 
    <url-pattern>/*</url-pattern> 
  </filter-mapping> 

  <servlet> 
    <servlet-name>TemplateEngineServlet</servlet-name> 


<servlet-class>org.fusesource.scalate.servlet.TemplateEngineServlet</servlet-class>

    <load-on-startup>1</load-on-startup> 
  </servlet> 

  <servlet-mapping> 
    <servlet-name>TemplateEngineServlet</servlet-name> 
    <url-pattern>*.mustache</url-pattern> 
  </servlet-mapping> 
  <servlet-mapping> 
    <servlet-name>TemplateEngineServlet</servlet-name> 
    <url-pattern>*.scaml</url-pattern> 
  </servlet-mapping> 
  <servlet-mapping> 
    <servlet-name>TemplateEngineServlet</servlet-name> 
    <url-pattern>*.ssp</url-pattern> 
  </servlet-mapping> 

  <error-page> 
    <error-code>500</error-code> 
    <location>/WEB-INF/scalate/errors/500.scaml</location> 
  </error-page>       
          
  
</web-app>
  

I am trying to access
http://localhost:8090/camel-example-servlet-tomcat-2.12.1-SNAPSHOT/ for
which I get a 500 error

java.lang.IllegalArgumentException: No ServletTemplateEngine instance
registered on ServletContext for key
org.fusesource.scalate.servlet.ServletTemplateEngine. Are you sure your web
application has registered the Scalate TemplateEngineServlet?

org.fusesource.scalate.servlet.ServletTemplateEngine$.apply(ServletTemplateEngine.scala:40)

org.fusesource.scalate.jersey.ScalateTemplateProcessor.resolve(ScalateTemplateProcessor.scala:69)

org.fusesource.scalate.jersey.ScalateTemplateProcessor.resolve(ScalateTemplateProcessor.scala:44)

com.sun.jersey.server.impl.template.TemplateFactory.resolveRelativeViewable(TemplateFactory.java:147)

com.sun.jersey.server.impl.template.TemplateFactory.resolveViewable(TemplateFactory.java:94)

com.sun.jersey.server.impl.template.ViewableRule.accept(ViewableRule.java:101)

com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)

com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)

com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)

com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)

com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)

com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)

com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)

com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)

com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)

com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:886)

com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:834)

com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:795)

I also need a web console url for this and tried
http://localhost:8090/camel-example-servlet-tomcat-2.12.1-SNAPSHOT/services/routes
which is not picking up either.

I have tried to search through various blogs as to how to set webconsole as
part of web application and I couldn't find any thing helpful




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Console-Not-able-to-bring-it-up-tp5739689.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message