facebook

Getting a simple Struts application to run in MyEclipse.

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #252027 Reply

    boneseclipse
    Member

    Version: 3.1.2
    Build id: M20060118-1600

    Eclipse Plug-in Development Environment

    Version: 3.1.2
    Build id: M20060118-1600

    Eclipse Project SDK

    Version: 3.1.2
    Build id: M20060118-1600

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -launcher
    C:\Eclipse 3.1\eclipse\eclipse.exe
    -name
    Eclipse
    -showsplash
    600
    -exitdata
    178c_a0
    -vm
    C:\WINDOWS\system32\javaw.exe

    I have activated Startup.bat on tomcat and then tried to run a simple Stuts application called TimeOfDay as an Eclipse application. I have deployed it on the Tomcat Server. When I try and run it from IE using localhost:8080/TimeOfDay/timeofday.do I get a 404 message from tomcat. When I try to run it from withing MyEclipse I get the following:

    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: 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.registry.RegistryImpl.setup(Unknown Source)
    at sun.rmi.registry.RegistryImpl.<init>(Unknown Source)
    at java.rmi.registry.LocateRegistry.createRegistry(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

    Do you have any suggestions. Please be detailed as I am new to this. Thanks a bunch for your effort.

    bones@sprintmail.com

    #252063 Reply

    Scott Anderson
    Participant

    java.net.BindException: Address already in use: JVM_Bind

    It’s likely that you already have another instance of Tomcat running if the port (8080) is already in use. When you installed Tomcat, did you have it install as a service that’s automatically started? In any event, I think you forgot to shut it down before starting it from within MyEclipse at some point.

    #252069 Reply

    boneseclipse
    Member

    I just opened MyEclipse and clicked on run. I did not touch Tomcat. A “create, mange and run” dialogue box comes up. On the Main tab, the project is named “TimeOfDay”. The “main class” says “sun.rmi.server.Activation”. The jre tab says “jre1.5.0_06.” The class path say “JRE System Library is JRE1.5.0_06 under “Bootstrap entries”. Under that in Bootstrap entries it says : J2EE 1.3 LIBRARY CONTAINER.” Under user entries it says the project name. In the Environment Tab it says C:\PROGRAM FILES\JAVA\JDK1.5.0_06 Which I entered in control panel (Operating system is Windows xp pro). In the console I get the following in the Console when I click Run: 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

    What am I doing wrong? Thank you

    #252070 Reply

    boneseclipse
    Member

    Scott. I just realized my error. I was running it as a Java Application. So I changed it to a MyEclipse application. I tried to run it and got the sam creat mange and run dialog box. I added the project. I got an error saying that the workspace was already in use. I closed MyEclipse and got an error message. When I reopened it the whole project was gone. Back to square one. What should I do next time?

    #252104 Reply

    Scott Anderson
    Participant

    I was running it as a Java Application. So I changed it to a MyEclipse application

    It sounds like you’re trying to use the Run/Debug options for Tomcat and that’s now how the servers are configured to be started or used. I’d suggest you give the Application Servers quickstart, the Working with Web Projects quickstart, and finally the Struts quickstart to see where the process you’re following differs from what’s described there.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Getting a simple Struts application to run in MyEclipse.

You must be logged in to post in the forum log in