Total Pageviews

2009/01/14

NamedQuery of name: jobDutyJobTitle.findByJobDuty not found.

As I used JPA as my persistence tier implementation. I declared a named query in my entity class:










And I called this name query in my DAO class:












But as I ran my web application, it got this kind of error message (no matter the name of query or the sql statement is corrent):

java.lang.IllegalArgumentException: NamedQuery of name: jobDutyJobTitle.findByJobDuty not found. 
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.getDatabaseQuery(EJBQueryImpl.java:422) 
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.setAsSQLReadQuery(EJBQueryImpl.java:136) 
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.getResultList(EJBQueryImpl.java:464) 
    at com.htc.hr.dao.JobDutyJobTitleDAO.findByJobDuty(JobDutyJobTitleDAO.java:41) 
    at com.htc.hr.controller.JobDutyController.showJobDutyJobTitle(JobDutyController.java:47)

The root cause is: I forgot to add this enity class declaration into persistence.xml

2009/01/06

An Introduction To JBoss RichFaces | Eclipse Zone

An Introduction To JBoss RichFaces | Eclipse Zone

If it's your first time to study JBoss RichFaces, here is a good place to start.

RichFaces for NetBeans IDE 6.1 (Part 1)

RichFaces for NetBeans IDE 6.1 (Part 1): "RichFaces for NetBeans IDE 6.1"
It also work for 6.5

2008/12/21

2008 台北馬拉松

2008/12/13

2008/12/11

Troubleshooting on Tomahawk JSCook Menu

http://wiki.apache.org/myfaces/JSCook_Menu

Check Notes and Known issues.
I had faced this issue Place of Menu tag in relation to Forms:
Menus must be placed inside forms starting with Tomahawk 1.1.3.
With regard to how to do configuration in web.xml, please check http://myfaces.apache.org/tomahawk/extensionsFilter.html

2008/12/10

java.lang.IllegalStateException: ExtensionsFilter not correctly configured. JSF mapping missing. JSF pages not covered.

Error Message
1
2
3
4
5
6
7
java.lang.IllegalStateException: ExtensionsFilter not correctly configured. JSF mapping missing. JSF pages not covered. Please see: http://myfaces.apache.org/tomahawk/extensionsFilter.html
    at org.apache.myfaces.renderkit.html.util.AddResourceFactory.throwExtensionsFilterMissing(AddResourceFactory.java:389)
    at org.apache.myfaces.renderkit.html.util.AddResourceFactory.checkEnvironment(AddResourceFactory.java:349)
    at org.apache.myfaces.renderkit.html.util.AddResourceFactory.getInstance(AddResourceFactory.java:279)
    at org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuRenderer.addResourcesToHeader(HtmlJSCookMenuRenderer.java:404)
    at org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuRenderer.encodeBegin(HtmlJSCookMenuRenderer.java:363)
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)


Solution
If you are using servlets 2.4, you cannot do a jsp:forward or request.getDispatcher().forward to any page, because the extensions filter is not executed. Instead you may want to try with a response.sendRedirect(). Therefore, I need to modify to response.sendRedirect("template-client.jsf");

2008/11/23

Integrate Seam with Apache Trinidad, Facelets and JPA

Agenda


  • Seam
  • Seam + JSF
  • Seam Annotation in JSF Implementation
  • Seam + JPA (No need to change)
  • Environment Configuration
  • Use Case
  • Page Flow
  • Class Diagram
  • Sequence Diagram


http://www.slideshare.net/junyuo/integrate-seam-with-apache-trinidad-facelets-and-jpa-presentation

2008/11/05

Re: [jasperreports-questions] IS_IGNORE_PAGINATION parameter

Re: [jasperreports-questions] IS_IGNORE_PAGINATION parameter


I had faced the same problem regarding exprting report to pdf in browser but bring blank page.
The root cause is the IS_IGNORE_PAGINATION had been set into FALSE, so it cannot diaplay correctly.

2008/10/28

Highlighting Odd and Even Rows in JasperReports - Brian Burridge

Highlighting Odd and Even Rows in JasperReports - Brian Burridge: "new Boolean( $V{PAGE_COUNT}.intValue() % 2 ==0 )"

In order to highlight odd or even rows with a background color, in JasperReports, first create a rectangle element with a background of your color choice, and send it to the background (in JasperAssistant, right click on the rectangle, choose Arrange and then Send to Back). Second, use the following expression to set when the element should appear, by placing the expression in the Print When Expression field of the rectangle element. Where the $V{PAGE_COUNT} appears, you can use that, to base it on the row number on the page, or use $V{REPORT_COUNT} to base it on the row within the report. Also, if you are using a group, you can use $V{groupname_COUNT} where groupname is replaced with the name of your group. The expression below will then test the row number within the Page, Report, or Group (whichever you selected) and if its divisible by 2, it will display the rectangle element with the background color.

2008/10/25

CAS (Central Authentication Service) Enhancement

Agenda
  • Why SSO (Single-Sign On)?
  • Central Authentication Service (CAS)
  • CAS Installation
  • As-Is and To-be Process
  • Modification Process

http://www.slideshare.net/junyuo/cas-enhancement-presentation

2008/10/02

CAS Demo Application Installation

CAS Demo Application Installation

including troubleshooting (CAS Demo App. cannot be running correctly)