Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

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

 
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....
 
Ranch Hand
Posts: 1609
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is your class name?
 
Bartender
Posts: 1104
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.
 
Don't destroy the earth! That's where I keep all my stuff! Including this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!