|
From: Kristof J. <dy...@on...> - 2005-02-23 14:09:00
|
Juergen, we need to run to separate webapps which are integrated via WS on the same tomcat (client's choice), so checking the WSDL at startup is not an option. A configurable setting of the WSDL checking would be a perfect solution for that problem. I don't have the application context code anymore and it's not in our CVS either as it wasn't working, but I remember explicitly specifying cglib proxying for that scenario and that's what failed. I needed a quick solution so I separated the WS-integration beans into a separate config file and loading it lazily from the caller manually using the ApplicationContextAware interface, but that's really a workaround, not a solution for the problem. regards, Kristof Juergen Hoeller wrote: > This is not a general problem with LazyInitTargetSource on a FactoryBean: > It's rather a problem with LazyInitTargetSource on a JDK proxy as target, if > no proxy interfaces have been specified. Try specifying an appropriate > interface on your ProxyFactoryBean definition (via the "proxyInterfaces" > bean property); this should automatically lead to a JDK proxy being > generated there too. > > BTW, why do you prefer your JaxRpcPortProxyFactoryBean to be lazily > initialized? To avoid checking the WSDL at startup? It would maybe make > sense to add a lazy initialization option to Spring's > JaxRpcPortProxyFactoryBean itself in this case (I'll consider this). > > Juergen > > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]On Behalf > Of Kristof Jozsa > Sent: Thursday, February 17, 2005 3:45 PM > To: spr...@li... > Subject: [Springframework-developer] is LazyInitTargetSource on > factories possible? > > > Hi, > > do I see it right that LazyInitTargetSource with Spring 1.4 cannot be > applied to factory objects? Concretely, I'd want to initialize the > configured JaxRpcPortProxyFactoryBean in a lazy way and it both looks > like it *is* getting initalized on startup and it throws an exception > about trying to subclass a final class.. (see the exception at the end). > > I'd need to figure out that issue as soon as possible, so any help's > greatly appreciated. Any workarounds might also help.. > > thanks much in advance, > > Kristof > > org.springframework.beans.factory.BeanCreationException: Error creating > bean with name 'rasPublicService' defined in ServletContext resource > [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested > exception is org.aopalliance.aop.AspectException: null > java.lang.IllegalArgumentException: Cannot subclass final class class > $Proxy0 > at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:438) > at > net.sf.cglib.transform.TransformingClassGenerator.generateClass(Transforming > ClassGenerator.java:33) > at > net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy > .java:25) > at > net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java: > 215) > at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:368) > at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:280) > at > org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.jav > a:176) > at > org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.jav > a:137) > at > org.springframework.aop.framework.ProxyFactoryBean.getSingletonInstance(Prox > yFactoryBean.java:241) > at > org.springframework.aop.framework.ProxyFactoryBean.setBeanFactory(ProxyFacto > ryBean.java:201) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory > .createBean(AbstractAutowireCapableBeanFactory.java:338) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory > .createBean(AbstractAutowireCapableBeanFactory.java:260) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra > ctBeanFactory.java:221) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra > ctBeanFactory.java:145) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory > .autowireByName(AbstractAutowireCapableBeanFactory.java:700) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory > .populateBean(AbstractAutowireCapableBeanFactory.java:668) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory > .createBean(AbstractAutowireCapableBeanFactory.java:325) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory > .createBean(AbstractAutowireCapableBeanFactory.java:260) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra > ctBeanFactory.java:221) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra > ctBeanFactory.java:145) > at > org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst > antiateSingletons(DefaultListableBeanFactory.java:282) > at > org.springframework.context.support.AbstractApplicationContext.refresh(Abstr > actApplicationContext.java:317) > at > org.springframework.web.context.support.AbstractRefreshableWebApplicationCon > text.refresh(AbstractRefreshableWebApplicationContext.java:131) > at > org.springframework.web.struts.ContextLoaderPlugIn.createWebApplicationConte > xt(ContextLoaderPlugIn.java:352) > at > org.springframework.web.struts.ContextLoaderPlugIn.initWebApplicationContext > (ContextLoaderPlugIn.java:295) > at > org.springframework.web.struts.ContextLoaderPlugIn.init(ContextLoaderPlugIn. > java:224) > at > org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: > 839) > at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332) > at javax.servlet.GenericServlet.init(GenericServlet.java:256) > at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:220) > at > org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j > ava:445) > at > org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic > ationHandler.java:150) > at > org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext. > java:458) > at org.mortbay.http.HttpServer.start(HttpServer.java:663) > at com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:282) > at com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:104) > at com.iw.plugins.jettyrunner.PluginRunner.main(PluginRunner.java:75) > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |