ClassNotFound but class is there

We have a very strange problem. We have a jar file that contains, among other things, the class ProgressWindow, which has a static method called closeWindow(). This method is called from another class which is in the same jar, from a finally{}. We are running on Solaris. The java program runs essentially as a service which is called from another java program. We find that if the "client" is run on the same box as the "server", all is ok, but if the "client" is run from a different box we get a ClassNotFoundException when calling the static method. We are running out of ideas. Has anyone seen anything similar to this?

Well, whoever needs the class--client, server, or both--has to have a way to access it. For standalone apps (as opposed to applets or servlets) that's general by indicating a directory or jar file on the local file system. You can, however, use a URLClassLoader to get a class from any URL, or any custom classloader you can create to get the class however you want. Regardless though, whoever needs it has to be able to get to it.
If you, say, moved the client to a different machine, and didn't copy the appropriate class files or jar file(s), or put them in a different directory than they were on the server, but didn't change the classpath, that would be one way it could break. Without more details, anything anybody here could suggest would just be speculation.

Similar Messages

  • ClassNotFound (class is there in EAR file)

    I have an EAR file. It gives me ClassNotFound error even though I have checked
    that the class is there in the EAR at right place. This happens with one particular
    server. Same EAR file when deployed on another instance gives no problem.
    Can it happen if a class is fould at two different locations in classpath at runtime?
    Thanks in advance

    SquareBox wrote:
    user8483670 wrote:
    To handle String data like you said the one "Hello world" we can use string Buffer or StringBuilder for that purpose? why only String?I'm NOT 100% sure about this but I'm pretty sure. Anytime you create a String, the Java compiler uses StringBuilder.No, that's definitely not the case.
    Perhaps what you're thinking of is that when you concatenate non-compile-time-constant Strings, the compiler generates StringBuilder.append() calls.
    That is why when you want to use an array to create Strings for each element, it is better to explicitly call the StringBuilder because otherwise Java will create a new StringBuilder for every single element. In this case if you create a StringBuilder explicitly, then Java would only have to do it once rather than for each element of the array. This would slow down the program for large arrays.Sort of. Arrays don't specifically have anything to do with it. They're just one specific case. The real issue is when doing a lot of concatenations in a loop, you want to explicitly user StringBuilder, to avoid creating (and having to GC) large numbers of temporary String and StringBuilder objects.
    String s1 = "abc" + x "def" + y + "zzz";The above is fine, because the compiler can insert the creation of a single StringBuilder.
    String s1 = "";
    loop {
      s1 += something;
    }The above is not good, because for every pass through the loop, there will be a StringBuilder and a String created, and eligible for GC.
    StringBuilder sb = new StringBuilder();
    loop {
      sb.append(something);
    }The above is the preferred way to do it. Although in practice, in the majority of cases you probably won't even notice the difference.
    Edited by: jverd on Mar 8, 2011 9:44 AM

  • Webstart cache bug? ClassnotfoundExeption BUT IS IS THERE!

    Hi,
    we have a swing application that is launched via webstart.
    This worked fine over years with all versions of java 1.4 up to 1.5, but with 1.6 from time to time we are facing a strange problem:
    -From time to time, rarely, the application cannot be launched via webstart, it returns with a class-not-found-exception. Neither the jnlp., nor the jars or anything else has changed!!!
    -I know, the Expiry attributes in the HTTP header have to be set correctly, and i verified also that the http communication is correct(by monitoring the network).
    -This happens only if the application is in the Java webstart cache. If the problem occurs and i clean the cache, the problem is solved.
    -However, if the problem occurs, the files are inside the javaws cache and the class that is not being found by Webstart is definetly there!!!
    -You can easily tell if JavaWS attempts to download a resource or not, but in the error case it looks like it accesses ONLY the cache , but it fails to read from it.
    -We think that, from time to time, Java WS fails reading the jar out of the cache, since in 75% of all error cases its the Main-Class that is not being found (but it is there in the cache). The fact that the remaining 25% other classes are not found show that the problems does not come from my main class.
    -This happens for a lot of users (as i said rarely, but it happens). Its not ideal to tell a end-user to flush the webstart-cache, so has anybody experienced similar problems or knows whats going wrong here?
    many thanks...

    I analyzed the cache of webstart and i found out the following:
    Unlike as in 1.5, in the new 1.6 Version Webstart places jar files under a cryptic name in the cache. When viewing the cache by the java control panel, you'll see your jar-file with a size in KB, lets say 4500. When looking in the cache, the 4500 are divided into the jar-file (the actually 4000KB on the server) and and .idx-file (the remaining 500KB).
    1.) Today, i launched the ws application for the first time after a long period on the testing pc. This caused WS to create a new subfolder under its own caching-folder, where it has stored a .idx-file and a .lap file and a file with no file-extension.
    content of .idx: the URL of the jnlp that i loaded (nothing else)
    content of .lap: the date+time from last access today, the number of launches of the application for today, the entry "forcedUpdateCheck=true", and the parameter "lastAccessed" with the date+time for today as value.
    content of file with no file-extension: the jnlp file itself
    ->the jar file is missing. As far as i understand, this is no error, it can be in any subfolder in the caching-directory.
    2.)I found the according .jar-file in the cache in another subfolder. By analyzing the content of this folder, you can tell that this is the folder created at the last time i launched the WS application some days ago (it contains .idx etc with date information) .
    The jar file is correct and by renaming it to .zip you can easily see that the missing class IS DEFINETELY THERE!!!
    3.)in the old cache-subfolder from the last launch some days ago, the .idx-file shows some HTTP-information, also the header: it gives an "expiry" for the http-call for the jnlp file for today, at the first time i accessed the jnlp (the very first launch today).
    Conclusion:
    Under strange conditions and if the resource expires, it is possible that JavaWs is not able to update the cache. This results in the fact that classes cannot be found because the jar-file cannot be read, due to:
    a)missing mapping of new entry to old value in another folder
    b)concurrent modification
    Possible reasons:
    -concurrent modification of the folders is causing trouble to the cache management logic, results in loosing the abillity to map the cache entry to the according value in another subfolder in the cache. I think the naming of files in the cache has been changed from 1.5 to 1.6, so perhaps there is a still a bug. If the cache is cleared by the java control panel, the problem is gone.
    Last but not least:
    Some of my collegues had the idea that the problem is also related to mutlipe launches of Webstart or any Java-Application, wich might cause problems in terms of concurrencies of java processes. The interesting thing is, that the moment i launched the same application under my ide (eclipse) as an application via giving the main-method as startpoint (means non-Webstart-mode), and during the launch i started the same application as a webstart-application from a browser, the problem occured. Not to say that launching applications from my ide has something to do with webstart (god,hopefully not), but it is strange that exactly at this moment the problem occured....but: also end-users with no ide's that launch over webstart see the problem. btw: the launch of webstart failed, but the concurrent launch via eclipse was successful.

  • I'm trying to install iTunes on my computer running Windows 7 Home Premium.. I'm not sure if iTunes is compatible with it because when I try to install it, it says the installation is complete but it says there was an error so I can't get it! Please help!

    Hellooo Apple Community!
    I'm trying to install iTunes on my computer running Windows 7 Home Premium. I'm not sure if iTunes is compatible with my computer operating system because when I try to install it, it says the installation is completed but it says there was an error so it won't let me get itunes! Can someone please tell me if iTunes can be downloaded and installed on "Windows 7 Home Premium" and if so, how?! I need iTunes asap, I have an iphone 4 running ios 6.1.3. Please get back to mee!!
    Thankyou thankyou thankyou!
    Natalie.

    I just tried running the Lenovo Hard Drive Quick Test both in normal mode and in safe mode.  Both times it indicated a failed read test on the HDD. The last two tests also failed.  I forget what those tests were called.
    I am really beginning to think I have a bad HDD and the problem just happens to be in the reserved partition where my factory system software resides.

  • 1 year ago i installed Elements 12 on my PC with a serial number.  Today i have installed Elements 12 also on my laptop. But,...there is a problem with validation of the serial number on my laptop. Is there a need to validate Elements  or will this progra

    One year ago i installed Elements 12 on my PC with a serial number and it was OK.
    Today i have installed Elements 12 also on my laptop.
    But,...there is a problem with validation of the serial number on my laptop. Is there a need to validate Elements  or will this program real disapeare in 7 days?
    Hans

    Hi,
    Since you already have one copy activated the serial number must be logged in your account details - I would first check that the one logged and the one you are attempting to enter are the same.
    You can check your account details by going to www.adobe.com and clicking on Manage Account. You need to sign in with your Adobe Id and then click on View All under Plans & Products. Next click on View your products and after a while it should produce your list.
    If there is a problem with the serial number, only Adobe can help you there (we are just users). Please see the response in this thread
    First of all, I would have to say that getting in touch with you is a nightmare and I am not at all happy that I can't just email or live chat with someone who can help!  I am not a technical person, I just want to be able to use Photoshop Elements and ge
    Brian

  • I just downloaded Yosemite and all my iPhotos have disappeared! I tried importing them from the photo library but it said there wasn't enough space on my hard drive which is rubbish, because they were there before. How do I get them back to iPhoto?

    I just downloaded Yosemite and all my iPhotos have disappeared! I tried importing them from the photo library but it said there wasn't enough space on my hard drive which is rubbish, because they were there before. How do I get them back to iPhoto?

    There are 9 different versions of iPhoto and they run on 9 different versions of the Operating System. The tricks and tips for dealing with issues vary depending on the version of iPhoto and the version of the OS. So to get help you need to give as much information as you can. Include things like:
    - What version of iPhoto.
    - What version of the Operating System.
    - Details. As full a description of the problem as you can. For example, if you have a problem with exporting, then explain by describing how you are trying to export, and so on.
    - History: Is this going on long? Has anything been installed or deleted? - Are there error messages?
    - What steps have you tried already to solve the issue.
    - Anything unusual about your set up? Or how you use iPhoto?
    Anything else you can think of that might help someone understand the problem you have.

  • My iphone 4 is dead after I updated to ios 6.1.3 it doesnt turn on and doesnt respond to itunes also. Visited Apptronix service desk but they say there is nothing they can do about it, and they have charged INR 10640 for a new one. Is there anybody same..

    My iphone 4 is dead after I updated to ios 6.1.3 it doesnt turn on and doesnt respond to itunes also. Visited Apptronix service desk but they say there is nothing they can do about it, and they have charged INR 10640 for a new one. Is there anybody with similar problem....

    Hm... Try this----> http://support.apple.com/kb/ht1808 or http://osxdaily.com/2010/12/04/ipad-dfu-mode/

  • How do I fix my Iphone if I have already updated to the latest version of itunes but it says there is an error and cant be restored?

    My Iphone 4 crahsed a few months ago when I tried to update and i have used Itunes already and it updated to the latest version of itunes but it says there is an erro and cannot be restored, I'm not sure why it is saying that, can I get some help?

    Hi Alyssa_fagundes,
    Thanks for the question. Based on what you stated, it seems like you need help restoring an iOS device. I would recommend that you read this article, it may be able to help you isolate or resolve the issue.
    If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support
    Thanks for using Apple Support Communities.
    Cheers,
    Mario

  • Hi have just purchased iphone 4s . my itunes on my mac is currently 10.4 . 10.5 is needed for the new iphone but when i download it and click on install the itunes about still says 10.4 . have tried to update through itunes but it says there is no softwar

    hi have just purchased iphone 4s . my itunes on my mac is currently 10.4 . 10.5 is needed for the new iphone but when i download it and click on install the itunes about still says 10.4 . have tried to update through itunes but it says there is no software available for me . please help . mr frustrated

    If your computer is running an OS X prior to Snow Leopard 10.6,
    the answer (if it is an Intel-based Mac; not old PowerPC model)
    would be to buy the retail Snow Leopard 10.6 DVD from Apple
    for about $20, and install it. Then update that to 10.6.8 by using
    the installed Snow Leopard online to get Combo Update v1.1 for
    Snow Leopard 10.6.8. After that is installed & updated, run the
    system's Software Update again, to see what else is available to
    that system.
    Later systems can then be looked into at Mac App Store, once
    the computer is running Snow Leopard 10.6.8.
    And if your computer is a Power PC (G4/G5, etc) and has no
    Core2Duo kind of CPU -- See "About this Mac" in apple menu
    to disclose the general info about your Mac. Also you can see
    even more by clicking on "More Info" when looking in there...
    If it isn't an Intel-based Mac, it can't run a system past 10.5.8.
    Hopefully this helps.
    Good luck & happy computing!

  • My ipad mail is synced to my iMac mail account. On iPad, I can only see my inbox and sent messages. I can't see any of the folders I have created on my iMac. How do I do that? Probably a dumb question, but I know there's a lot of smart people out there!

    My iPad mail is synced to my private email account, which I organise on my iMac. On iPad, I can only see inbox and sent messages folders, not any of the other folders in my email account I have created on my iMac. How do I get iPad to show my other folders? Probably a dumb question, but I know there's a lot of smart people out there.

    If you select a mailbox, you should get an Edit button (easier to see in landscape mode). Clicking the button will provide you with check circles for the messages. You also get Delete and Move buttons at the bottom. Check the messages you want to move and then navigate to the mailbox you want to drop them into. I think as long as you can navigate to a mailbox you can move the messages to it.
    In the Mac Mail application and probably Outlook on the Windows side, you also setup rules to move messages to specific mailboxes. If the mailboxes are stored on the server, then you can have the sorting done on the server and they should appear that way on the iPad. If your later messages do not show up, you may need to have the iPad app pulled down more messages until they are all showing.

  • Just updated my iPhone 4 from IOS 6.1.3 to 7.1.2, I know I am behind the times, but I got there eventually! All seems well but I have one specific problem and hope someone can offer a helpful suggestion.

    Just updated my iPhone 4 from IOS 6.1.3 to 7.1.2, I know I am behind the times, but I got there eventually! All seems well but I have one specific problem and hope someone can offer a helpful suggestion.
    On opening the app "Find my iPhone" I add my password and sign in, to be greeted with a screen that says;
    "Update Find My iPhone. A new version of Find My iPhone is available from the App. Store. You must install the update to continue using the app. Update now"
    On hitting the "Update now" button I'm taken to the relevant page on the App Store, to be told that I cannot update as it needs IOS8 to be able to continue and as my iPhone is only a 4 cannot install IOS8.
    I'm left going around in circles. The only thing would be to delete the app, but looks like I could not re-install the version I would need. Any body have any thoughts or suggestions? (Apart from updating my phone, I have a few months left on the contract!)
    Thanks in advance.

    Hi, thanks for the suggestion. I have tried as you suggested, and when opening the "purchased" apps some have the icloud logo next to them, but I only have "OPEN" against "Find My iPhone". When opening it up, it goes through the same routine; needs to be updated before proceeding, and wouldn't update because I don't have IOS8.
    Anything else I could try, or am I doomed!
    All of your help is much appreciated, thanks

  • Cd drive on my laptop not seen as a device. Can refresh itunes and device appears but get unknown sync error 13019 when transferring cd's to my nano.  The cd's appear on the nano when it's connected to itunes but aren't there when I disconnect?

    cd drive on my laptop not seen as a device. Can refresh itunes and device appears but get unknown sync error 13019 when transferring cd's to my nano.  The cd's appear on the nano when it's connected to itunes but aren't there when I disconnect?

    Satellite L675-S7113 Specifications (PSK3AU-07C02S)
    Satellite L675-S7113 Support Page
    rwls wrote:...since I got it 3 years ago I've been unable to burn an audio CD from ITunes or Windows media although it worked once after the computer had been shut off for awhile..and didn't find the problem until after my warranty had expired...
    From your statements above, it sounds like you never tried to burn a CD for at least the first year that you owned the laptop, as it had a one year warranty on it. While you might have used it frequently to install software,  play DVDs, Blu-Ray disks, etc, that's unclear from your statements. Nonetheless, it might just be dirty-dusty. So, before deleting-uninstalling any software, and given they're cheap, try a CD-DVD Cleaner Disk first and see if that resolves your problems.
    Let us know what happens. Good luck.
    Mike

  • I have install last update for i pod(ios5) but during installation there was one problem....i have restore my ipod and now i have lost all my buyed music!!Is not possible download it....?What are the details, including any error messages, related to your

    I have install last update for i pod(ios5) but during installation there was one problem....i have restore my ipod and now i have lost all my buyed music!!Is not possible download it....?What are the details, including any error messages, related to your question?

    Have you not got the music on your computer and/or on backups on, for example, external drives or CDs/DVDs ?

  • Hi,  I'm having a problem with the stabilization all of a sudden. I did an analyze. The amount of shake isn't terrible but it's there. There are no squiggly lines in the clip I'm trying to stabilize. As you can see in the screenshot that it allows me to c

    Hi,
    I'm having a problem with the stabilization all of a sudden. I did an analyze. The amount of shake isn't terrible but it's there. There are no squiggly lines in the clip I'm trying to stabilize. As you can see in the screenshot that it allows me to click the "Smooth clip motion" but the slider is not there for zoom. Any ideas why this is happening all of a sudden? It happens on all clips in this event. The entire event was analyzed after importing.

    What program are you using for this editing?
    We can ask a Host should move your query over to that forum.

  • After upgrading to Mavericks all my pdf's that were on Ibooks in Itunes library disapeared. It said they were moved to the new ibooks for mac app. but nothing is there. Can anyone help

    After upgrading to Mavericks all my pdf's that were on Ibooks in Itunes library disapeared. It said they were moved to the new ibooks for mac app. but nothing is there. Can anyone help

    Well where is your library located now if not in the iTunes folder?  See the links below on what your iTunes folder should look like and put it back together:
    What are the iTunes library files? - http://support.apple.com/kb/HT1660
    More on iTunes library files and what they do - http://en.wikipedia.org/wiki/ITunes#Media_management
    What are all those iTunes files? - http://www.macworld.com/article/139974/2009/04/itunes_files.html
    Where are my iTunes files located? - http://support.apple.com/kb/ht1391
    iTunes 9 [and later]: Understanding iTunes Media Organization - http://support.apple.com/kb/ht3847

Maybe you are looking for

  • Path does not exit - While trying to save file on SharPoint Server 2013 from client machine

    Hi, I have installed Microsoft SharePoint Server 2013 Enterprise Edition on my testing Lab environment (On VM Workstation 10) on Windows Server 2012 with SQL server 2012, I can access all files stored at SharePoint Server from any physical machine, I

  • Foreign Current Revalution posting document not found

    Hi SAP Expert, I have post an foreign currency valuation in IDES system and found that the document is posting to Posting Not in Leading Ledger (Document Status) and Ledger Group (L5). When i view document in FB03 the document can be display. But whe

  • Is there a bug with creating a contact out from an app?

    I work with my iPhone 3GS OS 3.1.3 and use email, calendar and contacts fully synchronized with the Exchange server at the office. And so far, It works great. But, unfortunately, is there a little bug. I use only the contacts folder from Exchange and

  • Which user actually makes the deployment from J2EE engine?

    What's up ? I keep getting this error when I try to deploy an ear file: Settings SDM host : vm2003server SDM port : 50018 URL to deploy : file:/C:/DOCUME1/JOS1/CONFIG~1/Temp/temp17955JSP_teste_EAR.ear Result => deployment aborted : file:/C:/DOCUME1/J

  • DMVPN using GRE Configuration with EIGRP

    Good morning to all, What a pleasure to find a forum in our language and in our language to express any objection to our network and enlist the help of experts. I want to express my case is as follows: I configured DMVPN using tunnel to lift the VPN