Revision 5311
Added by daigle about 14 years ago
MetacatHandler.java | ||
---|---|---|
342 | 342 |
+ e.getMessage(); |
343 | 343 |
logMetacat.error(errorMsg); |
344 | 344 |
out.println(errorMsg); |
345 |
e.printStackTrace(System.out); |
|
345 | 346 |
return; |
346 | 347 |
} |
347 | 348 |
boolean isValid = sess.authenticate(request, un, pw); |
... | ... | |
365 | 366 |
+ se.getMessage(); |
366 | 367 |
logMetacat.error("MetaCatServlet.handleLoginAction - " + errorMsg); |
367 | 368 |
out.println(errorMsg); |
369 |
se.printStackTrace(System.out); |
|
368 | 370 |
return; |
369 | 371 |
} |
370 | 372 |
} |
... | ... | |
383 | 385 |
} catch (Exception e) { |
384 | 386 |
logMetacat.error("MetaCatServlet.handleLoginAction - General error" |
385 | 387 |
+ e.getMessage()); |
388 |
e.printStackTrace(System.out); |
|
386 | 389 |
} |
387 | 390 |
} |
388 | 391 |
} |
... | ... | |
433 | 436 |
logMetacat.error( |
434 | 437 |
"MetaCatServlet.handleLogoutAction - General error: " |
435 | 438 |
+ e.getMessage()); |
439 |
e.printStackTrace(System.out); |
|
436 | 440 |
} |
437 | 441 |
} |
438 | 442 |
} |
... | ... | |
584 | 588 |
} catch (IOException ioe) { |
585 | 589 |
logMetacat.error("MetaCatServlet.handleExportAction - Problem with the servlet output: " |
586 | 590 |
+ ioe.getMessage()); |
591 |
e.printStackTrace(System.out); |
|
587 | 592 |
} |
588 | 593 |
|
589 | 594 |
logMetacat.error("MetaCatServlet.handleExportAction - General error: " |
... | ... | |
691 | 696 |
} catch (IOException ioe) { |
692 | 697 |
logMetacat.error("MetaCatServlet.handleReadInlineDataAction - Problem with the servlet output: " |
693 | 698 |
+ ioe.getMessage()); |
699 |
e.printStackTrace(System.out); |
|
694 | 700 |
} |
695 | 701 |
logMetacat.error("MetaCatServlet.handleReadInlineDataAction - General error: " |
696 | 702 |
+ e.getMessage()); |
703 |
e.printStackTrace(System.out); |
|
697 | 704 |
} |
698 | 705 |
} |
699 | 706 |
|
... | ... | |
783 | 790 |
if (zip) { |
784 | 791 |
addDocToZip(request, docid, providedFileName, zout, user, groups); |
785 | 792 |
} else { |
786 |
readFromMetacat(request.getRemoteAddr(), response, response.getOutputStream(), docid, qformat, |
|
793 |
if (out == null) { |
|
794 |
out = response.getOutputStream(); |
|
795 |
} |
|
796 |
readFromMetacat(request.getRemoteAddr(), response, out, docid, qformat, |
|
787 | 797 |
user, groups, withInlineData, params); |
788 | 798 |
} |
789 | 799 |
} |
... | ... | |
817 | 827 |
} catch (Exception exc) { |
818 | 828 |
logMetacat.error("MetaCatServlet.handleReadAction - General error: " |
819 | 829 |
+ exc.getMessage()); |
830 |
exc.printStackTrace(System.out); |
|
820 | 831 |
try { |
821 | 832 |
if (out != null) { |
822 | 833 |
response.setContentType("text/xml"); |
... | ... | |
849 | 860 |
} catch (IOException ie) { |
850 | 861 |
logMetacat.error("MetaCatServlet.handleReadAction - Problem with the servlet output: " |
851 | 862 |
+ ie.getMessage()); |
863 |
ie.printStackTrace(System.out); |
|
852 | 864 |
} |
853 | 865 |
} |
854 | 866 |
} catch (Exception e) { |
... | ... | |
890 | 902 |
|
891 | 903 |
logMetacat.error("MetaCatServlet.handleReadAction - General error: " |
892 | 904 |
+ e.getMessage()); |
893 |
//e.printStackTrace(System.out);
|
|
905 |
e.printStackTrace(System.out); |
|
894 | 906 |
} |
895 | 907 |
} |
896 | 908 |
|
... | ... | |
994 | 1006 |
// old way of creating the xml directly. |
995 | 1007 |
logMetacat.error("MetaCatServlet.readFromMetacat - could not read from document file " + docid |
996 | 1008 |
+ ": " + e.getMessage()); |
1009 |
e.printStackTrace(System.out); |
|
997 | 1010 |
PrintWriter pw = new PrintWriter(out); |
998 | 1011 |
doc.toXmlFromDb(pw, user, groups, withInlineData); |
999 | 1012 |
} |
... | ... | |
1306 | 1319 |
} catch (MetacatUtilException ue) { |
1307 | 1320 |
logMetacat.error("MetaCatServlet.handleInsertOrUpdateAction - Could not determine if user could insert or update: " |
1308 | 1321 |
+ ue.getMessage()); |
1322 |
ue.printStackTrace(System.out); |
|
1309 | 1323 |
} |
1310 | 1324 |
|
1311 | 1325 |
try { |
... | ... | |
1461 | 1475 |
|
1462 | 1476 |
logMetacat.error("MetaCatServlet.handleInsertOrUpdateAction - General error: " |
1463 | 1477 |
+ e.getMessage()); |
1478 |
e.printStackTrace(System.out); |
|
1464 | 1479 |
} |
1465 | 1480 |
} |
1466 | 1481 |
} |
... | ... | |
1580 | 1595 |
out.println("</error>"); |
1581 | 1596 |
logMetacat.error("MetaCatServlet.handleDeleteAction - Document could not be deleted: " |
1582 | 1597 |
+ ane.getMessage()); |
1598 |
ane.printStackTrace(System.out); |
|
1583 | 1599 |
} |
1584 | 1600 |
} catch (Exception e) { |
1585 | 1601 |
response.setContentType("text/xml"); |
... | ... | |
1589 | 1605 |
out.println("</error>"); |
1590 | 1606 |
logMetacat.error("MetaCatServlet.handleDeleteAction - Document could not be deleted: " |
1591 | 1607 |
+ e.getMessage()); |
1608 |
e.printStackTrace(System.out); |
|
1592 | 1609 |
} |
1593 | 1610 |
} |
1594 | 1611 |
} |
... | ... | |
1710 | 1727 |
docid = actualDocId; |
1711 | 1728 |
} catch (ParseLSIDException ple) { |
1712 | 1729 |
logMetacat.error("MetaCatServlet.handleGetAccessControlAction - MetaCatServlet.handleGetAccessControlAction - " + |
1713 |
"could not parse lsid: " + docid + " : " + ple.getMessage()); |
|
1730 |
"could not parse lsid: " + docid + " : " + ple.getMessage()); |
|
1731 |
ple.printStackTrace(System.out); |
|
1714 | 1732 |
} |
1715 | 1733 |
} |
1716 | 1734 |
|
... | ... | |
1953 | 1971 |
} |
1954 | 1972 |
} catch (ParseException e) { |
1955 | 1973 |
logMetacat.error("MetaCatServlet.handleGetLogAction - Failed to created Timestamp from input."); |
1974 |
e.printStackTrace(System.out); |
|
1956 | 1975 |
} |
1957 | 1976 |
|
1958 | 1977 |
// Request the report by passing the filter parameters |
... | ... | |
1962 | 1981 |
} catch (IOException e) { |
1963 | 1982 |
logMetacat.error("MetaCatServlet.handleGetLogAction - Could not open http response for writing: " |
1964 | 1983 |
+ e.getMessage()); |
1984 |
e.printStackTrace(System.out); |
|
1965 | 1985 |
} catch (MetacatUtilException ue) { |
1966 | 1986 |
logMetacat.error("MetaCatServlet.handleGetLogAction - Could not determine if user is administrator: " |
1967 | 1987 |
+ ue.getMessage()); |
1988 |
ue.printStackTrace(System.out); |
|
1968 | 1989 |
} |
1969 | 1990 |
} |
1970 | 1991 |
|
... | ... | |
2031 | 2052 |
} catch (IOException e) { |
2032 | 2053 |
logMetacat.error("MetaCatServlet.handleBuildIndexAction - Could not open http response for writing: " |
2033 | 2054 |
+ e.getMessage()); |
2055 |
e.printStackTrace(System.out); |
|
2034 | 2056 |
} catch (MetacatUtilException ue) { |
2035 | 2057 |
logMetacat.error("MetaCatServlet.handleBuildIndexAction - Could not determine if user is administrator: " |
2036 | 2058 |
+ ue.getMessage()); |
2059 |
ue.printStackTrace(System.out); |
|
2037 | 2060 |
} |
2038 | 2061 |
} |
2039 | 2062 |
|
... | ... | |
2080 | 2103 |
} catch (PropertyNotFoundException pnfe) { |
2081 | 2104 |
logMetacat.error("MetaCatServlet.handleMultipartForm - Could not determine data file size limit. Using 1000. " |
2082 | 2105 |
+ pnfe.getMessage()); |
2106 |
pnfe.printStackTrace(System.out); |
|
2083 | 2107 |
} |
2084 | 2108 |
logMetacat.debug("MetaCatServlet.handleMultipartForm - The size limit of uploaded data files is: " + sizeLimit); |
2085 | 2109 |
|
... | ... | |
2161 | 2185 |
} catch (IOException ioe2) { |
2162 | 2186 |
logMetacat.error("MetaCatServlet.handleMultipartForm - Fatal Error: couldn't get response " |
2163 | 2187 |
+ "output stream."); |
2188 |
ioe2.printStackTrace(System.out); |
|
2164 | 2189 |
} |
2165 | 2190 |
|
2166 | 2191 |
if (action.equals("upload")) { |
... | ... | |
2283 | 2308 |
{ |
2284 | 2309 |
logMetacat.error("MetaCatServlet.handleInsertMultipartAction - IO Exception copying file: " + |
2285 | 2310 |
ioe.getMessage()); |
2311 |
ioe.printStackTrace(System.out); |
|
2286 | 2312 |
} |
2287 | 2313 |
size = newFile.length(); |
2288 | 2314 |
if (size == 0) |
... | ... | |
2331 | 2357 |
catch(Exception e) |
2332 | 2358 |
{ |
2333 | 2359 |
logMetacat.error("MetaCatServlet.handleInsertMultipartAction - error uploading text file via multipart: " + e.getMessage()); |
2334 |
e.printStackTrace();
|
|
2360 |
e.printStackTrace(System.out);;
|
|
2335 | 2361 |
} |
2336 | 2362 |
} |
2337 | 2363 |
} |
... | ... | |
2404 | 2430 |
} catch (IOException ioe) { |
2405 | 2431 |
logMetacat.error("IO Exception copying file: " + |
2406 | 2432 |
ioe.getMessage()); |
2433 |
ioe.printStackTrace(System.out); |
|
2407 | 2434 |
} |
2408 | 2435 |
size = newFile.length(); |
2409 | 2436 |
if (size == 0) { |
... | ... | |
2490 | 2517 |
|
2491 | 2518 |
logMetacat.error("MetaCatServlet.handleUploadAction - General error: " |
2492 | 2519 |
+ e.getMessage()); |
2520 |
e.printStackTrace(System.out); |
|
2493 | 2521 |
} |
2494 | 2522 |
} |
2495 | 2523 |
} |
... | ... | |
2583 | 2611 |
docid = actualDocId; |
2584 | 2612 |
} catch (ParseLSIDException ple) { |
2585 | 2613 |
logMetacat.error("MetaCatServlet.handleSetAccessAction - " + |
2586 |
"could not parse lsid: " + docid + " : " + ple.getMessage()); |
|
2614 |
"could not parse lsid: " + docid + " : " + ple.getMessage()); |
|
2615 |
ple.printStackTrace(System.out); |
|
2587 | 2616 |
} |
2588 | 2617 |
} |
2589 | 2618 |
|
... | ... | |
2597 | 2626 |
} catch (Exception e) { |
2598 | 2627 |
logMetacat.error("MetaCatServlet.handleSetAccessAction - Error in handleSetAccessAction: " |
2599 | 2628 |
+ e.getMessage()); |
2629 |
e.printStackTrace(System.out); |
|
2600 | 2630 |
error = "Error in set access control for document - " + accessionNumber + e.getMessage(); |
2601 | 2631 |
errorList.addElement(error); |
2602 | 2632 |
continue; |
... | ... | |
2637 | 2667 |
} catch (Exception ee) { |
2638 | 2668 |
logMetacat.error("MetaCatServlet.handleSetAccessAction - Error inserting permission: " |
2639 | 2669 |
+ ee.getMessage()); |
2670 |
ee.printStackTrace(System.out); |
|
2640 | 2671 |
error = "Failed to set access control for document " |
2641 | 2672 |
+ accessionNumber + " because " + ee.getMessage(); |
2642 | 2673 |
errorList.addElement(error); |
... | ... | |
2662 | 2693 |
} catch (MetacatUtilException mue) { |
2663 | 2694 |
logMetacat.error("metaCatServlet.handleSetAccessAction - could not forward " + |
2664 | 2695 |
"request. Sending output to response writer"); |
2696 |
mue.printStackTrace(System.out); |
|
2665 | 2697 |
outputResponse(successList, errorList, out); |
2666 | 2698 |
} |
2667 | 2699 |
} else { |
... | ... | |
2872 | 2904 |
/** |
2873 | 2905 |
* @param sitemapScheduled toggle the _sitemapScheduled flag |
2874 | 2906 |
*/ |
2875 |
public static void set_sitemapScheduled(boolean sitemapScheduled) {
|
|
2907 |
public void set_sitemapScheduled(boolean sitemapScheduled) { |
|
2876 | 2908 |
_sitemapScheduled = sitemapScheduled; |
2877 | 2909 |
} |
2878 | 2910 |
|
Also available in: Unified diff
Merge 1.9.2 changes back into the trunk