cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Kieselhorst (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-2558) ClientProxyFactoryBeanDefinitionParser is called multiple times
Date Tue, 08 Dec 2009 07:38:18 GMT

    [ https://issues.apache.org/jira/browse/CXF-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12787354#action_12787354
] 

Dennis Kieselhorst commented on CXF-2558:
-----------------------------------------

The problem also occurs when injecting a client with the JSF DelegatingVariableResolver.

> ClientProxyFactoryBeanDefinitionParser is called multiple times
> ---------------------------------------------------------------
>
>                 Key: CXF-2558
>                 URL: https://issues.apache.org/jira/browse/CXF-2558
>             Project: CXF
>          Issue Type: Bug
>          Components: Simple Frontend
>    Affects Versions: 2.2.5
>         Environment: Spring 2.5.6
>            Reporter: Dennis Kieselhorst
>            Priority: Critical
>
> In some cases we're using the ContextSingletonBeanFactoryLocator to obtain a cxf client
from a non spring bean (cp. Spring's section about "Glue code and the evil singleton"). For
example:
> BeanFactory bf = ContextSingletonBeanFactoryLocator.getInstance().useBeanFactory("cssBeanFactory").getFactory();
> final AccountService accountService = (AccountService) bf.getBean("accountService", AccountService.class);
> With 2.2.3 this was no problem...the proxies were only created once at startup (no further
call, when bf.getBean is called):
> 	ReflectionServiceFactoryBean.buildServiceFromClass() line: 351	
> 	ReflectionServiceFactoryBean.initializeServiceModel() line: 444	
> 	ReflectionServiceFactoryBean.create() line: 195	
> 	ClientFactoryBean(AbstractWSDLBasedEndpointFactory).createEndpoint() line: 100	
> 	ClientFactoryBean.create() line: 52	
> 	ClientProxyFactoryBeanDefinitionParser$SpringClientProxyFactoryBean(ClientProxyFactoryBean).create()
line: 102	
> 	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native
method]	
> 	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39	
> 	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25	
> 	Method.invoke(Object, Object...) line: 597	
> 	CglibSubclassingInstantiationStrategy(SimpleInstantiationStrategy).instantiate(RootBeanDefinition,
String, BeanFactory, Object, Method, Object[]) line: 115	
> 	ConstructorResolver.instantiateUsingFactoryMethod(String, RootBeanDefinition, Object[])
line: 435	
> 	DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).instantiateUsingFactoryMethod(String,
RootBeanDefinition, Object[]) line: 903	
> 	DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).createBeanInstance(String,
RootBeanDefinition, Object[]) line: 817	
> 	DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).doCreateBean(String,
RootBeanDefinition, Object[]) line: 440	
> 	AbstractAutowireCapableBeanFactory$1.run() line: 409	
> 	AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line:
not available [native method]	
> 	DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).createBean(String, RootBeanDefinition,
Object[]) line: 380	
> 	AbstractBeanFactory$1.getObject() line: 264	
> 	DefaultListableBeanFactory(DefaultSingletonBeanRegistry).getSingleton(String, ObjectFactory)
line: 222	
> 	DefaultListableBeanFactory(AbstractBeanFactory).doGetBean(String, Class, Object[], boolean)
line: 261	
> 	DefaultListableBeanFactory(AbstractBeanFactory).getBean(String, Class, Object[]) line:
185	
> 	DefaultListableBeanFactory(AbstractBeanFactory).getBean(String) line: 164	
> 	DefaultListableBeanFactory.preInstantiateSingletons() line: 429	
> 	ClassPathXmlApplicationContext(AbstractApplicationContext).finishBeanFactoryInitialization(ConfigurableListableBeanFactory)
line: 728	
> 	ClassPathXmlApplicationContext(AbstractApplicationContext).refresh() line: 380	
> 	ClassPathXmlApplicationContext.<init>(String[], boolean, ApplicationContext) line:
139	
> 	ClassPathXmlApplicationContext.<init>(String[]) line: 93	
> 	NativeConstructorAccessorImpl.newInstance0(Constructor, Object[]) line: not available
[native method]	
> 	NativeConstructorAccessorImpl.newInstance(Object[]) line: 39	
> 	DelegatingConstructorAccessorImpl.newInstance(Object[]) line: 27	
> 	Constructor<T>.newInstance(Object...) line: 513	
> 	BeanUtils.instantiateClass(Constructor, Object[]) line: 100	
> 	CglibSubclassingInstantiationStrategy(SimpleInstantiationStrategy).instantiate(RootBeanDefinition,
String, BeanFactory, Constructor, Object[]) line: 87	
> 	ConstructorResolver.autowireConstructor(String, RootBeanDefinition, Constructor[], Object[])
line: 248	
> 	DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).autowireConstructor(String,
RootBeanDefinition, Constructor[], Object[]) line: 925	
> 	DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).createBeanInstance(String,
RootBeanDefinition, Object[]) line: 835	
> 	DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).doCreateBean(String,
RootBeanDefinition, Object[]) line: 440	
> 	AbstractAutowireCapableBeanFactory$1.run() line: 409	
> 	AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line:
not available [native method]	
> 	DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).createBean(String, RootBeanDefinition,
Object[]) line: 380	
> 	AbstractBeanFactory$1.getObject() line: 264	
> 	DefaultListableBeanFactory(DefaultSingletonBeanRegistry).getSingleton(String, ObjectFactory)
line: 222	
> 	DefaultListableBeanFactory(AbstractBeanFactory).doGetBean(String, Class, Object[], boolean)
line: 261	
> 	DefaultListableBeanFactory(AbstractBeanFactory).getBean(String, Class, Object[]) line:
185	
> 	DefaultListableBeanFactory(AbstractBeanFactory).getBean(String, Class) line: 168	
> 	ClassPathXmlApplicationContext(AbstractApplicationContext).getBean(String, Class) line:
884	
> 	ContextSingletonBeanFactoryLocator(SingletonBeanFactoryLocator).useBeanFactory(String)
line: 397	
> 	ContextLoader.loadParentContext(ServletContext) line: 341	
> 	ContextLoader.initWebApplicationContext(ServletContext) line: 195	
> 	ContextLoaderListener.contextInitialized(ServletContextEvent) line: 45	
> With 2.2.5 there is no call at startup time, but each time bf.getBean is called 
> 	ReflectionServiceFactoryBean.buildServiceFromClass() line: 432	
> 	ReflectionServiceFactoryBean.initializeServiceModel() line: 523	
> 	ReflectionServiceFactoryBean.create() line: 271	
> 	ClientFactoryBean(AbstractWSDLBasedEndpointFactory).createEndpoint() line: 100	
> 	ClientFactoryBean.create() line: 51	
> 	ClientProxyFactoryBeanDefinitionParser$SpringClientProxyFactoryBean(ClientProxyFactoryBean).create()
line: 102	
> 	ClientProxyFactoryBeanDefinitionParser$SpringClientProxyFactoryBean.getObject() line:
111	
> 	FactoryBeanRegistrySupport$1.run() line: 121	
> 	AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line:
not available [native method]	
> 	DefaultListableBeanFactory(FactoryBeanRegistrySupport).doGetObjectFromFactoryBean(FactoryBean,
String, boolean) line: 116	
> 	DefaultListableBeanFactory(FactoryBeanRegistrySupport).getObjectFromFactoryBean(FactoryBean,
String, boolean) line: 98	
> 	DefaultListableBeanFactory(AbstractBeanFactory).getObjectForBeanInstance(Object, String,
String, RootBeanDefinition) line: 1288	
> 	DefaultListableBeanFactory(AbstractBeanFactory).doGetBean(String, Class, Object[], boolean)
line: 217	
> 	DefaultListableBeanFactory(AbstractBeanFactory).getBean(String, Class, Object[]) line:
185	
> 	DefaultListableBeanFactory(AbstractBeanFactory).getBean(String, Class) line: 168	
> 	ClassPathXmlApplicationContext(AbstractApplicationContext).getBean(String, Class) line:
884	
> After some time this leads to a OutOfMemoryError:
> org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'accountService': FactoryBean threw exception on
>  object creation; nested exception is java.lang.OutOfMemoryError: Java heap space

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message