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 robert lazarski <ro...@gmail.com> on 2009/12/07 22:27:39 UTC

Re: A spring resource xml file, Axis, Tomcat, and Eclipse can be found but can't be found

On Mon, Dec 7, 2009 at 5:55 PM, nhcoder <an...@hotmail.com> wrote:
>
> Hi,
>
>
> Since I need to deploy it on a production machine, I packaged my service
> into an aar file using the axis2 packaging Eclipse plugin, made absolutely
> sure the jar file with the Spring xml file was in the aar file, and decided
> to deploy it to an external Tomcat instance.  Now when I hit the service I
> get the following error:
>
> Exception parsing XML document from class path resource
> [license-beans2.xml]; nested exception is java.io.FileNotFoundException:
> class path resource [license-beans2.xml] cannot be opened because it does
> not exist.
>

You probably don't need any of your spring stuff in the aar file - try
putting everything spring related in WEB-INF/classes. Try that and let
us know what happens.

- R

Re: A spring resource xml file, Axis, Tomcat, and Eclipse can be found but can't be found

Posted by robert lazarski <ro...@gmail.com>.
On Mon, Dec 7, 2009 at 7:03 PM, nhcoder <an...@hotmail.com> wrote:
>
> I moved all the jars to axis2's WEB-INF/lib and it worked.  Thanks.
>
> While it works because I only have one service, doesn't that defeat the
> purpose of keeping the dependencies of different aar's separate from each
> other since every aar can see what is in that lib directory?
>
> Thanks,
>
> Andy
>

You can have as many services as you want with one aar and one spring
instance. You can have lots of aar's with one spring instance. The
only time, imho, that spring inside the aar makes sense is when you
want _isolation_ of each spring instance from each other. One of the
advanced use cases of an aar is isolation from each other, and spring
in the aar can give you that same isolation. I just happen to think
its not that common of a requirement - ymmv.

- R


>
>
> iksrazal wrote:
>>
>> On Mon, Dec 7, 2009 at 6:27 PM, robert lazarski
>> <ro...@gmail.com> wrote:
>>> On Mon, Dec 7, 2009 at 5:55 PM, nhcoder <an...@hotmail.com>
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>>
>>>> Since I need to deploy it on a production machine, I packaged my service
>>>> into an aar file using the axis2 packaging Eclipse plugin, made
>>>> absolutely
>>>> sure the jar file with the Spring xml file was in the aar file, and
>>>> decided
>>>> to deploy it to an external Tomcat instance.  Now when I hit the service
>>>> I
>>>> get the following error:
>>>>
>>>> Exception parsing XML document from class path resource
>>>> [license-beans2.xml]; nested exception is java.io.FileNotFoundException:
>>>> class path resource [license-beans2.xml] cannot be opened because it
>>>> does
>>>> not exist.
>>>>
>>>
>>> You probably don't need any of your spring stuff in the aar file - try
>>> putting everything spring related in WEB-INF/classes. Try that and let
>>> us know what happens.
>>>
>>> - R
>>>
>>
>> I meant WEB-INF/lib . Also, are you sure license-beans2.xml is related
>> to spring?
>>
>> - R
>>
>>
>
> --
> View this message in context: http://old.nabble.com/A-spring-resource-xml-file%2C-Axis%2C-Tomcat%2C-and-Eclipse-can-be-found-but-can%27t-be-found-tp26684011p26685040.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>

Re: A spring resource xml file, Axis, Tomcat, and Eclipse can be found but can't be found

Posted by nhcoder <an...@hotmail.com>.
I moved all the jars to axis2's WEB-INF/lib and it worked.  Thanks.  

While it works because I only have one service, doesn't that defeat the
purpose of keeping the dependencies of different aar's separate from each
other since every aar can see what is in that lib directory?

Thanks,

Andy 



iksrazal wrote:
> 
> On Mon, Dec 7, 2009 at 6:27 PM, robert lazarski
> <ro...@gmail.com> wrote:
>> On Mon, Dec 7, 2009 at 5:55 PM, nhcoder <an...@hotmail.com>
>> wrote:
>>>
>>> Hi,
>>>
>>>
>>> Since I need to deploy it on a production machine, I packaged my service
>>> into an aar file using the axis2 packaging Eclipse plugin, made
>>> absolutely
>>> sure the jar file with the Spring xml file was in the aar file, and
>>> decided
>>> to deploy it to an external Tomcat instance.  Now when I hit the service
>>> I
>>> get the following error:
>>>
>>> Exception parsing XML document from class path resource
>>> [license-beans2.xml]; nested exception is java.io.FileNotFoundException:
>>> class path resource [license-beans2.xml] cannot be opened because it
>>> does
>>> not exist.
>>>
>>
>> You probably don't need any of your spring stuff in the aar file - try
>> putting everything spring related in WEB-INF/classes. Try that and let
>> us know what happens.
>>
>> - R
>>
> 
> I meant WEB-INF/lib . Also, are you sure license-beans2.xml is related
> to spring?
> 
> - R
> 
> 

-- 
View this message in context: http://old.nabble.com/A-spring-resource-xml-file%2C-Axis%2C-Tomcat%2C-and-Eclipse-can-be-found-but-can%27t-be-found-tp26684011p26685040.html
Sent from the Axis - User mailing list archive at Nabble.com.


Re: A spring resource xml file, Axis, Tomcat, and Eclipse can be found but can't be found

Posted by robert lazarski <ro...@gmail.com>.
On Mon, Dec 7, 2009 at 6:27 PM, robert lazarski
<ro...@gmail.com> wrote:
> On Mon, Dec 7, 2009 at 5:55 PM, nhcoder <an...@hotmail.com> wrote:
>>
>> Hi,
>>
>>
>> Since I need to deploy it on a production machine, I packaged my service
>> into an aar file using the axis2 packaging Eclipse plugin, made absolutely
>> sure the jar file with the Spring xml file was in the aar file, and decided
>> to deploy it to an external Tomcat instance.  Now when I hit the service I
>> get the following error:
>>
>> Exception parsing XML document from class path resource
>> [license-beans2.xml]; nested exception is java.io.FileNotFoundException:
>> class path resource [license-beans2.xml] cannot be opened because it does
>> not exist.
>>
>
> You probably don't need any of your spring stuff in the aar file - try
> putting everything spring related in WEB-INF/classes. Try that and let
> us know what happens.
>
> - R
>

I meant WEB-INF/lib . Also, are you sure license-beans2.xml is related
to spring?

- R