Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to log Java Events to a text file?
    primarykey
    data
    text
    <p>How to log the Line logger.severe to a file. I just see it in the console. BTW, may I please ask another question, is that how can you skip the row after the severe event, I tried to continue, but it just skips to the next column... Thank you for taking time to help</p> <pre><code> private Product2 readProductRow(XSSFSheet ws, int r) throws SQLException { Product2 p = new Product2(); try { XSSFRow rowData = ws.getRow(r); for (int j = 0; j &lt; 5; j++) { // read the first rcord XSSFCell cell = rowData.getCell(j); java.util.Date val = null; String value = null; FormulaEvaluator evaluator = ws.getWorkbook().getCreationHelper().createFormulaEvaluator(); if (cell !=null) { switch (evaluator.evaluateFormulaCell(cell)) { case Cell.CELL_TYPE_BOOLEAN: value = cellToString(cell); break; case Cell.CELL_TYPE_NUMERIC: if (DateUtil.isCellDateFormatted(cell)) { val = cell.getDateCellValue(); } break; case Cell.CELL_TYPE_STRING: value = cellToString(cell); break; case Cell.CELL_TYPE_BLANK: break; case Cell.CELL_TYPE_ERROR: break; case Cell.CELL_TYPE_FORMULA: value = cellToString(cell); break; } if (value == null &amp;&amp; val == null) { if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC &amp;&amp; DateUtil.isCellDateFormatted(cell)) { val = cell.getDateCellValue(); } else value = cellToString(cell); } if (value == null &amp;&amp; val == null) { if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC &amp;&amp; DateUtil.isCellDateFormatted(cell)) { val = cell.getDateCellValue(); } } switch (j) { case 0: if (value == null || value.toString().trim().equals("")) { logger.severe("第"+ r + "行纪录没有大类编码,没有汇入" ); continue; } else { char tid = db.getCategoryID(value.charAt(0)); if (tid == 'X') { db.insertCategory(value.charAt(0)); Category tex = db.getCategory(value); tid = tex.getCode(); } p.setCategoryID(tid); t = tid; } break; case 1: if (value == null || value.toString().trim().equals("")) { </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload