atom feed15 messages in org.codehaus.enunciate.userRe: [enunciate-user] How does Enuncia...
FromSent OnAttachments
Matt RaibleAug 14, 2009 3:27 pm 
Ryan HeatonAug 14, 2009 3:58 pm 
Matt RaibleAug 16, 2009 11:36 am 
Ryan HeatonAug 17, 2009 8:50 am 
Matt RaibleAug 18, 2009 7:33 am 
Matt RaibleAug 18, 2009 12:20 pm.patch
Matt RaibleAug 18, 2009 2:32 pm 
Ryan HeatonAug 18, 2009 3:51 pm 
Matt RaibleAug 18, 2009 8:16 pm 
Matt RaibleAug 18, 2009 9:32 pm 
Ryan HeatonAug 19, 2009 10:35 am 
Matt RaibleAug 19, 2009 12:16 pm 
Ryan HeatonAug 19, 2009 12:50 pm 
Matt RaibleAug 19, 2009 2:56 pm 
Ryan HeatonAug 19, 2009 3:22 pm 
Subject:Re: [enunciate-user] How does Enunciate go about configuring Spring
From:Matt Raible (ma@raibledesigns.com)
Date:Aug 18, 2009 12:20:01 pm
List:org.codehaus.enunciate.user
Attachments:

I think I've discovered the problem. First of all, Enunciate's ServiceEndpointFactoryBean does not look in parent context files to resolve beans. I believe the attached patch will solve this.

After I make this change, I receive Autowiring errors that I'm guessing are caused by the ServiceEndpointFactoryBean. Since my services are already registered in Spring XML files, is it possible to setup the service beans (in applicationContext.xml) so they use the "serviceImplementationBean" property instead of "defaultImplementationBeanName" and "defaultImplementationBeanClass"?

Thanks,

Matt

I no longer get an error on startup - thanks. However, my beans still have "Impl" in their name. Is that "as designed"?

Also my Spring objects are no longer getting wired up properly. I'm using @Autowired in my service implementations and their @Autowired fields are not getting set. My project does have a fair amount of custom Spring tags, so it's possible this problem is not Enunciate's fault.

On Mon, Aug 17, 2009 at 11:50 AM, Ryan Heaton <stoi@gmail.com>wrote:

No JIRA; I just fixed it out-of-band. I'm deploying 1.14 final today.

On Sun, Aug 16, 2009 at 12:36 PM, Matt Raible <ma@raibledesigns.com>wrote:

Is there a JIRA # for this so I can track when it's fixed?

Thanks,

On Fri, Aug 14, 2009 at 4:59 PM, Ryan Heaton <stoi@gmail.com>wrote:

Wow. You've somehow managed to trigger an old error condition that was once needed, but now it isn't anymore. Basically, the JAX-WS RI was limited in its ability to peer into objects to see their metadata, so if an endpoint interface bean was being proxied (or otherwise wasn't an instance of the endpoint implementation class) then JAX-WS RI would freak out. But since Enunciate is now creating a instrumented implementation class for the endpoints, we don't need that validation check anymore.

I'll get rid of it before I cut 1.14 final.

On Fri, Aug 14, 2009 at 4:27 PM, Matt Raible <ma@raibledesigns.com>wrote:

I'm getting the error below after generating some services with Enunciate. These service implementations have @Autowire annotations. The strange thing in the error message below is that it seems to be referring to the implementation as an interface, rather than the actual interface. Rather than this:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enunciate:service:ConversationDesignServiceImpl' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.context.ApplicationContextException: Found service implementation bean is not an instance of com.company.app.internal.service.ConversationDesignServiceImpl

I would expect this:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enunciate:service:ConversationDesignService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.context.ApplicationContextException: Found service implementation bean is not an instance of com.company.app.service.ConversationDesignService

Any idea why my "impl" is being referred to rather than the interface? I'm guessing "no", but writing these questions seems to often help me figure out the solution. ;-)

Thanks,

SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enunciate:service:ConversationDesignServiceImpl' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.context.ApplicationContextException: Found service implementation bean is not an instance of com.company.app.internal.service.ConversationDesignServiceImpl at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350) 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.startup.Embedded.start(Embedded.java:825) at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(AbstractRunMojo.java:385) at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java:144) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41) 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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.springframework.context.ApplicationContextException: Found service implementation bean is not an instance of com.company.app.internal.service.ConversationDesignServiceImpl at org.codehaus.enunciate.modules.spring_app.ServiceEndpointFactoryBean.initApplicationContext(ServiceEndpointFactoryBean.java:141) at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73) at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:70) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:350) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1331) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)