Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-15-2008, 03:32 PM
Member
 
Join Date: Jan 2008
Posts: 2
tarat is on a distinguished road
Jasper report + JPQL
Hi!

I've a problem and I didn't find any information on WEB about it so I try to use your experiment.
I try to use Jasper Report with EJBQL:
<queryString language="ejbql"><![CDATA[SELECT p, k FROM
PmUser p JOIN p.PmUserBeosztasCollection c JOIN c.beosztas k]]></queryString>
The problem is...p and k also have a field with a same name.

So when I try to use these names:

<field name="p.nev" class="java.lang.String"/>
<field name="aktiv" class="java.lang.Short"/>
<field name="admin" class="java.lang.Short"/>
<field name="k.nev" class="java.lang.String"/>

I have got an error:
Error retrieving field value from bean : p.nev
------------------
This works quite well:

<queryString language="ejbql"><![CDATA[SELECT p FROM
PmUser p JOIN p.PmUserBeosztasCollection c JOIN c.beosztas k]]></queryString>

<field name="nev" class="java.lang.String"/>
<field name="aktiv" class="java.lang.Short"/>
<field name="admin" class="java.lang.Short"/>

but I have to use k.nev..

Please help me!
Thanks a lot...tarat
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-16-2008, 06:16 PM
Member
 
Join Date: Jan 2008
Posts: 2
tarat is on a distinguished road
OK..
I have the answer.
Every column in Jasper has an autoincrement field so the fields are:

<queryString language="ejbql"><![CDATA[SELECT
p.nev, p.aktiv, p.admin, k.nev
FROM
PmUser p JOIN p.PmUserBeosztasCollection c JOIN c.beosztas k]]></queryString>

<field name="COLUMN_1" class="java.lang.String"/>
<field name="COLUMN_2" class="java.lang.Short"/>
<field name="COLUMN_3" class="java.lang.Short"/>
<field name="COLUMN_4" class="java.lang.String"/>
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 08-01-2008, 07:47 PM
Member
 
Join Date: Aug 2008
Posts: 1
kahlel is on a distinguished road
Quote:
Originally Posted by tarat View Post
I have got an error:
Error retrieving field value from bean : p.nev
Te voy a contestar en español así que tal vez tengas que buscar un traductor

Este código genera esa excepción

if (bean != null)
101 {
102 try
103 {
104 value = PropertyUtils.getProperty(bean, propertyName);
105 }
106 catch (java.lang.IllegalAccessException e)
107 {
108 throw new JRException("Error retrieving field value from bean : " + propertyName, e);
109 }
110 catch (java.lang.reflect.InvocationTargetException e)
111 {
112 throw new JRException("Error retrieving field value from bean : " + propertyName, e);
113 }
114 catch (java.lang.NoSuchMethodException e)
115 {
116 throw new JRException("Error retrieving field value from bean : " + propertyName, e);
117 }
118 catch (IllegalArgumentException e)
119 {
120 //FIXME replace with NestedNullException when upgrading to BeanUtils 1.7
121 if (!e.getMessage().startsWith("Null property value for "))
122 {
123 throw e;
124 }
125 }

bean es el objeto que estas intentando obtener, así que ahí esta el error a la hora de hacer get al bean el .jar te envía esa excepción así que asegurar de que ese bean esta bien construido, yo te recomendaría también que no uses punto al escribir los nombres tal vez puedas usar el caracter _
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
org.apache.jasper.JasperException: null ranjan_ashish26 Java Servlet 1 03-21-2008 06:06 AM
Jasper iReports and Java shinky New To Java 2 08-09-2007 10:24 AM
Crystal report with JSP fred JavaServer Pages (JSP) and JSTL 1 08-05-2007 05:34 AM
Error With Sql And Jasper Report Heather Database 3 07-31-2007 07:07 AM
Jasper Report + iReport + NetBeans 4 Ed NetBeans 2 07-02-2007 08:39 PM


All times are GMT +3. The time now is 04:14 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org