aspose file tools*
The moose likes Other Application Frameworks and the fly likes Error While writing values in Excel file using java... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Error While writing values in Excel file using java..." Watch "Error While writing values in Excel file using java..." New topic
Author

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

shubham pateriya
Greenhorn

Joined: Dec 15, 2011
Posts: 5
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

Joined: Jun 22, 2005
Posts: 1535
what is your class name?


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1089
    
  10

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.


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error While writing values in Excel file using java...