This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 201195 - Jar files with DLL's are not loading
Summary: Jar files with DLL's are not loading
Status: RESOLVED INCOMPLETE
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 7.0.1
Hardware: PC Windows 7 x64
: P2 normal (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-21 20:46 UTC by visumagic
Modified: 2011-09-18 16:17 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Servers snapshot (62.89 KB, image/png)
2011-08-25 14:19 UTC, visumagic
Details
Xuggler Test Web application (1.74 MB, application/octet-stream)
2011-09-16 02:59 UTC, visumagic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description visumagic 2011-08-21 20:46:12 UTC
I'm testing my application. I used to copy jar files with native code, into \.netbeans\7.0\config\GF3\domain1\lib. 

When I run my web project in Glassfish through Netbeans, it was working fine upto Netbeasn 7.0
(Works for netbeans-trunk-nightly-201107140600-ml-windows also) 

But all of sudden Netbeans 7.0.1 is not supporting the dll loading from this folder. 

Is there any library loading strategy change in latest versions.
Comment 1 David Konecny 2011-08-22 00:10:08 UTC
This looks like GlassFish runtime issue and not a NetBeans problem. Leaving for Vince to decide.
Comment 2 Vince Kraemer 2011-08-22 18:03:30 UTC
Please attach a screenshot of the Servers dialog for the server that you are deploying onto.

Please provide the complete path to the location where your jars with DLLs are being placed.

Are there multiple directories in .netbeans\7.0\config named something like GF3??
Comment 3 Vince Kraemer 2011-08-23 14:04:38 UTC
Please reopen when the additional data is available.
Comment 4 visumagic 2011-08-25 13:41:18 UTC
Following is the error code. 

The same server setup/project is working in fine in NetBeans Dev 201107140600

Xuggler is an API with native codes. The jar files will be there in the project classpath. But the native libraries are working from path :\.netbeans\7.0\config\GF3\domain1\lib

But Nb 7.0.1 , it's throwing following exception.



Caused by: java.lang.UnsatisfiedLinkError: no xuggle-xuggler in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738)
	at java.lang.Runtime.loadLibrary0(Runtime.java:823)
	at java.lang.System.loadLibrary(System.java:1028)
	at com.xuggle.ferry.JNILibraryLoader.loadLibrary0(JNILibraryLoader.java:265)
	at com.xuggle.ferry.JNILibraryLoader.loadLibrary(JNILibraryLoader.java:168)
	at com.xuggle.xuggler.XugglerJNI.<clinit>(XugglerJNI.java:19)
	at com.xuggle.xuggler.IContainer.<clinit>(IContainer.java:1457)
	at notechange.rest.MediaService.createThumbForVideo(MediaService.java:894)
	at notechange.rest.MediaService.createThumb(MediaService.java:886)
	at notechange.rest.MediaService.updateStream(MediaService.java:1282)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
	at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
	at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5366)
	at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
	at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
	at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
	at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
	at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
	at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
	at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
	at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5338)
	at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5326)
	at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
	... 57 more
Comment 5 Vince Kraemer 2011-08-25 13:48:38 UTC
Please provide the data that I requested in http://netbeans.org/bugzilla/show_bug.cgi?id=201195#c2
Comment 6 visumagic 2011-08-25 13:54:35 UTC
Snapshot of the server is log file , do you need the screen shot ?

Server is not showing any message , just when ever I invoke a service, the following error occurs.

-raghu
Comment 7 Vince Kraemer 2011-08-25 14:13:18 UTC
Go to the Tools menu. Trigger the Servers item in that menu.

This opens the Servers dialog.

Select the server that is having trouble from the list of servers on the left hand side.

Take a screenshot that includes the content of the dialog

attach it to this issue.

Please include an answer to the direct question, "Are there multiple directories in .netbeans\7.0\config named something like
GF3?", also.
Comment 8 visumagic 2011-08-25 14:19:03 UTC
Created attachment 110213 [details]
Servers snapshot

Servers snapshot attached, please check
Comment 9 Vince Kraemer 2011-08-28 15:35:34 UTC
One more time...

Please include an direct answer to the direct question, "Are there multiple
directories in .netbeans\7.0\config named something like
GF3?"
Comment 10 visumagic 2011-08-28 15:42:16 UTC
No.

There is only one directory with name 'GF3' inside '.netbeans\7.0\config'

-raghu
Comment 11 Vince Kraemer 2011-09-15 22:17:49 UTC
please attach a project that demonstrates the behavior...  I have tried to replicate the problem but haven't been able to yet...

Please include instructions that will allow me to replicate the problem.

You indicate that you have to put jars in the domain lib directory.. which ones?



Here is what I did to try to replicate the issue....

I downloaded xuggler and installed it 'just for me'.

I installed NB 7.0.1

I started i with a 'clean userdir

I create the ServletStateless sample project.

I added all the jar files that appear in the xuggle\share\java\jars directory to my web app project.

I created a NewServlet.

I added 'implements ISimpleMediaFile'

I let NB create a bunch of empty methods to implement the interface.

I built the project and deployed it onto GF.

I accessed the NewServlet from the web browser.
  I did not see a big UnsatisfiedLinkError stack-trace... but I did see a message that xuggle-xuggler did not load.

I undeployed the sample app.

I shutdown the server

I put xuggle-xuggler.jar in the domains\domain1\lib

I restarted the server.

I redeployed the app

I accessed NewServlet.
  Again... no stack trace... also no warning message.

I am using xuggler 3.4 for these tests.
Comment 12 David Konecny 2011-09-15 23:13:39 UTC
visumagic, state RESOLVED-INCOMPLETE means that we acknowledge the problem but are not able to reproduce it and need more info to fix it. Please provide info Vince is requesting and once we can reproduce it we will update issue state appropriately. Thanks.
Comment 13 visumagic 2011-09-16 02:59:43 UTC
Created attachment 110798 [details]
Xuggler Test Web application
Comment 14 visumagic 2011-09-16 03:03:39 UTC
Vince,

Thanks for your time and patience. I thought it could be easy fix because this stopped working in consecutive netbeans builds.

I attached one sample web application. You just try to run in your nb 7.0.1 you will see the error. 

PS: Please install xuggler 3.4 into your pc.

I dont know weather to reopen this bug or not. But I will wait for your response.


-raghu
Comment 15 visumagic 2011-09-16 04:24:39 UTC
This error is reproducible even in latest NetBeans Dev 201107140600. If you don't resolve this problem, this will continue for ever.
Comment 16 Vince Kraemer 2011-09-16 19:23:13 UTC
(In reply to comment #15)
> This error is reproducible even in latest NetBeans Dev 201107140600. If you
> don't resolve this problem, this will continue for ever.

Now I am confused...

In you initial report you claim that 201107140600 was working fine. You restate the same claim in http://netbeans.org/bugzilla/show_bug.cgi?id=201195#c4...

And now that build doesn't work either?

Please let me know which NB build and GF build you are using when you update this issue.

To get the GF build info, go to http://localhost:4848

I do not have access to the dev build from 201107140600... so I am really dependent on you to provide clear and unambiguous information that I can work against on this...
Comment 17 visumagic 2011-09-16 20:15:20 UTC
I got your problem. Please continue your work on the build previously mentioned. The root cause is same for this issue. 

'netbeans 7.0.1 build on wards this issue is reproducible' 

-raghu
Comment 18 Vince Kraemer 2011-09-16 20:33:16 UTC
I need a couple more pieces of info from you...

1. what is the value of java.library.path when your server is running your XugTest app?
  You may want to turn off the loadonstatup behavior  of XugTestServlet and have a different servlet print out that info for you.. so your app will deploy and you will be able to see the info.

2. Where did you install xuggler?

3. Is that install location listed as part of your java.library.path?

Here is why I ask...

I

1. installed xuggler in S:\Users\vbk\AAAAAAA using  xuggler-3.4 windows installer exe...

2. I installed the latest dev build 9201109141017 with GF 3.1.1 b12.

3. I started NB.

4. I opened the XugTest project

5. I used the Run item on the project's right-click menu.

The project built.
The app deployed.
There were no JNI related exceptions in the server log.

6. I created a NewServlet to print-out the java.library.path

this triggered a redeploy... which had a problem related to multiple loads of the xuggler dll.

7. I added the code to do the printing and saved my changes.

this triggered another deploy with the same issue as step 6.

8. I stopped GF.

9. I used the Run item to trigger a GF start and deploy.

10.  I executed my NewServlet and saw S:\Users\vbk\AAAAAAA\bin was part of the java.library.path.

You should note that I did not put any files into the GF install or domain directories...

I have tried to find a reference in the GF documentation that indicates that you would need to copy xuggle-xuggler.jar into the domain1/lib directory.  Do you know where you read that?
Comment 19 visumagic 2011-09-17 11:37:04 UTC
I checked the java.library.path, and XUGGLER_HOME is configured perfectly and same project works fine in Netbeas 7.0 version, with following code.

  IRational frameRate = IRational.make(3, 1);

But in latest builds it's not loading dependent libs.

From following link, I'm copying the jars into domain1/lib. Was working perfect.

http://wiki.xuggle.com/Frequently_Asked_Questions#I_get_an_.22UnsatisfiedLinkError.22_when_I_run_Xuggler-based_Applications_in_Tomcat


Following is the error stack ... 

INFO: 2011-09-17 16:54:26,387 [http-thread-pool-8080(5)] WARN  com.xuggle.ferry.JNILibraryLoader - Failure: library load of library: xuggle-xuggler; version: 3: absolute path: C:\Xuggle\bin\libxuggle-xuggler-3.dll; error: java.lang.UnsatisfiedLinkError: C:\Xuggle\bin\libxuggle-xuggler-3.dll: Can't find dependent libraries

INFO: 2011-09-17 16:54:26,400 [http-thread-pool-8080(5)] WARN  com.xuggle.ferry.JNILibraryLoader - Failure: library load of library: xuggle-xuggler; version: 3: absolute path: C:\Xuggle\bin\libxuggle-xuggler-3.dll; error: java.lang.UnsatisfiedLinkError: C:\Xuggle\bin\libxuggle-xuggler-3.dll: Can't find dependent libraries

INFO: 2011-09-17 16:54:26,407 [http-thread-pool-8080(5)] ERROR com.xuggle.ferry.JNILibraryLoader - Could not load library: xuggle-xuggler; version: 3; Visit http://www.xuggle.com/xuggler/faq/ to find common solutions to this problem
Comment 20 Vince Kraemer 2011-09-18 16:17:50 UTC
Please answer direct questions with direct answers...  Trying to reproduce a problem based on answers is really tough.

1. what is the value of java.library.path when your server is running your
XugTest app?
  You may want to turn off the loadonstatup behavior  of XugTestServlet and
have a different servlet print out that info for you.. so your app will deploy
and you will be able to see the info.

2. Where did you install xuggler?

3. Is that install location listed as part of your java.library.path?

I am not sure instructions for tomcat really apply to glassfish...

I did not follow that advice and was able to run XugTest just fine... so they may not be applicable.  Have you tried removing xuggle-xuggler.jar from domain1/lib