users@glassfish.java.net

Re: Native path insanity in Glassfish v3

From: Alexis Moussine-Pouchkine <alexis.mp_at_sun.com>
Date: Mon, 24 May 2010 22:24:05 +0200

thanks Jeff for posting the solution to your problem.
Dealing with native paths can sometimes be a real pain.
-Alexis

On 24 mai 2010, at 20:19, JeffGetzin wrote:

>
>
>
> JeffGetzin wrote:
>>
>> I'm hoping you guys can help me. I've been struggling for a while with
>> this issue without luck. I've been getting a problem with Tibco RV not
>> finding its native library. I have tried setting the native library path
>> in the administration console. I have tried making sure there are no
>> conflicting DLLs. I've tried defining various locations with the -D
>> option.
>>
>> So here's what I found. I decompiled the RV library, and used that to step
>> into the Java classloader code. There I found two variables being used to
>> look for native libraries: sys_paths and usr_paths. Usr_paths *appears* to
>> be loaded from the environment variable "java.library.path" and sys_paths
>> *appears* to be loaded from the environment variable
>> "sun.boot.library.path".
>>
>> Looking at, say, usr_paths, I find the following entries: "C:\Program
>> Files\Genuitec\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\bin",
>> "C:\glassfishv3\glassfish\bin", and "C:\glassfishv3\glassfish\lib". I've
>> found that if I manually place the DLL in the the last one
>> (C:\glassfishv3\glassfish\lib), then Tibco finds the library and all is
>> well.
>>
>> But this is not an acceptable workaround in our production environment. I
>> need to configure glassfish or our web project so that the solution will
>> find the native library without having to manually place a Tibco dll in a
>> Glassfish binary directory. That may work for now, but it's a potential
>> support nightmare.
>>
>> So my question is, where is getting those path entries. Going to the root
>> of the glassfish directory and doing a search for "Genuitec" returns no
>> matches. Where is that value set? Is there some setting I can set in the
>> Glassfish admin console or in our web.xml or something so that the
>> Classloader will know to look for the dll in the correct location(s)?
>>
>> In short, HELPPPPPPPPPP!
>>
>> Thanks,
>> Jeff
>>
>>
>
> Please disregard my last message. I had spent literally days trying to
> resolve this issue and of course, no sooner do I ask you guys for help than
> I find the solution.
>
> In case any of you find yourself in the same (stupid) boat I was in, here's
> what the issue was.
>
> I was running my Glassfish project from Eclipse. I foolishly thought that
> Eclipse would run Glassfish using Glassfish's standard settings. I was
> wrong. Instead, Eclipse assigned its own paths, including (you guessed it!)
> the native library path.
>
> Sure enough, as soon as I added the Tibco RV bin directory to the Eclipse
> native path and voila! It worked perfectly.
>
> I apologize for wasting any of your time and I hope you can learn from my
> mistake.
>
> Jeff
>
> --
> View this message in context: http://old.nabble.com/Native-path-insanity-in-Glassfish-v3-tp28658958p28659959.html
> Sent from the java.net - glassfish users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>