Dave Pawson | 1 Dec 14:43 2008
Picon

Re: [MarkLogic Dev General] adding to marklogic classpath

2008/11/30 Ron Hitchens <ron.hitchens@...>:
>
>  You need to be more specific about what you're
> trying to do.  MarkLogic Server is not written in
> Java so there is no extension API that lets you
> plug your own classes into it.

OK, wrong assumption on my part. Sorry.

>
>  If you're trying to use XCC to send documents
> to MarkLogic, then you can use any of several
> approaches.  There are some samples bundled with
> XCC and there are several open source projects
> on http://developer.marklogic.com that may be
> useful.

Thanks. I've been trying
http://developer.marklogic.com/howto/tutorials/2006-06-recordloader.xqy
but its either dated or unmaintained.

>
>  You can also do the job entirely in XQuery if
> the files you want to load are on the same host
> where MarkLogic Server is running.  See the docs
> on the developer site.

Is that a MarkLogic extension then?

>
(Continue reading)

Frank Sanders | 1 Dec 15:25 2008

RE: [MarkLogic Dev General] adding to marklogic classpath

RecordLoader is actively maintained, according to the workshop page the last 
release was built on 6/24/2008.

You can get the latest releases here:

http://xqzone.marklogic.com/svn/recordloader/releases/

The SVN repository for the code is here:

http://xqzone.marklogic.com/svn/recordloader/trunk/

The tutorial is a bit old, but all the information remains relevant.

The README.html found in the SVN repository will give you additional 
information on all the supported extensions.

Hope this helps, it should definitely suit your needs in loading those XML 
files. I have a few sample properties files, along with some bash scripts to 
run RecordLoader that I can share if you would find them helpful.

-fs

-----Original Message-----
From: general-bounces@... 
[mailto:general-bounces@...] On Behalf Of Dave Pawson
Sent: Monday, December 01, 2008 8:44 AM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] adding to marklogic classpath

2008/11/30 Ron Hitchens <ron.hitchens@...>:
(Continue reading)

Dave Pawson | 1 Dec 15:46 2008
Picon

Re: [MarkLogic Dev General] adding to marklogic classpath

2008/12/1 Frank Sanders <Frank.Sanders@...>:
> RecordLoader is actively maintained, according to the workshop page the last
> release was built on 6/24/2008.
>
> You can get the latest releases here:
>
> http://xqzone.marklogic.com/svn/recordloader/releases/
>
> The SVN repository for the code is here:
>
> http://xqzone.marklogic.com/svn/recordloader/trunk/
>
> The tutorial is a bit old, but all the information remains relevant.

Dec 1, 2008 1:38:57 PM com.marklogic.recordloader.Monitor halt
INFO: halting
Exception in thread "main" java.lang.NoClassDefFoundError:
org/xmlpull/v1/XmlPullParserException
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at com.marklogic.recordloader.LoaderFactory.<init>(LoaderFactory.java:78)
	at com.marklogic.recordloader.AbstractInputHandler.getFactory(AbstractInputHandler.java:35)
	at com.marklogic.recordloader.DefaultInputHandler.run(DefaultInputHandler.java:55)
	at com.marklogic.ps.RecordLoader.runInputHandler(RecordLoader.java:246)
	at com.marklogic.ps.RecordLoader.run(RecordLoader.java:183)
	at com.marklogic.ps.RecordLoader.main(RecordLoader.java:147)
Caused by: java.lang.ClassNotFoundException:
org.xmlpull.v1.XmlPullParserException
	at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
	at java.security.AccessController.doPrivileged(Native Method)
(Continue reading)

Frank Sanders | 1 Dec 16:00 2008

RE: [MarkLogic Dev General] adding to marklogic classpath

That error indicates a Classpath Issue.

What command are you using to start RecordLoader? What OS are you ON? What 
path are you trying to launch from? Which JVM? what jars of the supporting 
libraries do you have?

Below is the script I use to kick off RecordLoader.

-fs

#!/bin/bash

CP="c:/cygwin/usr/local/ml-java/recordloader.jar"
CP="$CP;c:/cygwin/usr/local/ml-java/xcc.jar"
CP="$CP;c:/cygwin/usr/local/ml-java/xpp3-1.1.4c.jar"

java -Xmx1024M -cp $CP com.marklogic.ps.RecordLoader $*

-----Original Message-----
From: general-bounces@... 
[mailto:general-bounces@...] On Behalf Of Dave Pawson
Sent: Monday, December 01, 2008 9:47 AM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] adding to marklogic classpath

2008/12/1 Frank Sanders <Frank.Sanders@...>:
> RecordLoader is actively maintained, according to the workshop page the last
> release was built on 6/24/2008.
>
> You can get the latest releases here:
(Continue reading)

Vidhya Arvind | 1 Dec 16:23 2008
Picon
Picon

[MarkLogic Dev General] entity enrichment

Hi All,

Is there a way to limit the entity enrichment to places(|e:gpe)| and 
names(|e:person)? I am trying to avoid wrong mappings like the one below|

<article-title xmlns:e="http://marklogic.com/entity">Robustness of mean E(X) and
<e:organization>R</e:organization> charts</article-title>

|Thanks
Vidhya

Sample Query

import module namespace entity="http://marklogic.com/entity"
    at "/MarkLogic/entity.xqy";

let $title := <article-title>Robustness of mean E(X) and R 
charts</article-title>
return
entity:enrich($title)

|
Attachment (vidhya_parthasarathy.vcf): text/x-vcard, 254 bytes
Hi All,

Is there a way to limit the entity enrichment to places(|e:gpe)| and 
names(|e:person)? I am trying to avoid wrong mappings like the one below|

(Continue reading)

Dave Pawson | 1 Dec 16:29 2008
Picon

Re: [MarkLogic Dev General] adding to marklogic classpath

2008/12/1 Frank Sanders <Frank.Sanders@...>:
> That error indicates a Classpath Issue.
>
> What command are you using to start RecordLoader? What OS are you ON? What
> path are you trying to launch from? Which JVM? what jars of the supporting
> libraries do you have?
>
> Below is the script I use to kick off RecordLoader.
>
> -fs
>
> #!/bin/bash
>
> CP="c:/cygwin/usr/local/ml-java/recordloader.jar"
> CP="$CP;c:/cygwin/usr/local/ml-java/xcc.jar"
> CP="$CP;c:/cygwin/usr/local/ml-java/xpp3-1.1.4c.jar"

Not much different. java 1.6

#!/bin/sh
#
ml=/myjava/marklogic
CP=$ml/lib/recordloader.jar
CP=$CP:$ml/lib/xcc.jar
CP=$CP:$ml/lib/xpp3_xpath-1.1.4c.jar

if [ $# -lt 1  ]
  then
  echo Usage: recordloader.sh path/to/xml/files

(Continue reading)

Michael Blakeley | 1 Dec 16:38 2008

Re: [MarkLogic Dev General] adding to marklogic classpath

As the original exception suggested, Dave doesn't have the right xpp3 
jar file.

Exception in thread "main" java.lang.NoClassDefFoundError:
org/xmlpull/v1/XmlPullParserException

The xpp3_xpath jar isn't sufficient for RecordLoader.

-- Mike

Dave Pawson wrote:
> 2008/12/1 Frank Sanders <Frank.Sanders@...>:
>> That error indicates a Classpath Issue.
>>
>> What command are you using to start RecordLoader? What OS are you ON? What
>> path are you trying to launch from? Which JVM? what jars of the supporting
>> libraries do you have?
>>
>> Below is the script I use to kick off RecordLoader.
>>
>> -fs
>>
>> #!/bin/bash
>>
>> CP="c:/cygwin/usr/local/ml-java/recordloader.jar"
>> CP="$CP;c:/cygwin/usr/local/ml-java/xcc.jar"
>> CP="$CP;c:/cygwin/usr/local/ml-java/xpp3-1.1.4c.jar"
> 
> Not much different. java 1.6
> 
(Continue reading)

Dave Pawson | 1 Dec 16:50 2008
Picon

Re: [MarkLogic Dev General] adding to marklogic classpath

2008/12/1 Michael Blakeley <michael.blakeley@...>:
> As the original exception suggested, Dave doesn't have the right xpp3 jar
> file.

Or something is missing.

>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/xmlpull/v1/XmlPullParserException
>
> The xpp3_xpath jar isn't sufficient for RecordLoader.

Then are you going to :

1. Tell me what is (see my classpath earlier)
2. Update the links on
http://developer.marklogic.com/howto/tutorials/2006-06-recordloader.xqy
   to appropriate and complete list of jars?

regards

--

-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk
Michael Blakeley | 1 Dec 16:56 2008

Re: [MarkLogic Dev General] adding to marklogic classpath

Dave,

http://developer.marklogic.com/howto/tutorials/2006-06-recordloader.xqy 
reads:

> Finally, you'll need a copy of XPP3. You can download it from this site.
> Again, be sure to get the latest version: right now, that's
> xpp3-1.1.3_8.jar. 

The link for "this site" is 
http://www.extreme.indiana.edu/dist/java-repository/xpp3/jars/ - where 
http://www.extreme.indiana.edu/dist/java-repository/xpp3/jars/xpp3-1.1.3_8.jar 
is still available. But the most recent is now 
http://www.extreme.indiana.edu/dist/java-repository/xpp3/jars/xpp3-1.1.4c.jar 
and I'd recommend that you use that.

-- Mike

Dave Pawson wrote:
> 2008/12/1 Michael Blakeley <michael.blakeley@...>:
>> As the original exception suggested, Dave doesn't have the right xpp3 jar
>> file.
> 
> Or something is missing.
> 
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/xmlpull/v1/XmlPullParserException
>>
>> The xpp3_xpath jar isn't sufficient for RecordLoader.
> 
(Continue reading)

Dave Pawson | 1 Dec 17:21 2008
Picon

Re: [MarkLogic Dev General] adding to marklogic classpath

2008/12/1 Michael Blakeley <michael.blakeley@...>:

>> Finally, you'll need a copy of XPP3. You can download it from this site.
>> Again, be sure to get the latest version: right now, that's
>> xpp3-1.1.3_8.jar.
>
> The link for "this site" is
> http://www.extreme.indiana.edu/dist/java-repository/xpp3/jars/ - where
> http://www.extreme.indiana.edu/dist/java-repository/xpp3/jars/xpp3-1.1.3_8.jar
> is still available. But the most recent is now
> http://www.extreme.indiana.edu/dist/java-repository/xpp3/jars/xpp3-1.1.4c.jar
> and I'd recommend that you use that.

Thanks. I'd picked up the xpath version from
http://www.extreme.indiana.edu/dist/java-repository/xpp3/jars/
Perhaps a direct link to the jars?

Now falling foul of the ?? server type ??
Logger shows

Dec 1, 2008 4:15:58 PM com.marklogic.ps.SimpleLogger logException
SEVERE:
com.marklogic.recordloader.FatalException:
com.marklogic.xcc.exceptions.ServerResponseException: Query evaluation
request rejected (404, Not Found). Is this an XDBC server?

To which the answer is no.

<quote>The default value is xcc://admin:admin <at> localhost:9000. That
will work, as long as you've set up an XDBC server that listens on
(Continue reading)


Gmane