Hi

Camel 2.2.0 is using Jetty 6.1.22, so maybe the old 6.1.9 has an issue.
Here is the Maven generated dependency:list for camel-jetty in Camel 2.2.0:

[INFO] ------------------------------------------------------------------------
[INFO] Building Camel :: Jetty
[INFO]    task-segment: [dependency:list]
[INFO] ------------------------------------------------------------------------
[INFO] [dependency:list]
[INFO]
[INFO] The following files have been resolved:
[INFO]    aopalliance:aopalliance:jar:1.0:test
[INFO]    com.sun.xml.bind:jaxb-impl:jar:2.1.12:compile
[INFO]    commons-codec:commons-codec:jar:1.2:compile
[INFO]    commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO]    commons-logging:commons-logging:jar:1.1.1:compile
[INFO]    commons-logging:commons-logging-api:jar:1.1:compile
[INFO]    javax.activation:activation:jar:1.1:compile
[INFO]    javax.xml.bind:jaxb-api:jar:2.1:compile
[INFO]    javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO]    junit:junit:jar:4.4:test
[INFO]    log4j:log4j:jar:1.2.14:test
[INFO]    org.apache.camel:camel-core:jar:2.2.0:compile
[INFO]    org.apache.camel:camel-http:jar:2.2.0:compile
[INFO]    org.apache.camel:camel-spring:jar:2.2.0:test
[INFO]    org.apache.camel:camel-test:jar:2.2.0:test
[INFO]    org.apache.geronimo.specs:geronimo-servlet_2.4_spec:jar:1.1.1:compile
[INFO]    org.fusesource.commonman:commons-management:jar:1.0:compile
[INFO]    org.mortbay.jetty:jetty:jar:6.1.22:compile
[INFO]    org.mortbay.jetty:jetty-client:jar:6.1.22:compile
[INFO]    org.mortbay.jetty:jetty-sslengine:jar:6.1.22:compile
[INFO]    org.mortbay.jetty:jetty-util:jar:6.1.22:compile
[INFO]    org.mortbay.jetty:jetty-util5:jar:6.1.22:compile
[INFO]    org.mortbay.jetty:servlet-api:jar:2.5-20081211:compile
[INFO]    org.springframework:spring-aop:jar:2.5.6:test
[INFO]    org.springframework:spring-beans:jar:2.5.6:test
[INFO]    org.springframework:spring-context:jar:2.5.6:test
[INFO]    org.springframework:spring-core:jar:2.5.6:test
[INFO]    org.springframework:spring-tx:jar:2.5.6:test


On Sun, Mar 21, 2010 at 12:42 PM, hdev <henning.due...@berlin.de> wrote:
>
> Hi Willem,
> thank you for your reply.
>
> Unfortunately the problem must be somewhere else
>
> I tried some combinations always getting the same Exception:
>
>  jetty:http://localhost:9080/?matchOnUriPrefix=true
>  jetty:http://localhost:9080/MyApp/?matchOnUriPrefix=true
>  jetty:http://localhost:9080/
>  jetty:http://localhost:9080/MyApp/
>  jetty:http://localhost:9080/MyApp/FooBar
>
> This is the first excercising with camel, so the Error might be somthing
> really really stupid, since no one else seams to have this problem.
> I successfully created consuming and producing endpoints for jms, active-mq,
> mina tcp, file and so on, but the simplest jetty:http refuses to work.
>
> So i am a bit clueless at the moment...
>
> Maybe there is something wrong with the loaded jar versions.
> This is the list of jars that a currently referenced in the eclipse project
>
>        apache-camel-2.2.0/lib/camel-core-2.2.0.jar
>        apache-camel-2.2.0/lib/camel-jms-2.2.0.jar
>        apache-camel-2.2.0/lib/camel-spring-2.2.0.jar
>        apache-camel-2.2.0/lib/commons-logging-1.1.1.jar
>        apache-camel-2.2.0/lib/commons-management-1.0.jar
>        apache-camel-2.2.0/lib/spring-beans-2.5.6.jar
>        apache-camel-2.2.0/lib/spring-context-2.5.6.jar
>        apache-camel-2.2.0/lib/spring-core-2.5.6.jar
>        apache-activemq-5.3.0/activemq-all-5.3.0.jar
>        apache-camel-2.2.0/lib/spring-aop-2.5.6.jar
>        apache-camel-2.2.0/lib/spring-web-2.5.6.jar
>        backport-util-concurrent-3.0.jar
>        spring-2.5.6.jar
>        apache-activemq-5.3.0/lib/activemq-core-5.3.0.jar
>        apache-activemq-5.3.0/lib/activemq-web-5.3.0.jar
>        apache-activemq-5.3.0/lib/optional/commons-pool-1.4.jar
>        apache-camel-2.2.0/lib/camel-jetty-2.2.0.jar
>        apache-camel-2.2.0/lib/camel-http-2.2.0.jar
>        apache-activemq-5.3.0/lib/optional/commons-httpclient-3.1.jar
>        apache-activemq-5.3.0/lib/web/geronimo-servlet_2.5_spec-1.2.jar
>        apache-activemq-5.3.0/lib/web/jetty-6.1.9.jar
>        apache-activemq-5.3.0/lib/web/jetty-util-6.1.9.jar
>        apache-activemq-5.3.0/lib/web/jetty-xbean-6.1.9.jar
>        jetty-client-6.1.19.jar
>        apache-camel-2.2.0/lib/camel-servlet-2.2.0.jar
>        apache-camel-2.2.0/lib/camel-mina-2.2.0.jar
>        mina-core-1.1.7.jar
>        apache-activemq-5.3.0/lib/web/slf4j-api-1.5.0.jar
>        apache-activemq-5.3.0/lib/web/slf4j-jcl-1.5.0.jar
>
> These containbs also the jars for the other referenced endpoints i tried
> also.
> but i think the jars should all be ok or at least up to date. or is there
> something missing.
>
> Perhaps i should reduce the scenario to find the problem.
> What would be the minimal environment of jars to start a camel jetty:http
> endpoint from JavaDSL?
>
> thanks in advance for replies,
> Henning
>
>
>
> willem.jiang wrote:
>>
>> Hi,
>>
>> You got this kind of exception, because you didn't specify the context
>> path. Please change the RouteBuilder configure method like this
>>
>> from("jetty:http://localhost:9080/?matchOnUriPrefix=true";).to("mock:one");
>>
>> Willem
>>
>>
>> hdev wrote:
>>> Hi,
>>> when I try to start a CamelContext with a simple route
>>> import org.apache.camel.builder.RouteBuilder;
>>> import org.apache.camel.impl.DefaultCamelContext;
>>>
>>>
>>> public class Main {
>>>
>>>      public static void main(String[] args) throws Exception {
>>>              DefaultCamelContext camelContext;
>>>
>>>              camelContext = new DefaultCamelContext();
>>>              camelContext.addRoutes(new RouteBuilder() {
>>>                      public void configure() {
>>>                              
>>> from("jetty:http://localhost:9080?matchOnUriPrefix=true";)
>>>                                      .to("mock:one");
>>>                      }
>>>              });
>>>              camelContext.start();
>>>              Thread.sleep(10000);
>>>      }
>>> }
>>>
>>> using jetty-6.1.9 i get the following Output and Exception
>>>
>>> 20.03.2010 14:07:25 org.apache.camel.impl.DefaultCamelContext doStart
>>> INFO: Apache Camel 2.2.0 (CamelContext:camel-1) is starting
>>> 20.03.2010 14:07:25 org.apache.camel.impl.DefaultCamelContext
>>> createManagementStrategy
>>> INFO: JMX enabled. Using DefaultManagedLifecycleStrategy.
>>> 20.03.2010 14:07:27 org.apache.camel.component.jetty.JettyHttpComponent
>>> connect
>>> WARNUNG: You use localhost interface! It means that no external
>>> connections
>>> will be available. Don't you want to use 0.0.0.0 instead (all network
>>> interfaces)?
>>> 2010-03-20 14:07:27.996::INFO:  Logging to STDERR via
>>> org.mortbay.log.StdErrLog
>>> 2010-03-20 14:07:27.996::INFO:  jetty-6.1.9
>>> Exception in thread "main" java.lang.IllegalArgumentException: Illegal
>>> context spec:null
>>>      at
>>> org.mortbay.jetty.handler.ContextHandlerCollection.mapContexts(ContextHandlerCollection.java:82)
>>>      at
>>> org.mortbay.jetty.handler.ContextHandlerCollection.setHandlers(ContextHandlerCollection.java:149)
>>>      at
>>> org.mortbay.jetty.handler.HandlerCollection.addHandler(HandlerCollection.java:197)
>>>      at org.mortbay.jetty.Server.addHandler(Server.java:591)
>>>      at org.mortbay.jetty.servlet.Context.<init>(Context.java:124)
>>>      at org.mortbay.jetty.servlet.Context.<init>(Context.java:73)
>>>      at
>>> org.apache.camel.component.jetty.JettyHttpComponent.createServletForConnector(JettyHttpComponent.java:356)
>>>      at
>>> org.apache.camel.component.jetty.JettyHttpComponent.connect(JettyHttpComponent.java:159)
>>>      at
>>> org.apache.camel.component.http.HttpEndpoint.connect(HttpEndpoint.java:111)
>>>      at
>>> org.apache.camel.component.http.HttpConsumer.doStart(HttpConsumer.java:50)
>>>      at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53)
>>>      at
>>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:49)
>>>      at
>>> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:989)
>>>      at test.Main.main(Main.java:22)
>>>
>>> The Class is started in Eclipse.
>>> The Libraries come from Camel 2.2.0 and ActiveMQ 5.3.0 releases. I am not
>>> using maven but have downloaded the libs explicitly.
>>>
>>> since all posts i found concerning this Exception gave me no clue for
>>> solving my problem, i am posting here.
>>>
>>> thanks i advance
>>> Henning
>>
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/problems-loading-jetty---%22Illegal-context-spec%3Anull%22-tp27954863p27975511.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to