Many thanks Monika, that worked.

 

Also, my system was putting the new .class file into

~/dspace/webapps/xmlui/WEB-INF/classes/org/dspace/app/xmlui/administrative

Instead of into the xmlui.jar archive.

 

Will figure out how to update my xmlui.pom to fix that.

 

All the best,

Joseph

 

From: Monika Mevenkamp [mailto:[email protected]] 
Sent: 02 February 2016 21:41
To: Joseph Greene
Cc: Jose Blanco; [email protected]
Subject: Re: [dspace-community] Help with running a java class

 

dspace dsrun by default has access inly to the jars in /dspace/lib 

which has only the core api jar and the supporting jars 

 

you should make sure that the script uses the xmlui classes as well 

 

export CLASSPATH=<your xmlui.jar> 

the try dsrun again 

 

Monika

________________ 
Monika Mevenkamp
[email protected]

http://mo-meven.tumblr.com/
http://mcmprogramming.com/mo.meven/



 

On Feb 2, 2016, at 10:34 AM, Joseph Greene <[email protected]> wrote:

 

Thanks Jose,

I’m onto that now, but getting same error message (launcher.xml is basically 
the same as dsrun AFAIK). I think there’s something wrong with my 
directory/package/class name.

Still digging.

Joseph

 

From: Jose Blanco [mailto:[email protected]] 
Sent: 02 February 2016 15:02
To: Joseph Greene
Cc: [email protected]
Subject: Re: [dspace-community] Help with running a java class

 

Joseph,

 

Go to the config directory.  You'll see a file named launcher.xml there. You 
need to defined your code there.  I think once you see what's there, you'll see 
how that's done.  Then you can run your program like this:

 

bin/dspace bulkmove

 

I assume bulkmove is the name you give your command.

 

Hope this helps.

 

-Jose

 

On Tue, Feb 2, 2016 at 8:48 AM, Joseph Greene < <mailto:[email protected]> 
[email protected]> wrote:

Hi,

I’ve written some code to bulk move items from one collection to another. It 
taps into the xmlui api. I need help running the code, e.g.:

 

~/dspace/bin/dspace dsrun 
org.dspace.app.xmlui.aspect.administrative.BulkItemMove

 

As you can see, it’s located in the xmlui package, because it uses 
FlowItemUtils to move items. This was easier for me to understand in limited 
time than the standard (non-XMLUI) API.

 

When I run the above, I get the following:

 

Error in launcher.xml: Invalid class name: 
org.dspace.app.xmlui.aspect.administrative.BulkItemMove

 

My guess is that dsrun doesn’t know how to find that package, what would be the 
correct way to run it? I’ll have a look at launcher.xml in the meantime.

 

Joseph

 

 

___________________________

Joseph Greene, MLIS

Research Repository Librarian

UCD Library

Room 325, Level 3, James Joyce Library

T:  <tel:%2B353%201%20716%207398> +353 1 716 7398 | E:  
<mailto:[email protected]> [email protected] | W:  
<http://researchrepository.ucd.ie/> http://researchrepository.ucd.ie/

 

<image001.jpg>

 

 <http://www.ucd.ie/library> www.ucd.ie/library |  <http://libguides.ucd.ie/> 
libguides.ucd.ie |  <https://twitter/@UCDLibrary> @UCDLibrary

 

 

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to  <mailto:[email protected]> 
[email protected].
To post to this group, send email to  
<mailto:[email protected]> [email protected].
Visit this group at  <https://groups.google.com/group/dspace-community> 
https://groups.google.com/group/dspace-community.
For more options, visit  <https://groups.google.com/d/optout> 
https://groups.google.com/d/optout.

 

 

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to  <mailto:[email protected]> 
[email protected].
To post to this group, send email to  
<mailto:[email protected]> [email protected].
Visit this group at  <https://groups.google.com/group/dspace-community> 
https://groups.google.com/group/dspace-community.
For more options, visit  <https://groups.google.com/d/optout> 
https://groups.google.com/d/optout.

 

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-community.
For more options, visit https://groups.google.com/d/optout.

Reply via email to