XoomCode / AcidMaps

Interpolated Images Generator
GNU Lesser General Public License v3.0
33 stars 10 forks source link

no AMS on OS X Lion with Geoserver App #5

Open barnabe opened 13 years ago

barnabe commented 13 years ago

Hi I can't wait to use this plugin but I am running into this issue.

I try to access the service from open layers using the example provided (using sf:bugsites) I still get this error: "Could not get a ServiceInfo for service ams thus could not check if the service is enabled"

Any suggestion would be greatly appreciated.

Thanks in advance B

maurimiranda commented 13 years ago

Try this:

1) Put the library (libacid-maps-jni.dylib) in your Java library path (e.g.: /Library/Java/Extensions)

2) Restart Geoserver

3) Open this: http://localhost:8080/geoserver/wms?service=AMS&version=1.1.0&request=GetMap&layers=sf:bugsites&styles=&bbox=590223.4382724703,4914107.882513998,608462.4604629107,4920523.89081033&width=938&height=330&srs=EPSG:26713&format=image/png&VALUE_COLUMN=cat&SIMPLIFY_METHOD=3&SIMPLIFY_SIZE=90&INTERVALS[]=10,20,45,70,100&INTERVALS_COLORS[]=0xffffff80,0xff000080,0xffff0080,0x00ff0080,0x0000ff80&RENDERER_TYPE=2&INTERPOLATION_STRATEGY=2&radius=40

barnabe commented 13 years ago

Thanks.

unfortunately i now get this error message: "java.lang.UnsatisfiedLinkError: /usr/lib/java/libacid-maps-jni.dylib: no suitable image found. Did find: /usr/lib/java/libacid-maps-jni.dylib: mach-o, but wrong architecture /usr/lib/java/libacid-maps-jni.dylib: no suitable image found. Did find: /usr/lib/java/libacid-maps-jni.dylib: mach-o, but wrong architecture"

Are there different OSX versions of the library? I am confused about why the architecture does not match.

maurimiranda commented 13 years ago

I got the same error, then I restarted Geoserver and everything goes well.

I'm using the same versions: Geoserver 2.1.1 and OSX 10.7

There's just one difference, I'm using Geoserver Standalone (http://downloads.sourceforge.net/geoserver/geoserver-2.1.1-bin.zip). Anyway, I think this shouldn't be related to your problem.

barnabe commented 13 years ago

well no luck... even after (several) restarts. I am back to "java.lang.NoClassDefFoundError: Could not initialize class com.xoomcode.acidmaps.adapter.JCAdapter Could not initialize class com.xoomcode.acidmaps.adapter.JCAdapter"

i need to double check what my java library path actually is...

barnabe commented 13 years ago

having tried to save the JNI file in /system/library/java/extension, i now get this error "java.lang.UnsatisfiedLinkError: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libacid-maps-jni.dylib: no suitable image found. Did find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libacid-maps-jni.dylib: mach-o, but wrong architecture /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libacid-maps-jni.dylib: no suitable image found. Did find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libacid-maps-jni.dylib: mach-o, but wrong architecture"

i must be dumb...

barnabe commented 13 years ago

Thank you maurimiranda for helping me identify the problem. for the record we concluded that acid maps seems not to work well with the app version of Geoserver on OS X. I installed the standalone version and got it to work immediately through an http request such as

http://localhost:8080/geoserver/wms?service=AMS&version=1.1.0&request=GetMap&layers=sf:archsites&styles=&bbox=589851.4376666048,4914490.882968263,608346.4603107043,4926501.8980334345&width=512&height=332&srs=EPSG:26713&format=image/png&VALUE_COLUMN=cat&SIMPLIFY_METHOD=3&SIMPLIFY_SIZE=10&INTERVALS%5B%5D=10,20,45,70,100&INTERVALS_COLORS%5B%5D=0xffffff80,0xff000080,0xffff0080,0x00ff0080,0x0000ff80&RENDERER_TYPE=2&INTERPOLATION_STRATEGY=3&radius=30

however, i am now struggling to make acidmaps perform with open layers. here is my code:




    test Acid Maps
    
    


    
maurimiranda commented 13 years ago

I see two main errors:

  1. You are getting the openlayers script from OpenLayers-2.10/OpenLayers.js
    • Are you sure this is right?
    • Try replacing the script tag by: <script src="http://www.openlayers.org/dev/OpenLayers.js"></script>
  2. You are trying to get the layer from http://ams.xoomcode.com/geoserver/wms
    • Replace this url by your own geoserver: http://localhost:8080/geoserver/wms
maurimiranda commented 13 years ago

I wrote an example that could help you.

Check it out at: https://github.com/XoomCode/AcidMaps/tree/master/examples/isolines

I sent an email to the Geoserver guys to ask them about the problem we are getting with the app version.

I'll let you know as soon as I get an answer.

barnabe commented 13 years ago

Thank you for this. That was very helpful. Got it to work now but still having problems with the tiled version of the service. Any known issues with this?

maurimiranda commented 13 years ago

Yes, it seems to crash because of wrong memory access. That only occurs in OSX so I guess it's something related to the way we are allocating the memory. We use AcidMaps only in Linux servers so we haven't test it good enough in the other platforms. I'll check the code as soon as I can.

ghost commented 12 years ago

Hello,

I'm using Windows Server 2008 r2, GeoServer Version 2.1.3.

I'm facing the same issue:

" ows:ExceptionText java.lang.NoClassDefFoundError: Could not initialize class com.xoomcode.acidmaps.adapter.JCAdapter Could not initialize class com.xoomcode.acidmaps.adapter.JCAdapter /ows:ExceptionText /ows:Exception /ows:ExceptionReport"

I'm using 64 bit version of Java, and Windows Server, the JNI adapter is in the System32 folder.

Is Windows Server version also facing wrong memory access issue?