Help needed!! Novice with Garbage Collection problems.

Hi Guys,
Really hoping somebody can help me here. I am a relative novice when it comes to all things Java but i am slowly trying to learn. I have come across an issue which i have identified but i am just not sure what to do about it.
Ok, in a nut shell the issue seems to be revolving around the frequency of garbage collection. From the default-err.log file i am seeing (on average) an Allocation Failure occur every 2 secs. Here is a sample from the log with verbose:gc active:
<AF[4986]: Allocation Failure. need 208480 bytes, 78 ms since last AF>
<AF[4986]: managing allocation failure, action=2 (559165976/1342176248)>
<GC: Mon Oct 11 11:51:12 2004
<GC(4986): freed 4101528 bytes in 1559 ms, 41% free (563267504/1342176248)>
<GC(4986): mark: 1301 ms, sweep: 258 ms, compact: 0 ms>
<GC(4986): refs: soft 0 (age >= 32), weak 0, final 0, phantom 0>
<AF[4986]: completed in 1563 ms>
<AF[4987]: Allocation Failure. need 208536 bytes, 78 ms since last AF>
<AF[4987]: managing allocation failure, action=2 (559138336/1342176248)>
<GC: Mon Oct 11 11:51:14 2004
<GC(4987): freed 4105128 bytes in 1563 ms, 41% free (563243464/1342176248)>
<GC(4987): mark: 1293 ms, sweep: 270 ms, compact: 0 ms>
<GC(4987): refs: soft 0 (age >= 32), weak 0, final 0, phantom 0>
<AF[4987]: completed in 1563 ms>
As you can see, allocation failures are occuring all the time, and with 2secs between events, and each GC taking around 1.5secs, i am having massive problems with the response of the server. It seems that the javaw.exe process is just pegged at 100% CPU the whole time and then it will eventually grind to a halt, and the users will get terrible response times.
OK, the questions are:
- Even to me (a novice) the above extract from the log doesnt look good. Am i right?
- what would be causing this? (i know - how long is a peice of string but i am hoping somebody can point me in the right direction so i can look some more)
- what can i do about it? Is there any parameters i can put into the java args to help me out?
Currently i am running -Xms of 128meg and an -Xmx of 1024m with no other settings. There are at the moment about 200users logged onto this server concurrently, and it seems to die a couple of hours into them all being logged on. I then have to kick everybody out and reboot to get it in a working state again.
I am in some serious need of help from some gurus!! any help would be invaluable, thanks heaps guys.
Tim

Hi Again guys, thanks for all your replies.
I have been working my butt of on this issue and i just cant seem to get anywhere... probably due to my complete lack of knowledge on this whole GC thing! :)
One thing that i have noticed that seems to be very consistant is the fact that as soon as i get an "action=2" in my default-err.log from an allocation failure, thats when the system goes nuts and tends to not recover.
At all other times it is an action=1, and the system seems to be running OK, but as soon as i get action=2, the time between GC events drop from seconds to miliseconds, and the bytes required just skyrockets. It keeps on this upward spiral till i just have to reboot the box.
From all my reading, i have found that an action=2 means "2 - The Garbage Collector has tried to allocate out of the wilderness, and failed."
This is the only item in the logs that i see is directly related to the server performance.
Can anybody please explain to me (in laymans terms) what the action=2 means, what may cause it and what i should be looking at changing to fix it?
The extract from the log files (in my first post in this thread) are still valid, as are the min/max memory settings.
Any help at all would be invaluable.
Thanks very much.
Tim

Similar Messages

  • Help needed quick with AGP problems

    i bought a Radeon 9600 256MB vidcard from Sapphire today, and when i tried it in my K7N2 Delta ILSR, the system would boot, load windows, hang, then refuse to boot unless i removed the radeon ... since i dont have any onboard video, i've been using an Nvidia Vanta before the radeon, any ideas what the prob might be?
    help would be very much appreciated

    Quote
    Originally posted by skzillz
    where can i find the list of recommended memory modules for the Delta ILSR?
    and what are some of the recommended PSU's also plz
    thanks for ur help btw, i had solved the problem by moving the memory from one slot to another, does this give u any idea about any underlying problem with the motherboard??
    I've already given you the top 2 PSU choices, and Bonz has linked you to his sticky on RAM choices. Please read what's been given to you already. As far as RAM I would recommend a good quality Mushkin or Corsair.   Run this to test your memory Memtest
    Good Luck
    Bob

  • Garbage Collection Problem

    Hi All,
    I am facing some problem with frequent Garbage Collection application running in the background. Issue in production system. Frequently GC is happening, which is affecting the performance. Is there any work around. Issue is affecting the employees and data is inconsistent.
    Please help on this asap.
    Regards,
    Soorya

    Hi,
    >>>I am facing some problem with frequent Garbage Collection application running in the background.
    usually issues with GC are not that simple
    also you need to check what kind of GC is happening first then you can start checking why
    but my guess would be there is something wrong with the flow and this is causing the GC to work in a wrong way
    (if it was working before)
    when I did GC checks for my clients it was at least one day of work sometimes to find out what was wrong + repairs later on
    Regards,
    Michal Krawczyk

  • Full Garbage Collection Problem

    Hi All,
    We are working on NetWeaver Application Server JAVA 7.0
    I am getting an error message in of the the EWA reports for JAVA system. The red alert says as below:
    The maximum ratio of full garbage collections to total garbage collections in the reported interval was higher than 90%.
    In order to solve the above problem, I increased Heap Memory for all JAVA Server nodes to 3072 (earlier it was 2048 for all the server nodes). However, still I am getting same error in EWA report.
    Can any one help me in further analysing and solving the above problem?
    Your help is appreciated.

    Here are links to some of the tools. I have worked with [IBM GC for IBM JVM|http://www.ibm.com/developerworks/java/library/j-ibmtools2/index.html]. You may have to try others that can read Sun JVM's GC log.
    http://www.tagtraum.com/gcviewer.html
    http://www.yourkit.com/overview/index.jsp
    https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPJMETER
    http://java.sun.com/performance/jvmstat/visualgc.html

  • Help Needed for T42 Start-up Problem

    Urgent help need!!!
    I have a ThinkPad T42 with Windows XP installed.  It works perfectly for a while without ever have any problem or error message.  Then suddenly it won’t work anymore.  The symptom is following:
    After power on the laptop the Microsoft window would show up and it prompt me for window logon password.  After I type in the password it then shows “window is loading your personal setting”.  After a long while nothing would show up on the screen other than the background of the normal screen.  There is no window bar at the bottom or any icon on the screen.  If I start in safe mode then everything would show up.  I don’t know what is going on.
    This happened two months ago and I ended up restoring a backup image to get it work again.  It happens again today with the same symptom.  I am really tired of having to restore image backup every 2 months. 
    I would really appreciate it if any of your experts can offer me some insight into this problem.  I am desperate in need of help.
    Thanks very much!

    wangy26, welcome to the forum,
    Have a look at this thread to see if my post there helps. The problem seems to mostly occur at the start of a month, why I don't know. Unfortunately the member didin't report back whether or not this was a viable solution for them.
    Andy  ______________________________________
    Please remember to come back and mark the post that you feel solved your question as the solution, it earns the member + points
    Did you find a post helpfull? You can thank the member by clicking on the star to the left awarding them Kudos Please add your type, model number and OS to your signature, it helps to help you. Forum Search Option T430 2347-G7U W8 x64, Yoga 10 HD+, Tablet 1838-2BG, T61p 6460-67G W7 x64, T43p 2668-G2G XP, T23 2647-9LG XP, plus a few more. FYI Unsolicited Personal Messages will be ignored.
      Deutsche Community     Comunidad en Español    English Community Русскоязычное Сообщество
    PepperonI blog 

  • Desperate Help Needed re CS6 Activation/Installation Problem

    A few months ago, I purchased the full retail version of CS6 (Design Standard) for Windows.  I installed it on a new clean computer running Windows 7 and activated and registered it.  The installation, activation and registration process went smoothly, and initially everything seemed OK.
    A little over a month ago, the nightmare started.  Since then, each time I try to run any of the CS6 components, I get a message telling me it "thinks" I have the trial version installed (even though I actually installed and activated the full version) and asks me if I want to "start the trial" or "license this software."  If I choose "license" it asks for my serial number (which has already been entered numerous times) and it then seems to be OK -- for a while.  However, within a short period of time, the problem is back, and the cycle starts again.
    I have tried on numerous occasions (and spent countless dozens of hours) attempting to resolve this through Adobe support, both via telephone and via "chat."  Each time, I wind up telling the same story to several different people, re-explaining it until they apparently understand it, and then getting transferred around to several people until I finally get to somebody who, supposedly, can help.  Then, that individual walks me through the same things that have already been tried several times before.  Finally, I am assured that the problem has been fixed, and am also assured that they will keep the case open.  Each time, the problem has not been fixed, and I find that the case has been closed (so that the only way I can try to communicate is by starting all over, wasting more hours trying to get through, and ultimately again getting to somebody who has no idea what to do other than to tell me to do the same things that have already proven themselves (several times) not to work).
    The result of all this is that I have a $1200 piece of software which is totally useless.
    Perhaps somebody from Adobe can help me with how to take this to the next level so that it gets to somebody with the knowledge to figure out how to fix the problem.  If anybody other than from Adobe has dealt with a similar problem, any suggestions would be appreciated.
    Robert Rothman (a very dissatisfied customer)
    Edit: To be clear, this was not purchased via download; I installed from physical disks.

    Rob you may find this interesting...Adobe Customer Care sent me an email today in reguards to the problem I (we) have all been having...entering serial number numerious times in order to launch the CS6 program.  This is what they sent me...
    "With this response, we believe your issue is resolved and have therefore closed your case 0183753409.  If your support case has not been completed to your satisfaction or you should need to contact us on this issue again, please reference your case number.  You can reopen your case up to 14 days after it has been closed."
    Then they continue with...
    "Thank you for contacting Adobe technical support.
    Thank you for updating the dependency information.  We discussed this case again with our development team and they have informed that we do not have a solution for this issue at this point in time.  You need to enter the serial number and activate the software each time you launch a 64 bit CS6 application.  I would like to tell you that this is a rare incident and we are extremely sorry for the inconvenience caused to you.  We are closing this case now.  We will get back to you once we have a fix for your issue.
    I request you to contact us back via Live Chat for further questions."
    So basically they are telling me (us) there is no fix  and they do not have a plan for when there will be one, and that this problem is a rare incident.  I'm not buying the rare incident statement what about you?  I would be very interested to know just how many people out there are having this problem? 
    I am very disappointed in Adobe. How can they close my case saying the issue is resolved when infact it is not?   I am also wondering why they have not already fixed this problem as it seems to have been around for quite awhile.  Not really sure what else to do as Adobe seems not to be very concerned about customers spending hundreds of dollars for a program they know has this crazy annoying problem. 
    I've entered my serial number so many times I almost have the whole number memorized!  What a pain to have to enter it about every other time I want to access my CS6 program!   I'm a Very Very Unhappy Customer!!!  
    Good Luck Rob I hope you have better luck than me!  I'm going to keep checking back to this posts discussion so if you do find a fix please post it here so we will all know about it.  Thanks...
    Jeff, Thanks, I did finally find a browser that would let me actually access my open (but now closed) case but I had to try three different ones before it worked.  Google Chrome worked,  Internet Explorer and Foxfire did not!  FYI
    Chesterr, I will try the steps you suggested but I do not have high hopes in them working to solve our problem.  Thanks...

  • Help needed please, with Iphone stuck with apple picture and progress bar after software update attempted

    Help needed please, everytime I try to update the software version on my iphone it comes up with a message saying it could not be completed and is now frozen with the apple picture and progress bar on it. Do I unplug it and hope the macbook pro sees it again, I also stupidly did not back up before starting the download which I realise I will have to go back to the previous back up. This keeps happening, everytime I do this type of update, I'm starting to think I should just give up on updating my software on the Iphone. I thought it was happening because I was using a window based computer to do the updates, this time I used my Macbook Pro. Please somebody help

    ljm17 wrote:
    ...This keeps happening, everytime I do this type of update, I...
    Then you should know what you need to do... If you don't remember...
    See Here  >  http://support.apple.com/kb/HT1808

  • DataGrid Garbage Collection problem

    Hi,
    I'm quite confused about the DataGrid component's garbage collection. I've made a simple test code which adds a datagrid to the display list. If I remove the component from its parent without clicking any item, the element is collected correctly. However, if I click an item, the datagrid is no longer removed. Otherwise, if I use the keyborad to navigate through the items, the component is removed.
    The profiler doesn't display any inbound reference to the datagrid. So, what's the problem? Is Flex retaining any reference when I use the mouse?
    Thanks in advance.

    Hi,
    here it goes:
    the main application:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
         <mx:Script>
              <![CDATA[
                   import com.adur.nodes.Child;          
                   private var _child:Child;
                   private function onLinkClickHandler(event:MouseEvent) : void {                    
                        _linkButton.enabled      = false;
                        _unlinkButton.enabled      = true;
                        _child = new Child();
                        addChild(_child);
                   private function onUnlinkClickHandler(event:MouseEvent) : void {               
                        _linkButton.enabled      = true;
                        _unlinkButton.enabled      = false;
                        removeChild(_child);
                        _child = null;          
                        System.gc();
              ]]>
         </mx:Script>
         <mx:VBox width="100%" height="100%">
              <mx:HBox width="100%" height="30">
                   <mx:Button id="_linkButton" width="100" label="Link" click="onLinkClickHandler(event)" />
                   <mx:Button id="_unlinkButton" width="100" label="Unlink" enabled="false" click="onUnlinkClickHandler(event)" />
              </mx:HBox>
              <mx:Box     id="_content" width="100%" height="100%" />
         </mx:VBox>
    </mx:Application>
    the Child class:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" >
         <mx:ArrayCollection id="collection">
              <mx:source>
              <mx:Array>
                   <mx:Object label="Option1" score="85" />
              </mx:Array>
              </mx:source>
         </mx:ArrayCollection>
         <mx:List dataProvider="{collection}" />
    </mx:Canvas>
    thanks harUI.

  • Help Needed : iPOD Photo 30 Gig Problem with Starting

    I have a 3 months old iPod Photo 30 GB.
    Since past 3 days it is not starting up or showing any activity.Click wheel doesnt works,Screen is blank with no sign of any life
    Have tried charging it thru charger but doesnt works.
    Also it is not recognized when I connect it to my Comp/Laptop.
    I have a docking station from Bose on which it works.
    I can use the click wheel as well as can operate it thru remote of Docking station.On the dock it shows full battery.
    Can somebody help?

    Something wrong with your AC Charger (or the cable connected with your iPod) it is not a problem with your iPod otherwise it would not work on Bose docking station. I suggest that you leave it with your Bose for 3 hours then do the following ..
    1. Do a reset, press "select"+"menu" keys
    2. Connect to your laptop
    Hope it got recongized

  • Garbage Collection problem with BI 4.0

    Hi experts,
    I've installed BI 4.0, the operating system is SUSE Linux. In the logging directory are several *._gc.log-Files:
    E.g. crproc_bobSIAN.CrystalReportsProcessingServer_child_gc.log:
    34.609: [Full GC [PSYoungGen: 8352K->2707K(86976K)] [ParOldGen: 33449K->33470K(49472K)] 41801K->36177K(136448K) [PSPermGen: 35
    487K->35460K(56640K)], 0.2510370 secs] [Times: user=0.25 sys=0.00, real=0.24 secs]
    39.664: [GC [PSYoungGen: 81283K->4033K(100544K)] 114753K->40232K(150016K), 0.0387570 secs] [Times: user=0.03 sys=0.02, real=0.
    04 secs]
    41.271: [GC [PSYoungGen: 91137K->14332K(101440K)] 127336K->51242K(150912K), 0.0316510 secs] [Times: user=0.02 sys=0.01, real=0
    .03 secs]
    47.628: [GC [PSYoungGen: 101436K->15431K(112320K)] 138346K->66686K(163712K), 0.0623110 secs] [Times: user=0.06 sys=0.01, real=
    0.06 secs]
    47.690: [Full GC [PSYoungGen: 15431K->12343K(112320K)] [ParOldGen: 51255K->51388K(73088K)] 66686K->63731K(185408K) [PSPermGen:
    63948K->63918K(96064K)], 0.5285130 secs] [Times: user=0.49 sys=0.04, real=0.53 secs]
    659.998: [GC [PSYoungGen: 107383K->14966K(114752K)] 158771K->66354K(187840K), 0.1000770 secs]
    or bobSIAN_gc.log:
    3542.210: [GC 3542.233: [DefNew: 20756K->925K(22208K), 0.0036560 secs] 54323K->34493K(71208K), 0.0037360 secs] [Times: user=0.00 sys=0.00, real=0.03 secs]
    3781.915: [GC 3781.942: [DefNew: 20701K->962K(22208K), 0.0031300 secs] 54269K->34530K(71208K), 0.0031840 secs] [Times: user=0.00 sys=0.00, real=0.03 secs]
    4081.483: [GC 4081.499: [DefNew: 20738K->981K(22208K), 0.0030550 secs] 54306K->34549K(71208K), 0.0031110 secs]
    It's also interesting, that I'm missing free space in the installation directory of Business Objects. There are no reports scheduled, but the directory still grows. Maybe it depends on problems with GC.
    Any idea? Is there a best practice, how to configure the jvm?
    Thanks and best regards,
    Max

    Hello Deepu,
    The current plan for BI OnDemand is to support BOE 4.0 in the 2012 timeframe.  We have not yet worked out a specific date for the release, though.  The specific upgrade plan and long term feature roadmap is still under discussion for BI OnDemand.  
    Regards,
    Terry Penner
    BI OnDemand Product Owner

  • Help Needed-iTunes has encountered a problem and needs to close.

    Hey guys,
    I have had this extremely frustrating problem that just recently started occurring with iTunes. I have read many discussion forums but can’t seem to find a working solution. The problem is every time I try to open iTunes I get an error message that says “iTunes has encountered a problem and needs to close.” The same thing happens when I try to open Quicktime as well.
    I have tried every solution suggested in these forums. I have completely uninstalled Quicktime and iTunes along with their components (Bonjour, Apple Mobile Device Support, Apple Software Update, etc.) and then reinstalled each of them but the problem still remains. I do NOT use iTunes for my iPod (I do not own one) I simply use iTunes to listen to my music.
    I have also tried the methods of installing Quicktime by itself and not with iTunes but the problem still remains. I have tried every solution I have seen. The only method I have not tried is completely removing all files and folders that have to do with iTunes because I am worried if I delete those files with all the music I have bought it will have to be downloaded again or lost.
    This is the “Error Signature” that is on the error report when I try to open iTunes.
    AppName: itunes.exe AppVer: 9.0.2.25 ModName: ntdll. dll
    ModVer: 5.1.2600.5755 Offset: 0001b21a
    There was A LOT more information in the “Error Report Contents” but it would have taken me all night to type it all accurately. If that is what is needed then I am willing to provide any other information about this problem in hope of getting some useful suggestions or solutions. Any help would be deeply appreciated. Thanks!

    that's been happening to me all day! i hope someone answers soon. bought my daughter an itunes card for christmas and now can't use it

  • Help need  for  PL/SQL  collections

    Hi All,
    Please help me to solve the following Error.
    Error # ORA-06533: Subscript beyond count.
    I am using Oracle 10g.
    I have data in the Test_table
    id_col stat_col reason_col
    101 A          HPQ
    101 A NULL
    101 NULL EDU
    101 P NULL
    102 P NULL
    102 NULL HEN
    103 R NULL
    103 Q NULL
    Ny requirement is like:
    id_col stat_col_ reason_col
    101 A|P HPQ|EDU
    102 P HEN
    103 R|Q NULL
    step1- Type tab_type as table of varchar2(32767);
    step2 - I have written a function which returns the pl/sql table type
    create or replace function fn_get_val(id in VARCHAR2)
    return tab_type
    cursor my_cur is
    select id_col,stat_col,reason_col
    from test_table WHERE ID_COL = ID;
    lv_status VARCHAR2(100);
    LV_reason varchar2(200);
    lv_sep CHAR(1);
    lv_disp_stat varchar2(200);
    lv_disp_reason varchar2(200);
    LN_STR NUMBER;
    BEGIN
    lv_tab_data:= tab_type();
    lv_tab_data.extend;
    open my_cur;
    loop
    fetch my_cur into lv_status,lv_reason;
    exit when my_cur%notfound;
    --dbms_output.put_line('my_curr.rowcount'|| my_curr.rowcount);
    lv_disp_stat:= lv_disp_stat||lv_sep||lv_status;
    lv_disp_reason:= lv_disp_reason||lv_sep||lv_reason;
    lv_sep:= '|';
    end loop;
    -- To remove first occurance of (|) pipeline in the string.
    LN_STR := INSTR(lv_str1,'|',1,1);
    IF LN_STR = 1 THEN
    lv_disp_stat := SUBSTR(lv_disp_stat ,2 );
    END IF;
    LN_STR := INSTR(lv_str2,'|',1,1);
    IF LN_STR = 1 THEN
    lv_disp_reason := SUBSTR(lv_disp_reason ,2 );
    END IF;
    lv_tab_data(1) := lv_disp_stat;
    lv_tab_data.extend;
    lv_tab_data(2) := lv_disp_reason;
    return lv_tab_data;
    EXCEPTION
    DBMS_OUTPUT.PUT_LINE('Error in function fn_get_val # '||SQLERRM||' - '||dbms_utility.format_error_backtrace);
    END fn_get_val;
    STEP-3
    I have created one procedure where the above function is called
    CREATE OR REPLACE PROCEDURE my_proc (p_emp_id in Varchar2)
    AS
    lv_tab_ty tab_type;
    CURSOR DET_CUR IS
    SELECT EMP_ID_C,NAME_C,LOCATION
    FROM DETAILS_TABLE
    WHERE EMP_ID_C = p_emp_id;
    type det_tab_ty is table of det_cur%type index by pls_integer;
    lv_det_rec det_tab_ty;
    BEGIN
         lv_tab_ty := fn_get_val(p_emp_id);
         dbms_output.put_line('lv_tab_ty.count is : '||lv_tab_ty.count);
         OPEN DET_CUR;
         LOOP
         FETCH DET_CUR BULK COLLECT INTO lv_det_rec;
         EXIT WHEN DET_CUR%NOTFOUND;
         END LOOP;
         CLOSE DET_CUR;
         IF lv_det_rec.COUNT > 0 THEN
         FOR i IN lv_det_rec.FIRST .. lv_det_rec.LAST
         LOOP
         INSERT INTO other_tab (emp_id_c,name_c,Loc_c,status_c,reason_c) values(lv_det_rec(i).emp_id_c,lv_det_rec(i).NAME_C,lv_det_rec(i).LOCATION,lv_tab_ty(1),lv_tab_ty(2) );
         END LOOP;
         END IF;
    COMMIT;
    EXCEPTIONS
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('Error in procedure my_proc # '||SQLERRM||' - '||dbms_utility.format_error_backtrace);
    END my_proc ;
    After exucting the above procedure i am getting the following error.
    lv_tab_ty.count is : 1
    Error # ORA-06533: Subscript beyond count.
    This error is occured when my_curr.rowcount is equal to 0 (cursor defined in the function fn_get_val() ).
    The function fn_get_val() does return null to the pl/sql table variable (lv_tab_ty).
    AND another schenario:
    If
    lv_tab_data.count = 1
    Then how can i handle this situation in the above procedure,because i need both
    lv_tab_data(1)
    and lv_tab_data(2)
    to insert to the OTHER_TABLE in the procedure.
    Please help me to solve this issue.
    Thanks in Advance!!!
    PKM

    You can do it with one query with Tom Kyte's stragg function:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:3431223221768118::::P11_QUESTION_ID:15637744429336
    with test_table(id_col,stat_col,reason_col) as (
    select 101,'A','PQ' from dual union all
    select 101,'A',NULL from dual union all
    select 101,NULL,'EDU' from dual union all
    select 101,'P',NULL from dual union all
    select 102,'P',NULL from dual union all
    select 102,NULL,'HEN' from dual union all
    select 103,'R',NULL from dual union all
    select 103,'Q',NULL from dual
    select id_col,replace(stragg(stat_col),',','|'),replace(stragg(reason_col),',','|')
    from test_table tt
    group by id_colRegards,
    Sayan M.

  • Plz help me out with class loader problem

    hai forum members,
    I have a code which loads class files from local disk.
    It works fine with some classes ,
    But i get this exception when i am selecting certain other class files
    I am using jdeveloper.
    Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Filter (wrong name: project1/Filter)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at com.jutframe.JavaUnitTester.selectClass_actionPerformed(JavaUnitTester.java:449)
         at com.jutframe.JavaUnitTester$7.actionPerformed(JavaUnitTester.java:338)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1766)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
         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)
                        JFileChooser jfilechooser=new JFileChooser();
                        Filterclass filter=new Filterclass();
                        //Set selection mode for file chooser
                        jfilechooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
                        //set file filter
                        jfilechooser.setFileFilter(filter);
                        int returnVal = jfilechooser.showOpenDialog(this);
                        if(returnVal == JFileChooser.APPROVE_OPTION)
                            try
                                    String str = jfilechooser.getSelectedFile().getName();
                                    String parent=jfilechooser.getSelectedFile().getParent();
                                     // Create a File object on the root of the directory containing the class file
                                     File file = new File(parent);
                                     // Convert File to a URL
                                     URL url = file.toURL();         
                                     URL[] urls = new URL[]{url};
                                     // Create a new class loader with the directory
                                     ClassLoader cl = new URLClassLoader(urls);
                                     StringTokenizer st = new StringTokenizer(str,".");
                                     String s = st.nextToken ();
                                     Class c = cl.loadClass(s);  //ERROR IS SHOWN IN THIS PARTICULAR LINE
                                     Object instance=c.newInstance();
    --------------------------------------------please help me trace my mistake.
    thank you all.

    i think the problem that i have set a particular class path for my class files and my application loads files from that alone.
    So plz tell me if theres any way to access the class path of a particular file dynamically?
    regards

  • Help needed imediately with photos in swf project!

    Firts of all thanks in advance.
    Ive made a website with flash. I have 6 photos as thumbnails that are buttons. I want to know , when a thumbnail is clicked how to activate lightbox/flashbox to bring up the bigger image via light/flashbox. What function to I need to apply in the actionscript window to the thumbnail that is converted to a symbol as a button
    I am using Flash CS5 and actionscript 3.
    Please any help would be greatful. Ive been seearching and trying for 3 whole days with no luck

    Give a event listener to the btns,
    btn.addEventListener(MouseEvent.CLICK, openbigimage);
    function openbigimage(e:MouseEvent):void
    //write your code for opening big image here
    //Look this for reference
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/EventDispa tcher.html#addEventListener%28%29
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/events/MouseEvent.html

  • Help needed working with layers and exporting from acrobat3d

    hi, i am repostng this message becaus eihad no success last time, and I am working under a tight deadline for a school project. any help will be tremendously appreciated
    I received an Acrobat 3d file with a model that was originally created in CATIA v4 embedded in it.
    I need to export the model for use in rhino. Currently the model size is enormous as an IGES that Windows runs out of memory when attempting to open. This is a bit wasteful since I do not need all of the model, I just need a layer of it. I noticed that when exporting to IGES you have the option to export hidden or not, and I have hidden the layers i do not need (via Isolation) and still I get the whole file.
    Is there a way I can do this? export the file With the layers under the model tree? or is there a way I can delete a layer? or how can I make the hidden object feature work when Exporting IGES as not to get the things I dont need?
    I read that you can open the model in Toolkit to edit it but it wont let me, open it... no "edit 3d in toolkit" option and when i open the pdf in toolkit it says unknown file....
    is there a way i can open the embedded model in CATIA again?
    thanks for the help

    Please email me your contact information at [email protected] and I might be able to help you.
    Thanks.

Maybe you are looking for