Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error While writing values in Excel file using java...

 
shubham pateriya
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on Play Framework,
In my code I am writing values in Excel file...From Code Side there is no issue..problem in in classPath, when I am not adding commons-digester-2.1.jar, I am getting Following Error
An unexpected error occured caused by exception NoClassDefFoundError: org/apache
/commons/digester/Digester

play.exceptions.UnexpectedException: Unexpected Error
`enter code here` at play.Invoker$Invocation.onException(Invoker.java:244)
at play.Invoker$Invocation.run(Invoker.java:286)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
at net.sf.jxls.transformer.Configuration.initDigester(Configuration.java
:239)
at net.sf.jxls.transformer.Configuration.getJXLSRoot(Configuration.java:
285)
at net.sf.jxls.parser.CellParser.parseTag(CellParser.java:279)
at net.sf.jxls.parser.CellParser.parseCellValue(CellParser.java:194)
at net.sf.jxls.parser.CellParser.parseCell(CellParser.java:55)
at net.sf.jxls.transformer.SheetTransformer.parseCells(SheetTransformer.
java:203)
at net.sf.jxls.transformer.SheetTransformer.parseRow(SheetTransformer.ja
va:273)
at net.sf.jxls.transformer.SheetTransformer.transformSheet(SheetTransfor
mer.java:80)
at net.sf.jxls.transformer.XLSTransformer.transformWorkbook(XLSTransform
er.java:243)
at net.sf.jxls.transformer.XLSTransformer.transformXLS(XLSTransformer.ja
va:218)
at play.modules.excel.RenderExcel.apply(RenderExcel.java:106)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:252)
... 1 more


And While I am adding commons-digester-2.1.jar in my ClassPath I am getting following Error

java.lang.UnsupportedOperationException: This parser does not support specificat
ion "null" version "null"
at javax.xml.parsers.SAXParserFactory.setXIncludeAware(SAXParserFactory.
java:448)
at org.apache.commons.digester.Digester.getFactory(Digester.java:539)
`enter code here` at org.apache.commons.digester.Digester.getParser(Digester.java:791)
at org.apache.commons.digester.Digester.getXMLReader(Digester.java:1068)

at org.apache.commons.digester.Digester.parse(Digester.java:1940)
at net.sf.jxls.parser.CellParser.parseTag(CellParser.java:286)
at net.sf.jxls.parser.CellParser.parseCellValue(CellParser.java:194)
at net.sf.jxls.parser.CellParser.parseCell(CellParser.java:55)
at net.sf.jxls.transformer.SheetTransformer.parseCells(SheetTransformer.
java:203)
at net.sf.jxls.transformer.SheetTransformer.parseRow(SheetTransformer.ja
va:273)
at net.sf.jxls.transformer.SheetTransformer.transformSheet(SheetTransfor
mer.java:80)
at net.sf.jxls.transformer.XLSTransformer.transformWorkbook(XLSTransform
er.java:243)
at net.sf.jxls.transformer.XLSTransformer.transformXLS(XLSTransformer.ja
va:218)
at play.modules.excel.RenderExcel.apply(RenderExcel.java:106)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:252)
at play.server.PlayHandler$NettyInvocation.execute(PlayHandler.java:251)

at play.Invoker$Invocation.run(Invoker.java:278)
at play.server.PlayHandler$NettyInvocation.run(PlayHandler.java:229)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44
1)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:662)
17:41:27,638 ERROR ~


The Code I am using is Like this...

public static void downloadDataLogExcel(String formatType,
String containerNumber) throws AbstractBaseException {
Logger.info("downloadDataLogExcel");
containerNumber="MSKU1234567";
List<DataLogDownloadVO> dataLogVO;
try {
dataLogVO = ContainerPageModel
.downloadDataLogSingle(containerNumber,Security.connected());
formatType="xls";
request.format = formatType;
renderArgs.put(RenderExcel.RA_FILENAME, containerNumber + "."
+ formatType);
renderArgs.put(containerNumber + "." + formatType, dataLogVO);
render(dataLogVO);
}
catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}







Please Help....
 
Akhilesh Trivedi
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is your class name?
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi shubham,
This forum is for discussing 'JSRs' and may not be the best place for this question. So, I have moved this to the Other Application Frameworks forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic