Author Login
Post Reply
user Digest 2 Apr 2008 20:34:58 -0000 Issue 7958
Topics (messages 184942 through 184956):
Re: Using sets of objects with tags
184942 by: Dave Newton
184945 by: jstraub.altec.org
Re: Strange behavior: Trying to implement saveToken() in display actions.
184943 by: Doug Lochart
Re: struts-default.properties
184944 by: Dave Newton
rrrrr...why my field returns null????
184946 by: xianwinwin
Struts - Spring - hibernate and lazy initialization
184947 by: Yayo
184952 by: Gabriel Belingueres
184953 by: Adam Hardy
184956 by: Yayo
Re: Optiontransferselect list issue
184948 by: Laurie Harper
Re: Help with tutorial
184949 by: Laurie Harper
Re: Struts 2.1 TabbedPanel scenario
184950 by: Laurie Harper
Re: [S2] checkboxes in each row of table - set values in action
184951 by: Laurie Harper
Re: Security @ Struts2, using Acegy or Inspector
184954 by: Laurie Harper
Re: application folder name in webapps folder in tomcat.
184955 by: Laurie Harper
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_184942.ezm (zipped)--- jstraub@(protected):
> I am loading a simple set of objects representing users in an action; they
> have names, passwords, etc., all loaded from a database.
Struts 2?
> Next, I use the iterator to create textfield tags instead of property
> tags, with the goal of allowing the viewer to edit all of the fields.
>
> My problem is, how do I submit all of these fields? Understand that there
> is a varying number of fields, and possibly quite a lot of them, so just
> hardcoding matching setters/getters for N uniquely identified DOM tree
> elements seems a poor solution.
Use map- (and/or) index-based field names. Trivial with S2, don't actually
remember for S1.
> Sorry again if this is not the place to pose this question, but various
> forums have proved to be unresponsive.
Er, what other forums would you have tried?
Dave

Attachment:
user_184945.ezm (zipped)>
> Struts 2?
>
Sorry, yes I am using Struts 2.
>
> Er, what other forums would you have tried?
>
Varied coding forums that happened to have a
struts/hibernate/whatever-else subsection
>
> Use map- (and/or) index-based field names. Trivial with S2, don't actually
> remember for S1.
>
I may not understand what you are saying.
I have a set of varying size that needs to generate modifiable text fields
for each element in the set. This means that within my Action I simply
load up a Set/Map and then in the .jsp use the iterator tag to pre-fill
the text fields. The text fields are inside a form tag.
If I use index based field names, other than directly parsing the stream,
is there a way to retrieve the modifications made to the text fields in
the Action to which I submit the form?
If a visual example would help, the site I am being asked to develop can
be found here:
http://www-dev.arcademicskillbuilders.com
Feel free to login as username: test, password: test

Attachment:
user_184943.ezm (zipped)On Wed, Apr 2, 2008 at 2:37 PM, Dave Newton <newton.dave@(protected):
> --- Doug Lochart <dlochart@(protected):
> > > --- Martin Gainty <mgainty@(protected):
> > > > Is there any reason (other than political) why you are using 1.3.8
> > > > [Singletons? Filters?]
>
> > > I guess I'm not sure what that has to do with an S1 token issue; could
> > > you explain further?
> >
>
> > Certalnly. Maybe I should have stated it more clearly but t S1 tokens
> > are NOT the problem. I was trying to emphasize the pattern (for lack
> > of a better term) that I was trying to follow. That pattern is:
>
> I actually replied to Martin, hence was asking him that question, as I was
> unsure what his answer had to do with your original question.
Sorry it was not clear to me.
> Your question, in a nutshell, is that you're wondering why the second display
> action (not the create action) is displaying the contents of the first
> display? Or the initial form?
> Dave
Yes that is my question in a nutshell!
thanks
Doug
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
What profits a man if he gains the whole world yet loses his soul?

Attachment:
user_184944.ezm (zipped)--- "Barron, Daniel" <dbarron@(protected):
> There is no "default.properties" file in the v2.0.11.1 S2 core jar [...]
Then you have a corrupt struts2-core-2.0.11.1.jar file.
Dave

Attachment:
user_184946.ezm (zipped)
Can anyone advise why my bean is null.
I have the following jsp page:
<html>
<head>
<s:head theme="ajax"/>
</head>
<body>
<s:form
theme="ajax"
id="myForm"
cssStyle="font-size : 8pt; font-family: verdana"
action="notes_insert"
method="post" >
<s:textarea rows="5" cols="60" name="str" label="Add Note"
required="true"/>
<s:submit align="center" targets="myForm" theme="ajax"/>
</s:form>
when the user cllicks submit - the action 'insert' kicksin but the bean
(Note) is null (yes, i have getter and setter)
//action
@Validation
public class NoteAction extends BaseSupport implements Serializable
{
private String str;
@SkipValidation
public String insert()
{
System.out.println("the value is "+ str);
}
public String getStr()
{
return str;
}
public void setStr(String str)
{
this.str = str;
}
}
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_184947.ezm (zipped)Hi,
I'm developing a struts - spring based application.
I've got actions-delegates-managers and daos and I use the open session in
view filter from hibernate.
In some cases I've got to return lazy results to the user so I've got to
launch a new worker thread and taht new one doesn't have an hibernate
session attached so I've added hibernateInterceptors to my managers.
The new addition crashes the application because (as I've found on the net)
there's a circular reference as my DAOs need the sessionfactory and the
hibernate interceptor too.
I've found that using lazy initializing of one of the services in the
ciruclar references should do the job but it's still crashing afterall,
maybe I don't know what is the one to be lazily initialized...
any idea??
--
"Sit tibi terra levis"
http://yayocaturas.blogspot.com/

Attachment:
user_184952.ezm (zipped)Try to post a stack trace or something more meaningful, but first of
all, as a general architectural guideline, try first to refactor your
code to avoid circular dependencies.
2008/4/2, Yayo <eduyayo@(protected)>:
> Hi,
>
> I'm developing a struts - spring based application.
>
> I've got actions-delegates-managers and daos and I use the open session in
> view filter from hibernate.
>
> In some cases I've got to return lazy results to the user so I've got to
> launch a new worker thread and taht new one doesn't have an hibernate
> session attached so I've added hibernateInterceptors to my managers.
>
> The new addition crashes the application because (as I've found on the net)
> there's a circular reference as my DAOs need the sessionfactory and the
> hibernate interceptor too.
>
> I've found that using lazy initializing of one of the services in the
> ciruclar references should do the job but it's still crashing afterall,
> maybe I don't know what is the one to be lazily initialized...
>
> any idea??
>
> --
> "Sit tibi terra levis"
>
> http://yayocaturas.blogspot.com/
>

Attachment:
user_184953.ezm (zipped)Yayo on 02/04/08 20:23, wrote:
> I'm developing a struts - spring based application.
>
> I've got actions-delegates-managers and daos and I use the open session in
> view filter from hibernate.
>
> In some cases I've got to return lazy results to the user so I've got to
> launch a new worker thread and taht new one doesn't have an hibernate
> session attached so I've added hibernateInterceptors to my managers.
Hi Yayo,
that paragraph doesn't sound right. You say 'lazy results' and so I understand
you want your hibernate entities to lazy load - is that correct?
If that is correct, I don't see the connection with what you say 'launches a new
worker thread'. Why do you do that? If you need lazy loading, you make sure the
Hibernate session is still running, which you have already because you use the
OpenSessionInViewFilter.
What is the reason for launching a new thread? The idiomatic spring/hibernate
approach doesn't require that. You just pass your hibernate entities around and
as long as the session is running, it will be fine.
Regards
Adam

Attachment:
user_184956.ezm (zipped)Sorry, more explanation is needed... I've got to launch a "batch process"
it's not a batch but it's a long lasting process that could raise a timeout
and tomcat will kill the worker thread... So I've launched a worker of my
own to do the job and inform the user with a progress indicator or the like.
Also I may want to launch my workers using Quartz scheduling features but...
A new thread doesn't have an Hibernate Session attached to it.
Now the circular reference. When I add proxies to my manager layer with an
hibernateInterceptor wich needs a sessionFactory. Under the managers there
are DAOs which depend on sessionFactory too and that's the cyclic reference.
Now the trace. Notice that this is just a cut from it but the "cause" is
just the same stack trace
Related cause:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'filterManager' defined in ServletContext resource
[/WEB-INF/spring/managers.xml]: Cannot resolve reference to bean
'filterManagerTarget' while setting bean property 'target'; nested exception
is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'filterManagerTarget' defined in ServletContext resource
[/WEB-INF/spring/managers.xml]: Cannot resolve reference to bean 'filterDao'
while setting bean property 'filterDao'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'filterDao' defined in ServletContext resource
[/WEB-INF/spring/daos.xml]: Cannot resolve reference to bean
'sessionFactory' while setting bean property 'sessionFactory'; nested
exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sessionFactory' defined in ServletContext resource
[/WEB-INF/spring/hibernate.xml]: Cannot resolve reference to bean
'dataSource' while setting bean property 'dataSource'; nested exception is
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error
creating bean with name 'dataSource': FactoryBean which is currently in
creation returned null from getObject
Related cause:
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'filterManager' defined in ServletContext
resource [/WEB-INF/spring/managers.xml]: Cannot resolve reference to bean
'filterManagerTarget' while setting bean property 'target'; nested exception
is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'filterManagerTarget' defined in ServletContext resource
[/WEB-INF/spring/managers.xml]: Cannot resolve reference to bean 'filterDao'
while setting bean property 'filterDao'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'filterDao' defined in ServletContext resource
[/WEB-INF/spring/daos.xml]: Cannot resolve reference to bean
'sessionFactory' while setting bean property 'sessionFactory'; nested
exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sessionFactory' defined in ServletContext resource
[/WEB-INF/spring/hibernate.xml]: Cannot resolve reference to bean
'dataSource' while setting bean property 'dataSource'; nested exception is
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error
creating bean with name 'dataSource': FactoryBean which is currently in
creation returned null from getObject
Related cause:
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'filterManager' defined in ServletContext
resource [/WEB-INF/spring/managers.xml]: Cannot resolve reference to bean
'filterManagerTarget' while setting bean property 'target'; nested exception
is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'filterManagerTarget' defined in ServletContext resource
[/WEB-INF/spring/managers.xml]: Cannot resolve reference to bean 'filterDao'
while setting bean property 'filterDao'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'filterDao' defined in ServletContext resource
[/WEB-INF/spring/daos.xml]: Cannot resolve reference to bean
'sessionFactory' while setting bean property 'sessionFactory'; nested
exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sessionFactory' defined in ServletContext resource
[/WEB-INF/spring/hibernate.xml]: Cannot resolve reference to bean
'dataSource' while setting bean property 'dataSource'; nested exception is
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error
creating bean with name 'dataSource': FactoryBean which is currently in
creation returned null from getObject
Related cause:
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'filterManager' defined in ServletContext
resource [/WEB-INF/spring/managers.xml]: Cannot resolve reference to bean
'filterManagerTarget' while setting bean property 'target'; nested exception
is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'filterManagerTarget' defined in ServletContext resource
[/WEB-INF/spring/managers.xml]: Cannot resolve reference to bean 'filterDao'
while setting bean property 'filterDao'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'filterDao' defined in ServletContext resource
[/WEB-INF/spring/daos.xml]: Cannot resolve reference to bean
'sessionFactory' while setting bean property 'sessionFactory'; nested
exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sessionFactory' defined in ServletContext resource
[/WEB-INF/spring/hibernate.xml]: Cannot resolve reference to bean
'dataSource' while setting bean property 'dataSource'; nested exception is
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error
creating bean with name 'dataSource': FactoryBean which is currently in
creation returned null from getObject
Related cause:
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'filterManager' defined in ServletContext
resource [/WEB-INF/spring/managers.xml]: Cannot resolve reference to bean
'filterManagerTarget' while setting bean property 'target'; nested exception
is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'filterManagerTarget' defined in ServletContext resource
[/WEB-INF/spring/managers.xml]: Cannot resolve reference to bean 'filterDao'
while setting bean property 'filterDao'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'filterDao' defined in ServletContext resource
[/WEB-INF/spring/daos.xml]: Cannot resolve reference to bean
'sessionFactory' while setting bean property 'sessionFactory'; nested
exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sessionFactory' defined in ServletContext resource
[/WEB-INF/spring/hibernate.xml]: Cannot resolve reference to bean
'dataSource' while setting bean property 'dataSource'; nested exception is
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error
creating bean with name 'dataSource': FactoryBean which is currently in
creation returned null from getObject
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference (
BeanDefinitionValueResolver.java:275)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary (
BeanDefinitionValueResolver.java:104)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues (
AbstractAutowireCapableBeanFactory.java:1210)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (
AbstractAutowireCapableBeanFactory.java:978)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (
AbstractAutowireCapableBeanFactory.java:462)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:404)
at
java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (
AbstractAutowireCapableBeanFactory.java:375)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:263)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (
DefaultSingletonBeanRegistry.java:170)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (
AbstractBeanFactory.java:260)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean (
AbstractBeanFactory.java:1187)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean (
AbstractAutowireCapableBeanFactory.java:617)
at
org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch (
AbstractBeanFactory.java:456)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType (
DefaultListableBeanFactory.java:224)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType (
DefaultListableBeanFactory.java:202)
at
org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors (
BeanFactoryUtils.java:143)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates (
DefaultListableBeanFactory.java:653)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency (
DefaultListableBeanFactory.java:611)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType (
AbstractAutowireCapableBeanFactory.java:1039)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (
AbstractAutowireCapableBeanFactory.java:950)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (
AbstractAutowireCapableBeanFactory.java:462)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:404)
at
java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (
AbstractAutowireCapableBeanFactory.java:375)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:263)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (
DefaultSingletonBeanRegistry.java:170)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (
AbstractBeanFactory.java:260)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean (
AbstractBeanFactory.java:1187)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean (
AbstractAutowireCapableBeanFactory.java:617)
at
org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch (
AbstractBeanFactory.java:456)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType (
DefaultListableBeanFactory.java:224)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType (
DefaultListableBeanFactory.java:202)
at
org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors (
BeanFactoryUtils.java:143)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates (
DefaultListableBeanFactory.java:653)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency (
DefaultListableBeanFactory.java:611)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType (
AbstractAutowireCapableBeanFactory.java:1039)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (
AbstractAutowireCapableBeanFactory.java:950)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (
AbstractAutowireCapableBeanFactory.java:462)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:404)
at
java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (
AbstractAutowireCapableBeanFactory.java:375)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:263)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (
DefaultSingletonBeanRegistry.java:170)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (
AbstractBeanFactory.java:260)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean (
AbstractBeanFactory.java:1187)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean (
AbstractAutowireCapableBeanFactory.java:617)
at
org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch (
AbstractBeanFactory.java:456)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType (
DefaultListableBeanFactory.java:224)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType (
DefaultListableBeanFactory.java:202)
at
org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors (
BeanFactoryUtils.java:143)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates (
DefaultListableBeanFactory.java:653)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency (
DefaultListableBeanFactory.java:611)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType (
AbstractAutowireCapableBeanFactory.java:1039)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (
AbstractAutowireCapableBeanFactory.java:950)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (
AbstractAutowireCapableBeanFactory.java:462)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:404)
at
java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (
AbstractAutowireCapableBeanFactory.java:375)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:263)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (
DefaultSingletonBeanRegistry.java:170)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (
AbstractBeanFactory.java:260)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean (
AbstractBeanFactory.java:1187)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean (
AbstractAutowireCapableBeanFactory.java:617)
at
org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch (
AbstractBeanFactory.java:456)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType (
DefaultListableBeanFactory.java:224)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType (
DefaultListableBeanFactory.java:202)
at
org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors (
BeanFactoryUtils.java:143)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates (
DefaultListableBeanFactory.java:653)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency (
DefaultListableBeanFactory.java:611)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType (
AbstractAutowireCapableBeanFactory.java:1039)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (
AbstractAutowireCapableBeanFactory.java:950)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (
AbstractAutowireCapableBeanFactory.java:462)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:404)
at
java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (
AbstractAutowireCapableBeanFactory.java:375)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:263)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (
DefaultSingletonBeanRegistry.java:170)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (
AbstractBeanFactory.java:260)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean (
AbstractBeanFactory.java:1187)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean (
AbstractAutowireCapableBeanFactory.java:617)
at
org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch (
AbstractBeanFactory.java:456)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType (
DefaultListableBeanFactory.java:224)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType (
DefaultListableBeanFactory.java:202)
at
org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors (
BeanFactoryUtils.java:143)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates (
DefaultListableBeanFactory.java:653)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency (
DefaultListableBeanFactory.java:611)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType (
AbstractAutowireCapableBeanFactory.java:1039)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (
AbstractAutowireCapableBeanFactory.java:950)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (
AbstractAutowireCapableBeanFactory.java:462)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:404)
at
java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (
AbstractAutowireCapableBeanFactory.java:375)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:263)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (
DefaultSingletonBeanRegistry.java:170)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (
AbstractBeanFactory.java:260)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean (
AbstractBeanFactory.java:184)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean (
AbstractBeanFactory.java:163)
at
org.springframework.context.support.AbstractApplicationContext.getBean (
AbstractApplicationContext.java:881)
at
org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors (
AbstractApplicationContext.java:597)
at
org.springframework.context.support.AbstractApplicationContext.refresh (
AbstractApplicationContext.java:366)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext (
ContextLoader.java:254)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext (
ContextLoader.java:198)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized (
ContextLoaderListener.java:45)
at
org.apache.catalina.core.StandardContext.listenerStart (
StandardContext.java:3827)
at
org.apache.catalina.core.StandardContext.start (
StandardContext.java:4334)
at
org.apache.catalina.core.ContainerBase.start (
ContainerBase.java:1045)
at
org.apache.catalina.core.StandardHost.start (
StandardHost.java:719)
at
org.apache.catalina.core.ContainerBase.start (
ContainerBase.java:1045)
at
org.apache.catalina.core.StandardEngine.start (
StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start (
StandardService.java:516)
at
org.apache.catalina.core.StandardServer.start (
StandardServer.java:710)
at
org.apache.catalina.startup.Catalina.start (
Catalina.java:566)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke (
NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke (
DelegatingMethodAccessorImpl.java:25)
at
java.lang.reflect.Method.invoke (
Method.java:597)
at
org.apache.catalina.startup.Bootstrap.start (
Bootstrap.java:288)
at
org.apache.catalina.startup.Bootstrap.main (
Bootstrap.java:413)
On Wed, Apr 2, 2008 at 10:19 PM, Adam Hardy <
ahardy.struts@(protected):
> Yayo on 02/04/08 20:23, wrote:
>
> > I'm developing a struts - spring based application.
> >
> > I've got actions-delegates-managers and daos and I use the open session
> > in
> > view filter from hibernate.
> >
> > In some cases I've got to return lazy results to the user so I've got to
> > launch a new worker thread and taht new one doesn't have an hibernate
> > session attached so I've added hibernateInterceptors to my managers.
> >
>
>
> Hi Yayo,
> that paragraph doesn't sound right. You say 'lazy results' and so I
> understand you want your hibernate entities to lazy load - is that correct?
>
> If that is correct, I don't see the connection with what you say 'launches
> a new worker thread'. Why do you do that? If you need lazy loading, you make
> sure the Hibernate session is still running, which you have already because
> you use the OpenSessionInViewFilter.
>
> What is the reason for launching a new thread? The idiomatic
> spring/hibernate approach doesn't require that. You just pass your hibernate
> entities around and as long as the session is running, it will be fine.
>
>
> Regards
> Adam
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Sit tibi terra levis"
http://yayocaturas.blogspot.com/

Attachment:
user_184948.ezm (zipped)Have you double-checked that getUser().getGroups() is returning what it
should be? I.e. getUser() is not returning null; getUser().getGroups()
is really returning a collection? As a sanity check, what happens if you
include the following in your JSP:
user:
<s:property value="user"/>
<s:property value="getUser()"/>
user.groups:
<s:property value="user.groups"/>
<s:property value="getUser().getGroups()"/>
L.
ryangr wrote:
>> Are you just missing the getter for user? Struts2 has to call
>> getUser().getGroups().
>
> The action has getters and setters for both user and groups, and the user
> object has a getter/setter for its groups attribute.
>
>> I never have these two attributes pointing to the same property. It may
>> work, but it's the first place I'd look for type conversion problems.
>> My list attribute always points to a List with key and value entries for
>> the select and the name attribute always points to a String[] that will
>> contain the selected key values.
>
> Thanks for the pointer on that, I was wondering what the difference between
> them was; however, I don't think that is quite the issue in this case (yet).
>
> Taking your advice on having a String[] for the name attribute, I can do an
> <s:updownselect list="groups" name="groupKeys" /> and that collection
> displays its data, but when I have <s:updownselect list="user.groups"
> name="groupKeys" /> the JSP throws the same exception as the
> <s:optiontransferselect> snippet that is causing headaches.
>
> Apr 2, 2008 10:33:18 AM
org.apache.catalina.core.ApplicationDispatcher> invoke
> SEVERE: Servlet.service() for servlet jsp threw exception
> tag 'updownselect', field 'list': The requested list key 'user.groups' could
> not be resolved as a collection/array/map/enumeration/iterator type.
> Example: people or people.{name} - [unknown location]
>
> It is baffling me at this point because they are the same data type, and
> getters/setters exist for all the related objects... *scratches head*
>
> -Ryan
>
>
> Jeromy Evans - Blue Sky Minds wrote:
>> ryangr wrote:
>>
>>> With that being said...I can populate the list "groups" just fine, but
>>> when
>>> I try to use "user.groups" to get the other list it throws an exception
>>> that
>>> says: "The requested list key 'user.groups' could not be resolved as a
>>> collection/array/map/enumeration/iterator type." What am I doing wrong?
>>> It's
>>> probably pretty obvious, but this hasn't exactly been a good week for
>>> concentration so far. ;)
>>>
>> Are you just missing the getter for user? Struts2 has to call
>> getUser().getGroups().
>>
>>
>>> I have the following for code in my JSP:
>>>
>>> <s:optiontransferselect
>>> name="user.groups"
>>> list="user.groups"
>> I never have these two attributes pointing to the same property. It may
>> work, but it's the first place I'd look for type conversion problems.
>> My list attribute always points to a List with key and value entries for
>> the select and the name attribute always points to a String[] that will
>> contain the selected key values.
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>

Attachment:
user_184949.ezm (zipped)Lukasz Lenart wrote:
> Hi,
>
>> org.hibernate.AnnotationException:
java.lang.NoSuchMethodException:
>
> As for me, such fragment says that you maybe made some miss typo with
> method name, in class or in Spring xml file
Either that, or you have a classpath issue. Check you have all required
JARs deployed, and don't have any that shouldn't be there. Be sure the
ones you have are the correct versions.
L.

Attachment:
user_184950.ezm (zipped)Shoaib Gauhar wrote:
> Hello,
>
> Here is the scenrio. I have two action classes. ClassA and ClassB. There is
> no relationship among these classes. You might say that if there is no
> relationship then why i have to put them in one single jsp. Well its a
> client's requirement.
That's an implementation detail, not a functional requirement. Why does
the client care how you structure your actions?
> In a single jsp there are two tabs. Tab1ForClassA and Tab2ForClassB.
>
> Each tab has fields concerned to their classes as defined above. Tab1 ->
> ClassA and Tab2 -> ClassB.
>
> Can we do it? I have tried this but what happens is that when i submit the
> data on Tab1, Tab2's data becomes empty.
A request is only processed by one action. If you need both actions to
be able to process all the input from both tabs, you'll have to have
them both aware of the full dataset. There are a number of ways you
might achieve that, depending on what you're trying to achieve.
> So, any ideas will be highly appreciated. Furthermore, i am quite new to
> tabbed panel and would require clear tips and ideas.
I haven't used that widget in Struts 2 so can't offer specific tips.
However, if you start by defining the functional requirements (rather
than the implementation details), it'll be easier to offer advice.
L.

Attachment:
user_184951.ezm (zipped)lbastil wrote:
> Hello,
>
> I have the following problem:
>
> in action i have a collection of class User
> each class User have different attributes, one is: boolean permission
>
> in JSP I use struts 2 iterator tag to iterate the User Objects.
> For each User entry I create one row in table.
> for displaying/changing the boolean permission value I use S2 checkbox tag
>
> so far it works fine and show all data in collection of Users correct.
>
> But how can I set changed checkbox values (the permission attribute) back to
> action?
If your checkbox is bound the the permission property of the user,
submitting the form should update the property. If that's not happening,
you need to give more details: what your JSP code looks like, and the
relevant bits of your action and User code, at least.
L.

Attachment:
user_184954.ezm (zipped)Frans Thamura wrote:
> hi there
>
> I want to filter any .action in my cimande project
>
> and i want to give several database security to the action
>
> i just think this will become ACL for Struts2
>
> but...
>
> I am also using Spring,
>
> anyone can help me
>
> is this better create my own interceptor (how to develop interceptor that
> can access my POJO like action did) or using acegy security
>
> any opinion welcome
If you anticipate having the complexity of a full ACL implementation,
I'd just go ahead and use AceGI; why re-invent all that machinery? If
you decide to roll your own, though, then the interceptor can access the
action through the ActionInvocation object and, through the action, can
access your POJO via whatever mechanism you want -- via ModelDriven's
getModel() method, through an interceptor-specific interface you design,
or whatever.
L.

Attachment:
user_184955.ezm (zipped)Raghuveer wrote:
>
>
> I have HelloServlet ,HelloServletContextListener in 3 different applications
> in tomcat
>
> <tomcat_home>webapps\AppHello1
> <tomcat_home>webapps\AppHello2
> <tomcat_home>webapps\AppHello3
>
> How to identify in my listner class what is the folder/context name in my
> server.
>
> public void contextInitialized(ServletContextEvent ce) {
> contextName = ce.getServletContext().getServletContextName();
> }
>
>
> This code is working only if i have
> <display-name>AppHello1</display-name> in web.xml.
> If there is no <display-name> in web.xml then above code in listner class is
> returning null.
>
> Is there facility to know application folder name in webapps folder in
> tomcat.
Call getRealPath("/") on the servlet context:
http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/ServletContext.html#getRealPath(
java.lang.String)
L.