Hi
Here is my stack trace, it looks like the interface is not compiled
when the impl is generated.
Any idea ?
Cheers
Guillqume
Jan 8, 2008 8:45:06 PM org.springframework.web.context.ContextLoader
initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'helloEndPoint': Cannot resolve reference to
bean 'helloworldImpl' while setting constru
ctor argument with index 1; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'helloworldImpl': BeanPostProcessor befo
re instantiation of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'scriptedObject.helloworldImpl': In
stantiation of bean failed; nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException:
Factory method [public java.lang.Object org.springframework.scr
ipting.groovy.GroovyScriptFactory.getScriptedObject(org.springframework.scripting.ScriptSource,java.lang.Class[])
throws java.io.IOException,org.springframework.scripting.Scri
ptCompilationException] threw exception; nested exception is
org.springframework.scripting.ScriptCompilationException: Could not
compile Groovy script: class path resource [He
lloWorldImpl.groovy]; nested exception is
org.codehaus.groovy.control.MultipleCompilationErrorsException:
startup failed, script1199796306619.groovy: 21: unable to resolve cla
ss HelloWorld
@ line 21, column 8.
1 error
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'helloworldImpl': BeanPostProcessor
before instantiation of bean failed; nest
ed exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'scriptedObject.helloworldImpl': Instantiation
of bean failed; nested ex
ception is org.springframework.beans.factory.BeanDefinitionStoreException:
Factory method [public java.lang.Object
org.springframework.scripting.groovy.GroovyScriptFactory.get
ScriptedObject(org.springframework.scripting.ScriptSource,java.lang.Class[])
throws
java.io.IOException,org.springframework.scripting.ScriptCompilationException]
threw excepti
on; nested exception is
org.springframework.scripting.ScriptCompilationException: Could not
compile Groovy script: class path resource [HelloWorldImpl.groovy];
nested exceptio
n is org.codehaus.groovy.control.MultipleCompilationErrorsException:
startup failed, script1199796306619.groovy: 21: unable to resolve
class HelloWorld
@ line 21, column 8.
1 error
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'scriptedObject.helloworldImpl':
Instantiation of bean failed; nested excepti
on is org.springframework.beans.factory.BeanDefinitionStoreException:
Factory method [public java.lang.Object
org.springframework.scripting.groovy.GroovyScriptFactory.getScrip
tedObject(org.springframework.scripting.ScriptSource,java.lang.Class[])
throws
java.io.IOException,org.springframework.scripting.ScriptCompilationException]
threw exception; n
ested exception is
org.springframework.scripting.ScriptCompilationException: Could not
compile Groovy script: class path resource [HelloWorldImpl.groovy];
nested exception is
org.codehaus.groovy.control.MultipleCompilationErrorsException:
startup failed, script1199796306619.groovy: 21: unable to resolve
class HelloWorld
@ line 21, column 8.
1 error
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
Factory method [public java.lang.Object
org.springframework.scripting.groovy.GroovyScriptFactory.get
ScriptedObject(org.springframework.scripting.ScriptSource,java.lang.Class[])
throws
java.io.IOException,org.springframework.scripting.ScriptCompilationException]
threw excepti
on; nested exception is
org.springframework.scripting.ScriptCompilationException: Could not
compile Groovy script: class path resource [HelloWorldImpl.groovy];
nested exceptio
n is org.codehaus.groovy.control.MultipleCompilationErrorsException:
startup failed, script1199796306619.groovy: 21: unable to resolve
class HelloWorld
@ line 21, column 8.
1 error
Caused by: org.springframework.scripting.ScriptCompilationException:
Could not compile Groovy script: class path resource
[HelloWorldImpl.groovy]; nested exception is org.code
haus.groovy.control.MultipleCompilationErrorsException: startup
failed, script1199796306619.groovy: 21: unable to resolve class
HelloWorld
@ line 21, column 8.
1 error
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException:
startup failed, script1199796306619.groovy: 21: unable to resolve
class HelloWorld
@ line 21, column 8.
1 error
at
org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:326)
at
org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:848)
at
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:480)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:306)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:275)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:270)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:242)
at
org.springframework.scripting.groovy.GroovyScriptFactory.getScriptedObject(GroovyScriptFactory.java:131)
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:585)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:118)
at
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:332)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:778)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:705)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:268)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at
org.springframework.scripting.support.ScriptFactoryPostProcessor.postProcessBeforeInstantiation(ScriptFactoryPostProcessor.java:284)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:682)
On Jan 8, 2008 6:26 PM, Jeff Zhang <[EMAIL PROTECTED]> wrote:
> Hi Guillaume,
>
> Since apache maillist can't attach file, I will send to you by your
> email address.
> I visit http://localhost:8080/spring_http/HelloWorld?wsdl by the
> browser, it return the right wsdl file.
> I use spring 2.0.6.
>
> Hope useful.
> Jeff
>
>
> tog wrote:
> > Hi Jeff,
> >
> > I just checked and I have all those files (yes I read the README :-) )
> > So you mean you get the same WSDL by choosing any of the jaxws:endpoint ?
> >
> > Could you send me your webapp (without the lib dir) ?
> > I am using the 2.0.7 spring version.
> >
> > Cheers
> > Guillaume
> >
> > On Jan 8, 2008 5:12 PM, Jeff Zhang <[EMAIL PROTECTED]> wrote:
> >
> >> Hi Guillaume,
> >>
> >> I tested on my machine, it works.
> >> Could you check the required 3rd-party jars was put into WEB-INF/lib,
> >> you can find the jars in the README.txt in groovy sample directory.
> >> * spring-aop-2.0.x.jar
> >> * spring-support-2.0.x.jar
> >> * groovy-1.0.jar
> >> * antlr-2.7.6.jar
> >> * asm-2.2.3.jar
> >>
> >> regards
> >> Jeff
> >>
> >>
> >> tog wrote:
> >>
> >>> My goal is to deploy configure a groovy service in tomcat using spring.
> >>>
> >>> I started using the java_first_spring_support samples. I deployed it
> >>> into tomcat and started to modify it a bit.
> >>> I added the files HelloWorld.groovy & HelloWorldImpl.groovy in
> >>> webapps/spring_http/WEB-INF/classes.
> >>> I then modified the beans.xml so that it look like this:
> >>>
> >>> <beans xmlns="http://www.springframework.org/schema/beans"
> >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>> xmlns:lang="http://www.springframework.org/schema/lang"
> >>> xmlns:jaxws="http://cxf.apache.org/jaxws"
> >>> xsi:schemaLocation="
> >>> http://www.springframework.org/schema/beans
> >>> http://www.springframework.org/schema/beans/spring-beans.xsd
> >>> http://www.springframework.org/schema/lang
> >>> http://www.springframework.org/schema/lang/spring-lang-2.0.xsd
> >>> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
> >>>
> >>> <import resource="classpath:META-INF/cxf/cxf.xml" />
> >>> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"
> >>> />
> >>> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> >>>
> >>> <lang:groovy id="helloworld"
> >>> script-source="classpath:HelloWorld.groovy" scope="prototype"/>
> >>> <lang:groovy id="helloworldImpl"
> >>> script-source="classpath:HelloWorldImpl.groovy" scope="prototype"/>
> >>>
> >>> <bean id="hello" class="demo.spring.HelloWorldImpl" />
> >>> <jaxws:endpoint id="helloEndPoint"
> >>> implementor="#helloworldImpl" address="/HelloWorld" />
> >>> <!--
> >>> <jaxws:endpoint id="helloEndPoint" implementor="#hello"
> >>> address="/HelloWorld" />
> >>> -->
> >>>
> >>> </beans>
> >>>
> >>> Starting tomcat and looking the logs is fine except that my WSDL is
> >>> almost empty (see below). Any idea what I am doing wrong ?
> >>>
> >>> <wsdl:definitions name="HelloWorldImplService"
> >>> targetNamespace="http://unknown.namespace/">
> >>> <wsdl:portType name="HelloWorldImpl">
> >>> </wsdl:portType>
> >>> <wsdl:binding name="HelloWorldImplServiceSoapBinding"
> >>> type="tns:HelloWorldImpl">
> >>> <soap:binding style="document"
> >>> transport="http://schemas.xmlsoap.org/soap/http"/>
> >>> </wsdl:binding>
> >>> <wsdl:service name="HelloWorldImplService">
> >>> <wsdl:port binding="tns:HelloWorldImplServiceSoapBinding"
> >>> name="HelloWorldImplPort">
> >>> <soap:address location="http://localhost:8080/spring_http/HelloWorld"/>
> >>> </wsdl:port>
> >>> </wsdl:service>
> >>> </wsdl:definitions>
> >>>
> >>>
> >>>
> >
> >
> >
> >
>
--
Best Regards
Guillaume
http://cheztog.blogspot.com