Error when I run java sdk from eclipse

Dec 10, 2009 at 2:21 PM
Edited Dec 10, 2009 at 2:24 PM

When I run the java sdk from eclipse, I'm getting the following error:

<font size="2" color="#ff0000">

"Activation.main: warning: sun.rmi.activation.execPolicy system

property unspecified and no ExecPermissions/ExecOptionPermissions

granted; subsequent activation attempts may fail due to unsuccessful

ExecPermission/ExecOptionPermission permission checks. For

documentation on how to configure rmid security, refer to:

</font>

 

 

http://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html

http://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html

 

Activation.main: an exception occurred:

 

<font size="2" color="#ff0000">

 

</font>

java.rmi.server.ExportException: Port already in use: 1098; nested exception is: java.net.BindException: Address already in use: JVM_Bind

java.rmi.server.ExportException

 

at sun.rmi.transport.tcp.TCPTransport.listen(Unknown Source)

at sun.rmi.transport.tcp.TCPTransport.exportObject(Unknown Source)

at sun.rmi.transport.tcp.TCPEndpoint.exportObject(Unknown Source)

at sun.rmi.transport.LiveRef.exportObject(Unknown Source)

at sun.rmi.server.UnicastServerRef.exportObject(Unknown Source)

at sun.rmi.server.Activation$ActivatorImpl.<init>(Unknown Source)

at sun.rmi.server.Activation.init(Unknown Source)

at sun.rmi.server.Activation.startActivation(Unknown Source)

at sun.rmi.server.Activation.main(Unknown Source)

Caused by:

at java.net.PlainSocketImpl.socketBind(

at java.net.PlainSocketImpl.bind(Unknown Source)

at java.net.ServerSocket.bind(Unknown Source)

at java.net.ServerSocket.<init>(Unknown Source)

at java.net.ServerSocket.<init>(Unknown Source)

at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(Unknown Source)

at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(Unknown Source)

at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(Unknown Source)

... 9 more

<font size="2" color="#000080">

 

</font>

: Port already in use: 1098; nested exception is: java.net.BindException: Address already in use: JVM_Bindjava.net.BindException: Address already in use: JVM_BindNative Method)"

How to solve this issue? I stuck in this issue for a very long time, Kindly do the needful. FYI port 1098 is not used by any other programs, it's free!!!

Coordinator
Dec 10, 2009 at 7:21 PM

vckumareshbabu, you have been having a lot of difficulties.  I would suggest taking a step back and starting with the most basic scenarios.  Do not proceed if you cannot get the sample app running from the command line.

I do not know what you are running that started the RMI subsystem.  When you ask questions, can you describe exactly what you have done and what libararies you are using?  If are interested, please contact, or have your company contact, the HealthVault partner team to help you through.

First off,

Choose which library you want, build it and run it. 

R1.0

Basic library to connect with HealthVault.  You are responsible for marshalling all XML for all methods and types.  The sample UI demonstrates some of the SDK behavior. 

  1. Install maven (maven.apache.org)
  2. Install Java SE JDK (java.sun.com)
  3. Build it:
    > cd sdk
    > mvn install
    > cd ui
    > mvn package
  4. Run demo UI
    > cd ui
    > mvn jetty:run
  5. Point browser at http://localhost:8080

Jaxb

Jaxb layers on top of the basic SDK to provide objects to represent the various HealthVault methods and types.

  1. Install maven (maven.apache.org)
  2. Install Java SE JDK (java.sun.com)
  3. Build it:
    > mvn install
  4. Run demo UI
    > cd ui
    > mvn jetty:run

Eclipse

Eclipse integration is not HV SDK specific.  The instructions are in the README.

 

Dec 11, 2009 at 9:53 AM

Hi Mr.robmay,

Kindly do not hesitate, robmay

Since the resources for the healthvault are limited, I am not in a position to solve the issues immediately. Moreover, I am able to run tha application from command line

I followed the following steps as below:
1. Downloaded R 1.0, "jaxb" from that site, and I put jaxb in the same location, where the R1.0 is.
2. In the cmd prompt Mapped the location,  R1.0->SDK-> I typed mvn install
3. In the cmd prompt Mapped the location,  R1.0-> ui-> I typed mvn package
4. then mvn jetty:run, and in the browser I typed http://locahost:8080/jwildcat-ui and the "work with weight" page worked
5. Next, In command prompt, mapping the SDK of jaxb's I typed mvn install, that builded successfully.
6. After that, mapping the ui of jaxb's, i typed mvn:jetty run, where I get the error:


[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) com.microsoft.hsg:hv-jaxb:jar:jaxb-SNAPSHOT

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=com.microsoft.hsg -DartifactId=hv-jaxb
-Dversion=jaxb-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there:

      mvn deploy:deploy-file -DgroupId=com.microsoft.hsg -DartifactId=hv-jaxb -
version=jaxb-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -Dreposi
oryId=[id]

  Path to dependency:
        1) hv:weight-jaxb-ui:war:0.1-SNAPSHOT
        2) com.microsoft.hsg:hv-jaxb:jar:jaxb-SNAPSHOT

----------
1 required artifact is missing.

for artifact:
  hv:weight-jaxb-ui:war:0.1-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Fri Dec 11 12:59:59 IST 2009
[INFO] Final Memory: 8M/15M
[INFO] ------------------------------------------------------------------------

The error is related to artifacts. How to solve this?

Simultaneously I loaded the R 1.0 project [which includes jaxb folders'] in eclipse environment and did this:

Right clicked project->Run as->Java application-> a window appeared to select java applicaion which has "activation-sun.rmi.server", "junitcore", "activationgroupint", "appletview" and so on... I selected "activation-sun-rmi.server", where I get the following error:

Activation.main: warning: sun.rmi.activation.execPolicy system
property unspecified and no ExecPermissions/ExecOptionPermissions
granted; subsequent activation attempts may fail due to unsuccessful
ExecPermission/ExecOptionPermission permission checks.  For
documentation on how to configure rmid security, refer to:

http://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html
http://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html

Activation.main: an exception occurred: java.rmi.server.ExportException: Port already in use: 1098; nested exception is:
 java.net.BindException: Address already in use: JVM_Bind
java.rmi.server.ExportException: Port already in use: 1098; nested exception is:
 java.net.BindException: Address already in use: JVM_Bind
 at sun.rmi.transport.tcp.TCPTransport.listen(Unknown Source)
 at sun.rmi.transport.tcp.TCPTransport.exportObject(Unknown Source)
 at sun.rmi.transport.tcp.TCPEndpoint.exportObject(Unknown Source)
 at sun.rmi.transport.LiveRef.exportObject(Unknown Source)
 at sun.rmi.server.UnicastServerRef.exportObject(Unknown Source)
 at sun.rmi.server.Activation$ActivatorImpl.<init>(Unknown Source)
 at sun.rmi.server.Activation.init(Unknown Source)
 at sun.rmi.server.Activation.startActivation(Unknown Source)
 at sun.rmi.server.Activation.main(Unknown Source)
Caused by: java.net.BindException: Address already in use: JVM_Bind
 at java.net.PlainSocketImpl.socketBind(Native Method)
 at java.net.PlainSocketImpl.bind(Unknown Source)
 at java.net.ServerSocket.bind(Unknown Source)
 at java.net.ServerSocket.<init>(Unknown Source)
 at java.net.ServerSocket.<init>(Unknown Source)
 at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(Unknown Source)
 at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(Unknown Source)
 at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(Unknown Source)
 ... 9 more 

Coordinator
Dec 11, 2009 at 6:44 PM

When running from Eclipse,

1.  select Run As-->Java Application

2.  select Start--com.microsoft.hsg.applications.weight

You are attempting to run an rmi-server and not the sample ui.

Coordinator
Dec 11, 2009 at 7:02 PM

You seem to be getting tangled up in your releases.  The R1.0 release does not include any Jaxb libraries and has it's own sample ui.  The Jaxb release contains the sdk, jaxb, and it's own sample ui.  Treat them as separate projects with separate builds. 

The error from maven is telling you that you have not built the hv-jaxb artifact and gives you a command line to do that.  You can also cd into the jaxb directory and type mvn install to resolve the issue.  If you type mvn install from the top level pom in the Jaxb project that should build all the dependent projects as I noted above.