Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaCL is missing OSGi support #283

Closed
tarelli opened this issue Mar 8, 2012 · 12 comments
Closed

JavaCL is missing OSGi support #283

tarelli opened this issue Mar 8, 2012 · 12 comments

Comments

@tarelli
Copy link

tarelli commented Mar 8, 2012

The Import package directive fails when javacl is added to a manifest file:

Import-Package: com.nativelibs4java.opencl [0.0.0, oo) could not be resolved MANIFEST.MF

Import-Package: com.nativelibs4java.util [0.0.0, oo) could not be resolved MANIFEST.MF

@gidili
Copy link

gidili commented Mar 14, 2012

Any news on this? I am stuck with this too

@slarson
Copy link

slarson commented Mar 14, 2012

This would be a tremendous help to have fixed for me as well! OSGi support FTW

@tarelli tarelli closed this as completed Apr 12, 2012
@tarelli tarelli reopened this Apr 12, 2012
@tarelli
Copy link
Author

tarelli commented Apr 12, 2012

Sorry wrong button :) Was checking if there were any updates...

ochafik added a commit that referenced this issue Apr 16, 2012
…NAPSHOT) and JavaCL (1.0-SNAPSHOT)

Added OSGi projects for BridJ and JavaCL (issue #283)
@ochafik
Copy link
Member

ochafik commented Apr 16, 2012

Hi @tarelli ,

Sorry about the delay !
I've created a specific artifact for use with OSGi : com.nativelibs4java:javacl-osgi:1.0-SNAPSHOT

(you can download it here : https://oss.sonatype.org/content/groups/public/com/nativelibs4java/javacl-osgi)

Please let me know if it works correctly in your container.

Cheers

@tarelli
Copy link
Author

tarelli commented May 15, 2012

Hi Olivier,
Thanks a lot for this!
I have been working to try to make the OSGi version to work, the latest roadblock I hit is the following: when JavaCL tries to instantiate Bridj I get a NoClassDefFoundError.
In the log I find the following exceptions:

[2012-05-15 18:49:00.209] ERROR Thread-69 org.bridj.BridJ Failed to load 'bridj' java.io.FileNotFoundException: bridj
at org.bridj.Platform.initLibrary(Platform.java:310)
at org.bridj.Platform.(Platform.java:144)
at org.bridj.CRuntime.(CRuntime.java:450)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.bridj.BridJ.getRuntimeByRuntimeClass(BridJ.java:233)
at org.bridj.BridJ.getRuntime(BridJ.java:264)
at org.bridj.BridJ.register(BridJ.java:287)
at org.bridj.BridJ.register(BridJ.java:161)
at com.nativelibs4java.opencl.JavaCL$OpenCLProbeLibrary.(JavaCL.java:94)
at com.nativelibs4java.opencl.JavaCL.(JavaCL.java:120)
at org.openworm.simulationengine.samplesolver.SampleSolverService.solve(SampleSolverService.java:58)
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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy167.solve(Unknown Source)
at org.openworm.simulationengine.samplesimulator.internal.SampleSimulatorService.endSimulatorCycle(SampleSimulatorService.java:56)
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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy165.endSimulatorCycle(Unknown Source)
at org.openworm.simulationengine.samplesimulation.SampleSimulationController$SimulationThread.run(SampleSimulationController.java:152)

[2012-05-15 18:49:00.234] ERROR Thread-69 System.err java.lang.RuntimeException: Failed to initialize BridJ
[2012-05-15 18:49:00.235] ERROR Thread-69 System.err at org.bridj.Platform.initLibrary(Platform.java:336)
[2012-05-15 18:49:00.235] ERROR Thread-69 System.err at org.bridj.Platform.(Platform.java:144)
[2012-05-15 18:49:00.235] ERROR Thread-69 System.err at org.bridj.CRuntime.(CRuntime.java:450)
[2012-05-15 18:49:00.235] ERROR Thread-69 System.err at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[2012-05-15 18:49:00.235] ERROR Thread-69 System.err at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[2012-05-15 18:49:00.235] ERROR Thread-69 System.err at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[2012-05-15 18:49:00.235] ERROR Thread-69 System.err at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[2012-05-15 18:49:00.235] ERROR Thread-69 System.err at java.lang.Class.newInstance0(Class.java:355)
[2012-05-15 18:49:00.236] ERROR Thread-69 System.err at java.lang.Class.newInstance(Class.java:308)
[2012-05-15 18:49:00.236] ERROR Thread-69 System.err at org.bridj.BridJ.getRuntimeByRuntimeClass(BridJ.java:233)
[2012-05-15 18:49:00.236] ERROR Thread-69 System.err at org.bridj.BridJ.getRuntime(BridJ.java:264)
[2012-05-15 18:49:00.236] ERROR Thread-69 System.err at org.bridj.BridJ.register(BridJ.java:287)
[2012-05-15 18:49:00.236] ERROR Thread-69 System.err at org.bridj.BridJ.register(BridJ.java:161)
[2012-05-15 18:49:00.236] ERROR Thread-69 System.err at com.nativelibs4java.opencl.JavaCL$OpenCLProbeLibrary.(JavaCL.java:94)
[2012-05-15 18:49:00.236] ERROR Thread-69 System.err at com.nativelibs4java.opencl.JavaCL.(JavaCL.java:120)
[2012-05-15 18:49:00.237] ERROR Thread-69 System.err at org.openworm.simulationengine.samplesolver.SampleSolverService.solve(SampleSolverService.java:58)
[2012-05-15 18:49:00.237] ERROR Thread-69 System.err at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2012-05-15 18:49:00.237] ERROR Thread-69 System.err at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[2012-05-15 18:49:00.237] ERROR Thread-69 System.err at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[2012-05-15 18:49:00.237] ERROR Thread-69 System.err at java.lang.reflect.Method.invoke(Method.java:597)
[2012-05-15 18:49:00.238] ERROR Thread-69 System.err at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
[2012-05-15 18:49:00.238] ERROR Thread-69 System.err at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
[2012-05-15 18:49:00.238] ERROR Thread-69 System.err at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
[2012-05-15 18:49:00.238] ERROR Thread-69 System.err at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[2012-05-15 18:49:00.238] ERROR Thread-69 System.err at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
[2012-05-15 18:49:00.239] ERROR Thread-69 System.err at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
[2012-05-15 18:49:00.239] ERROR Thread-69 System.err at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[2012-05-15 18:49:00.239] ERROR Thread-69 System.err at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
[2012-05-15 18:49:00.239] ERROR Thread-69 System.err at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[2012-05-15 18:49:00.239] ERROR Thread-69 System.err at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
[2012-05-15 18:49:00.240] ERROR Thread-69 System.err at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
[2012-05-15 18:49:00.240] ERROR Thread-69 System.err at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[2012-05-15 18:49:00.240] ERROR Thread-69 System.err at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
[2012-05-15 18:49:00.241] ERROR Thread-69 System.err at $Proxy167.solve(Unknown Source)
[2012-05-15 18:49:00.241] ERROR Thread-69 System.err at org.openworm.simulationengine.samplesimulator.internal.SampleSimulatorService.endSimulatorCycle(SampleSimulatorService.java:56)
[2012-05-15 18:49:00.241] ERROR Thread-69 System.err at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2012-05-15 18:49:00.241] ERROR Thread-69 System.err at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[2012-05-15 18:49:00.242] ERROR Thread-69 System.err at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[2012-05-15 18:49:00.242] ERROR Thread-69 System.err at java.lang.reflect.Method.invoke(Method.java:597)
[2012-05-15 18:49:00.242] ERROR Thread-69 System.err at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
[2012-05-15 18:49:00.242] ERROR Thread-69 System.err at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
[2012-05-15 18:49:00.242] ERROR Thread-69 System.err at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
[2012-05-15 18:49:00.243] ERROR Thread-69 System.err at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[2012-05-15 18:49:00.243] ERROR Thread-69 System.err at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
[2012-05-15 18:49:00.243] ERROR Thread-69 System.err at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
[2012-05-15 18:49:00.243] ERROR Thread-69 System.err at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[2012-05-15 18:49:00.244] ERROR Thread-69 System.err at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
[2012-05-15 18:49:00.244] ERROR Thread-69 System.err at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[2012-05-15 18:49:00.244] ERROR Thread-69 System.err at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
[2012-05-15 18:49:00.244] ERROR Thread-69 System.err at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
[2012-05-15 18:49:00.244] ERROR Thread-69 System.err at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[2012-05-15 18:49:00.244] ERROR Thread-69 System.err at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
[2012-05-15 18:49:00.245] ERROR Thread-69 System.err at $Proxy165.endSimulatorCycle(Unknown Source)
[2012-05-15 18:49:00.245] ERROR Thread-69 System.err at org.openworm.simulationengine.samplesimulation.SampleSimulationController$SimulationThread.run(SampleSimulationController.java:152)
[2012-05-15 18:49:00.245] ERROR Thread-69 System.err Caused by: java.lang.UnsatisfiedLinkError: no bridj in java.library.path
[2012-05-15 18:49:00.245] ERROR Thread-69 System.err at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1758)
[2012-05-15 18:49:00.246] ERROR Thread-69 System.err at java.lang.Runtime.loadLibrary0(Runtime.java:823)
[2012-05-15 18:49:00.246] ERROR Thread-69 System.err at java.lang.System.loadLibrary(System.java:1045)
[2012-05-15 18:49:00.246] ERROR Thread-69 System.err at org.bridj.Platform.initLibrary(Platform.java:322)
[2012-05-15 18:49:00.246] ERROR Thread-69 System.err ... 53 more
[2012-05-15 18:50:11.560] INFO Thread-69 System.out End of HH simulation
[2012-05-15 18:50:13.966] ERROR Thread-69 System.err Exception in thread "Thread-69" java.lang.UnsatisfiedLinkError: org.bridj.Platform.sizeOf_ptrdiff_t()I
[2012-05-15 18:50:13.967] ERROR Thread-69 System.err at org.bridj.Platform.sizeOf_ptrdiff_t(Native Method)
[2012-05-15 18:50:13.967] ERROR Thread-69 System.err at org.bridj.Platform.(Platform.java:149)
[2012-05-15 18:50:13.967] ERROR Thread-69 System.err at org.bridj.CRuntime.(CRuntime.java:450)
[2012-05-15 18:50:13.967] ERROR Thread-69 System.err at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[2012-05-15 18:50:13.967] ERROR Thread-69 System.err at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[2012-05-15 18:50:13.967] ERROR Thread-69 System.err at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[2012-05-15 18:50:13.967] ERROR Thread-69 System.err at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[2012-05-15 18:50:13.967] ERROR Thread-69 System.err at java.lang.Class.newInstance0(Class.java:355)
[2012-05-15 18:50:13.968] ERROR Thread-69 System.err at java.lang.Class.newInstance(Class.java:308)
[2012-05-15 18:50:13.968] ERROR Thread-69 System.err at org.bridj.BridJ.getRuntimeByRuntimeClass(BridJ.java:233)
[2012-05-15 18:50:13.968] ERROR Thread-69 System.err at org.bridj.BridJ.getRuntime(BridJ.java:264)
[2012-05-15 18:50:13.968] ERROR Thread-69 System.err at org.bridj.BridJ.register(BridJ.java:287)
[2012-05-15 18:50:13.968] ERROR Thread-69 System.err at org.bridj.BridJ.register(BridJ.java:161)
[2012-05-15 18:50:13.968] ERROR Thread-69 System.err at com.nativelibs4java.opencl.JavaCL$OpenCLProbeLibrary.(JavaCL.java:94)
[2012-05-15 18:50:13.968] ERROR Thread-69 System.err at com.nativelibs4java.opencl.JavaCL.(JavaCL.java:120)
[2012-05-15 18:50:13.968] ERROR Thread-69 System.err at org.openworm.simulationengine.samplesolver.SampleSolverService.solve(SampleSolverService.java:58)
[2012-05-15 18:50:13.968] ERROR Thread-69 System.err at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2012-05-15 18:50:13.969] ERROR Thread-69 System.err at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[2012-05-15 18:50:13.969] ERROR Thread-69 System.err at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[2012-05-15 18:50:13.969] ERROR Thread-69 System.err at java.lang.reflect.Method.invoke(Method.java:597)
[2012-05-15 18:50:13.969] ERROR Thread-69 System.err at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
[2012-05-15 18:50:13.969] ERROR Thread-69 System.err at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
[2012-05-15 18:50:13.969] ERROR Thread-69 System.err at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
[2012-05-15 18:50:13.969] ERROR Thread-69 System.err at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[2012-05-15 18:50:13.970] ERROR Thread-69 System.err at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
[2012-05-15 18:50:13.970] ERROR Thread-69 System.err at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
[2012-05-15 18:50:13.970] ERROR Thread-69 System.err at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[2012-05-15 18:50:13.970] ERROR Thread-69 System.err at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
[2012-05-15 18:50:13.970] ERROR Thread-69 System.err at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[2012-05-15 18:50:13.970] ERROR Thread-69 System.err at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
[2012-05-15 18:50:13.970] ERROR Thread-69 System.err at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
[2012-05-15 18:50:13.970] ERROR Thread-69 System.err at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[2012-05-15 18:50:13.970] ERROR Thread-69 System.err at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
[2012-05-15 18:50:13.970] ERROR Thread-69 System.err at $Proxy167.solve(Unknown Source)
[2012-05-15 18:50:13.971] ERROR Thread-69 System.err at org.openworm.simulationengine.samplesimulator.internal.SampleSimulatorService.endSimulatorCycle(SampleSimulatorService.java:56)
[2012-05-15 18:50:13.971] ERROR Thread-69 System.err at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2012-05-15 18:50:13.971] ERROR Thread-69 System.err at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[2012-05-15 18:50:13.971] ERROR Thread-69 System.err at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[2012-05-15 18:50:13.971] ERROR Thread-69 System.err at java.lang.reflect.Method.invoke(Method.java:597)
[2012-05-15 18:50:13.971] ERROR Thread-69 System.err at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
[2012-05-15 18:50:13.971] ERROR Thread-69 System.err at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
[2012-05-15 18:50:13.971] ERROR Thread-69 System.err at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
[2012-05-15 18:50:13.971] ERROR Thread-69 System.err at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[2012-05-15 18:50:13.971] ERROR Thread-69 System.err at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
[2012-05-15 18:50:13.972] ERROR Thread-69 System.err at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
[2012-05-15 18:50:13.972] ERROR Thread-69 System.err at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[2012-05-15 18:50:13.972] ERROR Thread-69 System.err at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
[2012-05-15 18:50:13.972] ERROR Thread-69 System.err at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[2012-05-15 18:50:13.972] ERROR Thread-69 System.err at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
[2012-05-15 18:50:13.972] ERROR Thread-69 System.err at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
[2012-05-15 18:50:13.972] ERROR Thread-69 System.err at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[2012-05-15 18:50:13.972] ERROR Thread-69 System.err at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
[2012-05-15 18:50:13.972] ERROR Thread-69 System.err at $Proxy165.endSimulatorCycle(Unknown Source)
[2012-05-15 18:50:13.973] ERROR Thread-69 System.err at org.openworm.simulationengine.samplesimulation.SampleSimulationController$SimulationThread.run(SampleSimulationController.java:152)

Do you have any idea what is happening? Looks like bridj is not found at runtime.
Thanks,
Matteo

@ochafik
Copy link
Member

ochafik commented May 23, 2012

Hi @tarelli ,

Thanks for your work and sorry for the delay.

This error would seem to indicate that Platform.extractEmbeddedLibraryResource failed. That method is responsible for getting the native bridj library (bridj.dll, libbridj.so, libbridj.dylib) from the org/bridj/lib/xyz embedded resource path (where xyz is win32, win64, linux_x86, etc...).
Since that resource lookup uses getResourceAsStream on a class loader (see Platform.getClassLoader(), which takes BridJ's classloader, or if it's null the system classloader), there might be an interference with OSGi here. Any experience with that ?

Cheers

@ochafik
Copy link
Member

ochafik commented May 23, 2012

Hi @tarelli ,

I've committed a change that might help :
7eb6e96

(deployed in BridJ 0.6.2-SNAPSHOT / JavaCL 1.0-SNAPSHOT)

Please let me know how it behaves on your side.

Cheers

@tarelli
Copy link
Author

tarelli commented Jun 12, 2012

Hi @ochafik ,
I have spent another three hours today to try to get it to work and figure out what is happening but no success.
I tried to attach the sources to debug myself but I couldn't manage in anyway to make Eclipse happy to attach the sources from either javacl-osgi-1.0-SNAPSHOT-sources.jar or javacl-osgi-1.0-20120523.215321-5-sources.jar so I couldn't find out more about the error (even with the new version I still get the same).
Can you think of anyway you could reproduce this situation on your side? Otherwise if you could give me assistance to try to debug on my side hooking up the sources then maybe I could find out more information that would help moving forward.
Unfortunately this is becoming a huge bottleneck so I will have to either get it work or give up with JavaCL which I would be very sad about.
Thanks again for your fantastic support so far, I hope we can pull this off.
Cheers!

@ochafik
Copy link
Member

ochafik commented Jun 13, 2012

Hi @tarelli ,

Sorry for not being able to solve the issue yet :-S
I've just deployed a tiny change that might actually help a bit : the resource packages where native libraries were loaded from were not exported : might affect the OSGi classloader.

It's available here :
https://oss.sonatype.org/content/repositories/snapshots/com/nativelibs4java/javacl-osgi/1.0-SNAPSHOT/javacl-osgi-1.0-20120613.231151-6.jar

Regarding the attachment of sources, I'm afraid javacl-osgi-sources.jar only contains the bundle activator and not an aggregation of all the dependencies' sources. For that you'll have to find the jars for sources of BridJ & JavaCL (in your case, BridJ should be enough) :

https://oss.sonatype.org/content/repositories/snapshots/com/nativelibs4java/bridj/0.6.2-SNAPSHOT/bridj-0.6.2-20120607.201101-8-sources.jar

I'll have a closer look at how to reproduce in Eclipse tomorrow, any pointers and/or executable demos are welcome !
Cheers

@tarelli
Copy link
Author

tarelli commented Jun 14, 2012

Hi @ochafik ,
It worked! You have no idea how grateful I am! :)
I'll test it more tomorrow just to double check that it actually works and then close the issue.
Thanks a lot on behalf also of the entire OpenWorm team.
Matteo

@gidili
Copy link

gidili commented Jun 14, 2012

Wow - this is huge, mad props to @ochafik! :)

@ochafik
Copy link
Member

ochafik commented Jun 14, 2012

Hehe, my pleasure !
Please let me know if any other issue pops up (or if this one turns up not being quite solved :-S).

Cheers

@tarelli tarelli closed this as completed Jun 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants