Re: tapestry 5.2.4 and spring 3.1M1

2011-12-16 Thread zelenka....@gmail.com
glad to see this one is fixed,
Thanks,
Jan


On Thu, Dec 15, 2011 at 11:35 AM, Igor Drobiazko [via Tapestry] 
ml-node+s1045711n507709...@n5.nabble.com wrote:

 Fixed in trunk and 5.3 branch.

 On Thu, Dec 15, 2011 at 12:54 AM, Thiago H. de Paula Figueiredo 
 [hidden email] http://user/SendEmail.jtp?type=nodenode=5077094i=0
 wrote:

  On Wed, 14 Dec 2011 21:16:45 -0200, [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=5077094i=1
  [hidden email] http://user/SendEmail.jtp?type=nodenode=5077094i=2
 wrote:
 
   I was able to fix this issue (and the above error for 5.3) with the
  following patch:
 
 
  Hi, Matt!
 
  Nice! :)
 
  Could you please attach this patch to the JIRA issue you've opened?
 
 
  --
  Thiago H. de Paula Figueiredo
  Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
  and instructor
  Owner, Ars Machina Tecnologia da Informação Ltda.
  http://www.arsmachina.com.br
 
 
 --**--**-
  To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org[hidden
 email] http://user/SendEmail.jtp?type=nodenode=5077094i=3
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=5077094i=4
 
 


 --
 Best regards,

 Igor Drobiazko
 http://tapestry5.de


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://tapestry.1045711.n5.nabble.com/tapestry-5-2-4-and-spring-3-1M1-tp4462226p5077094.html
  To unsubscribe from tapestry 5.2.4 and spring 3.1M1, click 
 herehttp://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4462226code=emVsZW5rYS5qYW5AZ21haWwuY29tfDQ0NjIyMjZ8LTExNDY3ODcxMzQ=
 .
 NAMLhttp://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespacebreadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/tapestry-5-2-4-and-spring-3-1M1-tp4462226p5079682.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: tapestry 5.2.4 and spring 3.1M1

2011-12-15 Thread Igor Drobiazko
Fixed in trunk and 5.3 branch.

On Thu, Dec 15, 2011 at 12:54 AM, Thiago H. de Paula Figueiredo 
thiag...@gmail.com wrote:

 On Wed, 14 Dec 2011 21:16:45 -0200, m...@raibledesigns.com 
 m...@raibledesigns.com wrote:

  I was able to fix this issue (and the above error for 5.3) with the
 following patch:


 Hi, Matt!

 Nice! :)

 Could you please attach this patch to the JIRA issue you've opened?


 --
 Thiago H. de Paula Figueiredo
 Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
 and instructor
 Owner, Ars Machina Tecnologia da Informação Ltda.
 http://www.arsmachina.com.br

 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org




-- 
Best regards,

Igor Drobiazko
http://tapestry5.de


Re: tapestry 5.2.4 and spring 3.1M1

2011-12-14 Thread m...@raibledesigns.com

m...@raibledesigns.com wrote
 
 If I try 5.3, I get a whole new error:
 
 Tests in error: 
   testListUsers(org.appfuse.webapp.pages.admin.UserListTest): Context
 attribute is not of type WebApplicationContext:
 org.springframework.context.support.GenericApplicationContext@48a77106:
 startup date [Tue Dec 13 12:49:44 MST 2011]; root of context hierarchy
 
 

I was able to fix this issue (and the above error for 5.3) with the
following patch:

Index:
tapestry-spring/src/main/java/org/apache/tapestry5/internal/spring/SpringModuleDef.java
===
---
tapestry-spring/src/main/java/org/apache/tapestry5/internal/spring/SpringModuleDef.java
(revision 1214516)
+++
tapestry-spring/src/main/java/org/apache/tapestry5/internal/spring/SpringModuleDef.java
(working copy)
@@ -78,7 +78,9 @@
  */
 protected ApplicationContext locateApplicationContext(ServletContext
servletContext)
 {
-ApplicationContext context =
WebApplicationContextUtils.getWebApplicationContext(servletContext);
+ApplicationContext context = (ApplicationContext) servletContext
+   
.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
 
 if (context == null)
 {
@@ -153,7 +155,7 @@
 
 private void addServiceDefsForSpringBeans(ApplicationContext context)
 {
-for (final String beanName :
BeanFactoryUtils.beanNamesIncludingAncestors(context))
+for (final String beanName : context.getBeanDefinitionNames())
 {
 String trueName = beanName.startsWith() ?
beanName.substring(1) : beanName;
 


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/tapestry-5-2-4-and-spring-3-1M1-tp4462226p5075968.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: tapestry 5.2.4 and spring 3.1M1

2011-12-14 Thread Thiago H. de Paula Figueiredo
On Wed, 14 Dec 2011 21:16:45 -0200, m...@raibledesigns.com  
m...@raibledesigns.com wrote:



I was able to fix this issue (and the above error for 5.3) with the
following patch:


Hi, Matt!

Nice! :)

Could you please attach this patch to the JIRA issue you've opened?

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: tapestry 5.2.4 and spring 3.1M1

2011-12-13 Thread m...@raibledesigns.com
Are there any plans to fix the Tapestry-Spring integration to fix this issue?

java.lang.RuntimeException: Service id 'environment' has already been
defined by
org.apache.tapestry5.services.TapestryModule.buildEnvironment(PerthreadManager)

I'm seeing it myself after trying to upgrade to Spring 3.1.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/tapestry-5-2-4-and-spring-3-1M1-tp4462226p5072413.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: tapestry 5.2.4 and spring 3.1M1

2011-12-13 Thread Thiago H. de Paula Figueiredo
On Tue, 13 Dec 2011 16:50:51 -0200, m...@raibledesigns.com  
m...@raibledesigns.com wrote:


Are there any plans to fix the Tapestry-Spring integration to fix this  
issue?


java.lang.RuntimeException: Service id 'environment' has already been
defined by
org.apache.tapestry5.services.TapestryModule.buildEnvironment(PerthreadManager)

I'm seeing it myself after trying to upgrade to Spring 3.1.


Hi, Matt!

I couldn't find any JIRA posted for this issue. Please post one and we'll  
fix it. Please include this link as it suggests some solutions:  
http://tapestry.1045711.n5.nabble.com/tapestry-5-2-4-and-spring-3-1M1-td4462226.html#a4742011


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: tapestry 5.2.4 and spring 3.1M1

2011-12-13 Thread m...@raibledesigns.com
Thanks for the fast response! Created at
https://issues.apache.org/jira/browse/TAP5-1788.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/tapestry-5-2-4-and-spring-3-1M1-tp4462226p5072483.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: tapestry 5.2.4 and spring 3.1M1

2011-12-13 Thread Thiago H. de Paula Figueiredo
On Tue, 13 Dec 2011 17:25:13 -0200, m...@raibledesigns.com  
m...@raibledesigns.com wrote:



Thanks for the fast response!


Someone once compared this list to an IRC channel . . . :P


Created at https://issues.apache.org/jira/browse/TAP5-1788.


Thanks! By the way, have you checked Tapestry 5.3?

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: tapestry 5.2.4 and spring 3.1M1

2011-12-13 Thread m...@raibledesigns.com

On Dec 13, 2011, at 12:40 PM, Thiago H de Paula Figueiredo [via Tapestry] wrote:

 On Tue, 13 Dec 2011 17:25:13 -0200, [hidden email]   
 [hidden email] wrote: 
 
  Thanks for the fast response! 
 
 Someone once compared this list to an IRC channel . . . :P 
 
  Created at https://issues.apache.org/jira/browse/TAP5-1788. 
 
 Thanks! By the way, have you checked Tapestry 5.3? 
 

If I try 5.3, I get a whole new error:

Tests in error: 
  testListUsers(org.appfuse.webapp.pages.admin.UserListTest): Context attribute 
is not of type WebApplicationContext: 
org.springframework.context.support.GenericApplicationContext@48a77106: startup 
date [Tue Dec 13 12:49:44 MST 2011]; root of context hierarchy

Here's how I'm trying to create a Spring-aware PageTester in my application:

@ContextConfiguration(locations = {
classpath:/applicationContext-resources.xml, 
classpath:/applicationContext-dao.xml,
classpath:/applicationContext-service.xml, 
classpath*:/applicationContext.xml,
/WEB-INF/applicationContext*.xml})
public abstract class BasePageTestCase extends 
AbstractTransactionalJUnit4SpringContextTests {
protected PageTester tester;
protected Document doc;
protected MapString, String fieldValues;
protected final Log log = LogFactory.getLog(getClass());
protected static final String MESSAGES = Constants.BUNDLE_KEY;
private int smtpPort = 25250;

@Before
public void onSetUp() {
String appPackage = org.appfuse.webapp;
String appName = app;
final MockServletContext servletContext = new MockServletContext();

servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE,
 applicationContext);

servletContext.addInitParameter(SpringConstants.USE_EXTERNAL_SPRING_CONTEXT, 
true);

tester = new PageTester(appPackage, appName, src/main/webapp) {
@Override
protected ModuleDef[] provideExtraModuleDefs() {
return new ModuleDef[]{new SpringModuleDef(servletContext)};
}
};



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/tapestry-5-2-4-and-spring-3-1M1-tp4462226p5072571.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: tapestry 5.2.4 and spring 3.1M1

2011-08-27 Thread zelenka....@gmail.com
actually tapestry-spring integration with external context set tu True uses 

BeanFactoryUtils.beanNamesIncludingAncestors(context)

to get list of beans to be exported as tapestry services. Maybe it should
use just

context.getBeanDefinitionNames()

because starting with Spring 3.1 the former returns also bean named
environment and tapestry then crashes with:

SEVERE: Exception starting filter app
java.lang.RuntimeException: Service id 'environment' has already been
defined by
org.apache.tapestry5.services.TapestryModule.buildEnvironment(PerthreadManager)
(at TapestryModule.java:2686) and may not be redefined by
org.apache.tapestry5.internal.spring.SpringBeanServiceDef@6f0294. You should
rename one of the service builder methods.
at
org.apache.tapestry5.ioc.internal.RegistryImpl.init(RegistryImpl.java:208)
at
org.apache.tapestry5.ioc.RegistryBuilder.build(RegistryBuilder.java:170)
at
org.apache.tapestry5.internal.TapestryAppInitializer.createRegistry(TapestryAppInitializer.java:214)
at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:95)

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/tapestry-5-2-4-and-spring-3-1M1-tp4462226p4742011.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



tapestry 5.2.4 and spring 3.1M1

2011-06-07 Thread jan zelenka
Hi,

I use Spring in tapestry via spring-tapestry module
(org.apache.tapestry5.spring.TapestrySpringFilter filter class)
and tapestry.use-external-spring-context set to true, because I need to have
Spring beans exposed as tapestry services for injection into pages and
services

After upgrading Spring 3.1M1 this stopped work with error:
service with id environment already defined...

which is probably caused by Spring 3.1 introducing internal bean called
environment.

Question is how these two make work again... so far I thought along these
lines:

1) rename Tapestry environment service which is defined in TapestryModule
  - Is it possible ? How?

2) rename Spring internal environment bean
  ok, I will ask this on Spring forum :)

3) if neither of above possible, modify spring-tapestry module code to
silently swallow exception when exporting spring beans as tapestry service
  - I really do not need spring internal environment bean exposed as a
tapestry service a I think that spring beans are exposed after Tapestry own
services (so Tapestry environment service will be first)

Any thoughts?
Or should this be asked on dev list or entered into JIRA?

Thanks, Jan