Child pages
  • HowTOs

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Anchor
toc
toc

Table of Contents

Warning

This page is outdated, use FAQ instead.

DistributeMe HOWTOs

This document stands for resolving difficult problems or answers questions that you might have regarding DistributeMe product.
The structure of the document is pretty simple. Each section of this document describes a problem or a question and then the ways the problem can be solved.

#toc

What is DistributeMe for?

ANSWER:

the goal of the DistributeMe product is to provide 100% pure Java solution for distributed calculations that is based on RMI.

#toc

What are the benefits of DistributeMe?

ANSWER:
  • convenience for Java developers that create functionality, they don't have to manualy create Java classes that stand for transport via RMI. This stuff generates DistributeMe for them;
  • DistributeMe comes with its own registry that makes remote RMI calls possible.

#toc

Can't build the demo project, cannot find basic-project.xml

PROBLEM:

When building I get the error message like:

igor@imer /cygdrive/d/projects/companies/Anotheria/demo
$ ant dist
Buildfile: build.xml

BUILD FAILED
d:\projects\companies\Anotheria\demo\build.xml:6: Cannot find ../build/basic-project.xml imported from d:\projects\companies\Anotheria\demo\build.xml

Total time: 0 seconds

What should I do to build the demo project successfully?

#toc

SOLUTION:

Checkout http://svn.anotheria.net/opensource/build/trunk project as D:\projects\companies\Anotheria\build so that build and demo projects have the same direct parent directory. Then build again.

#toc

The demo project build takes too long

PROBLEM:

I started the building procedure and it takes too long to build. While hanging it prints the following output ...

Wiki Markup
...
ivy-checkout:
\[svn\] <Checkout> started ...

#toc

ANSWER:

This usualy happens the first time you build the demo project. During that operation it downloads a banch of JAR files from our Ivy repositories.
This procedure might take a few minutes to complete. That depends on your network connection speed.

#toc

Having build problems due to incorrect JDK used

PROBLEM:

When building I get the error message like:

Wiki Markup
compile:
\[apt\] Since compiler setting isn't classic or modern,ignoring fork setting.
\[apt\] Compiling 7 source files to d:\projects\companies\Anotheria\demo\build\classes
\[apt\] Since compiler setting isn't classic or modern,ignoring fork setting.
\[apt\] d:\projects\companies\Anotheria\demo\java\org\distributeme\demo\GettingStartedService.java:3: cannot access net.anotheria.anoprise.metafactory.Service
\[apt\] bad class file: d:\projects\companies\Anotheria\demo\lib\ano-prise.jar(net/anotheria/anoprise/metafactory/Service.class)
\[apt\] class file has wrong version 50.0, should be 49.0
\[apt\] Please remove or make sure it appears in the correct subdirectory of the classpath.
\[apt\] import net.anotheria.anoprise.metafactory.Service;
\[apt\]                                           ^
\[apt\] d:\projects\companies\Anotheria\demo\java\org\distributeme\demo\GettingStartedService.java:3: cannot access net.anotheria.anoprise.metafactory.Service
\[apt\] bad class file: d:\projects\companies\Anotheria\demo\lib\ano-prise.jar(net/anotheria/anoprise/metafactory/Service.class)
\[apt\] class file has wrong version 50.0, should be 49.0
\[apt\] Please remove or make sure it appears in the correct subdirectory of the classpath.
\[apt\] import net.anotheria.anoprise.metafactory.Service;
\[apt\]                                           ^
\[apt\] 1 error

BUILD FAILED
d:\projects\companies\Anotheria\build\basic-project.xml:22: The following error occurred while executing this line:
d:\projects\companies\Anotheria\demo\build.xml:18: Compile failed; see the compiler error output for details.

Total time: 27 minutes 2 seconds

What should I do to build the demo project successfully?

#toc

ANSWER:

You must be using a JDK of a different version. You should use JDK 1.6.0.
The version of JDK you use can be checked with the following command:

igor@imer /cygdrive/d/projects/companies/Anotheria/demo
$ java -version
java version "1.5.0_18"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_18-b02)
Java HotSpot(TM) Client VM (build 1.5.0_18-b02, mixed mode, sharing)

In this example the wrong JDK is used.

So, what to do?

Just install JDK 1.6.0,
set JAVA_HOME environment variable to the proper location and
make sure the java.exe, javac.exe and apt.exe are found in the Path environment variable sooner that the same binaries from wrong JDK.

After that restart the Cygwin environment (thus it can use the latest values of the environment variables) and then go build again (you can also check if the variables you just installed have proper values and the JDK used has the right version)

igor@imer ~
$ cd "D:\projects\companies\Anotheria\demo"

igor@imer /cygdrive/d/projects/companies/Anotheria/demo
$ set | grep JAVA_HOME
JAVA_HOME='D:\projects\tools\java6'

igor@imer /cygdrive/d/projects/companies/Anotheria/demo
$ java -version
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)

igor@imer /cygdrive/d/projects/companies/Anotheria/demo
$ ant dist
...

Good luck!

#toc

 

Got stack trace when executing RemoteTest

PROBLEM:

When executing it I got the following exception stack trace:

...

  • No rmiregistry started locally
  • Wrong IP address is registered in the DistributeMe registry

#toc

SOLUTION

You should make sure rmiregistry tool is started on the client machine. This can be done with the following command:

...

Though this must not be required for future versions of DistributeMe.
Then restart your RemoteTest client.

Still having the same issue? Check the following ...

...

How to install and use DistributeMe registry locally

PROBLEM:

My client does not want to use the standard DistributeMe registry which is located at test.anotheria.net:80.

#toc

ANSWER:

Build distributeme.war and install it on your local tomcat.
Just use the following steps:

  • get distributeme project from our SVN repository http://svn.anotheria.net/opensource/distributeme/trunk as ~/projects/dime/distributeme folder
  • perform commands
    unmigrated-wiki-markup

    igor@igorlap:~/projects/dime$ cd \ ~/projects/dime/distributeme
    igor@igorlap:~/projects/dime/distributeme$ ant \ -f build-registry.xml war
    Buildfile: build-registry.xml
    ...
    war: \
    [war\] Building war: /home/igor/projects/dime/distributeme/dist/distributeme.war

    BUILD SUCCESSFUL
    Total time: 4 seconds

...

This is just an example:

Code Block
borderStylesolid
title/etc/distributeme.jsonborderStylesolid

{
	registryContainerPort: 8080,
	registryContainerHost: "10.1.13.57",
}

10.1.13.57 - is the machine where tomcat server is started and distributeme.war is deployed to it. 8080 is the port number used for HTTP protocol by that tomcat instance.

Good luck!

#toc

Debugging RMI on TCP Level

PROBLEM:

I have connection timeouts or problems in the TCP/IP Stack, how can I debug them?

ANSWER:

Check following link for details on RMI options.

http://download.oracle.com/javase/6/docs/technotes/guides/rmi/logging.html

Registry host/port

Problem

How do distributeme components know where the registry is running.

Answer

It is in the file distributeme.json in classpath in variables registryContainerHost and registryContainerPort.