RMI and NetBeans again

Hi everybody,
I am doing one of my projects in university which involve remote method invocation.
I wrote a simple program using RMI and it works when I am running it from the console, but I am unable to run it in NetBeans 5.5.1
I found out that I need to add this text in build.xml file in my project
<target name="-post-compile">
<rmic base="${build.classes.dir}" includes="**/Remote*.class"/>
</target>but still I am receiving this notification
Trouble: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
        java.net.ConnectException: Connection refused: connectMay be anybody know how to make it work properly?
Thanks!

So it works in the Console but not NetBeans?
Then your question belongs on a NetBeans specific forum and not a forum on Java programming in general.

Similar Messages

  • RMI and Netbeans

    hello,
    i have develop a simple application using RMI. It was running perfectly from command prompt.
    Then i imported the project into netbeans 6.1. Then when i run it the server looks running normally but when a client try to connect to the server it given an error
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.lang.ClassNotFoundException: ........(No security manager: RMI class loader disabled)
    Can someone help suggest a solution
    Thanks

    Hi!
    Please tell me how could you get netbeans 6.1 to recognise an RMI project.
    I have too, tried to import some old java files (two rmi interface files a server implementation and an applet) into netbeans 6.1. As far as i can tell it completely refuses to work with RMI, and i have not found ANY support on the internet so far, to how to do it, or any working rmi modules for netbeans 6.1 ...
    Years old rmi developement, what worked nicely under windows 95 (good old days lol) does not wish to work for me now...
    Should I return to use age old enviroments, or what?
    I would deeply appreciate any help from You, or anyone able.
    Thanks!

  • RMI inside Netbeans and Logging of Network activities

    I worte a program in jdk 1.6 that sets up an RMI and it worked fine. But when i took the same code into netbeans its showing an exception that the correct stub file is not available. Is there a way to create stubs from inside netbeans? in the rmic the file I gave was the implementation file but the netbeans package is asking for the stub file with the name client.logger, wee client is the package name.
    Also please tell me if there is a way I can create a log of all the files transfered over LAN from the computer thats running the java program. It should log all incoming files and sender and files sent with the destination. I need these for a first year engineering project.
    Thank you.

    'Context is read-only' is not a Registry error
    message. You are trying to bind to something else.
    Show us some code.Well, I'm not doing a lot of binding, so I'm assuming it's this part:
                   DDBServer stub = (DDBServer)UnicastRemoteObject.exportObject(this, 0);
                   Registry registry = LocateRegistry.getRegistry();
                   registry.rebind("DDBServer", stub);The error message is:
    2007-04-18 14:06:40 NamingContextListener[Catalina/localhost/DDBServer]: Creation of the naming context failed: javax.naming.NamingException: Context is read only

  • Please help: RMI and Swing/AWT issue

    Hi guys, I've been having a lot of trouble trying to get a GUI application to work with RMI. I'd appreciate any help. Here's the story:
    I wrote a Java application and its GUI using Netbeans. In a nutshell, the application is about performing searches. I am now at the point where I need exterior programs to use my application's search capabilities, thus needing RMI. Such exterior programs are to call methods currently implemented in my application.
    I implemented RMI, and got the client --> server communication working. However, the GUI just breaks. It starts outputting exceptions, gets delayed, doesn't update properly, some parts of it stop working.... basically hysterical behavior.
    Now take a look at this line within my server class:
    Naming.rebind("SearchProgram", mySearchProgram);
    If I take it out, RMI obviously does not work... but the application and its GUI work flawlessly. If I put it in, the RMI calls work, but the GUI's above symptoms occur again. Among the symptoms are null pointer exceptions which all look similar, are related to "AWT-EventQueue-0", and keep ocurring. Here's just snippet of the errors outputted:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at javax.swing.plaf.metal.MetalScrollBarUI.getPreferredSize(MetalScrollBarUI.java:102)
    at javax.swing.JComponent.getPreferredSize(JComponent.java:1615)
    at javax.swing.JScrollBar.getMinimumSize(JScrollBar.java:704)
    at javax.swing.ScrollPaneLayout.minimumLayoutSize(ScrollPaneLayout.java:624)
    at java.awt.Container.minimumSize(Container.java:1598)
    at java.awt.Container.getMinimumSize(Container.java:1583)
    at javax.swing.JComponent.getMinimumSize(JComponent.java:1697)
    at java.awt.BorderLayout.minimumLayoutSize(BorderLayout.java:634)
    at java.awt.Container.minimumSize(Container.java:1598)
    at java.awt.Container.getMinimumSize(Container.java:1583)
    at javax.swing.JComponent.getMinimumSize(JComponent.java:1697)
    at java.awt.BorderLayout.minimumLayoutSize(BorderLayout.java:634)
    at java.awt.Container.minimumSize(Container.java:1598)
    at java.awt.Container.getMinimumSize(Container.java:1583)
    at javax.swing.JComponent.getMinimumSize(JComponent.java:1697)
    at javax.swing.BoxLayout.checkRequests(BoxLayout.java:433)
    at javax.swing.BoxLayout.layoutContainer(BoxLayout.java:375)
    at java.awt.Container.layout(Container.java:1401)
    at java.awt.Container.doLayout(Container.java:1390)
    at java.awt.Container.validateTree(Container.java:1473)
    at java.awt.Container.validateTree(Container.java:1480)
    at java.awt.Container.validateTree(Container.java:1480)
    at java.awt.Container.validateTree(Container.java:1480)
    at java.awt.Container.validateTree(Container.java:1480)
    at java.awt.Container.validate(Container.java:1448)
    at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:113)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at javax.swing.plaf.basic.BasicMenuItemUI.getPreferredMenuItemSize(BasicMenuItemUI.java:400)
    at javax.swing.plaf.basic.BasicMenuItemUI.getPreferredSize(BasicMenuItemUI.java:310)
    at javax.swing.JComponent.getPreferredSize(JComponent.java:1615)
    at javax.swing.BoxLayout.checkRequests(BoxLayout.java:434)
    at javax.swing.BoxLayout.preferredLayoutSize(BoxLayout.java:251)
    at javax.swing.plaf.basic.DefaultMenuLayout.preferredLayoutSize(DefaultMenuLayout.java:38)
    at java.awt.Container.preferredSize(Container.java:1558)
    at java.awt.Container.getPreferredSize(Container.java:1543)
    at javax.swing.JComponent.getPreferredSize(JComponent.java:1617)
    at javax.swing.JRootPane$RootLayout.layoutContainer(JRootPane.java:910)
    at java.awt.Container.layout(Container.java:1401)
    at java.awt.Container.doLayout(Container.java:1390)
    at java.awt.Container.validateTree(Container.java:1473)
    at java.awt.Container.validate(Container.java:1448)
    at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:113)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    There are no complaints about anything within my code, it's all GUI related whenever I make a bind() or rebind() call.
    Again, any help here would be great... cause this one's just beating me.
    Thanks!

    Maybe you want to change that worker thread to
    not do RMI but anything else (dummy data) to see if it really is RMI, I doubt it, I think you are updating some structures that have to do with swing GUI and hence you will hang.
    Just check this out.

  • Problem executing RMI Methods Netbeans

    Hi everyone!
    I�m using a system Servlet+applet that communicate by RMI with Netbeans.
    The remote object, the stub and the binding are correctly created at the servlet. At the applet the reference to the remote object is ok too.
    The problem appears when I invoke a method in the remote object from the applet.
    The message the Java console throws:
    RemoteException  en soloEscribe()
    java.security.AccessControlException: access denied (java.net.SocketPermission 192.168.1.100:1079 connect,resolve)
    soloEscribe() is the method in the remote object.
    I�m running everything locally, and I have granted allPermissions at the java.policy.
    Hope someone can help!
    Edited by: SnowyC on May 18, 2008 11:31 AM

    and one more thing I added following lines
    Context rootContext=(Context)initialNamingContext.lookup("");
    System.out.println("The Look up suceeded");
    to see whether it is able to look up the root context or not.
    I saw that it is suceeded in finding the root context and print the message also , but again failed to rebind the object .thrwing following exception
    java -classpath . -Djava.naming.factory.ini
    tial=com.sun.jndi.cosnaming.CNCtxFactory -Djava.naming.provider.url=iiop://local
    host:1050 Registry
    Inside Constructor
    The Look up suceeded
    java.lang.IllegalArgumentException: Only instances of org.omg.CORBA.Object can b
    e bound
    at com.sun.jndi.cosnaming.CNCtx.callBindOrRebind(Unknown Source)
    at com.sun.jndi.cosnaming.CNCtx.rebind(Unknown Source)
    at com.sun.jndi.cosnaming.CNCtx.rebind(Unknown Source)
    at javax.naming.InitialContext.rebind(Unknown Source)
    at Registry.main(Registry.java:30

  • Rmi and http

    i know this might sound silly but i am new to rmi ( to java too )
    i want to understand the difference between rmi and other protocols such as http,ftp and so.
    now what i think i know - and sometimes think im not sure i know or
    perhaps im sure i know nothing about - is that rmi is java specific and can only work with java while http is different if im not wrong.. and rmi does not require http r8?
    so how can rmi work over http or ftp ..,( can it in the 1st place ?)

    Which version of WLS you are using?
    Applet should also need to satisfy the version requirements similar to
    standalone java client. With WLS 5.1, it may work. But, it will not work
    with 6.* servers.
    Again, the JRE versions in the Netscape and IExplorer are different. So the
    applet, working in IE may not work on Netscape. It is better to test a
    sample application, than taking assumptions.
    Cheers,
    ..maruthi
    "Andrea Musumeci" <[email protected]> wrote in message
    news:3cb1dcba$[email protected]..
    can an applet written in java 1.1.x work in a browser using weblogic rmiwithout a plugin? I need to create a java chat applet with callback. Tnx in
    advance

  • Help Please!!!!!  RMI and Threads

    My server has 10 threads doing constant polling of network equipment through use of SNMP. I have a servlet that connects to my server and retrieves collected information by using RMI and displays it in the browser window. Browser refreshes the information very often. So, there is a constant flow of RMI traffic between the server and the servlet.
    Here is the problem:
    There are times when my server stops responding to RMI requests issued by the servlet. All 10 threads that are doing SNMP polling stop being scheduled by the JVM. They block! This picular situation occurs with the server only during RMI requests coming from servlet. It doesn't always happen though. Also, I've noticed that if RMI load is high this problem emerges again.
    I get no RMI exceptions.
    I am using Apache and Jserv.
    All of my attempts to understand and fix the problem have been futile so far. Could a heavy RMI load between my server and servlet be causing my threads to block? Should I decrease my RMI traffic?

    You have the same problem I had. You need to set the timeout .. so once the timeout is exceeded, an exception is thrown. You need to create a custom RMISocketFactory ... trust me, its easier than it sounds ..check the answers to my post at:
    http://forums.java.sun.com/thread.jsp?forum=58&thread=167287
    hope that helps.

  • Develop & deploy RMI in Netbeans 5.0

    Hello,
    I am a newbie to Java as well as RMI.
    Does you develop RMI in Netbeans 5.0?
    I would like to know if there are any existing built-in modules could help me in developing and deploying a RMI application in Netbeans 5.0. ( Or module update is appreciated )
    The most important is [1] for generating the stub and skeleton file (i.e. executing rmic). Other features likes [2] providing sample interface files (extends java.rmi.Remote), interface implementaion files (extends java.rmi.server.RemoteServer or java.rmi.server.UnicastRemoteObject, or .... ), [3] I always develop server and client inside one project/package, in order to share the commonly-used server/client interface file. So within the same project, separately execute the application as Server-code or Client-code.
    Or... you are welcome to share how you develop and deploy RMI inside Netbeans 5.0 is appreciated and also helpful to me ...
    Thanks in advance !

    I don't use netbeans, but it is a good idea to separate the projects. That way you can guarantee if the client works and if the server works, you can send the client to someone that it will work too. If you use them in the same project you can end up creating some dependencies between them.
    I developed a RMI project on my college, we separated the whole thing in 3 differente self contained projects: a common, where the intefaces were declared, and were all the common libraries were stored, a server and a client, both using the library project as a jar.
    As for netbeans, sorry if I can't help

  • Mail applications is blank when I open it, then it closes and opens again by itself, keeping blank

    In my Ipad, when I open Mail application it is blank. It stays like this for a few seconds, then it closes and open again by itself.  Keeping all time blank.

    Have you tried to force quit the app. Double tap the home button. Scroll sideways if needed to bring the mail app preview up on the screen. Flick that preview up and off the screen to close the app. Tap on the home page preview to exit the mode. Then try your mail again.
    Other things people have needed to do, especially after an update is to go into the settings, mail contacts and calendars, delete their mail account (it only deletes it off the iPad not out of existence) then exit out, go back i and re-enter the info.

  • I am on windows 7 and I upgraded to 10.0.2 and now it will not open. I have removed firefox completely and uploaded it again and that did not work. So my latest attempt I removed firefox 10 again and uploaded the beta version and once again nothing.

    I am on windows 7 and I upgraded to the newest verison of firefox and now it will not open. I have removed firefox completely and uploaded it again and that did not work. I then made sure it could get through my firewall and that did not work. So my latest attempt I removed firefox 10 again and uploaded the beta version hoping that would do it and once again nothing. It will not open at all. Please help - is there a live chat or a number to talk to someone at Firefox?

    I think when uninstalling you may also have to choose (tick) to delete the preferences and other personal data like the bookmarks, stored passwords etc. to erase completely. If you are installing afresh, please try right-clicking on the file and '''Run as administrator''' to install. And when uninstalling, please also make sure choose to delete all data and also manually delete any '''Mozilla''', '''Mozilla Firefox''' or '''Firefox''' from %appdata%, %localappdata% and %programfiles%. You can open a location by typing for eg. %appdata% in the '''Run''' box (Windows key + R). You may also have to check the '''VirtualStore''' folder in %localappdata%. Files in the VirtualStore can be problematic. I think a clean installation may help.
    [https://www.mozilla.org/en-US/firefox/new/ Firefox]
    [http://kb.mozillazine.org/Installation_directory Installation Folder]
    [http://kb.mozillazine.org/Profile_folder Profile Folder]
    Please note that using system restore would usually damage the Firefox installation.

  • Is there a way to create an e-mail template to send over and over again to different people?

    Can I create a template and use it over and over again? I found where I was able to save an e-mail as a template but I cannot find where to access it to be able to send it.

    Read this.
    http://kb.mozillazine.org/Thunderbird_:_FAQs_:_Using_Templates

  • Getting error while creating a new web app saying "The password supplied with the username domainname\username was not correct. Verify that it was entered correctly and try again"

    Hi ,
    I am trying to create a new web app using Central Administration in Sharepoint 2010 and getting an error "The password supplied with the username  was not correct. Verify that it was entered correctly and try again".
    I tried running this command also "stsadm -o updatefarmcredentials -userlogin <domain\username> -password <newpassword>" but when it got executed it showed me "Access Denied".
    What should i do ??
    Thanks in advance.
    Regards, Anurag

    HI,
    right click on command icon and click run as administrator then use above stsadm commend to update credential. If still you face same issue then try with powershell as mention in below link: (make sure that you open sharepoint powershell as run as administrator)
    http://smartrider.wordpress.com/2010/07/15/powershell-script-to-create-web-application-and-site-collection-in-sharepoint-2010/
    let us know your result
    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • "there is a problem with adobe acrobat/reader. if it is running please exit and try again. (523.523)

    We are getting the following error "there is a problem with adobe acrobat/reader. if it is running please exit and try again. (523.523)" and a gray screen appears (Image not viewable) with multiple users. We are using Adobe Reader XI (11.0.05) and (11.0.06). The current workaround is to log off the website and log back in. Once the user logs back in, the pdf will appear. However it occurs anywhere from 2-8 times in a day. Anyone else having this issue or know of another workaround? Any suggestion with how to fix? Please help!!

    Hi Valerie,
    Please let me know the version of Adobe Acrobat/Reader & operating system installed on your computer?
    Also, try this:-
    Launch Adobe Reader/Acrobat.
    From the menu, choose Edit -> preferences -> General
    Uncheck the option for "Enable Protected Mode at startup"
    Restart the Adobe Reader and web browser.
    Regards,
    Aadesh

  • Cannot send or receive yahoo mail or gmail from iPhone . installed ios 6 recently. tried rebooting the phone and deleting the email account and adding again but nothing works ! can someone suggest a solution?

    cannot send or receive yahoo mail or gmail from iPhone . installed ios 6 recently. tried rebooting the phone and deleting the email account and adding again but nothing works ! can someone suggest a solution?

    Not sure about yahoo, but for gmail, I done the following:
    Set up using Exchange on iPhone, it'll keep prompting for password.  On PC use captcha option, log in to gmail account from PC after completingg captcha option, enter password on iPhone.
    See how that goes for gmail, let us know.
    Hopefully someone will have fix for yahoo.

  • Couldn't find root user.  Sleeping and trying again.

    Last week I installed an MSO 2004 update on my G5 iMac running 10.4.11.
    Then I attempted to repair permissions. The repair permissions process
    halted at about half of the progress bar. I let it cook for about two
    hours without success, then tried to force quit Disk Utility. I
    couldn't force quit it, so I very reluctantly turned off the Mac;
    something I've rarely ever done. I waited five minutes and then turned
    the Mac back on. The startup sequence progressed to the point where the
    system displays the gray apple on the gray background, and the circular
    progress indicator or gear begins turning. I let it turn for one hour
    and then powered off the iMac, then powered it back up with the same
    results.
    I powered it off again and then commenced a Safe Boot. Same results as
    before.
    I powered it off again and then started it in Single User Mode. No
    problem. I ran /sbin/fsck -fy. No problem.
    I typed "reboot" and it rebooted. This time I start it in Verbose mode.
    After the preliminary startup code, the system began repeating the same
    message lines:
    dsFindDirNodes returned -14071, count = 0 count = 2147483646
    Couldn't find root user. Sleeping and trying again.
    A Google search produced very few results. I don't have a backup
    because I inherited this iMac from my 75 year old semi retired father
    who wanted a 20-inch Intel iMac instead. I just goof around with the G5
    iMac from time to time, and am considering giving it to my little niece and
    nephews. It worked great for about a month. I have customized my
    user account and the accounts for the little ones, so I really don't
    want to wipe the hard drive and reinstall Tiger again from scratch.
    I booted from the suspect internal hard drive into single user mode.
    I ran /sbin/fsck -fy on the internal hard drive.
    All tests passed.
    I ran fsck_hfs on the internal hard drive.
    It returned a message that stated that I needed
    to add additional information.
    I ran fsck_hfs with several switches enabled, but
    it continued to return this message.
    I performed the procedures in Apple's article 107210
    "Mac OS X, Mac OS X Server: How to Replace the NetInfo
    Database (Restoring from defaults).
    This did not solve the problem.
    I booted this computer from my external Firewire hard drive that I use
    to create nightly backups on my G4 iMac using SuperDuper!.
    I ran Disk Utility Repair Disk Permissions on the
    internal hard drive.
    There were no permissions errors.
    I ran Disk Utility Repair Disk.
    All tests passed.
    I ran the TechTool Pro Suites --> Advanced Tests on
    the internal hard drive.
    All tests passed except for "Startup File" which it
    listed as " <Not Present>".
    The description of this test is:
    "This test checks the Startup file. The parameters
    within this file contain the information used by
    the computer ROM to determine what program will
    boot the computer as well as other system-specific
    aspects."
    I ran the TechTool Pro Performance --> Maintenance
    routine on the internal hard drive.
    It completed the maintenance successfully.
    I ran DiskWarrior on the internal hard drive.
    It reported no directory errors, but I replaced it
    anyway.
    While booted from the external Firewire hard drive, I viewed what
    appears to be the proper compliment of folders on the internal hard
    drive. Of course, I didn't examine and verify every subfolder in the
    hierarchy, however, examining the Applications, Library, System, and
    Users folders two deep seemed to indicate that everything was there.
    I booted this computer from my Tiger installation disk. I selected
    Utilities --> Reset Password... (I think.). It listed only the
    Administrator account (root) on the internal hard drive. It did not
    list the other three accounts that I created on this hard drive, even
    all three respective folders are present in the Users folder. However,
    it did list all four accounts on the still attached external Firewire
    hard drive.
    By every measure, this drive and its directory are sound. I am
    concerned that TechTool Pro reported that the Startup File is Not
    Present. Beyond the meaning that the words suggest, I'm not sure what
    this really means. I checked the Micromat site and found the following:
    The Startup File has been defined but not yet
    implemented by Apple.
    What does the message signify:
    dsFindDirNodes returned -14071, count = 0 count = 2147483646
    Couldn't find root user. Sleeping and trying again.
    Can I effect a simple repair?
    Thank you.

    I think besides a reinstall, only DiskWarrior from Alsoft...
    http://www.alsoft.com/DiskWarrior/
    stands a chance of fixing it.

Maybe you are looking for

  • Mutli-room dvr stopped working after upgrade to 500 gb dvr

    I've been running in circle with the online chats. I upgraded my dvr and since then my remote dvr and mutli room dvr will only work for a few mins after resetting the boxes: I've done the start the boxes, factory reset of the router and took the coax

  • "iTunes has stopped working" grrr, any help?

    Well this happend last night. i had just gotten a bunch of songs and i was putting them on itunes, everything was fine. i always need to create an ACC version of everything as my music is saved on to an external hard drive (if thats not plugged in iT

  • Can't Add Stamp to PDF Document

    I'm trying to sign an IRS tax document using my custom signature stamp, but I get the error in the enclosed screenshot. I have already tried simply saving a different copy of the PDF file as the notice implies, but even in the copy that's created, no

  • Park invoice

    Hi, I wamt to use BAPI_INCOMINGINVOICE_PARK or MRM_INVOICE_PARK to parking MM invoice with ref. to PO for transaction MIR7. Kindly provide me a sample code for how to use this function modules. because editior is one of the i/p for this function modu

  • Unable to print album artwork, though it is in iTunes

    Hello, I have iTunes 8.0.2. I purchased an album from the iTunes store, removing it immediately from the 'Purchased' list for reasons I won't bore you with. I burned a CD and then went to print the artwork, to find that it came up blank in the previe