Re: Adding a JNDI lookup yields unexpected Struts errors (Spring injection)

2011-06-16 Thread Jeffrey Black
FWIW, I've been debugging this test case and I have traced the issue down into 
the Spring source code. 

More to come.  Stay tuned.

jb
/


On Jun 8, 2011, at 11:38 AM, Miguel mig...@almeida.at wrote:

 To ease inspection of the problem, I created a unit test in the JIRA
 issue (https://issues.apache.org/jira/browse/WW-3647 ):
 
 run JNDIProblemTestCase in
 https://issues.apache.org/jira/secure/attachment/12481828/redirectActionErrorWithJunitTest.zip
  
 
 
 On Wed, 2011-06-08 at 16:08 +0100, Miguel wrote:
 
 Hey Lukasz,
 
 On Wed, 2011-06-08 at 15:40 +0200, Lukasz Lenart wrote:
 
 
 and the result
 
 Hello test, today is 2011/06/08
 ***zzz***
 
 
 To display the problem you have to write issue in the name, not
 test.
 Take a look at the HelloWorldAction - the redirectAction is with login,
 whose result is triggered by writing issue in the field name.
 
 Can you try it again? You should see the error then!
 
 Miguel
 
 

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Adding a JNDI lookup yields unexpected Struts errors (Spring injection)

2011-06-08 Thread Lukasz Lenart
It works for me ...

Hello Lukasz, today is 2011/06/08


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/


2011/6/8 Miguel mig...@almeida.at:
 Hi,

 I have created a test maven project to demonstrate the issue, based on
 struts archetype.

 To see the problem:

 1) run the maven goal jetty:run
 2) browse to http://localhost:8080
 3) Write issue on the top form and submit

 Expected:
 - The action has an if issue, return login. Login has a global
 redirectAction result to index. I'd expect the action to redirect do index,
 which in turn redirects to /jsp/index.jsp

 Actual:
 Error - Problem accessing /zzz/index!zzz.action.

 Happens when:
 1) applicationContext.xml - jee:jndi-lookup is active. If you comment this
 line and the referring  property name=wtf... , the redirect is correct.
 Notice that zzz is the default for that jndi-lookup (and we haven't
 configured jndi, so the default is being used)
 2) The login result is a redirectAction. If you change the line in
 struts.xml to, say, result name=login /jsp/index.jsp/result, the
 problem isn't visible.

 Can someone try to understand why this is happening. It might be a very
 basic problem, but I've been looking at this for hours and can't figure out
 what is wrong.

 Thank you in advance,

 Miguel Almeida

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Adding a JNDI lookup yields unexpected Struts errors (Spring injection)

2011-06-08 Thread Miguel
Really? That's odd.

could you please try the test project at : 
https://issues.apache.org/jira/browse/WW-3647

Thanks for the help!

Enviado a partir do meu HTC

- Reply message -
De: Lukasz Lenart lukasz.len...@googlemail.com
Data: qua, Jun 8, 2011 13:42
Assunto: Adding a JNDI lookup yields unexpected Struts errors (Spring injection)
Para: Struts Users Mailing List user@struts.apache.org

It works for me ...

Hello Lukasz, today is 2011/06/08


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/


2011/6/8 Miguel mig...@almeida.at:
 Hi,

 I have created a test maven project to demonstrate the issue, based on
 struts archetype.

 To see the problem:

 1) run the maven goal jetty:run
 2) browse to http://localhost:8080
 3) Write issue on the top form and submit

 Expected:
 - The action has an if issue, return login. Login has a global
 redirectAction result to index. I'd expect the action to redirect do index,
 which in turn redirects to /jsp/index.jsp

 Actual:
 Error - Problem accessing /zzz/index!zzz.action.

 Happens when:
 1) applicationContext.xml - jee:jndi-lookup is active. If you comment this
 line and the referring  property name=wtf... , the redirect is correct.
 Notice that zzz is the default for that jndi-lookup (and we haven't
 configured jndi, so the default is being used)
 2) The login result is a redirectAction. If you change the line in
 struts.xml to, say, result name=login /jsp/index.jsp/result, the
 problem isn't visible.

 Can someone try to understand why this is happening. It might be a very
 basic problem, but I've been looking at this for hours and can't figure out
 what is wrong.

 Thank you in advance,

 Miguel Almeida

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Adding a JNDI lookup yields unexpected Struts errors (Spring injection)

2011-06-08 Thread Lukasz Lenart
Works like charm :-) I've based on the attached project. Modified a
bit HelloWorld,jsp to display wtf:

Hello s:property value=name/, today is s:property
value=dateNow /br/
***s:property value=wtf/***

and the result

Hello test, today is 2011/06/08
***zzz***

It's something with Eclipse, try to launch from command line, remove
all the dependencies from the local repository


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/


2011/6/8 Miguel mig...@almeida.at:
 Really? That's odd.

 could you please try the test project at :
 https://issues.apache.org/jira/browse/WW-3647

 Thanks for the help!

 Enviado a partir do meu HTC

 - Reply message -
 De: Lukasz Lenart lukasz.len...@googlemail.com
 Data: qua, Jun 8, 2011 13:42
 Assunto: Adding a JNDI lookup yields unexpected Struts errors (Spring
 injection)
 Para: Struts Users Mailing List user@struts.apache.org

 It works for me ...

 Hello Lukasz, today is 2011/06/08


 Regards
 --
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/
 Warszawa JUG conference - Confitura http://confitura.pl/


 2011/6/8 Miguel mig...@almeida.at:
 Hi,

 I have created a test maven project to demonstrate the issue, based on
 struts archetype.

 To see the problem:

 1) run the maven goal jetty:run
 2) browse to http://localhost:8080
 3) Write issue on the top form and submit

 Expected:
 - The action has an if issue, return login. Login has a global
 redirectAction result to index. I'd expect the action to redirect do
 index,
 which in turn redirects to /jsp/index.jsp

 Actual:
 Error - Problem accessing /zzz/index!zzz.action.

 Happens when:
 1) applicationContext.xml - jee:jndi-lookup is active. If you comment
 this
 line and the referring  property name=wtf... , the redirect is correct.
 Notice that zzz is the default for that jndi-lookup (and we haven't
 configured jndi, so the default is being used)
 2) The login result is a redirectAction. If you change the line in
 struts.xml to, say, result name=login /jsp/index.jsp/result, the
 problem isn't visible.

 Can someone try to understand why this is happening. It might be a very
 basic problem, but I've been looking at this for hours and can't figure
 out
 what is wrong.

 Thank you in advance,

 Miguel Almeida

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org





-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Adding a JNDI lookup yields unexpected Struts errors (Spring injection)

2011-06-08 Thread Miguel
Hey Lukasz,

On Wed, 2011-06-08 at 15:40 +0200, Lukasz Lenart wrote:


 and the result
 
 Hello test, today is 2011/06/08
 ***zzz***
 

To display the problem you have to write issue in the name, not
test.
Take a look at the HelloWorldAction - the redirectAction is with login,
whose result is triggered by writing issue in the field name.

Can you try it again? You should see the error then!

Miguel


Re: Adding a JNDI lookup yields unexpected Struts errors (Spring injection)

2011-06-08 Thread Miguel
To ease inspection of the problem, I created a unit test in the JIRA
issue (https://issues.apache.org/jira/browse/WW-3647 ):

run JNDIProblemTestCase in
https://issues.apache.org/jira/secure/attachment/12481828/redirectActionErrorWithJunitTest.zip
 


On Wed, 2011-06-08 at 16:08 +0100, Miguel wrote:

 Hey Lukasz,
 
 On Wed, 2011-06-08 at 15:40 +0200, Lukasz Lenart wrote:
 
 
  and the result
  
  Hello test, today is 2011/06/08
  ***zzz***
  
 
 To display the problem you have to write issue in the name, not
 test.
 Take a look at the HelloWorldAction - the redirectAction is with login,
 whose result is triggered by writing issue in the field name.
 
 Can you try it again? You should see the error then!
 
 Miguel




Adding a JNDI lookup yields unexpected Struts errors

2011-06-07 Thread Miguel
Dear all,

I am having a strange problem and was hoping anyone knows why this is
happening.

My web app was working correctly and running in development in jetty
running with maven. I'm using Spring's to inject dependencies.

The problem arises when I add a JNDI entry. To do so I:

1) change my container configuration in Maven's pom, so that it sees
jetty-env.xml:
webAppConfig
contextPath//contextPath
jettyEnvXml${basedir}/src/main/resources/jetty/jetty-env.xml
/jettyEnvXml
/webAppConfig

2) Configure a new env-entry in the jetty-env.xml:
Configure id=myApp class=org.eclipse.jetty.webapp.WebAppContext
New class=org.eclipse.jetty.plus.jndi.EnvEntry
ArgRef id=myApp//Arg
ArgxoxoGG/Arg
Arg type=java.lang.StringAAA/Arg
Arg type=booleantrue/Arg
/New
/Configure

3) Add a spring bean definition for this JNDI entry:
jee:jndi-lookup jndi-name=java:comp/env/xoxoGG
id=currentEnvironment  /

The outcome of this is that all links are appended with the value of
xoxoGG (AAA), yielding errors like:
There is no Action mapped for action name
AAA/tutorial/randomiseRedirect. -
or trying to reach http://localhost:8080/AAA/welcome!AAA.action#AAA (why
it is appending so many AAA I don't know)

While this is not strictly a problem with struts, perhaps somehow this
configuration is conflicting with Struts. 
Any help is appreciated in trying to understand this problem!

Regards,

Miguel Almeida




Re: Adding a JNDI lookup yields unexpected Struts errors

2011-06-07 Thread Miguel
On a follow-up of the previous post, the error is the same in Tomcat. It
happens whenever this line is added to applicationContext.xml:
jee:jndi-lookup jndi-name=java:comp/env/xoxoGG
id=currentEnvironment  /

Even if no xoxoGG env property is defined, if I add a
default-value=YYY to the above property Struts will say (for every
action):
There is no Action mapped for action name
YYY/tutorial/randomiseRedirect.

Why is it adding my jndi property to the URL?

On Tue, 2011-06-07 at 18:07 +0100, Miguel wrote:

 Dear all,
 
 I am having a strange problem and was hoping anyone knows why this is
 happening.
 
 My web app was working correctly and running in development in jetty
 running with maven. I'm using Spring's to inject dependencies.
 
 The problem arises when I add a JNDI entry. To do so I:
 
 1) change my container configuration in Maven's pom, so that it sees
 jetty-env.xml:
 webAppConfig
   contextPath//contextPath
   jettyEnvXml${basedir}/src/main/resources/jetty/jetty-env.xml
   /jettyEnvXml
 /webAppConfig
 
 2) Configure a new env-entry in the jetty-env.xml:
 Configure id=myApp class=org.eclipse.jetty.webapp.WebAppContext
   New class=org.eclipse.jetty.plus.jndi.EnvEntry
   ArgRef id=myApp//Arg
   ArgxoxoGG/Arg
   Arg type=java.lang.StringAAA/Arg
   Arg type=booleantrue/Arg
   /New
 /Configure
 
 3) Add a spring bean definition for this JNDI entry:
 jee:jndi-lookup jndi-name=java:comp/env/xoxoGG
 id=currentEnvironment  /
 
 The outcome of this is that all links are appended with the value of
 xoxoGG (AAA), yielding errors like:
 There is no Action mapped for action name
 AAA/tutorial/randomiseRedirect. -
 or trying to reach http://localhost:8080/AAA/welcome!AAA.action#AAA (why
 it is appending so many AAA I don't know)
 
 While this is not strictly a problem with struts, perhaps somehow this
 configuration is conflicting with Struts. 
 Any help is appreciated in trying to understand this problem!
 
 Regards,
 
 Miguel Almeida