Garbage Collector Problems

Problem: The garbage collector on my server runs aprox every 1 min for
about 8 secs swamping the CPUs.
I started a not so big version of my "big server" using the following:
JDK 1.4
Windows NT 4.0
Compaq Proliant with 4 CPUs @ 800Mhz
4GB SDRAM
I am starting with the following parametrs:
-mx1536m -verbose:gc -XX:-DisableExplicitGC -Xrs
On start up, my server creates a lot of objects that will live forever. Over
time any time period only a few objects (in comparison) are created that
will die young. I assume that I want a large older generation and a smaller
young generation. I need enoug room in my older generation for my older
objects plus room for the minor collections since they use copy collection.
The verbose gc trace shows the collector running ~every min. Here is a snip
of the log:
17:35:57 | [Full GC 245559K->245496K(441840K), 8.2943686 secs]
17:36:35 | [Full GC 245577K->245507K(441840K), 8.2816641 secs]
17:37:13 | [Full GC 245588K->245526K(441840K), 8.3754267 secs]
17:37:52 | [Full GC 245617K->245554K(441840K), 8.2831863 secs]
17:38:30 | [Full GC 245635K->245573K(441840K), 8.2977681 secs]
I let the server run and there were hundres of these with never a minor gc.
My analysis (Are my assumtions correct?)
1. I do not see minor collections happening so I assume these full
collections are not caused by collection of the young generations.
2. Since during my test run I know that no one is hitting my server, there
should not be and are not and significant memory changes that would require
a minor collection (which is why I don't see them).
3. I am using Visobroker which, like RMI, may be making explicit gc calls.
To prevent this I tried calling -XX:+DisableExplicitGC yet the GC seems to
wants to run every minuite.
Is -XX:+DisableExplicitGC supported on JDK1.4 Win32?
Could something else be causing these Full GCs?
-Chris

I have one other suggestion, but it is a long shot. The total size of your heap is around 440M and the total in use is very close to 60% of that value.
Since the JVM by default tries will consider increasing the heap size (up to -Xmx) when the free space falls below 40% AFTER GC, perhaps it is GC-ing periodically because of that. This sounds stupid since it should adjust heap size because of GC, but it is worth a try.
You might consider this...
java -Xms440m -Xmx1536m -Xminf0.1 -Xmaxf0.9 ...
This will mean that the heap will only expand when you have less than 10% free and will contract only when you have more than 90% free, but only to value of -Xms.
You also might consider -Xincgc as well, which should eliminate the 8-second pauses in favor of a more distributed gc load. Since you are alrready getting hit by >10% GC overhead, this may give you overall greater throughput as well, but I wouldn't bet on it.
Are you using the -server JVM? If not, I'd switch to that as well.
Chuck

Similar Messages

  • JNI - Garbage Collector Problem ?

    Hi,
    I've got a JNI methode, which ceate and lauch a Process in c++ (a process to make VoIP).
    - this methode is returning an int=the pointer to the instance (which implement this process) so that othet JNI methode can have access to the main instance.
    Under windows, everything works fine, but
    Using linux:
    I add a memory wathcher on my program to see the memory used by the application / memory available for the JVM.
    The memory used by the application is growing (this is normal at this point), but when the GC is callled (by the system) the Java application is frozen (no error message), and I have to kill it. On the oter side, the Dll is running normally !
    My theory is that under Linux, the GC is "feeing" the memory used by the c++ process , then java is trying to write on it, but have no access, or somehing like that.
    Is there any option to be check this theory: as Java is retunring no error, but just freezing, it is not very clear to understand.
    I tried, using JNI, but removing the Process in it, just calling a basic operation, and there is no bug.
    Is there a special procedure to do on LINUX, for managing the Garbage Collector with JNI ?
    Here is a piece of code :
    /***********Java Side******************/
    //The JNI def:
    public class JNIWrapper {
         public JNIWrapper() {
         // create the h323 Process
    public native int create();
    ///The class managing the JNI methodes and containing the pointer to the dll main class
    public class CallControlH323 implements CallControl {
         int h323StackPtr; //Pointer to the h323stack, needed in the c++ side
         JNIWrapper myJNIWrapper;
         String options; //option for the CallControl configuration
         public CallControlH323(){
              myJNIWrapper = new JNIWrapper();
         public void configure(String options, String codecs) {
              h323StackPtr = myJNIWrapper.create();
    /*************************C++ side*****************/
    //JNI functions (file JNITerminal.cxx)
    #include "JNITerminal.h"
    #include <stdio.h>
    // Java Global Variables
    jobject jobj;
    JavaVM *jvm;
    /** Create the MainInterface **/
    JNIEXPORT jint JNICALL Java_ca_sess_voicesess_terminal_JNIWrapper_create
         (JNIEnv *env, jobject obj)
         // Make object a Global Reference
         jobj = env->NewGlobalRef(obj);
         // Get Java VM
         env->GetJavaVM(&jvm);
         //create and start the main Process
         MainInterface * mainInterface;
         mainInterface = new MainInterface();
         return ( ( jint ) mainInterface );
    MainInterface inherite from PProcess (from Pwlib), it is the top process of the dll application
    MainInterface::MainInterface():PProcess("", "", MAJOR_VERSION, MINOR_VERSION, BUILD_TYPE, BUILD_NUMBER)
    #ifdef MSCVER
    #pragma warning(disable:4355)
    #endif
    #ifdef MSCVER
    #pragma warning(default:4355)
    #endif
         ShowOutputs("H323Lib: Create Main Interface");
    void MainInterface::Main () {}
    MainInterface::~MainInterface()
    /////////////////////////////////////////////////////////////////////////7
    If you have any suggestion, comment, help, don hesitate !!
    Thanks for your help
    Bart

    I also added the option -verbosegc to the java command.
    I noticed that the bug arrived after a Full gc:
    [Full GC 23301K->12351K(24844K), 0.3737040 secs]

  • JDK 1.2.2 garbage collector problem?

    Hi all,
    I am having a problem trying to run a program written in java that only executes oracle stored procedures.
    My Platform is:
    Client - IBM NATURAL
    Middleware - EntireX 5.3.1
    OS - UNIX AIX 4.3
    Server - My java program
    DataBase - Oracle 8.1.7
    JDBC - classes12.zip
    The problem is: When I try to make a load test (100 calls) I get a garbage collection error on the VM: memory allocation failure (AF). But my Oracle continue running the procedure. It takes almost 3 minutes for the VM to manage the error and continue with the bd processing. My time-out is 60s, so there is the problem.
    I am trying to update the VM to 1.3 but I've been reading the Oracle documentation and it says that classes12.zip or the JDBC driver is not compliant with JDK1.3. Is it that true? Does anybody had this problem? Can I update my VM to 1.3?
    Here is a short description of the error:
    -- The VM
    <AF[3]: Allocation Failure. need 32784 bytes, 44957 ms since last AF>
    <AF[3]: managing allocation failure, action=2 (550712/226877432)>
    <GC(3): freed 6802328 bytes in 796299 ms, 3% free (7353040/226877432)>
    <GC(3): mark: 128 ms, sweep: 68 ms, compact: 796103 ms>
    <GC(3): refs: soft 0 (age >= 4), weak 0, final 0, phantom 0>
    <GC(3): moved 61505 objects, 219171312 bytes, reason=1>
    <AF[3]: managing allocation failure, action=3 (7353040/226877432)>
    <GC(3): need to expand mark bits for 313610232-byte heap>
    <GC(3): expanded mark bits by 1355776 to 4902912 bytes>
    <GC(3): need to expand alloc bits for 313610232-byte heap>
    <GC(3): expanded alloc bits by 1355776 to 4902912 bytes>
    <GC(3): expanded heap by 86732800 to 313610232 bytes, 30% free>
    <AF[3]: completed in 797184 ms>
    thanks in advance,
    Marcelo Lopes
    Rio de Janeiro - Brazil

    j2sdk 1.4.0 and jdk 1.3 are working fine. But when I install jdk 1.2.2, it simply returns to Dos prompt without displaying any error message,usage or without executing the command.
    For eg.
    c:\>javac (Press Enter)
    c:\>

  • Garbage collector problem

    Hi,
    I�m geting weird behaviour using java sdk 1.4.1_01. When I�m executing my java application the java virtual machine always closes my application saying that it could not allocate memory after a garbage collection...I have a Pentium III 800 Mhz with 512MB DIMM of Ram running Windows XP, I coundn�t figure out what is going on, Could any one explain this to me??
    Thanks a lot,
    Roger Silva.

    You are running out of memory. Probably because you have a memory leak. But if not then you can use the command line options to increase the java heap which allows for more space. Without using the option the limit is 64m (on the newer Sun JVMs.) The limit has nothing to do with how much physical memory you have on the system.

  • Problem with garbage collector -

    I'm experiencing a problem with the Java Garbage Collector.
    It simply doesn't work when I try to free the memory that is used
    by an object in my program...
    I explicitly declared this object as null, and called System.gc, but it seems it isn't working.
    What might be the reason?
    This object uses a lot of memory. Therefore, I MUST destroy it after it's no longer
    needed.

    Ok. I'll try to be more specific...
    My "situation" seems something like that
    class Program {
    Xclass class1;
    void method1() {
    class1 = new Xclass();
    } (End of class Program)
    class Xclass {
    Yclass class2;
    Public Xclass( ) {
    class2 = new Yclass();
    add(class2);
    } (end of class Xclass)
    class Yclass {
    Public Yclass(Container parent) {
    (no explicit reference to Xclass or Program classes or any variable or instantiations of said classes);
    } (end of class Yclass)
    Well, I know that the gc is not being done because the first time I call method1 everything goes fine. But When I try it again an OutOfMemoryError happens...
    I tried to do the following (I know, it's not elegant, but I just wanted to get some results):
    void method1() {
    class1 = null;
    System.gc();
    class1 = new Xclass();
    Again it worked in the first time. But later...

  • Possible Bug in Garbage Collector?

    Hello all
    I'm new to these forums but I searched for this problem and couldn't find exactly the same thing - apologies if I missed something.
    I've written an image browser which displays thumbnails, and when you click on a thumbnail it loads the image in a new window. This new window is just a JFrame, with a single JLabel, with an ImageIcon in it, representing the picture. The path name of the picture is passed when this JFrame is created, and the picture is loaded within the JFrame. Therefore, when I close the JFrame, I expect the memory associated with the image to disappear.
    This works. However, when I open a fairly large image (around 1500x1500 pixels), and then close the window, the garbage collector doesn't free the memory. After this, if i continue to open windows with smaller images, they too have the same problem. However, this doesn't happen with smaller images until I open a larger image.
    I think this is a problem with the garbage collector, is this familiar to anyone? Can anyone help? Unfortunately I can't really paste code since this is a university assignment. But you can try it - just load a jframe with a large picture, close it, and as long as the program runs the memory will not be deallocated.
    Any help would be massively appreciated.
    Thanks

    Since you're not willing to post your code it's very hard to comment.
    One question: Are you calling System.gc() after closing these frames? In fact you should probably call it 3 times to make sure the garbage collector takes you seriously. Try this and let us know if you're still showing the leak

  • How to get the garbage collector to work?

    Hi,
    i have i program where i load an image scale it down and save the scaled version in an array. I do this for a whole directory of images.
    After every image i set the temporary variable for the loaded image = null and call the function System.gc().
    My problem is, that the garbage collector does�nt give the memory of the loaded image free and the used memory of my program grows with every loaded image.
    /* Reads all images from a folder an stores them in an Array of images */
         public static BufferedImage[] readScaledImagesFromFolder(String folder,
                   int maxSize) {
              File dir = new File(folder);     /* Open the Folder */
              String[] children = dir.list();          /* Get the children of the folder */
              if (children == null) {
                 // Either dir does not exist or is not a directory
                  System.out.println("No images in the folder!");
                  return null;
             } else {
                  /* Init array for images */
                  BufferedImage[] images = new BufferedImage[children.length];     
                  int i = 0;
                  int index = 0;
                  BufferedImage temp;
                  String filename, fileending;
                 for (i=0; i<children.length; i++) {
                      // Get filename of file or directory
                     filename = children;
         /* Get the fileending of the file */
         fileending = filename.toLowerCase().substring(filename.length()-4);
         if(fileending.equals(".jpg") || fileending.equals(".bmp")
                   || fileending.equals(".png") || fileending.equals(".gif"))
              /* Read the image */
              temp = util.ImageUtils.loadBufferedImage(folder+"/"+filename);
              /* Scale the image down and save it in an array */
              images[index] = Util.getScaledImage(temp,maxSize);
              index++;          
         temp = null;
         System.gc();
         Mosaic.sourceImageNum = index;
         System.out.println((index+1)+" resized pictures loaded from folder: "+folder);
         return images;     
    How can i get the gargabe collector to work after every iteration?
    I tried to let the Thread.sleep(10) after System.gc() but it does�nt help.
    Thank you every much
    JackNeil

    Hm yes.. i now that System.gc() is only a
    suggestion.
    But i know what my program is doing and that it
    does�nt need the temporary image anymore after i have
    a scaled down version. And the temporay image will become unreachable as soon as reading the next one overwrites your temp variable. Setting the variable to null doesn't have much effect.
    It would be smarter to load the new image over the
    old temporary image and not to expand the heapsize to
    maximum.Then look at the possibitly of loading the next image into the same bufferedimage.

  • Garbage collector don't works.

    Hello people !
    When I restart the weblogic server this do not shows the lastest change that I made. I think the problem is related to the garbage collector and its bean tree.
    Do you known how to solve this?
    Thank you.
    Regards.

    I'm working with WebLogic Server 10.0 and the problem is if I restart the server this don't holds the lastest change that I made, it happens with any type of change (deploy, undeploy, create or delete servers/services, etc).
    I've reviewed the log file and I've found the following error:
    <Jun 2, 2008 6:45:14 PM CDT> <Warning> <Management> <BEA-141269> <The temporary bean tree updateDeploymentContext(Mon Jun 02 10:46:11 CDT 2008) was allocated for an undo, get, or activate operation, but has not been garbage collected.>
    Stopping PointBase server...
    PointBase server stopped.
    Thank you for your attention

  • I have a memory leak, objective-c 2.0, and garbage collector...

    the code i am using is a modification of the code/problem found in "Cocoa with Objective-C", chapter 3.
    i have tried to use the objective-c 2.0 garbage collector methodology, using @property, @synthesize, etc. when i run the code as listed below i get a leaking message.
    [Session started at 2008-02-01 23:33:37 -0500.]
    2008-02-01 23:33:38.070 SongsFoundationTool[28876:10b] * _NSAutoreleaseNoPool(): Object 0x2040 of class NSCFString autoreleased with no pool in place - just leaking
    Stack: (0x96b10178 0x96a3e0f8)
    2008-02-01 23:33:38.075 SongsFoundationTool[28876:10b] Song 1: We Have Exposive
    2008-02-01 23:33:38.076 SongsFoundationTool[28876:10b] * _NSAutoreleaseNoPool(): Object 0x2060 of class NSCFString autoreleased with no pool in place - just leaking
    Stack: (0x96b10178 0x96a3e0f8)
    2008-02-01 23:33:38.078 SongsFoundationTool[28876:10b] Song 2: Loops of Fury
    The Debugger has exited with status 0.
    when i include the commented out section, in the implementation file section, the description method, and use song1 and song2, in main, instead of song1.name and song2.name the program seems to run fine.
    The Debugger has exited with status 0.
    [Session started at 2008-02-01 23:38:24 -0500.]
    2008-02-01 23:38:24.375 SongsFoundationTool[28936:10b] Song 1: We Have Exposive
    2008-02-01 23:38:24.379 SongsFoundationTool[28936:10b] Song 2: Loops of Fury
    The Debugger has exited with status 0.
    please help me understand what's happening here.
    also, why was it necessary to use
    @property(copy, readwrite) NSString *name;
    @property(copy, readwrite) NSString *artist;
    instead of
    @property(readwrite) NSString *name;
    @property(readwrite) NSString *artist;
    thanks everyone, the code is below.
    // ....................... header file ...............
    #import <Cocoa/Cocoa.h>
    @interface Song : NSObject {
    NSString *name;
    NSString *artist;
    @property(copy, readwrite) NSString *name;
    @property(copy, readwrite) NSString *artist;
    @end
    //.................... the implementation file ..................
    #import "Song.h"
    @implementation Song
    @synthesize name;
    @synthesize artist;
    -(NSString *) description
    return [ self name ];
    @end
    //................................ main............................
    #import <Foundation/Foundation.h>
    #import "Song.h"
    int main (int argc, const char * argv[]) {
    Song *song1 = [ [ Song alloc ] init ];
    song1.name= @"We Have Exposive" ;
    [ song1 setArtist: @"The Future Sound Of Londown" ];
    Song *song2 = [ [ Song alloc ] init ];
    [ song2 setName: @"Loops of Fury" ];
    [ song2 setArtist: @"The Chemical Brothers" ];
    // Display Object
    NSLog( @"Song 1: %@", song1.name );
    NSLog( @"Song 2: %@", song2.name );
    // include statements below if -description method is uncommented
    // then comment out the two statements above. no memory leak if the code
    // is used from the statements below and - description is not commented out and
    // the two NSLog statements above are commented out.
    NSLog( @"Song 1: %@", song1 );
    NSLog( @"Song 2: %@", song2 );
    return 0;
    }

    Normally, your main only has a call to NSApplicationMain(). If you aren't doing a traditional MacOS X application, you will still want at least NSApplicationLoad() to get enough of the runtime to avoid those messages.
    I don't know for sure about the syntax of Objective-C 2.0. That stuff is all new. What error message are you getting that indicated that (copy, readwrite) is required? Could you provide a link to the actual example source? I did a quick check and assign and readwrite are the defaults. It is possible that readwrite by itself makes no sense. But I'm just guessing.

  • Is it possible to run garbage collector in publisher instance with out opening a tunnel?

    Hi,
    In General we are running garbage collector in publisher by opening a tunnel.
    is there any alternate way to do that.
    we installed adobe cq5 on solaris10.
    thanks,
    vidhyadhar

    Check out - http://dev.day.com/docs/en/crx/current/administering/persistence_managers.html#Automating Garbage Collection
    Example of curl command that will start up garbage collection. You can create a sheel script with the curl command and set it up to run as cron job on the publish server which should solve your problem.

  • Stateless ejb staying live after a garbage collector

    Hi,
    I use an aplication based in struts, in the actions i call session that call cmps, both ejb are stateless.
    Every thing works fine until i make some stress test, when i find that the server (Websphere) stay out of memory. After this i found that my sessions and cmps are staying live after the garbage collector run and i don't know why because the thread already finish and the ejb are stateless.
    Anyone already have this problem, how can i clear the memory of this objects?
    Thanks in advanced
    Ricardo

    Adjust the size of your EJB pool. Just because your application is no longer using the objects doesn't mean that the container won't hang on to them for re-use (object creation is an "expensive" operation).

  • Inefficient garbage collector process - WLS 8.1 SP6 - JVM jdk142_13 (SUN)

    Hi all,
    I am trying to perform some tuning operations in my server (maestroServer_01) because the application uses the total amount of heap size and the garbage collector process is not running fine. The arguments used on this VM are:
    -server -Xms2048m -Xmx2048m -Xss512k -XX:PermSize=384m -XX:MaxPermSize=384m -XX:+UseParallelGC -XX:ParallelGCThreads=4 -XX:+UseAdaptiveSizePolicy -XX:NewRatio=8 -XX:SurvivorRatio=12 -Xverify:none -Xnoclassgc -XX:+DisableExplicitGC -XX:+PrintGCDetails -Dweblogic.webservice.i18n.charset=utf-8 -Duser.timezone=$JAVA_TZ -DejbURL='t3://localhost:9081' -DjpdURL='http://localhost:9081'
    Please let me know if I can change these parameters in the WLS:
    Services -> Bridge -> Messaging Bridge Thread Pool Size -> from 5 to 20
    Configuration -> Tuning -> Socket Readers -> from 33 to 60, and disable "Enable Native IO" option.
    I got some informations from internet about some parameters that can be used to improve the memory utilization of this JVM. The parameters are described in the link below:
    http://java.sun.com/performance/reference/whitepapers/tuning.html
    Does anyone know what can be done? The WLS needs to be restarted every day!
    Thanks!

    yes regularely .. :-) (as you can see from the posts..)
    to your problem, the connectstring seems perfectly valid for a oracle light db installation (which we install within the bpel installation)
    can you check if this polite process is running?
    HTH clemens

  • Logging Garbage collector for an OC4J with 2JVM

    Hi, I have one OC4J with two JVM setted.
    If I put -verbose:gc it logs in the std Output file.
    I trying to log the garbage collector in two different file each one for one JVM.
    Anyone as an idea?

    Don't create massive amounts garbage memory. It's that simple. You should try to limit the creation of memory inside your animation loop. If there is a process inside the loop that creates memory, there is definitely some way to create that item staticly, rather than allocating new memory with each iteration. There shouldn't be any kind of problem that would involve the creation of THIS much memory, and it's deallocation. If you read about how the garbage collector is implemented, you'll notice that it stores all of it's memory on a single conveyor belt. This is for ALL memory in the program. Therefor once the garbage collector has gone through and marked all of the memory that needs to be reclaimed, it performs it's sweep and must feeze the entire program because that conveyor belt can not be manipulated while it's re-arranging the memory. The garbage collector will eliminate MOST memory leaks, but it does not eliminate any thought on the part of the programmer about memory.
    -Jason Thomas.

  • Automatic Garbage collector after JVM almost hit max value on weblogic ?

    Hi All,
    I have application on weblogic 10MP2. I use 4G JVM. My application getting slow when the usage of JVM hit arround 70-80% of max heap size. Unfortunatelly, the garbage collector didn't run when it hit that high. So to keep my application in good state, I need to MANUALLY hit the Perform GC to keep the JVM below 70%.
    Is there any settings to tell the JVM to perform GC when the free space of the JVM hit 30%?
    What will the weblogic do if one of the server in warning state? There is a settings in the weblogic to specify when it hit some percentage of free space, it will bring the server to warning state. Will it do the Garbage Collector?
    Need your help on this. I am tired of hitting the Perform GC button.
    Really appeciate your help.
    Thanks,
    Eric

    I am replying to my own post because I found a tool that
    helped me solve in two hours what I had been stumped on
    for the past few days.
    The Heap Analysis Tool.
    I had a major memory leak problem. I couldn't locate
    the source until I downloaded and used this tool(for free).
    This tool keeps track of memory used by objects,
    each objects references, objects references by each
    object, and all objects instances. All of this information
    can be obtained in html format for efficient traversing
    of object chains. I would highly recommend looking
    this tool over if you intend on doing memory intensive
    programming.
    In case your curious where my error was I had two problems
    which are now fixed. One. I had a couple of BufferedImages
    that were leaking 30MB RAM. Two. I didn't know that using
    ObjectStream's to read/write objects stored references
    to the objects being written(preventing garbage collection).
    Deffinately worth running the Heap Analysis Tool before
    pointing a finger at System.gc().

  • Understanding garbage collector output

    Hi all.
    My application uses an increasing amount of memory, and in order to solve the problem I have turned on the -verbosegc option. The output is as follows:
    <GC: managing allocation failure: need 1040 bytes, type=1, action=1>
    <GC: 504 milliseconds since last GC>
    <GC: freed 6530 objects, 288432 bytes in 10 ms, 35% free (661616/1887424)>
      <GC: init&scan: 1 ms, scan handles: 7 ms, sweep: 2 ms, compact: 0 ms>
      <GC: 4 register-marked objects, 7 stack-marked objects>
      <GC: 8 register-marked handles, 136 stack-marked handles>
      <GC: refs: soft 0 (age >= 32), weak 0, final 1, phantom 0>
    <GC: managing allocation failure: need 1040 bytes, type=1, action=2>
    <GC: 10 milliseconds since last GC>
    <GC: expanded object space by 1048576 to 2936000 bytes, 58% free>
    <GC: need to expand mark bits to cover 2560 bytes>Is any one able to explain this output for me? My problem is that the object space is expanded regularly and eventually the garbage collector writes "totally out of heap space" and an OutOfMemoryError occurs.
    My -version is
    java version "1.3.0"
    Java(TM) 2 Runtime Environment, Standard Edition
    Classic VM (build 1.3.0-1, native threads, jit)running on UNIX, Digital Alpha.
    Regards,
    Torben Lange

    Just a follow up on my memory leak problem which I have solved now.
    I had created a class which handles database connections. The constructor looked something like this:
    Connection connection;
    public DBConnection() {
      DriverManager.registerdriver(new myDriver());
      connection = DriverManager.getConnection(...);
    }My application creates an object of this class, uses it and then closes the object. This goes on all the time. (Yes, it could be handled another way by pooling database access or simply keep the connection open without closing it - but it isn't.)
    It seems that the registration of the driver in the constructor eventually will fill the memory - apparently the same driver is registered several times.
    Problem was solved when changing the code into the following:Connection connection;
    static boolean isRegistered = false;
    public DBConnection() {
      if (! isRegistered) {
        DriverManager.registerdriver(new myDriver());
        isRegistered = true;
      connection = DriverManager.getConnection(...);
    }Hope this could help others in the same situation.
    Regards,
    Torben Poort Lange

Maybe you are looking for

  • I have downloaded Elements 13 but it is the 32 bit version. How do I get the 64 bit version

    When downloading Elements 13, how do I get the option to choose between the 32 and 64 bit versions? I am automatically getting the 32 bit version which is no good for my operating system.

  • Premium email account payment

    Prior to taking out BT Total broadband I purchased a BT premium email account and pay this by monthly direct debit. I now have had total broadband for about 5 years was was never informed that the Premium email account was free with total broadband a

  • E72 Deleted all messages and now backup wont resto...

    Hello there - I am in such a mood and want my problem resolved so much that I will pay anyone that helps Basically on E72, I had messages in inbox, my folders and sent section. Once I restarted phone and then phone froze. I felt the problem was due t

  • Can't see Computers/Servers in Finder on local ip network

    I'm trying to share some files between by Powerbook and iMac. Both are running Tiger. Both are configured with IP on the same subnet and can ping each other Both are using wifi as their network interface Both can get to the internet, iMac, iDisk fine

  • Pcd object "com.sap.pct.crm.core.valuehelp" cannot be accessed

    Hi dear gurus, We need your help. We are a company working with CRM 5.0 Sp 15 on EP 7.0. We have this problem: One of the BP's tabs shows the Marketing Attributes in the standard way: first of all you have to decide the attribute set ("Add"), then yo