You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by John Cabral <jo...@gmail.com> on 2008/11/05 22:18:24 UTC
Spring Jars Inside .aar Lib Difficulty (NoClassDefFoundError)
I'm using Spring with Axis2 and have bumped into the problem with the
spring jars being in the WEB-INF/lib folder instead of inside the
.aar/lib when trying to deploy multiple services. I've tried to make
the recommended adjustment but I am still getting an error message.
My web service was working properly until I switched the location of
the spring jars.
Roughly, here is the relevant folder layout I have within axis2,
including the structure of the .aar
\WEB-INF\applicationContext.xml
\WEB-INF\services
\WEB-INF\MyService.aar
\WEB-INF\MyService.aar\META-INF
\WEB-INF\MyService.aar\META-INF\MyService.wsdl
\WEB-INF\MyService.aar\META-INF\MANIFEST.MF
\WEB-INF\MyService.aar\META-INF\services.xml
\WEB-INF\MyService.aar\lib
\WEB-INF\MyService.aar\lib\axis2-spring-1.3.jar
\WEB-INF\MyService.aar\lib\spring-beans.jar
\WEB-INF\MyService.aar\lib\spring-context.jar
\WEB-INF\MyService.aar\lib\spring-core.jar
Because of the intended production environment, the
applicationContext.xml file is outside of the .aar. This has not
caused any problems before.
The error I am receiving is: "The MyService.aar service, which is not
valid, caused java.lang.NoClassDefFoundError:
org/spring/framework/beans/factory/ListableBeanFactory."
This strikes me as a classpath error, but I can't find information on
additional configuration that is needed to run Spring inside an .aar.
Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Spring Jars Inside .aar Lib Difficulty (NoClassDefFoundError)
Posted by John Cabral <jo...@gmail.com>.
AHA! I figured it out.
The problem was that I had the class files for my service in a .jar
that was in the axis2/WEB-INF/lib folder. When I removed that .jar
file and then stored the folders for the classes in the root level of
my .aar I was able to get my two services up and running.
This is the basic pattern that's working for me now:
\WEB-INF\applicationContext.xml
\WEB-INF\services
\WEB-INF\services\MyService.aar
\WEB-INF\services\MyService.aar\META-INF
\WEB-INF\services\MyService.aar\META-INF\MyService.wsdl
\WEB-INF\services\MyService.aar\META-INF\MANIFEST.MF
\WEB-INF\services\MyService.aar\META-INF\services.xml
\WEB-INF\services\MyService.aar\lib
\WEB-INF\services\MyService.aar\lib\axis2-spring-1.3.jar
\WEB-INF\services\MyService.aar\lib\spring-beans.jar
\WEB-INF\services\MyService.aar\lib\spring-context.jar
\WEB-INF\services\MyService.aar\lib\spring-core.jar
\WEB-INF\services\MyService.aar\my\service\*.class
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Spring Jars Inside .aar Lib Difficulty (NoClassDefFoundError)
Posted by John Cabral <jo...@gmail.com>.
<serviceGroup>
<service name="SpringInit" class="my.service.SpringInit">
<description>
This web service initializes Spring.
</description>
<parameter name="ServiceClass" >my.service.SpringInit</parameter>
<parameter name="ServiceTCCL" >composite</parameter>
<parameter name="load-on-startup" >true</parameter>
<operation name="sprintInit">
<messageReceiver
class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
</operation>
</service>
<service name="MyService">
<description>
</description>
<parameter name="useOriginalwsdl">true</parameter>
<parameter name="ServiceTCCL" >composite</parameter>
<parameter name="ServiceObjectSupplier"
>org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier</parameter>
<parameter name="ServiceClass" >my.service.MyService</parameter>
<parameter name="SpringBeanName" >myService</parameter>
<operation name="getCard">
<messageReceiver
class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
</operation>
</service>
</serviceGroup>
activation-1.1.jar
activation-LICENSE.txt
MyService.jar
amps_batch_process.bat
annogen-0.1.0.jar
axiom-api-1.2.5.jar
axiom-dom-1.2.5.jar
axiom-impl-1.2.5.jar
axis2-adb-1.3.jar
axis2-adb-codegen-1.3.jar
axis2-clustering-1.3.jar
axis2-codegen-1.3.jar
axis2-fastinfoset-1.3.jar
axis2-java2wsdl-1.3.jar
axis2-jaxbri-1.3.jar
axis2-jaxws-1.3.jar
axis2-jaxws-api-1.3.jar
axis2-jibx-1.3.jar
axis2-json-1.3.jar
axis2-jws-api-1.3.jar
axis2-kernel-1.3.jar
axis2-LICENSE.txt
axis2-metadata-1.3.jar
axis2-mtompolicy-1.3.jar
axis2-saaj-1.3.jar
axis2-saaj-api-1.3.jar
axis2-spring-1.3.jar
axis2-xmlbeans-1.3.jar
backport-util-concurrent-2.2.jar
bcmail-jdk14-132.jar
bcprov-jdk14-132.jar
bootstrapconnector.jar
checkstyle-all-4.2.jar
commons-codec-1.3.jar
commons-fileupload-1.1.1.jar
commons-httpclient-3.0.1.jar
commons-io-1.2.jar
commons-logging-1.1.jar
examples.jar
exist-fluent.jar
exist-optional.jar
exist.jar
filters.raj
FontBox-0.1.0.jar
geronimo-annotation_1.0_spec-1.1.jar
geronimo-jms_1.1_spec-1.1.jar
GPS.jar
httpcore-4.0-alpha5.jar
httpcore-nio-4.0-alpha5.jar
httpcore-niossl-4.0-alpha5.jar
j2ee-svc.jar
j2ee.jar
javaee.jar
jaxb-api-2.0.jar
jaxb-impl-2.0.5.jar
jaxb-xjc-2.0.5.jar
jaxen-1.1.1.jar
jettison-1.0-RC1.jar
jibx-bind-1.1.5.jar
jibx-run-1.1.5.jar
juh.jar
juli-6.0.10.jar
jurt.jar
jut.jar
jVinci.jar
log4j-1.2.14.jar
lucene-core-2.0.0.jar
lucene-demos-2.0.0.jar
mail-1.4.jar
mail-LICENSE.txt
mex-impl-1.3.jar
neethi-2.0.2.jar
neethi-LICENSE.txt
officebean.jar
PDFBox-0.7.3.jar
ridl.jar
soapmonitor-1.3.jar
spring-beans.jar
spring-context.jar
spring-core.jar
start.jar
stax-api-1.0.1.jar
tribes-6.0.10.jar
uima-adapter-soap.jar
uima-adapter-vinci.jar
uima-core.jar
uima-cpe.jar
uima-document-annotation.jar
uima-examples.jar
uima-tools.jar
unoil.jar
woden-1.0-incubating-M7b.jar
wsdl4j-1.6.2.jar
wstx-asl-3.2.1.jar
xalan-2.7.0.jar
xbean-2.2.0.jar
xercesImpl-2.8.1.jar
xml-apis-1.3.03.jar
xmldb.jar
XmlSchema-1.3.2.jar
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Spring Jars Inside .aar Lib Difficulty (NoClassDefFoundError)
Posted by Andreas Veithen <an...@gmail.com>.
Can you please post the list of JARs in WEB-INF/lib as well as the
content of services.xml?
Andreas
On Wed, Nov 5, 2008 at 22:18, John Cabral <jo...@gmail.com> wrote:
> I'm using Spring with Axis2 and have bumped into the problem with the
> spring jars being in the WEB-INF/lib folder instead of inside the
> .aar/lib when trying to deploy multiple services. I've tried to make
> the recommended adjustment but I am still getting an error message.
>
> My web service was working properly until I switched the location of
> the spring jars.
>
> Roughly, here is the relevant folder layout I have within axis2,
> including the structure of the .aar
>
> \WEB-INF\applicationContext.xml
> \WEB-INF\services
> \WEB-INF\MyService.aar
> \WEB-INF\MyService.aar\META-INF
> \WEB-INF\MyService.aar\META-INF\MyService.wsdl
> \WEB-INF\MyService.aar\META-INF\MANIFEST.MF
> \WEB-INF\MyService.aar\META-INF\services.xml
> \WEB-INF\MyService.aar\lib
> \WEB-INF\MyService.aar\lib\axis2-spring-1.3.jar
> \WEB-INF\MyService.aar\lib\spring-beans.jar
> \WEB-INF\MyService.aar\lib\spring-context.jar
> \WEB-INF\MyService.aar\lib\spring-core.jar
>
>
> Because of the intended production environment, the
> applicationContext.xml file is outside of the .aar. This has not
> caused any problems before.
>
> The error I am receiving is: "The MyService.aar service, which is not
> valid, caused java.lang.NoClassDefFoundError:
> org/spring/framework/beans/factory/ListableBeanFactory."
>
> This strikes me as a classpath error, but I can't find information on
> additional configuration that is needed to run Spring inside an .aar.
>
> Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org