Re: RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread Maurizio Cucchiara
It's exactly what I meant (you can leave in your service class too). The object factory must be spring and your class name inside the action configuration must contain the bean id (instead of the real class name). I'm not sure if it works but it worth a try though. On 10 March 2011 00:08, CRANFORD

Re: Struts 2 Error:SEVERE: Could not find action or result

2011-03-09 Thread Johannes Geppert
You return an result of type ERROR in your DomainAction1 action. The problem is, this result is not defined in your struts.xml. Example: /jsp/interface.jsp /jsp/interfaceError.jsp Johannes JavaNoobie wrote: > > Hi All, > I'm a newbie to Struts 2 , and have tried to create my applica

Struts 2 Error:SEVERE: Could not find action or result

2011-03-09 Thread JavaNoobie
Hi All, I'm a newbie to Struts 2 , and have tried to create my application using references off the internet .However currently I'm faced with an error while trying to run the program , and i cant figure out where my mistake is :(. Please help me find out what I'm missing . I've attached a screen

Re: Exception in hibernate3

2011-03-09 Thread abhishek jain
Hello, No, the query isnt running. What do i need to do for this, Also i have to wait for 8 hours to see if mysql has timeout with my code in hibernate , cannt i reduce some values in hibernate.cfg.xml and test. Can some one post the relevant sections of hte config file, pl advice, i am now approa

RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread Martin Gainty
osiv filter (should) set flushing to never (now manual) to prevent accidental writes on the session so Map properties = new HashMap(); properties.put( "org.hibernate.flushMode", "manual" ); javax.persistence.EntityManager em = createEntityManager( properties ); e

Re: Struts2 XML Validation App

2011-03-09 Thread Chris Mawata
Your struts.xml is missing a tag -- or did you just not include it when you pasted? On Wed, 2011-03-09 at 14:54 -0800, Vivek Bansal wrote: > Hi, > > I am creating my first struts2 application with xml based validation. > However, I am not able to get the validation part working i.e. its not > re

RE: RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread CRANFORD, CHRIS
In the Struts2 Action rather than my service class? > -Original Message- > From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com] > Sent: Wednesday, March 09, 2011 4:20 PM > To: Struts Users Mailing List > Subject: Re: RE: Re : Re : ModelDriven & Hibernate Entities > > Have you tr

Struts2 XML Validation App

2011-03-09 Thread Vivek Bansal
Hi, I am creating my first struts2 application with xml based validation. However, I am not able to get the validation part working i.e. its not returning the field error message to UI. Please help. My code looks like this. *login.jsp* *struts.xml* /login.jsp /login

Re: RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread Maurizio Cucchiara
Have you tried to put the transational annotation in the class declaration? Maurizio Cucchiara Il giorno 09/mar/2011 21.38, "CRANFORD, CHRIS" ha scritto: > I still think this is related to my @Transactional annotation maybe. > >> -Original Message- >> From: Dave Newton [mailto:davelnew..

RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread CRANFORD, CHRIS
I still think this is related to my @Transactional annotation maybe. > -Original Message- > From: Dave Newton [mailto:davelnew...@gmail.com] > Sent: Wednesday, March 09, 2011 2:16 PM > To: Struts Users Mailing List > Subject: Re: Re : Re : ModelDriven & Hibernate Entities > > Another reas

Re: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread Dave Newton
Another reason OSiV filters can be tricky. Dave On Wed, Mar 9, 2011 at 2:04 PM, CRANFORD, CHRIS wrote: > Francois - > > I use the standard paramsPrepareParamsStack interceptor from Struts. > > All I have done on my end is wrap this interceptor stack with a few > application specific interceptor

RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread CRANFORD, CHRIS
Yes, that was the issue, it was interceptor order related. Now if only I could get the persistent entity not to be flushed under specific conditions: - Exception - Non-SUCCESS return code, etc. > -Original Message- > From: Chris Pratt [mailto:thechrispr...@gmail.com] > Sent: Wednesda

Re: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread Chris Pratt
It might just be an order of interceptors problem. One of your first interceptors should be your login check. That should definitely happen before the standard paramsPrepareParamsStack is run. (*Chris*) On Wed, Mar 9, 2011 at 11:04 AM, CRANFORD, CHRIS wrote: > Francois - > > I use the standar

RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread CRANFORD, CHRIS
Francois - I use the standard paramsPrepareParamsStack interceptor from Struts. All I have done on my end is wrap this interceptor stack with a few application specific interceptors that control things such as authentication required, auditing, and logging. I stepped upon my issue one day when

Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread François Rouxel
Hi Chris, first, you might have another pb, because struts2 does not change your model if a validation failed. In may case, the model is not changed so not persisted. Do u use validation and workflow interceptor ? second, you are right about MVC pattern, but, just be aware that when you use OSIV

Re: Re : ModelDriven & Hibernate Entities

2011-03-09 Thread Dave Newton
On Wed, Mar 9, 2011 at 1:09 PM, CRANFORD, CHRIS wrote: > I wouldn't place anything Hibernate or persistence related in > my JSP pages at all.  In my mind, this breaks the entire > reasoning behind MVC and the view simply there to render data IMO OSiV filters put non-render stuff into the JSP anywa

RE: Re : ModelDriven & Hibernate Entities

2011-03-09 Thread CRANFORD, CHRIS
Francois - While that may work for you, I wouldn't place anything Hibernate or persistence related in my JSP pages at all. In my mind, this breaks the entire reasoning behind MVC and the view simply there to render data. If the view is doing anything beyond that, I have a design problem, but

(O/T) RE: Struts 2.0.11.1 question

2011-03-09 Thread Martin Gainty
MG>(hopefully) quick replies > I wouldn't have a problem with using the GSON project, it's another > community maintained, battle tested project. From your examples it should > probably have a Struts Result object wrapped around it to make it easier to > use, but that's beside the point. > > >

Re : ModelDriven & Hibernate Entities

2011-03-09 Thread François Rouxel
same issue this how I fixed it : (the main idea is to redirect to a jsp if an exception occured, and the jsp rollback) create an error page error.jsp <%@page import="com.rdvcentral.util.persistance.HibernateUtil"%> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib pre

ModelDriven & Hibernate Entities

2011-03-09 Thread CRANFORD, CHRIS
I had started down a path of using the ModelDriven interface from Struts because I find it really helps maintain a class action class without large numbers of get/set methods for screens that contain a lot of form fields. However, I am finding at least with how I have attempted to approach Model

Re: Struts 2.0.11.1 question

2011-03-09 Thread Chris Pratt
I wouldn't have a problem with using the GSON project, it's another community maintained, battle tested project. From your examples it should probably have a Struts Result object wrapped around it to make it easier to use, but that's beside the point. My problem is companies that are short sigh

RE: Struts 2.0.11.1 question

2011-03-09 Thread Paul Zepernick
We are using the Google Gson project to handle converting our objects / maps to json. I will have to take a look at the plugin, I was not even aware of its existence. http://code.google.com/p/google-gson/ We put the result from Gson into an InputStream and send it back out using the stream

Re: Struts 2.0.11.1 question

2011-03-09 Thread Dave Newton
I agree 100%... Companies that expect an in-house, ad-hoc system to be of better quality, and/or faster to implement, and/or etc. are almost always 100% wrong. How is S2 "blessed" but one of its officially-supported components *not*?! Dave On Wed, Mar 9, 2011 at 11:24 AM, Chris Pratt wrote: > >

Re: Struts 2.0.11.1 question

2011-03-09 Thread Chris Pratt
Yes, it makes perfect sense to go outside of your chosen technology stack and use a home grown solution to a problem rather than to use a tool developed and tested by a community that you already trust (or you wouldn't be using Struts at all). That's definitely the recipe for long term success.

Re: Struts 2.0.11.1 question

2011-03-09 Thread Harsh C
Thanks for the responses all. "Not blessed" just means that it is not in the list of s/w that we are allowed to work with. I ended up writing just a plain servlet for now to serve the JSON string which works well enough, except the JSON parsing part of course. HC On Mar 9, 2011 1:19 AM, "Mauriz

Re: Tomcat 7 supported?

2011-03-09 Thread Alex Lopez
Working here with Tomcat 7.0.6 and Struts 2.2.1.1 without any problem... Em 06-03-2011 19:22, Lee Clemens escreveu: Tomcat 7 changes include "Switch from AnnotationProcessor to InstanceManager." Struts 2.2.1.1 fails to work on Tomcat 7 due to java.lang.ClassNotFoundException: org.apache.Annotat

RE: Struts 2.0.11.1 question

2011-03-09 Thread Jose Luis Martinez Avial
May I ask why the struts-json plugin is not blessed? I've been using it for months and works ok for me. I use json-result, the json interceptor and JSONUtil.serialize without any issue. I'm using Strtus 2.1.8.1 -Original Message- From: Harsh C [mailto:hchau...@gmail.com] Sent: Tuesday, M