Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cf-dev] server not running

Hello,

Changed it. But the problem is still the same. Did maven clean , maven install , build succes, i run the server but it terminates immediately without errors.
A couple of weeks back i read something about changes to CoapEndpoint, is this relevant to my problem?
Since it doesnt give errors i'm kind of lost on how to solve this or give more information.

when i debug

public class ReverseParamProxy {
private static final int PORT = NetworkConfig.getStandard().getInt(NetworkConfig.Keys.COAP_PORT);
private CoapServer proxy;

        public ReverseParamProxy() {
                ForwardingResource node1 = new ReverseResource("node1");
proxy = new CoapServer(PORT);     // goes into BlockwiseLayer , CoapStack, CoapEndpoint, CoapServer
proxy.add(node1);
        }


public static void main(String[] args) throws Exception {
try {
new ReverseParamProxy();
} catch (Throwable ex) {
       System.err.println("Uncaught exception - " + ex.getMessage());
       ex.printStackTrace(System.err);
        }
}

}

After new ReverseParamProxy() it does not go into the catch. And then it shows Thread.exit() line:754

Greetings

Jo

.

On Tue, Dec 15, 2015 at 2:14 PM, Hudalla Kai (INST/ESY) <Kai.Hudalla@xxxxxxxxxxxx> wrote:

Hi Jo,

 

we have released Californium 1.0.0 some weeks ago. Can you try to run your code using that version, i.e. update your dependencies in your POM file to 1.0.0 instead of 1.0.0-SNAPSHOT? If you want to use the most recent nightlies, you should depend on 1.1.0-SNAPSHOT …

 

Kai

 

 

From: cf-dev-bounces@xxxxxxxxxxx [mailto:cf-dev-bounces@xxxxxxxxxxx] On Behalf Of rahxepon12 .
Sent: Monday, December 14, 2015 10:12 AM
To: Californium (Cf) developer discussions
Subject: [cf-dev] server not running

 

Hello,

 

I was running the proxy example code. Since i didn't need to make changes i have been using the same jar file for 2 weeks.
Friday i needed to make some changes and i could not compile the code. It was an error about not finding the class Endpoint or CoAPEndpoint. I tried clean, install but nothing worked.

 

It was really late so i didn't look into it, this morning i did maven install again and the code compiled.

But when i run the proxy server it says "terminated proxy [Java Application] without errors.

 

I tried but it still didnt give any errors.

 

          public static void main(String[] args) throws Exception {

                      try {

                                  new ReverseParamProxy();

                      } catch (Throwable ex) {

                 System.err.println("Uncaught exception - " + ex.getMessage());

                 ex.printStackTrace(System.err);

             }

          }

 

Note that the code would not compile before i made any changes. Do i have to change anything for the new stable release?

 

This is my my pom file ( i dont know much about maven so maybe something is wrong with it even if it did work by accident before)

  

  

  <modelVersion>4.0.0</modelVersion>

  <groupId>be.ugent</groupId>

  <artifactId>param-proxy</artifactId>

  

  <packaging>jar</packaging>

  

  

  <version>0.0.1-SNAPSHOT</version>

  <name>paramProxy</name>

  <description>Proxy for string to binary translation</description>

  

  <properties>

          <jdk.version>1.7</jdk.version>

  </properties>

  

  <dependencies>

    <dependency>

            <groupId>org.eclipse.californium</groupId>

            <artifactId>californium-core</artifactId>

            <version>1.0.0-SNAPSHOT</version>

    </dependency>

    <dependency>

            <groupId>org.eclipse.californium</groupId>

            <artifactId>californium-proxy</artifactId>

            <version>1.0.0-SNAPSHOT</version>

    </dependency>

    <dependency>

          <groupId>com.googlecode.json-simple</groupId>

          <artifactId>json-simple</artifactId>

          <version>1.1</version>

  </dependency>

  </dependencies>

  

  <repositories>

    <repository>

      <id>repo.eclipse.org</id>

      <name>Californium Repository</name>

    </repository>

  </repositories>

  

  

  <build>

                      <finalName>paramProxy</finalName>

                      <plugins>

 

                       <!-- download source code in Eclipse, best practice -->

                       <plugin>

                                  <groupId>org.apache.maven.plugins</groupId>

                                  <artifactId>maven-eclipse-plugin</artifactId>

                                  <version>2.9</version>

                                  <configuration>

                                             <downloadSources>true</downloadSources>

                                             <downloadJavadocs>false</downloadJavadocs>

                                  </configuration>

                       </plugin>

                                 

                       <!-- Set a compiler level -->

                       <plugin>

                                  <groupId>org.apache.maven.plugins</groupId>

                                  <artifactId>maven-compiler-plugin</artifactId>

                                  <version>2.3.2</version>

                                  <configuration>

                                             <source>${jdk.version}</source>

                                             <target>${jdk.version}</target>

                                  </configuration>

                       </plugin>

 

                                  <!-- Maven Assembly Plugin -->

                                  <plugin>

                                             <groupId>org.apache.maven.plugins</groupId>

                                             <artifactId>maven-assembly-plugin</artifactId>

                                             <version>2.4.1</version>

                                             <configuration>

                                                         <!-- get all project dependencies -->

                                                         <descriptorRefs>

                                                                     <descriptorRef>jar-with-dependencies</descriptorRef>

                                                         </descriptorRefs>

                                                         <!-- MainClass in mainfest make a executable jar -->

                                                         <archive>

                                                          <manifest>

                                                                     <mainClass>be.ugent.server.ReverseParamProxy</mainClass>

                                                          </manifest>

                                                         </archive>

 

                                             </configuration>

                                             <executions>

                                              <execution>

                                                         <id>make-assembly</id>

                                        <!-- bind to the packaging phase -->

                                                         <phase>package</phase> 

                                                         <goals>

                                                                     <goal>single</goal>

                                                         </goals>

                                              </execution>

                                             </executions>

                                  </plugin>                                          

                      </plugins>

          </build>

  

</project>

Thanks

Jo


_______________________________________________
cf-dev mailing list
cf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cf-dev


Back to the top