Thanks. I''ll have to try that when I get home tonight.
On Sep 24, 2012 7:50 AM, "John Snelson" <john.snel...@marklogic.com> wrote:

> Try calling cts:aggregate() with a first argument of
> "native/regex-audf". The scope you used when you installed the plugin
> (in this case "native") needs to be included in the plugin name.
>
> John
>
> On 24/09/12 14:43, Ryan Dew wrote:
> > It may also help that I tried these steps with the sample native plugin
> provided and got the same results. Here is the info that you were asking
> for:
> >
> > Extensions DB:
> > /native/regex-audf/libregex-audf.dylib
> > /native/regex-audf/manifest.xml
> > /native/sampleplugin/libsampleplugin.dylib
> > /native/sampleplugin/manifest.xml
> >
> > find /Users/ryandew/Library/Application\ Support/MarkLogic/Data/Lib
> > /Users/ryandew/Library/Application Support/MarkLogic/Data/Lib
> > /Users/ryandew/Library/Application Support/MarkLogic/Data/Lib/.DS_Store
> > /Users/ryandew/Library/Application Support/MarkLogic/Data/Lib/Manifest
> > /Users/ryandew/Library/Application Support/MarkLogic/Data/Lib/native
> > /Users/ryandew/Library/Application
> Support/MarkLogic/Data/Lib/native/.DS_Store
> > /Users/ryandew/Library/Application
> Support/MarkLogic/Data/Lib/native/regex-audf
> > /Users/ryandew/Library/Application
> Support/MarkLogic/Data/Lib/native/regex-audf/libregex-audf.dylib
> > /Users/ryandew/Library/Application
> Support/MarkLogic/Data/Lib/native/regex-audf/manifest.xml
> > /Users/ryandew/Library/Application
> Support/MarkLogic/Data/Lib/native/sampleplugin
> > /Users/ryandew/Library/Application
> Support/MarkLogic/Data/Lib/native/sampleplugin/libsampleplugin.dylib
> > /Users/ryandew/Library/Application
> Support/MarkLogic/Data/Lib/native/sampleplugin/manifest.xml
> >
> >
> > Manifest:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <plugin xmlns="http://marklogic.com/extension/plugin";>
> >    <name>regex-audf</name>
> >    <id>regex-audf</id>
> >    <version>0.1</version>
> >    <provider-name>Ryan Dew</provider-name>
> >    <description>Native plugin for working with regex</description>
> >    <native>
> >      <path>libregex-audf.dylib</path>
> >    </native>
> > </plugin>
> >
> > Thanks again for looking into this!
> >
> > -Ryan Dew
> >
> > On Sep 24, 2012, at 7:22 AM, John Snelson <john.snel...@marklogic.com>
> wrote:
> >
> >> On 24/09/12 14:07, Ryan Dew wrote:
> >>> This past weekend I played around with creating my own native plugin. I
> >>> was able to compile and package my plugin just fine, making use of the
> >>> example make file provided. I also ran plugin:install-from-zip and it
> >>> returned 1 as expected.
> >>>
> >>> At this point, though, xdmp:host-status(xdmp:host())//*:native-plugins
> >>> indicates that I don't have any native plugins installed
> >>
> >> That's expected. The host status only contains information for native
> >> plugins that have been loaded. Native plugins are loaded lazily when
> >> they are first used.
> >>
> >>> and when I try to use my native plugin I get the following:
> >>>
> >>>
> >>>       [1.0-ml] XDMP-NOLIBRARY: cts:aggregate("regex-audf", "regex",
> >>>
> cts:path-reference("/records/record/title",("type=string","collation=
> http://marklogic.com/collation/";)),
> >>>       "Test .*8 Document") -- The shared library cannot be loaded:
> >>>       dlopen(/Users/ryandew/Library/Application
> >>>       Support/MarkLogic/Data/Lib/libregex-audf.dylib, 6)
> >>>
> >>>
> >>> The library file does exist at this location however. I tried
> restarting
> >>> MarkLogic. Could it be a permissions issue?
> >>
> >> I'm not sure how, since MarkLogic saves the native plugins files out
> >> into the "Lib" directory itself. I've successfully deployed and used a
> >> native plugin to Mac OS X myself, so I'd suspect it might have more to
> >> do with your plugin itself.
> >>
> >> Can you post a listing of the contents of your Extensions database?
> >> Also the result of the command "find /Users/ryandew/Library/Application\
> >> Support/MarkLogic/Data/Lib" or equivalent.
> >>
> >> Also does the library inside "Lib" look the same as the one you built
> >> into a native plugin?
> >>
> >> Turning on debug logging should output more information about the native
> >> plugin cache and plugin loading - that might help you work out what's
> >> going on.
> >>
> >> John
> >>
> >> --
> >> John Snelson, Lead Engineer                    http://twitter.com/jpcs
> >> MarkLogic Corporation                         http://www.marklogic.com
> >> _______________________________________________
> >> General mailing list
> >> General@developer.marklogic.com
> >> http://developer.marklogic.com/mailman/listinfo/general
> >
> > _______________________________________________
> > General mailing list
> > General@developer.marklogic.com
> > http://developer.marklogic.com/mailman/listinfo/general
> >
>
>
> --
> John Snelson, Lead Engineer                    http://twitter.com/jpcs
> MarkLogic Corporation                         http://www.marklogic.com
> _______________________________________________
> General mailing list
> General@developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
>
_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to