Bayeux Services

14 views
Skip to first unread message

wasif.masood

unread,
Mar 2, 2010, 10:08:18 AM3/2/10
to cometd-users
I am trying to implement the EchoService example given on the
dojotoolkit.org through ConfigurationServlet (http://
cometdproject.dojotoolkit.org/documentation/cometd-java/server/
services/integration)

it seems that the public void init() throws ServletException {} method
of ConfigurationServlet is never called. I have followed all the
instructions and corss checked even the web.xml files, everything is
the same but still confused that what is the actual problem.

Can anyone please help me out, I am new to cometD, so, sorry for
posting such a beginner's question on this forum.

Also when I try to run my Dynamic Web Project I receive the following
exceptions:
SEVERE: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: org/eclipse/jetty/util/thread/
ThreadPool
at ConfigurationServlet.init(ConfigurationServlet.java:31)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:
1173)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:
993)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
4149)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:
4458)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:
443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:
516)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:
710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:
583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:
288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:
413)
Caused by: java.lang.ClassNotFoundException:
org.eclipse.jetty.util.thread.ThreadPool
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1387)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1233)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 19 more
Mar 2, 2010 2:38:42 PM org.apache.catalina.core.StandardContext
loadOnStartup
SEVERE: Servlet /bayeux_4 threw load() exception
java.lang.ClassNotFoundException:
org.eclipse.jetty.util.thread.ThreadPool
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1387)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1233)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at ConfigurationServlet.init(ConfigurationServlet.java:31)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:
1173)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:
993)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
4149)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:
4458)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:
443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:
516)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:
710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:
583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:
288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:
413)


I am using Tomcat.

I think there is some class missing exception but I dont have any idea
how to resolve it. I need your expert opinion over that. Please help
me.

Simone Bordet

unread,
Mar 2, 2010, 11:05:11 AM3/2/10
to cometd...@googlegroups.com
Hi,

On Tue, Mar 2, 2010 at 16:08, wasif.masood <rwma...@gmail.com> wrote:
> I am trying to implement the EchoService example given on the
> dojotoolkit.org  through ConfigurationServlet (http://
> cometdproject.dojotoolkit.org/documentation/cometd-java/server/
> services/integration)
>
> it seems that the public void init() throws ServletException {} method
> of ConfigurationServlet is never called. I have followed all the
> instructions and corss checked even the web.xml files, everything is
> the same but still confused that what is the actual problem.
>
> Can anyone please help me out, I am new to cometD, so, sorry for
> posting such a beginner's question on this forum.
>
> Also when I try to run my Dynamic Web Project I receive the following
> exceptions:
> SEVERE: StandardWrapper.Throwable
> java.lang.NoClassDefFoundError: org/eclipse/jetty/util/thread/
> ThreadPool

You have some problem creating your war, which is missing some
dependency in WEB-INF/lib.
Double check that.
You can use CometD Maven archetypes to create a correct war to start from.
http://cometd.org/documentation/howtos/primer

Simon
--
http://bordet.blogspot.com
---
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless. Victoria Livschitz

wasif masood

unread,
Mar 3, 2010, 9:37:48 AM3/3/10
to cometd...@googlegroups.com



I have done all the needful described on this link, but I am getting this information :

HTTP ERROR: 503

Problem accessing /. Reason:

    Service Unavailable


Powered by Jetty://


can someone please direct what is missing.

this is message i get after running the command mvn install jetty:run

2010-03-03 14:05:11.625:INFO::Started SelectChann...@0.0.0.0:8080
[INFO] Started Jetty Server
[INFO] Starting scanner at interval of 1 seconds.



--
You received this message because you are subscribed to the Google Groups "cometd-users" group.
To post to this group, send email to cometd...@googlegroups.com
To unsubscribe from this group, send email to cometd-users...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cometd-users

Visit the cometd website at http://www.cometd.com/



--
Wasif Masood

Simone Bordet

unread,
Mar 3, 2010, 12:33:59 PM3/3/10
to cometd...@googlegroups.com
Hi,

On Wed, Mar 3, 2010 at 15:37, wasif masood <rwma...@gmail.com> wrote:
>
>
>
> I have done all the needful described on this link, but I am getting this
> information :
>
> HTTP ERROR: 503
>
> Problem accessing /. Reason:
>
> Service Unavailable
>
> ________________________________
> Powered by Jetty://
>
> can someone please direct what is missing.
>
> this is message i get after running the command mvn install jetty:run
> 2010-03-03 14:05:11.625:INFO::Started SelectChann...@0.0.0.0:8080
> [INFO] Started Jetty Server
> [INFO] Starting scanner at interval of 1 seconds.

You webapp has not been deployed because of an error.
Before the line:

2010-03-03 14:05:11.625:INFO::Started SelectChann...@0.0.0.0:8080

you should see why the application was not deployed correctly.

Could you follow the primer and have the application up and running
without your modifications ?

wasif masood

unread,
Mar 4, 2010, 7:05:17 AM3/4/10
to cometd...@googlegroups.com
Hi Simone,

sorry for the late reply as i am struggling with this cometD. Now I have complied and successfully ran the dojo-primier thingy. What I am trying to do now is to do some changes and try to make my own Bayeux service, but the starnge thing is that after compiling and packaging I only get .jar files but no war file, since I need a war file to deploy my web project so a little bit confused what to do, here is what my pom.xml file look like:

<modelVersion>4.0.0</modelVersion>
  
  <parent>
    <artifactId>cometd-project</artifactId>
    <groupId>org.cometd</groupId>
    <version>1.0.0rc0</version>
  </parent>
  
  <groupId>bayeux.test</groupId>
  <artifactId>bayeux_7</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  
  
  <build>
        <defaultGoal>install</defaultGoal>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <overlays>
                        <overlay />
                        <overlay>
                            <groupId>org.cometd.javascript</groupId>
                            <artifactId>cometd-javascript-dojo</artifactId>
                        </overlay>
                    </overlays>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <version>6.1.22</version>
                <configuration>
                    <scanIntervalSeconds>10</scanIntervalSeconds>
                    <webAppConfig>
                        <contextPath>/bayeux_7</contextPath>
                    </webAppConfig>
                </configuration>
            </plugin>
        </plugins>
    </build>
  
  
  <dependencies>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.cometd.javascript</groupId>
            <artifactId>cometd-javascript-dojo</artifactId>
            <version>1.0.1</version>
            <type>war</type>
        </dependency>
        <dependency>
            <groupId>org.cometd.java</groupId>
            <artifactId>cometd-java-server</artifactId>
            <version>1.0.1</version>
        </dependency>
    </dependencies>






--
You received this message because you are subscribed to the Google Groups "cometd-users" group.
To post to this group, send email to cometd...@googlegroups.com
To unsubscribe from this group, send email to cometd-users...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cometd-users

Visit the cometd website at http://www.cometd.com/



--
Wasif Masood

Simone Bordet

unread,
Mar 4, 2010, 12:46:02 PM3/4/10
to cometd...@googlegroups.com
Hi,

On Thu, Mar 4, 2010 at 13:05, wasif masood <rwma...@gmail.com> wrote:
> Hi Simone,
> sorry for the late reply as i am struggling with this cometD. Now I have
> complied and successfully ran the dojo-primier thingy.

Cool.
Are you using CometD 1.0.1 ?

> What I am trying to
> do now is to do some changes and try to make my own Bayeux service, but the
> starnge thing is that after compiling and packaging I only get .jar files
> but no war file, since I need a war file to deploy my web project so a
> little bit confused what to do, here is what my pom.xml file look like:

Are you hand-making this pom ?
Why you don't use the one generated by the archetypes, which is
already configured for you ?

In the pom below, you miss:

<packaging>war</packaging>.

Please follow the primer, create a project with the command line like
explained, then import the project in your IDE and modify that.

Reply all
Reply to author
Forward
0 new messages