Can't parse an expression rm.exec using jxls package

Posted on 2010-08-24
Last Modified: 2012-05-10
Exception in thread "main" java.lang.RuntimeException: Can't parse an expression rm.exec('SELECT depname, empname, payment, bonus FROM employee e, department d where = e.depid order by age desc')
at net.sf.jxls.tag.ForEachTag.parseItemsProperty(
at net.sf.jxls.tag.ForEachTag.init(
at net.sf.jxls.parser.CellParser.parseTag(
at net.sf.jxls.parser.CellParser.parseCellValue(
at net.sf.jxls.parser.CellParser.parseCell(
at net.sf.jxls.transformer.SheetTransformer.parseCells(
at net.sf.jxls.transformer.SheetTransformer.parseRow(
at net.sf.jxls.transformer.SheetTransformer.transformSheet(
at net.sf.jxls.transformer.XLSTransformer.transformWorkbook(
at net.sf.jxls.transformer.XLSTransformer.transformXLS(
at net.sf.jxls.transformer.XLSTransformer.transformXLS(
at net.sf.jxls.sample.ReportingSample.main(
Caused by: java.sql.SQLException: Column 'name' not found.
at com.mysql.jdbc.SQLError.createSQLException(
at com.mysql.jdbc.SQLError.createSQLException(
at com.mysql.jdbc.SQLError.createSQLException(
at com.mysql.jdbc.ResultSetImpl.findColumn(
at com.mysql.jdbc.ResultSetImpl.getObject(
at org.apache.commons.beanutils.JDBCDynaClass.getObject(
at org.apache.commons.beanutils.RowSetDynaClass.copy(
at org.apache.commons.beanutils.RowSetDynaClass.<init>(
at org.apache.commons.beanutils.RowSetDynaClass.<init>(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(
at org.apache.commons.jexl.parser.ASTMethod.execute(
at org.apache.commons.jexl.parser.ASTReference.execute(
at org.apache.commons.jexl.parser.ASTReference.value(
at org.apache.commons.jexl.parser.ASTReferenceExpression.value(
at org.apache.commons.jexl.ExpressionImpl.evaluate(
at net.sf.jxls.parser.Expression.evaluate(
at net.sf.jxls.tag.ForEachTag.parseItemsProperty(
Question by:rajumuchunde
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
LVL 92

Expert Comment

ID: 33518515
appears you are try to use a column name that does not exist
LVL 86

Expert Comment

ID: 33518872
rm.exec('SELECT depname, empname, e.payment payment, e.bonus bonus, e.age age FROM employee e, department d where = e.depid order by age desc')

Open in new window

LVL 86

Expert Comment

ID: 33518887
You might be able to simplify that to
rm.exec('SELECT depname, empname, e.payment, e.bonus FROM employee e, department d where = e.depid order by e.age desc')

Open in new window

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 33530431
error remain same inspite of changing query .
LVL 86

Expert Comment

ID: 33530620
Please post your current code
LVL 92

Accepted Solution

objects earned 500 total points
ID: 33536942
> error remain same inspite of changing query .

you need to change it to fix the column name

Author Closing Comment

ID: 33549220
alias name problems

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
null output 3 59
IBM TS2900 (3572) Tape Autoloader Java? 12 109
Github api to fetch the number of collaborators in a git repo 1 70
Overriding a method 3 15
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question