[Dspace-general] PUT returned status = 500; text=Internal Server Error(LNIclient finishPut)

Robin Wang greenstone at live.de
Tue Oct 6 15:05:01 EDT 2009




Hi
everyone,


I have one
question about DSpace LNIclient with DSpace SIP, which written by Larry Stone. 

I am using this java file to build our Ingest Tool. Before yesterday I didn’t
have any problem with it.


But at
yesterday night I can’t call the DSpaceLNIclient right at every time. Sometimes there
was Exception with finishPut() Method, which the return status is 500.

PUT
returned status = 500; text=Internal Server Error


The Problem
is that I didn’t change any line of LNIclient and DSpaceSIP. Why causes this
error anyway. 



I have restarted the tomcat. And sometime it’s work and can
ingest the DSpaceSIP. NOT AT EVERYTIME !! I really want to know, how I should fix this Problem.  I don’t
want to restart at every day.... How should i change the code or the setting of dspace  Please try to help me! 
Regards 
Robin


Here is my
code:
DSpaceLNIclient dspaceclient = new DSpaceLNIclient(
                "http://XXXXXXXXXXXX/lni/dav/",
                "XXXXXX", "XXXXXXX");
        OutputStream os;
        DSpaceSIP sip;
        String col_id = "123456789/5848";
        try {
            String str = dspaceclient.lookupHandle("123456789/5848");
            System.err.println(str);
           
            sip = new DSpaceSIP(false, Deflater.BEST_SPEED);
            sip.setOBJID("DSpaceID");
            sip.addAgent("SIP", "ORGANIZATION", "DAFFODIL Ingest Tool");
            sip.addBitstream(new File("Newby_01.xml"), "content/"
                    + "Newby_01.xml", "ORIGINAL", true);
            sip.addBitstream(new File("FoxmlText.xml"), "content/" + "FoxmlText.xml",
                    "ORIGINAL", true);

            org.jdom.Document modsDoc = sip.transformBibMD(new File(
                    "Newby_01.xml"), new File("Bib2MODS.xsl"));
            Namespace ns = Namespace.getNamespace("mods",
                    "http://www.loc.gov/mods/v3");
            sip.addDescriptiveMD("MODS", modsDoc, ns);
            
            os = dspaceclient.startPut(col_id, "METS", null);
            sip.write(os);
            os.close();

            String newItemhandle = dspaceclient.finishPut();
            System.out.println(newItemhandle);


 		 	   		  
_________________________________________________________________
http://redirect.gimas.net/?n=M0910xHotmail2
Neu, Besser, Hotmail - Die neuen Features sind da!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/dspace-general/attachments/20091006/15d712a5/attachment.htm


More information about the Dspace-general mailing list