Pallavi ch

Ranch Hand
+ Follow
since Dec 16, 2004
Merit badge: grant badges
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Pallavi ch

Our Project has Jasper 3.7.1 working with ANT.
Recently this is upgraded to Gradle 2.5, and currently working on a gradle task to compile Jasper reports.

task compileJasperReports() << {
println('--compileJasperReports Task--')
def jasperSourceDir = file('src/main/webapp/reports')
ant {
taskdef(name: 'jrc', classname: 'net.sf.jasperreports.ant.JRAntCompileTask', classpath: configurations.jasperreports.asPath)
jrc(srcdir: jasperSourceDir, destdir: jasperSourceDir) {
classpath(path: sourceSets.main.output.classesDir)
include(name: '**/*.jrxml')

All the jars and versions remain same from ANT to Gradle, few of the reports are throwing compilation errors.
[ant:jrc] net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
[ant:jrc] 1. Cannot cast from boolean to Boolean
value = (java.lang.Boolean)(((java.lang.Boolean)field_printIashClassificationSection.getValue()).equals(Boolean.TRUE)); //$JR_EXPR_ID=33$

How to fix these errors?

Just in case, if somebody wants to know,

JPA 1.0 specification doesn't support passing list of values to native queries as I read somewhere.
it works with JPQL.

For native queries we have 2 work aorunds.
1. make the native named query IN caluse have as many number of positional parameters as many you have them in list.
In my case,

It kind of limits the dynamic nature of list. But if it's a list of String values, you can have max. number of positional parameters in the query and set the required number of parameters in the code, and for the rest of the excess positional parameters set null string. It works!

2. go for dynamic native query.
Here the query is appended with the list of params.


I'm using openJPA native query defined in mapping file.
I've a select query where I'm trying to pass a List of values as input parameter to it using IN clause.
select... where... IN

SQL works , but when I use the same query in JPA with a positional parameter, It fails..
How to pass list of values to Query??

Here is the code.

When I execute this code, I'm getting
input Param :: '504152335','504152610','504180177','968718337'
Results size:: 0

With NO exception , no results.

I've treid removing single quotes in param, same output with 0 results.

i've tried making the input parametre as List<String>

When I run this Im getting following exception

Has anyone know about this issue?

Just realized... Query always returning NULL values for enum from the database, altough database has values.

Read in other forum, enum always loaded as Lazy, need to make it EAGER to get the values.

I've tried this

but NO luck

Switched to Annotation, and saw the real error in exception stack trace.
error is Query refering to enum values instead of variables.
fixed it and switched back to XML elemenets.
We have few complex queries to retreive data from database.
started with JPA native named queries.

when I map enum to the filed, JPA throws following exception:

I'm mapping attribute as enum on orm.xml.

I've treid with annotation too.
Getting the same exception..

Any suggestion on this??
Im usign open JPA 1.1.1 version
and sybase database

Hi all,
NIIT is offering special discount for sun certifications.
It's priced at Rs.5700/-
Offer is valid till this monthend.
I came to know about this last moment.
check it out at your places!
I think before posting any question here, first i should refer the errata page.
Simpletag files can access either classictag or simple tag's getParetn() method.
and classic tag can access only classic tag's getParent() method.

but in TagFiles chapter- HFSJ
Question no. 3

Y the answer says something else??
HFSJ PageNO.501 - Memorizing Tag Files

Question no.2
Fill in what would you must put into a tag file to declare that the tag must NOT have a body?

Ans-Given: <%@ tag body-content="tagdependant" %>
My ans : <%@ tag body-content="empty" %>

Why am I wrong??

Question no.3
Draw a tag file doc in each of the locations where the container will look for tag files?

Ans-given : web-inf/tags/

My ans : web-inf/tags/

how come "web-inf/lib/<jar>/meta-inf/TLDs/" came into picture??
It worked for me.
16 years ago
Hi all ,
I've uploaded a file to the server using struts - FormFile.
I'm able to get the file name and size in the server side.

but how do I know where it is saved on the disk??
I mean the file location?


How do I save a uploaded file to a particular location??
16 years ago
Hi Niranjan ,
your "Don't Quit" spirit will help you.
I think when we get less scores in chapter mock exams, then only we can know our mistakes and learn from it. generally we don't pay much attenction to the correct answers explanation.
So...Don't worry abt the scores.
Gud Luck for the exam.