You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sagi nachum <sa...@gmail.com> on 2007/05/12 10:27:28 UTC

Problems creating Java VM using JNI_CreateJavaVM

Hi,
I tried to change to prunsrv.c code so that after it fails creating a JVM
due to heap problem it will try again using a lower -Xmx parameter.
I have a problem doing it since after the first JVM creation failure, it
fails in all subsequent calls, specifically:

I tried to create it with -Xmx1700m and failed on a heap size problem (As
expected), right after that failure I change the -Xmx parameter to -Xmx800
(Which is expected to succeed) and try to create it again - And here I get a
failure again (Just a failure, no indication on heap size problem).
(Needless to say, when I try to create it with -Xmx800m from the first place
it succeeds).

The code change I did is at javajni.c at apxJavaInitialize (I know it looks
a bit hard-coded, its just for demo simplicity...):

if (DYNLOAD_FPTR(JNI_CreateJavaVM)(&(lpJava->lpJvm),
                                           (void **)&(lpJava->lpEnv),
                                           &vmArgs) != JNI_OK)

{
            apxLogWrite(APXLOG_MARK_ERROR "CreateJavaVM Failed");

            wsprintfA(iB[1], "-Xmx800m");
            lpJvmOptions[XMX_OPTION].optionString = iB[1];

            vmArgs.options  = lpJvmOptions;

            if (DYNLOAD_FPTR(JNI_CreateJavaVM)(&(lpJava->lpJvm),
                                                                       (void
**)&(lpJava->lpEnv),

&vmArgs) != JNI_OK)

            {

                       apxLogWrite(APXLOG_MARK_ERROR "CreateJavaVM Failed
Again!!!");

            }

            rv = FALSE;
}

As I said before, the first call is with -Xmx1700 (This is the default
conifguration of the service) and it fails on heap size allocation, but the
second call is with -Xmx800, and it should succeed. The second call also
fails (Not on heap size problem, it simply fails...)
I don't know what the problem is, I suspect it has something to do with
cleanups after the first failure, but I could not get it to work.

Any one have a solution?

Re: [cli] Commons CLI

Posted by Henri Yandell <fl...@gmail.com>.
I'm very happy to review and commit patches Brian - but I need someone
to be doing the majority of the activity. The issue tracker for
Commons moved, which is why you're finding that it's closed.

http://issues.apache.org/jira/browse/CLI

I've gone as far as to keep things generally in the right versions release wise.

I also know there are others who would like to help with a release,
but we're looking for someone to step up and drive the activity. So
this is a great email to see :)

Hen

On 5/12/07, Brian A. Egge <br...@yahoo.com> wrote:
> Hello,
>
> I've been using the Commons CLI library for various projects for several years now. The CLI library is nearly inactive, and I would to see that changed.  The current version of CLI, 1.0, was released over two years ago.  Since then, some work was done on a new 2.0 release, but that was never finished.  The bug tracker is full of bugs relating to the 1.0 release, but there is no way to open new issues.  Checking out the 1.0 branch, it apparently was branched some time after the 1.0 binary was created.
>
> Commons CLI is useful to many Java projects, and I think it's only going to become more visible once Commons is made a TLP.
>
> What I'd like to do:
>  1) Bug fix the 1.0 branch, and close some of the existing bug reports.
>  2) Get a 2.0 release, and re-open the/a bug tracking system.
>
> The 1.0 branch has enough features for most projects, and it's the release that nearly everyone uses, so I think it's worthwhile putting some maintenance effort into it.
>
> Since the bug tracker is closed for new bugs, and I can't find any active committers for this library, I haven't been able to contribute patches.
>
> Is there someone who has the time to help revive this project?  I'm happy to do as much as a non-committer can do, but I need someone to help by reviewing and integrating patches updating the bug tracker, etc..
>
> Cheers,
>
> Brian
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[cli] Commons CLI

Posted by "Brian A. Egge" <br...@yahoo.com>.
Hello, 

I've been using the Commons CLI library for various projects for several years now. The CLI library is nearly inactive, and I would to see that changed.  The current version of CLI, 1.0, was released over two years ago.  Since then, some work was done on a new 2.0 release, but that was never finished.  The bug tracker is full of bugs relating to the 1.0 release, but there is no way to open new issues.  Checking out the 1.0 branch, it apparently was branched some time after the 1.0 binary was created.

Commons CLI is useful to many Java projects, and I think it's only going to become more visible once Commons is made a TLP.

What I'd like to do:
 1) Bug fix the 1.0 branch, and close some of the existing bug reports.
 2) Get a 2.0 release, and re-open the/a bug tracking system.

The 1.0 branch has enough features for most projects, and it's the release that nearly everyone uses, so I think it's worthwhile putting some maintenance effort into it.  

Since the bug tracker is closed for new bugs, and I can't find any active committers for this library, I haven't been able to contribute patches.

Is there someone who has the time to help revive this project?  I'm happy to do as much as a non-committer can do, but I need someone to help by reviewing and integrating patches updating the bug tracker, etc..

Cheers,

Brian