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 05-04-2007, 10:30 AM
Member
 
Join Date: Apr 2007
Location: Singapore
Posts: 30
yuchuang is on a distinguished road
Send a message via MSN to yuchuang
What could this error be?
Below is the error message. I'm not sure what error is this? Please help. Thank you.

???en.unknown - sg.gov.ncss.vcfms.db.DaoException: cause - java.sql.SQLException: Error executing 'insertTrgCrsCat' in 'sg/gov/ncss/vcfms/db/sqlmaps/VfsTrgCrsCatSQL.xml'. Check the Parameter Map (or inline parameters). Check the 'volunteerFlag' property. Cause: com.ibatis.common.beans.BeansException: There is no READABLE property named 'volunteerFlag' in class 'sg.gov.ncss.vcfms.training.beans.VfsTrgCrsCatDTO' ???

What i'm using is struts and sql server 2000 as the DB.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-04-2007, 04:16 PM
Member
 
Join Date: Apr 2007
Location: USA
Posts: 50
derrickD is on a distinguished road
As mentioned in a previous post to you, the ??en. usually means a mapping error. First take a look at all your mapping (xml) files.Can you include some code with this, especially your VfsTrgCrsCarSQL.xml file.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 05-06-2007, 08:16 AM
Member
 
Join Date: Mar 2007
Posts: 41
peiceonly is on a distinguished road
Please give some attention to the "volunteerFlag" also. As derrickD it would be nice if you show us some code also
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 05-07-2007, 03:56 AM
Member
 
Join Date: Apr 2007
Location: Singapore
Posts: 30
yuchuang is on a distinguished road
Send a message via MSN to yuchuang
Below is part of the codes for VfsTrgCrsCarSQL.xml.

<result-map name="vfstrgcrscat_result" class="sg.gov.ncss.vcfms.training.beans.VfsTrgCrsC atDTO">
<property name="volunteerFlag" column="vtcc_volunteer_flag"/>
</result-map>

<mapped-statement name="insertTrgCrsCat">
INSERT INTO vfs_trg_crs_cat (vtcc_volunteer_flag)
VALUES (#volunteerFlag#)
</mapped-statement>

There are other property as well but i only show the property for volunteerFlag.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 05-07-2007, 06:46 PM
Member
 
Join Date: Apr 2007
Location: Indiana
Posts: 84
pegitha is on a distinguished road
Send a message via Skype™ to pegitha
So when you run the insert statement "INSERT INTO vfs_trg_crs_cat (vtcc_volunteer_flag) VALUES (#volunteerFlag#)" does the value of volunteerFlag look like a "Y" or something like that? What is the column vtcc_volunteer_flag in the database? Is it a string?
Also, is there a really a space in the name class =sg.gov.ncss.vcfms.training.beans.VfsTrgCrsCatDTO' in your mapping or is that just an artifact of copying?
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 05-08-2007, 04:37 AM
Member
 
Join Date: Apr 2007
Location: Singapore
Posts: 30
yuchuang is on a distinguished road
Send a message via MSN to yuchuang
volunteerFlag is a ddl where user will specify "yes" or "no". In the DB, the column name is called vtcc_volunteer_flag. The data type is char. The data recorded will be yes or no. In my mapping class, it is
class =sg.gov.ncss.vcfms.training.beans.VfsTrgCrsCatDTO'
without the space. Don't know why it just doesn't get inserted into the DB.
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 05-08-2007, 04:26 PM
Member
 
Join Date: Apr 2007
Location: Indiana
Posts: 84
pegitha is on a distinguished road
Send a message via Skype™ to pegitha
It is more or less a boolean then. When I have a char field in Oracle and it is a Yes/No type thing I make the field a boolean in java and in the hibernate mapping I use the org.hibernate.type.YesNoType. Here is an example of the mapping, that is Y if the person is a member and N if they are not.
In my class it is boolean so I can say if(member).

<property name="member" type="org.hibernate.type.YesNoType">
<column name="MEMBER" />
</property>
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



All times are GMT +3. The time now is 10:43 AM.


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