It looks like the problem is in the arguments to the SQL queries.
In the Category.xml file if I use:
<select id="getCategory" resultClass="category" parameterClass="string"
cacheModel="categoryCache">
SELECT
CATID AS categoryId,
NAME,
DESCN AS description
FROM category
WHERE CATID = 'FISH'
</select>
Everything runs fine and the FISH category is shown.
But if I change FISH with #categoryId# the problem appears again.
I believe this is a problem with case sensitive arguments or something like
that. Errrr ..
Im looking forward to hear from you.
Cheers,
Nuno
________________________________________
From: Nuno Rodrigues [mailto:[EMAIL PROTECTED]
Sent: segunda-feira, 16 de Abril de 2007 12:50
To: [email protected]
Subject: JPetstore and Linux problem
Hello all,
After installing JPetstore 5 on Windows with tomcat 5.5.20 + Mysql 5 I tried to
install it under Linux but the things didnt run very well.
After filling the database and deploying the application I had two errors when
clicking the viewCategory page. Both errors happened due to the case sensitive
problem of linux. The Product and Category tables werent being seen by the
application.
After changing the sql/Product.xml and sql/Cateogry.xml those kind of errors
disappeared but now Im having a new error which Im not being able to solve.
Here it is:
SEVERE: Servlet.service() for servlet action threw exception
javax.servlet.jsp.JspException: Define tag cannot set a null value
at org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java:236)
at
org.apache.jsp.catalog.Category_jsp._jspService(Category_jsp.java:292)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
Do you have any idea of what the problem can be?
Cheers,
Nuno