Mathias Berg

+ Follow
since Oct 03, 2007
Merit badge: grant badges
For More
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 Mathias Berg

Please provide the error log. Also just to clear out. Are you accesing a .jsf url or .jsp. (Your faces servlet checks on all *jsf url access.)

<a href="index.jsf">link</a>
16 years ago
As i see it, components is finished utils to use. Like Selects, radio, checkboxes, fileupload, menu navigations, tab navigations, Result listing in tabels (myfaces/tomahawk has a good dataTable component for this). And so on...

These components write out finished html code. So in your jsp page you only need to include these component tags.
Well you get more info by reading some tutorials about JSF.

Some links:

Regards, Mathias.
16 years ago
Response to myself

My inparam to the SP wich is a timestamp. If its null then i get this error

PLS-00306: wrong number or types of arguments in call to 'SELECTALLCASES'

But if a replace the null with a emtpy string "" then it doesnt throw a exception.
So it seems my Hibernate query skips the inpara if its null (This only happens for Timestamps though, for varchar2 it works fine with null)

Any clues, would be apreciated?
Hi i wonder if i could get some help regarding a small but so irretation thing.

Is there a problem of using Timestamp as null in a call to a stored procedure, by using Hibernate and Native SQL to to the call.
(im using this as an example, -> 16.2.2. Using stored procedures for querying)

Im using Spring 2.3, Hibernate 3, Oracle 10g database.

My DAO look like this.

List<TestSP> testSP = getHibernateTemplate().findByNamedQueryAndNamedParam
("selectAllCases_sp", new String[]{"id", "date_from"}
, new Object[]{"73",null}


My Hibernate stored procedure mapping file.

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"

<class name="TestSP" mutable="false">
<id name="Id" column="id" type="string" >
<generator class="assigned"/>
<property name="type" column="type"/>

<sql-query name="selectAllCases_sp" callable="true">
<return alias="testSP" class="TestSP">
<return-property name="Id" column="id"/>
<return-property name="type" column="type"/>

{ ? = call selectAllCases(:id, ate_from) }

My Exception is this
2007-11-13 16:55:50,522 DEBUG org.hibernate.jdbc.AbstractBatcher(line:393) - { ? = call selectAllCases(?, ?) }
2007-11-13 16:55:50,569 WARN org.hibernate.util.JDBCExceptionReporter(line:77) - SQL Error: 6550, SQLState: 65000
2007-11-13 16:55:50,569 ERROR org.hibernate.util.JDBCExceptionReporter(line:78) - ORA-06550: line 1, column 13:
PLS-00306: wrong number or types of arguments in call to 'SELECTALLCASES'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

2007-11-13 16:55:50,569 ERROR CaseDaoHibernate(line:86) - error
org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
Caused by:
org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(
at org.hibernate.exception.JDBCExceptionHelper.convert(
at org.hibernate.loader.Loader.doList(
at org.hibernate.loader.Loader.listIgnoreQueryCache(
at org.hibernate.loader.Loader.list(
at org.hibernate.loader.custom.CustomLoader.list(
at org.hibernate.impl.SessionImpl.listCustomQuery(
at org.hibernate.impl.AbstractSessionImpl.list(
at org.hibernate.impl.SQLQueryImpl.list(
at org.springframework.orm.hibernate3.HibernateTemplate$33.doInHibernate(
at org.springframework.orm.hibernate3.HibernateTemplate.execute(
at org.springframework.orm.hibernate3.HibernateTemplate.findByNamedQueryAndNamedParam(
at CaseDaoHibernate.getTestSP(
at CaseDaoTest.testCaseSearch(
Hi all, im having problem with JSF code in my sitemesh decorator files. i get this error if im putting in some JSF code, like <f:view> ... </f:view> in my default decorator file. It works fine in my other JSP files (Those that displays through the <decorator:body/> tag)

javax.faces.FacesException: Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml configuration fileand if you are accessing your jsf-pages through the correct mapping. E.g.: if your FacesServlet is mapped to *.jsf (with the -element), you need to access your pages as 'sample.jsf'. If you tried to access 'sample.jsp', you'd get this error-message.
at javax.faces.webapp.UIComponentTag.setupResponseWriter(
at javax.faces.webapp.UIComponentTag.doStartTag(
at org.apache.myfaces.taglib.core.ViewTag.doStartTag(
at org.apache.jsp.decorators.default_jsp._jspx_meth_f_005fview_005f0(
at org.apache.jsp.decorators.default_jsp._jspService(
at org.apache.jasper.runtime.HttpJspBase.service(
at javax.servlet.http.HttpServlet.service(


Anyone got this problem, solved it also maybe :-)

My env is:

Tomcat 5.5 / Servlet 2.4.
myfaces, 1.1.5
sitemesh, 2.2.1
16 years ago