6 Replies Latest reply on Mar 25, 2013 9:11 AM by mohsin

    Twitter WebSocket Example Gave error In Pom.xml??

    mohsin

      my pom.xml file is attached and error i am getting is,

       

      Description     Resource     Path     Location     Type

      maven-remote-resources-plugin (goal "process") is ignored by m2e.     pom.xml     /camel-example-twitter-websocket     line 26     Maven Project Build Lifecycle Mapping Problem

       

      hopes for your Suggestion thanks

        • 1. Re: Twitter WebSocket Example Gave error In Pom.xml??
          davsclaus

          Are you sure its an error? Maven may report a WARN or something.

          • 2. Re: Twitter WebSocket Example Gave error In Pom.xml??
            mohsin

            yup you are right i tried to run -->Run as -->Maven build then it execute like,

             

            SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

            SLF4J: Defaulting to no-operation (NOP) logger implementation

            SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

            Scanning for projects...

                                                                                    

            -


            Building Camel :: Example :: Twitter WebSocket 2.10.4

            -


            --- maven-bundle-plugin:2.3.7:cleanVersions (versions) @ camel-example-twitter-websocket ---

            --- maven-remote-resources-plugin:1.3:process (default) @ camel-example-twitter-websocket ---

            --- maven-resources-plugin:2.4.3:resources (default-resources) @ camel-example-twitter-websocket ---

            Using 'UTF-8' encoding to copy filtered resources.

            Copying 4 resources

            Copying 3 resources

            --- maven-resources-plugin:2.4.3:resources (default) @ camel-example-twitter-websocket ---

            Using 'UTF-8' encoding to copy filtered resources.

            Copying 4 resources

            Copying 3 resources

            --- maven-compiler-plugin:2.5.1:compile (default-compile) @ camel-example-twitter-websocket ---

            Nothing to compile - all classes are up to date

            --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ camel-example-twitter-websocket ---

            Using 'UTF-8' encoding to copy filtered resources.

            skip non existing resourceDirectory /root/apache-camel-2.10.4/examples/camel-example-twitter-websocket/src/test/resources

            Copying 3 resources

            --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ camel-example-twitter-websocket ---

            Nothing to compile - all classes are up to date

            --- maven-surefire-plugin:2.8:test (default-test) @ camel-example-twitter-websocket ---

            Surefire report directory: /root/apache-camel-2.10.4/examples/camel-example-twitter-websocket/target/surefire-reports

            --- maven-jar-plugin:2.3.1:jar (default-jar) @ camel-example-twitter-websocket ---

            Building jar: /root/apache-camel-2.10.4/examples/camel-example-twitter-websocket/target/camel-example-twitter-websocket-2.10.4.jar

            META-INF/maven/org.apache.camel/camel-example-twitter-websocket/pom.xml already added, skipping

            META-INF/maven/org.apache.camel/camel-example-twitter-websocket/pom.properties already added, skipping

            --- maven-site-plugin:3.0:attach-descriptor (attach-descriptor) @ camel-example-twitter-websocket ---

            --- ianal-maven-plugin:1.0-alpha-1:verify-legal-files (default) @ camel-example-twitter-websocket ---

            Checking legal files in: camel-example-twitter-websocket-2.10.4.jar

            --- maven-install-plugin:2.3.1:install (default-install) @ camel-example-twitter-websocket ---

            Installing /root/apache-camel-2.10.4/examples/camel-example-twitter-websocket/target/camel-example-twitter-websocket-2.10.4.jar to /root/.m2/repository/org/apache/camel/camel-example-twitter-websocket/2.10.4/camel-example-twitter-websocket-2.10.4.jar

            Installing /root/apache-camel-2.10.4/examples/camel-example-twitter-websocket/pom.xml to /root/.m2/repository/org/apache/camel/camel-example-twitter-websocket/2.10.4/camel-example-twitter-websocket-2.10.4.pom

            -


            BUILD SUCCESS

            -


            Total time: 3.760s

            Finished at: Mon Mar 18 03:54:29 EDT 2013

            Final Memory: 15M/36M

            -


             

            after that i type in browser,

             

            http://localhost:9090/

             

            it result in error " Unable to connect" ??? 

            • 3. Re: Twitter WebSocket Example Gave error In Pom.xml??
              davsclaus

              You have to run the maven goal: exec:java

               

              There is a run as maven ... (eg with some dots) then there is a dialog, where you can type in the goal. Then type exec:java to run this goal.

              • 4. Re: Twitter WebSocket Example Gave error In Pom.xml??
                mohsin

                i have changed credential to get my twitter account updates ,

                 

                private static String consumerKey

                 

                    private static String consumerSecret

                 

                    private static String accessToken

                 

                    private static String accessTokenSecret

                 

                then run as maven build i got this error,

                 

                SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

                SLF4J: Defaulting to no-operation (NOP) logger implementation

                SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

                Scanning for projects...

                                                                                        

                -


                Building Camel :: Example :: Twitter WebSocket 2.10.4

                -


                >>> exec-maven-plugin:1.1.1:java (default-cli) @ camel-example-twitter-websocket >>>

                --- maven-bundle-plugin:2.3.7:cleanVersions (versions) @ camel-example-twitter-websocket ---

                <<< exec-maven-plugin:1.1.1:java (default-cli) @ camel-example-twitter-websocket <<<

                --- exec-maven-plugin:1.1.1:java (default-cli) @ camel-example-twitter-websocket ---

                 

                 

                 

                 

                 

                ===============================================

                Open your web browser on http://localhost:9090

                Press ctrl+c to stop this example

                ===============================================

                 

                 

                 

                 

                 

                MainSupport                    INFO  Apache Camel 2.10.4 starting

                DefaultCamelContext            INFO  Apache Camel 2.10.4 (CamelContext: camel-1) is starting

                DefaultManagementAgent         INFO  Cannot determine localhost name. Using default: 1099

                java.net.UnknownHostException: rhel-6: rhel-6

                     at java.net.InetAddress.getLocalHost(InetAddress.java:1426)

                     at org.apache.camel.management.DefaultManagementAgent.createMBeanServer(DefaultManagementAgent.java:355)

                     at org.apache.camel.management.DefaultManagementAgent.doStart(DefaultManagementAgent.java:259)

                     at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)

                     at org.apache.camel.management.DefaultManagementStrategy.start(DefaultManagementStrategy.java:209)

                     at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)

                     at org.apache.camel.management.ManagementStrategyFactory.create(ManagementStrategyFactory.java:40)

                     at org.apache.camel.impl.DefaultCamelContext.createManagementStrategy(DefaultCamelContext.java:2490)

                     at org.apache.camel.impl.DefaultCamelContext.getManagementStrategy(DefaultCamelContext.java:2310)

                     at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1499)

                     at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1444)

                     at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)

                     at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1412)

                     at org.apache.camel.main.Main.doStart(Main.java:109)

                     at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)

                     at org.apache.camel.main.MainSupport.run(MainSupport.java:141)

                     at org.apache.camel.example.websocket.CamelTwitterWebSocketMain.main(CamelTwitterWebSocketMain.java:75)

                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                     at java.lang.reflect.Method.invoke(Method.java:616)

                     at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)

                     at java.lang.Thread.run(Thread.java:636)

                ManagementStrategyFactory      INFO  JMX enabled.

                DefaultTypeConverter           INFO  Loaded 177 type converters

                WebsocketComponent             INFO  Starting static resources server 0.0.0.0:9090 with static resource: classpath:.

                Server                         INFO  jetty-7.5.4.v20111024

                ContextHandler                 INFO  started o.e.j.s.ServletContextHandler{/,org.apache.camel.component.websocket.JettyClassPathResource@3a7e479a}

                AbstractLifeCycle              WARN  FAILED SelectChannelConnector@0.0.0.0:9090 FAILED: java.net.BindException: Address already in use

                java.net.BindException: Address already in use

                     at sun.nio.ch.Net.bind(Native Method)

                     at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)

                     at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)

                     at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:172)

                     at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:300)

                     at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:249)

                     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)

                     at org.eclipse.jetty.server.Server.doStart(Server.java:272)

                     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)

                     at org.apache.camel.component.websocket.WebsocketComponent.doStart(WebsocketComponent.java:727)

                     at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)

                     at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1763)

                     at org.apache.camel.impl.DefaultCamelContext.startServices(DefaultCamelContext.java:1769)

                     at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1572)

                     at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1444)

                     at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)

                     at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1412)

                     at org.apache.camel.main.Main.doStart(Main.java:109)

                     at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)

                     at org.apache.camel.main.MainSupport.run(MainSupport.java:141)

                     at org.apache.camel.example.websocket.CamelTwitterWebSocketMain.main(CamelTwitterWebSocketMain.java:75)

                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                     at java.lang.reflect.Method.invoke(Method.java:616)

                     at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)

                     at java.lang.Thread.run(Thread.java:636)

                AbstractLifeCycle              WARN  FAILED org.eclipse.jetty.server.Server@3a3f4a21: java.net.BindException: Address already in use

                java.net.BindException: Address already in use

                     at sun.nio.ch.Net.bind(Native Method)

                     at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)

                     at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)

                     at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:172)

                     at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:300)

                     at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:249)

                     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)

                     at org.eclipse.jetty.server.Server.doStart(Server.java:272)

                     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)

                     at org.apache.camel.component.websocket.WebsocketComponent.doStart(WebsocketComponent.java:727)

                     at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)

                     at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1763)

                     at org.apache.camel.impl.DefaultCamelContext.startServices(DefaultCamelContext.java:1769)

                     at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1572)

                     at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1444)

                     at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)

                     at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1412)

                     at org.apache.camel.main.Main.doStart(Main.java:109)

                     at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)

                     at org.apache.camel.main.MainSupport.run(MainSupport.java:141)

                     at org.apache.camel.example.websocket.CamelTwitterWebSocketMain.main(CamelTwitterWebSocketMain.java:75)

                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                     at java.lang.reflect.Method.invoke(Method.java:616)

                     at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)

                     at java.lang.Thread.run(Thread.java:636)

                WebsocketComponent             INFO  Stopping static resources server 0.0.0.0:9090 with static resource: classpath:.

                ContextHandler                 INFO  stopped o.e.j.s.ServletContextHandler{/,org.apache.camel.component.websocket.JettyClassPathResource@3a7e479a}

                DefaultCamelContext            INFO  Apache Camel 2.10.4 (CamelContext: camel-1) is shutting down

                DefaultTypeConverter           INFO  TypeConverterRegistry utilization[attempts=0, hits=0, misses=0, failures=0] mappings[total=177, misses=0]

                DefaultCamelContext            INFO  Apache Camel 2.10.4 (CamelContext: camel-1) is shutdown in 0.001 seconds. Uptime 30.774 seconds.

                MainSupport                    INFO  Apache Camel 2.10.4 stopping

                -


                BUILD FAILURE

                -


                Total time: 59.362s

                Finished at: Mon Mar 25 14:42:13 EDT 2013

                Final Memory: 8M/19M

                -


                Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1.1:java (default-cli) on project camel-example-twitter-websocket: An exception occured while executing the Java class. null: InvocationTargetException: Address already in use ->

                To see the full stack trace of the errors, re-run Maven with the -e switch.

                Re-run Maven using the -X switch to enable full debug logging.

                For more information about the errors and possible solutions, please read the following articles:

                http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

                MainSupport$HangupInterceptor  INFO  Received hang up - stopping the main instance.

                 

                 

                Hopes for your suggestion

                 

                Thanks

                • 5. Re: Twitter WebSocket Example Gave error In Pom.xml??
                  davsclaus

                  Hi

                   

                  You have in the stacktrace

                  java.net.BindException: Address already in use
                  

                   

                  That means you have already an application running that uses port 9090. Most likely you may have the twitter example running. So you need to stop that first. So you only run one application at any given time.

                  • 6. Re: Twitter WebSocket Example Gave error In Pom.xml??
                    mohsin

                    i stop this appication first  after changing credentials i clean its maven and then maven build result in the error,

                     

                    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

                    SLF4J: Defaulting to no-operation (NOP) logger implementation

                    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

                    Scanning for projects...

                                                                                            

                    -


                    Building Camel :: Example :: Twitter WebSocket 2.10.4

                    -


                    >>> exec-maven-plugin:1.1.1:java (default-cli) @ camel-example-twitter-websocket >>>

                    --- maven-bundle-plugin:2.3.7:cleanVersions (versions) @ camel-example-twitter-websocket ---

                    <<< exec-maven-plugin:1.1.1:java (default-cli) @ camel-example-twitter-websocket <<<

                    --- exec-maven-plugin:1.1.1:java (default-cli) @ camel-example-twitter-websocket ---

                    -


                    BUILD FAILURE

                    -


                    Total time: 4.649s

                    Finished at: Mon Mar 25 17:42:01 EDT 2013

                    Final Memory: 7M/18M

                    -


                    Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1.1:java (default-cli) on project camel-example-twitter-websocket: An exception occured while executing the Java class. org.apache.camel.example.websocket.CamelTwitterWebSocketMain ->

                    To see the full stack trace of the errors, re-run Maven with the -e switch.

                    Re-run Maven using the -X switch to enable full debug logging.

                    For more information about the errors and possible solutions, please read the following articles:

                    http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException