L.S.,
Have you tried specifying the configLocation as
"classpath:config/sqlmap-config.xml"?
btw, with ServiceMix 3.1, some locations are automatically added to the
classpath without having to specify them in your xbean.xml file (cfr.
"New in ServiceMix 3.1" on
http://incubator.apache.org/servicemix/classloaders.html"
Gert
kiwisurfer wrote:
Hi,
Is it possible to embed within a Service Unit, resources that the classes in
that service unit require, in particular xml config files?
I have a lw-container managed SU, that has a POJO in it. As part of this SU,
I have already successfully embedded jar files that it requires, and added
the classpath definitions for each, as described on
http://incubator.apache.org/servicemix/servicemix-jsr181.html.
However, in my servicemix.xml file I have defined a number of beans that use
DI. One of the property values being set is the name/path of a configuration
xml file. Eg.
<bean id="sqlMapClient"
class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation" value="config/sqlmap-config.xml"/>
<property name="dataSource" ref="dataSource"/>
</bean>
I have added the "config/sqlmap-config.xml" file to the Service Unit , and
it has also been added to the SU classpath.
However, when I try to deploy it, ServiceMix raises a FileNotFoundException.
Any ideas as to why ServiceMix can't see the path to the sqlmap-config.xml
file?
Thanks.