alice azevedo

Greenhorn
+ Follow
since Feb 08, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by alice azevedo

Some news!

Seems that something is wrong with the database!
I got the exception: Pool not open

I'm not sure about what it means.
I'm using MySQL.

Can someone help me with that?

Thanks!
18 years ago
Hi Brent!

One thing that really looks strange to me, is that I have similar daos and actions that do the same that I'm trying to do with this particular [Event] object.

I have downloaded the struts source code and it wasnt helpful.

I'll take your advice on log4j and struts.

Thanks for the help!

- Alice
18 years ago
Hi Brent.
Thanks for replying.

I tried to set a breakpoint in the save method. The object is saved normally.
And even with the try/catch, no throwable object is thrown.

What I meant with "the mapping does not occur" is that the hibernate save method is done,
and the next line is the struts mapping return but the thread does not get there, and the
page gets no answer, so when the page expires, that exception is thrown.

I hope I was clear.

Thanks!
18 years ago
To help I'm posting my struts-config with the mapping that fails:

<action path="/saveEvent" name="eventForm" scope="request"
type="actions.EventAction" parameter="save">
<forward name="success" path="/inicial.do"/>
<forward name="error" path="message?showMessage=error">
</action>

The DAO class:
public class EventDAOImpl extends HibernateDaoSupport implements EventDAO
{
public void save(Event event)
{
getHibernateTemplate().saveOrUpdate(event);
}

}


Well the page expires after I call the method to save the Event object at my action class:

public ActionForward save(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) throws ParseException
{
Event event = (Event) req.getSession().getAttribute("event");

if (event == null)
return mapping.findForward("error");


EventDAO eventDao = (EventDAO) getWebApplicationContext().getBean(Constants.EVENT_DAO);
eventDao.save(event);

return mapping.findForward(Constants.MAPPING_SUCCESS);
}


When I'm debuging, when the save is made, I dont know why, the thread doesnt ge to the return line. So when the page expires the exception is thrown.

Please, anybody can help me?
18 years ago
Hi!

I'm getting a really strange error with Struts.

My application runs under jBoss and I'm using Hibernate, Struts and SpringFramework.

Turns that when I try to save an object (not anyone, a specific one) the mapping does no occur and when the page expires, I get this error:

21:24:35,929 INFO [SessionFactoryImpl] closing
21:24:36,090 ERROR [[action]] Servlet.service() for servlet action threw exception
java.lang.NullPointerException
at org.apache.struts.action.RequestProcessor.getInternal(RequestProcessor.java:1106)
at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:516)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
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.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)


I tried changing the struts-config mapping, but result in nothing.

Can anybody help me?

Thank you!
18 years ago