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 Martin Polet <im...@skynet.be> on 2007/04/27 18:04:26 UTC

access to hibernate mapping file inside an .aar?

Hi,

I would like to know how to access my hibernate mapping file from the  
applicationContext.xml.
I'm using Spring 3 with hibernate 3.

Here is my bean from applicationcontext.xml which call my mapping file:

<bean id="mysessionFactory"  
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
             <property name="dataSource">
                         <ref bean="dataSource" />
             </property>
             <property name="hibernateProperties">
                         <ref bean="myHibernateProperties" />
             </property>
             <property name="mappingResources">
                         <list>

                         <value>/WEB-INF/AbsentiaD.hbm.xml</value>

                         </list>
             </property>
     </bean>




Here is the error:

[CODE]
Caused by: org.springframework.beans.factory.BeanCreationException:  
Error creating bean with name 'mysessionFactory' defined in class  
path resource [WEB-INF/applicationContext.xml]: Invocation of init  
method failed; nested exception is java.io.FileNotFoundException:  
class path resource [classpath*:**/AbsentiaD.hbm.xml] cannot be  
opened because it does not exist
Caused by: java.io.FileNotFoundException: class path resource  
[classpath*:**/AbsentiaD.hbm.xml] cannot be opened because it does  
not exist
[/CODE]

Thx a lot



____________________________________

Martin Polet
15 chemin des hayes
1380 Lasne

E-mail: martin.polet@skynet.be
GSM: 0477/ 90 48 51



Re: access to hibernate mapping file inside an .aar?

Posted by Davanum Srinivas <da...@gmail.com>.
instead of null in the first parameter for MultiParentClassLoader pass
an empty array list like so.

new URL[0]

-- dims

On 4/29/07, Martin Polet <im...@skynet.be> wrote:
> Not working neither. i have a null pointer exception this time.
> But I think the problem is coming from the place where i put my hibernate
> mapping files.
> Currently, the are in /web-inf with my applicationContext.xml which is
> recognized.
>
> Where do i have to put them exactly in my aar?
>
>
> And here is the stack trace with your code:
>
> http://imacx.ath.cx/tmp/axis_error2.txt
>
> thx for your time!
>
>
> Le 29-avr.-07 à 15:55, Davanum Srinivas a écrit :
>
>
> Last resort, do what we do in composite scenario.
>
> appCtx.setClassLoader(new
> org.apache.axis2.util.MultiParentClassLoader(null, new
> ClassLoader[]
> {AxisService.class.getClassLoader(),
> axisService.getClassLoader() }
> ));
>
> thanks,
> -- dims
>
> On 4/29/07, Martin Polet <im...@skynet.be> wrote:
> Unfortunaly, it's not working neither. If i put
> AxisService.class.getClassLoader(),
> it doesn't find my applicationContext.xml which was found with
> axisService.getClassLoader();
>
>
>
> Le 29-avr.-07 à 03:04, Davanum Srinivas a écrit :
>
>
> Try the following:
>
> ClassLoader classLoader =
> AxisService.class.getClassLoader();
>
> At startup time, the TCCL does not kick in yet.
>
> -- dims
>
> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
> Actualy, the error occurs when I start tomcat, when it try to deploy the
> aar.
>
> Here is the stack trace when my SpringInit class (with startUp and Shutdown
> method) try to make a refresh on my applicationContext:
>
>  public void startUp(ConfigurationContext configurationContext, AxisService
> axisService) {
>         try {
>             ClassLoader classLoader = axisService.getClassLoader();
>             ClassPathXmlApplicationContext appCtx = new
>                     ClassPathXmlApplicationContext(new
> String[] {"/WEB-INF/applicationContext.xml"}, false);
>             appCtx.setClassLoader(classLoader);
>
>             appCtx.refresh(); //error occurs here...
>
>             System.out.println("spring loaded");
>         }catch (Exception ex) {
>             ex.printStackTrace();
>         }
>     }
>
> Here is the stack trace with the method:
>
> http://imacx.ath.cx/tmp/axis_error.txt
>
>
>
>
> Thx for your help
>
>
>
> Le 28-avr.-07 à 17:36, Davanum Srinivas a écrit :
>
>
> can u paste a stack trace?
>
> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
> Thx for your answer but i all ready done this.
>
> Here is my servide.xml:
>
> <serviceGroup>
>
> <service name="EawServiceAdb"
> class="com.unisys.r4egov.eaw.spring.service.SpringInit">
>  <messageReceivers>
>  <messageReceiver
> mep="http://www.w3.org/2004/08/wsdl/in-out"
> class="com.unisys.r4egov.eaw.axis.EawServiceAdbMessageReceiverInOut"/>
>  </messageReceivers>
>
>  <parameter name="ServiceTCCL"
> locked="false">composite</parameter>
>  <parameter name="ServiceObjectSupplier"
> locked="false">org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier</parameter>
>  <parameter name="SpringBeanName"
> locked="false">eawServiceAxis</parameter>
>
>
>  <operation name="DeleteEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/DeleteEawResponse</outputActionMapping>
>  </operation>
>  <operation name="AddEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/AddEawResponse</outputActionMapping>
>  </operation>
>  <operation name="GetListEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/GetListEawResponse</outputActionMapping>
>  </operation>
>  <operation name="EditEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/EditEawResponse</outputActionMapping>
>  </operation>
> </service>
> </serviceGroup>
>
> I don't understand why it doesn't find my hibernate file and my
> applicationContext yes...
>
>
>
>
> Le 28-avr.-07 à 15:14, Davanum Srinivas a écrit :
>
> Set ServiceTCCL parameter to composite as mentioned here:
> http://wso2.org/blog/dims/1131
>
> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
> Hi,
>
> I will give a little bit more details about my problem:
>
> i follow this article:
>
> http://ws.apache.org/axis2/1_1_1/spring.html
>
> Everything is ok except that my applicationContext can't access my hibernate
> file.
> But, it can access my jdbc.properties which is also in
> /WEB-INF/jbbc.properties...
>
> And the point which is not very clear is the article, is the last point as
> follow:
>
>  <bean id="mySessionFactory"
> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>                 <property name="mappingLocations">
>
> <value>classpath*:**/MyEntity.hbm.xml</value>
>                 </property>
>                 ...
>  </bean>
>
> how can i fix the "classpath" in the field value?
>
>
> Can someone help me, thank you !
>
>
>
>
>
>
> Le 27-avr.-07 à 18:04, Martin Polet a écrit :
>
> Hi,
>
>
> I would like to know how to access my hibernate mapping file from the
> applicationContext.xml.
> I'm using Spring 3 with hibernate 3.
>
> Here is my bean from applicationcontext.xml which call my mapping file:
>
> <bean id="mysessionFactory"
> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>             <property name="dataSource">
>                         <ref bean="dataSource" />
>             </property>
>             <property name="hibernateProperties">
>                         <ref bean="myHibernateProperties" />
>             </property>
>             <property name="mappingResources">
>                         <list>
>
>
>
> <value>/WEB-INF/AbsentiaD.hbm.xml</value>
>
>                         </list>
>             </property>
>     </bean>
>
>
>
>
>
>
> Here is the error:
>
>
> [CODE]
> Caused by:
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'mysessionFactory' defined in class path
> resource [WEB-INF/applicationContext.xml]: Invocation of
> init method failed; nested exception is java.io.FileNotFoundException: class
> path resource [classpath*:**/AbsentiaD.hbm.xml] cannot be
> opened because it does not exist
> Caused by: java.io.FileNotFoundException: class path resource
> [classpath*:**/AbsentiaD.hbm.xml] cannot be opened because
> it does not exist
> [/CODE]
>
>  Thx a lot
>
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: access to hibernate mapping file inside an .aar?

Posted by robert lazarski <ro...@gmail.com>.
You might have already tried this, but have you placed spring in debug ?
When using classpath*:** with hibernate files, spring's debug will show all
the locations it is looking in.

One more tip: You might be able to hard code a specific location for your
files as done here - see the debug messages as explained above:

http://www.jroller.com/page/gmazza?entry=refactoring_the_spring_mvc_web

HTH,
Robert

On 4/29/07, Martin Polet <im...@skynet.be> wrote:
>
> Not working neither. i have a null pointer exception this time.But I think
> the problem is coming from the place where i put my hibernate mapping files.
> Currently, the are in /web-inf with my applicationContext.xml which is
> recognized.
>
> Where do i have to put them exactly in my aar?
>
>
> And here is the stack trace with your code:
>
> http://imacx.ath.cx/tmp/axis_error2.txt
>
> thx for your time!
>
>
> Le 29-avr.-07 à 15:55, Davanum Srinivas a écrit :
>
> Last resort, do what we do in composite scenario.
>
> appCtx.setClassLoader(new
> org.apache.axis2.util.MultiParentClassLoader(null, new ClassLoader[]
> {AxisService.class.getClassLoader(), axisService.getClassLoader() }
> ));
>
> thanks,
> -- dims
>
> On 4/29/07, Martin Polet < imacx@skynet.be> wrote:
>
> Unfortunaly, it's not working neither. If i put
> AxisService.class.getClassLoader(),
> it doesn't find my applicationContext.xml which was found with
> axisService.getClassLoader();
>
>
>
> Le 29-avr.-07 à 03:04, Davanum Srinivas a écrit :
>
>
> Try the following:
>
> ClassLoader classLoader =
> AxisService.class.getClassLoader ();
>
> At startup time, the TCCL does not kick in yet.
>
> -- dims
>
> On 4/28/07, Martin Polet < imacx@skynet.be> wrote:
> Actualy, the error occurs when I start tomcat, when it try to deploy the
> aar.
>
> Here is the stack trace when my SpringInit class (with startUp and
> Shutdown
> method) try to make a refresh on my applicationContext:
>
>  public void startUp(ConfigurationContext configurationContext,
> AxisService
> axisService) {
>         try {
>             ClassLoader classLoader = axisService.getClassLoader();
>             ClassPathXmlApplicationContext appCtx = new
>                     ClassPathXmlApplicationContext(new
> String[] {"/WEB-INF/applicationContext.xml"}, false);
>             appCtx.setClassLoader(classLoader);
>
>             appCtx.refresh(); //error occurs here...
>
>             System.out.println("spring loaded");
>         }catch (Exception ex) {
>             ex.printStackTrace();
>         }
>     }
>
> Here is the stack trace with the method:
>
> http://imacx.ath.cx/tmp/axis_error.txt
>
>
>
>
> Thx for your help
>
>
>
> Le 28-avr.-07 à 17:36, Davanum Srinivas a écrit :
>
>
> can u paste a stack trace?
>
> On 4/28/07, Martin Polet <imacx@skynet.be > wrote:
> Thx for your answer but i all ready done this.
>
> Here is my servide.xml:
>
> <serviceGroup>
>
> <service name="EawServiceAdb"
> class=" com.unisys.r4egov.eaw.spring.service.SpringInit">
>  <messageReceivers>
>  <messageReceiver
> mep="http://www.w3.org/2004/08/wsdl/in-out"
> class="com.unisys.r4egov.eaw.axis.EawServiceAdbMessageReceiverInOut "/>
>  </messageReceivers>
>
>  <parameter name="ServiceTCCL"
> locked="false">composite</parameter>
>  <parameter name="ServiceObjectSupplier"
> locked="false">
> org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier
> </parameter>
>  <parameter name="SpringBeanName"
> locked="false">eawServiceAxis</parameter>
>
>
>  <operation name="DeleteEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/DeleteEawResponse
> </outputActionMapping>
>  </operation>
>  <operation name="AddEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/AddEawResponse
> </outputActionMapping>
>  </operation>
>  <operation name="GetListEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/GetListEawResponse
> </outputActionMapping>
>  </operation>
>  <operation name="EditEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/EditEawResponse
> </outputActionMapping>
>  </operation>
> </service>
> </serviceGroup>
>
> I don't understand why it doesn't find my hibernate file and my
> applicationContext yes...
>
>
>
>
> Le 28-avr.-07 à 15:14, Davanum Srinivas a écrit :
>
> Set ServiceTCCL parameter to composite as mentioned here:
> http://wso2.org/blog/dims/1131
>
> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
> Hi,
>
> I will give a little bit more details about my problem:
>
> i follow this article:
>
> http://ws.apache.org/axis2/1_1_1/spring.html
>
> Everything is ok except that my applicationContext can't access my
> hibernate
> file.
> But, it can access my jdbc.properties which is also in
> /WEB-INF/jbbc.properties...
>
> And the point which is not very clear is the article, is the last point as
> follow:
>
>  <bean id="mySessionFactory"
> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>                 <property name="mappingLocations">
>
> <value>classpath*:**/MyEntity.hbm.xml</value>
>                 </property>
>                 ...
>  </bean>
>
> how can i fix the "classpath" in the field value?
>
>
> Can someone help me, thank you !
>
>
>
>
>
>
> Le 27-avr.-07 à 18:04, Martin Polet a écrit :
>
> Hi,
>
>
> I would like to know how to access my hibernate mapping file from the
> applicationContext.xml.
> I'm using Spring 3 with hibernate 3.
>
> Here is my bean from applicationcontext.xml which call my mapping file:
>
> <bean id="mysessionFactory"
> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>             <property name="dataSource">
>                         <ref bean="dataSource" />
>             </property>
>             <property name="hibernateProperties">
>                         <ref bean="myHibernateProperties" />
>             </property>
>             <property name="mappingResources">
>                         <list>
>
>
>
> <value>/WEB-INF/AbsentiaD.hbm.xml</value>
>
>                         </list>
>             </property>
>     </bean>
>
>
>
>
>
>
> Here is the error:
>
>
> [CODE]
> Caused by:
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'mysessionFactory' defined in class path
> resource [WEB-INF/applicationContext.xml]: Invocation of
> init method failed; nested exception is java.io.FileNotFoundException:
> class
> path resource [classpath*:**/AbsentiaD.hbm.xml] cannot be
> opened because it does not exist
> Caused by: java.io.FileNotFoundException: class path resource
> [classpath*:**/AbsentiaD.hbm.xml] cannot be opened because
> it does not exist
> [/CODE]
>
>  Thx a lot
>
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>  ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>

Re: access to hibernate mapping file inside an .aar?

Posted by Martin Polet <im...@skynet.be>.
Not working neither. i have a null pointer exception this time.
But I think the problem is coming from the place where i put my  
hibernate mapping files.
Currently, the are in /web-inf with my applicationContext.xml which  
is recognized.

Where do i have to put them exactly in my aar?


And here is the stack trace with your code:

http://imacx.ath.cx/tmp/axis_error2.txt

thx for your time!


Le 29-avr.-07 à 15:55, Davanum Srinivas a écrit :

> Last resort, do what we do in composite scenario.
>
> appCtx.setClassLoader(new
> org.apache.axis2.util.MultiParentClassLoader(null, new ClassLoader[]
> {AxisService.class.getClassLoader(), axisService.getClassLoader() }
> ));
>
> thanks,
> -- dims
>
> On 4/29/07, Martin Polet <im...@skynet.be> wrote:
>> Unfortunaly, it's not working neither. If i put
>> AxisService.class.getClassLoader(),
>> it doesn't find my applicationContext.xml which was found with
>> axisService.getClassLoader();
>>
>>
>>
>> Le 29-avr.-07 à 03:04, Davanum Srinivas a écrit :
>>
>>
>> Try the following:
>>
>> ClassLoader classLoader =
>> AxisService.class.getClassLoader();
>>
>> At startup time, the TCCL does not kick in yet.
>>
>> -- dims
>>
>> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
>> Actualy, the error occurs when I start tomcat, when it try to  
>> deploy the
>> aar.
>>
>> Here is the stack trace when my SpringInit class (with startUp and  
>> Shutdown
>> method) try to make a refresh on my applicationContext:
>>
>>  public void startUp(ConfigurationContext configurationContext,  
>> AxisService
>> axisService) {
>>         try {
>>             ClassLoader classLoader = axisService.getClassLoader();
>>             ClassPathXmlApplicationContext appCtx = new
>>                     ClassPathXmlApplicationContext(new
>> String[] {"/WEB-INF/applicationContext.xml"}, false);
>>             appCtx.setClassLoader(classLoader);
>>
>>             appCtx.refresh(); //error occurs here...
>>
>>             System.out.println("spring loaded");
>>         }catch (Exception ex) {
>>             ex.printStackTrace();
>>         }
>>     }
>>
>> Here is the stack trace with the method:
>>
>> http://imacx.ath.cx/tmp/axis_error.txt
>>
>>
>>
>>
>> Thx for your help
>>
>>
>>
>> Le 28-avr.-07 à 17:36, Davanum Srinivas a écrit :
>>
>>
>> can u paste a stack trace?
>>
>> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
>> Thx for your answer but i all ready done this.
>>
>> Here is my servide.xml:
>>
>> <serviceGroup>
>>
>> <service name="EawServiceAdb"
>> class="com.unisys.r4egov.eaw.spring.service.SpringInit">
>>  <messageReceivers>
>>  <messageReceiver
>> mep="http://www.w3.org/2004/08/wsdl/in-out"
>> class="com.unisys.r4egov.eaw.axis.EawServiceAdbMessageReceiverInOut"/ 
>> >
>>  </messageReceivers>
>>
>>  <parameter name="ServiceTCCL"
>> locked="false">composite</parameter>
>>  <parameter name="ServiceObjectSupplier"
>> locked="false">org.apache.axis2.extensions.spring.receivers.SpringApp 
>> ContextAwareObjectSupplier</parameter>
>>  <parameter name="SpringBeanName"
>> locked="false">eawServiceAxis</parameter>
>>
>>
>>  <operation name="DeleteEaw"
>> mep="http://www.w3.org/2004/08/wsdl/in-out">
>>  <actionMapping/>
>> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/ 
>> EawPortType/DeleteEawResponse</outputActionMapping>
>>  </operation>
>>  <operation name="AddEaw"
>> mep="http://www.w3.org/2004/08/wsdl/in-out">
>>  <actionMapping/>
>> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/ 
>> EawPortType/AddEawResponse</outputActionMapping>
>>  </operation>
>>  <operation name="GetListEaw"
>> mep="http://www.w3.org/2004/08/wsdl/in-out">
>>  <actionMapping/>
>> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/ 
>> EawPortType/GetListEawResponse</outputActionMapping>
>>  </operation>
>>  <operation name="EditEaw"
>> mep="http://www.w3.org/2004/08/wsdl/in-out">
>>  <actionMapping/>
>> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/ 
>> EawPortType/EditEawResponse</outputActionMapping>
>>  </operation>
>> </service>
>> </serviceGroup>
>>
>> I don't understand why it doesn't find my hibernate file and my
>> applicationContext yes...
>>
>>
>>
>>
>> Le 28-avr.-07 à 15:14, Davanum Srinivas a écrit :
>>
>> Set ServiceTCCL parameter to composite as mentioned here:
>> http://wso2.org/blog/dims/1131
>>
>> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
>> Hi,
>>
>> I will give a little bit more details about my problem:
>>
>> i follow this article:
>>
>> http://ws.apache.org/axis2/1_1_1/spring.html
>>
>> Everything is ok except that my applicationContext can't access my  
>> hibernate
>> file.
>> But, it can access my jdbc.properties which is also in
>> /WEB-INF/jbbc.properties...
>>
>> And the point which is not very clear is the article, is the last  
>> point as
>> follow:
>>
>>  <bean id="mySessionFactory"
>> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>>                 <property name="mappingLocations">
>>
>> <value>classpath*:**/MyEntity.hbm.xml</value>
>>                 </property>
>>                 ...
>>  </bean>
>>
>> how can i fix the "classpath" in the field value?
>>
>>
>> Can someone help me, thank you !
>>
>>
>>
>>
>>
>>
>> Le 27-avr.-07 à 18:04, Martin Polet a écrit :
>>
>> Hi,
>>
>>
>> I would like to know how to access my hibernate mapping file from the
>> applicationContext.xml.
>> I'm using Spring 3 with hibernate 3.
>>
>> Here is my bean from applicationcontext.xml which call my mapping  
>> file:
>>
>> <bean id="mysessionFactory"
>> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>>             <property name="dataSource">
>>                         <ref bean="dataSource" />
>>             </property>
>>             <property name="hibernateProperties">
>>                         <ref bean="myHibernateProperties" />
>>             </property>
>>             <property name="mappingResources">
>>                         <list>
>>
>>
>>
>> <value>/WEB-INF/AbsentiaD.hbm.xml</value>
>>
>>                         </list>
>>             </property>
>>     </bean>
>>
>>
>>
>>
>>
>>
>> Here is the error:
>>
>>
>> [CODE]
>> Caused by:
>> org.springframework.beans.factory.BeanCreationException:
>> Error creating bean with name 'mysessionFactory' defined in class  
>> path
>> resource [WEB-INF/applicationContext.xml]: Invocation of
>> init method failed; nested exception is  
>> java.io.FileNotFoundException: class
>> path resource [classpath*:**/AbsentiaD.hbm.xml] cannot be
>> opened because it does not exist
>> Caused by: java.io.FileNotFoundException: class path resource
>> [classpath*:**/AbsentiaD.hbm.xml] cannot be opened because
>> it does not exist
>> [/CODE]
>>
>>  Thx a lot
>>
>>
>>
>>
>> ____________________________________
>>
>> Martin Polet
>> 15 chemin des hayes
>> 1380 Lasne
>>
>> E-mail: martin.polet@skynet.be
>> GSM: 0477/ 90 48 51
>>
>>
>>
>> ____________________________________
>>
>> Martin Polet
>> 15 chemin des hayes
>> 1380 Lasne
>>
>> E-mail: martin.polet@skynet.be
>> GSM: 0477/ 90 48 51
>>
>>
>>
>>
>>
>> --
>> Davanum Srinivas :: http://davanum.wordpress.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>> ____________________________________
>>
>> Martin Polet
>> 15 chemin des hayes
>> 1380 Lasne
>>
>> E-mail: martin.polet@skynet.be
>> GSM: 0477/ 90 48 51
>>
>>
>>
>>
>>
>> --
>> Davanum Srinivas :: http://davanum.wordpress.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>>
>> ____________________________________
>>
>> Martin Polet
>> 15 chemin des hayes
>> 1380 Lasne
>>
>> E-mail: martin.polet@skynet.be
>> GSM: 0477/ 90 48 51
>>
>>
>>
>>
>>
>> --
>> Davanum Srinivas :: http://davanum.wordpress.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>>
>> ____________________________________
>>
>> Martin Polet
>> 15 chemin des hayes
>> 1380 Lasne
>>
>> E-mail: martin.polet@skynet.be
>> GSM: 0477/ 90 48 51
>>
>>
>
>
> -- 
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>

____________________________________

Martin Polet
15 chemin des hayes
1380 Lasne

E-mail: martin.polet@skynet.be
GSM: 0477/ 90 48 51



Re: access to hibernate mapping file inside an .aar?

Posted by Davanum Srinivas <da...@gmail.com>.
Last resort, do what we do in composite scenario.

appCtx.setClassLoader(new
org.apache.axis2.util.MultiParentClassLoader(null, new ClassLoader[]
{AxisService.class.getClassLoader(), axisService.getClassLoader() }
));

thanks,
-- dims

On 4/29/07, Martin Polet <im...@skynet.be> wrote:
> Unfortunaly, it's not working neither. If i put
> AxisService.class.getClassLoader(),
> it doesn't find my applicationContext.xml which was found with
> axisService.getClassLoader();
>
>
>
> Le 29-avr.-07 à 03:04, Davanum Srinivas a écrit :
>
>
> Try the following:
>
> ClassLoader classLoader =
> AxisService.class.getClassLoader();
>
> At startup time, the TCCL does not kick in yet.
>
> -- dims
>
> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
> Actualy, the error occurs when I start tomcat, when it try to deploy the
> aar.
>
> Here is the stack trace when my SpringInit class (with startUp and Shutdown
> method) try to make a refresh on my applicationContext:
>
>  public void startUp(ConfigurationContext configurationContext, AxisService
> axisService) {
>         try {
>             ClassLoader classLoader = axisService.getClassLoader();
>             ClassPathXmlApplicationContext appCtx = new
>                     ClassPathXmlApplicationContext(new
> String[] {"/WEB-INF/applicationContext.xml"}, false);
>             appCtx.setClassLoader(classLoader);
>
>             appCtx.refresh(); //error occurs here...
>
>             System.out.println("spring loaded");
>         }catch (Exception ex) {
>             ex.printStackTrace();
>         }
>     }
>
> Here is the stack trace with the method:
>
> http://imacx.ath.cx/tmp/axis_error.txt
>
>
>
>
> Thx for your help
>
>
>
> Le 28-avr.-07 à 17:36, Davanum Srinivas a écrit :
>
>
> can u paste a stack trace?
>
> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
> Thx for your answer but i all ready done this.
>
> Here is my servide.xml:
>
> <serviceGroup>
>
> <service name="EawServiceAdb"
> class="com.unisys.r4egov.eaw.spring.service.SpringInit">
>  <messageReceivers>
>  <messageReceiver
> mep="http://www.w3.org/2004/08/wsdl/in-out"
> class="com.unisys.r4egov.eaw.axis.EawServiceAdbMessageReceiverInOut"/>
>  </messageReceivers>
>
>  <parameter name="ServiceTCCL"
> locked="false">composite</parameter>
>  <parameter name="ServiceObjectSupplier"
> locked="false">org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier</parameter>
>  <parameter name="SpringBeanName"
> locked="false">eawServiceAxis</parameter>
>
>
>  <operation name="DeleteEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/DeleteEawResponse</outputActionMapping>
>  </operation>
>  <operation name="AddEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/AddEawResponse</outputActionMapping>
>  </operation>
>  <operation name="GetListEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/GetListEawResponse</outputActionMapping>
>  </operation>
>  <operation name="EditEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/EditEawResponse</outputActionMapping>
>  </operation>
> </service>
> </serviceGroup>
>
> I don't understand why it doesn't find my hibernate file and my
> applicationContext yes...
>
>
>
>
> Le 28-avr.-07 à 15:14, Davanum Srinivas a écrit :
>
> Set ServiceTCCL parameter to composite as mentioned here:
> http://wso2.org/blog/dims/1131
>
> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
> Hi,
>
> I will give a little bit more details about my problem:
>
> i follow this article:
>
> http://ws.apache.org/axis2/1_1_1/spring.html
>
> Everything is ok except that my applicationContext can't access my hibernate
> file.
> But, it can access my jdbc.properties which is also in
> /WEB-INF/jbbc.properties...
>
> And the point which is not very clear is the article, is the last point as
> follow:
>
>  <bean id="mySessionFactory"
> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>                 <property name="mappingLocations">
>
> <value>classpath*:**/MyEntity.hbm.xml</value>
>                 </property>
>                 ...
>  </bean>
>
> how can i fix the "classpath" in the field value?
>
>
> Can someone help me, thank you !
>
>
>
>
>
>
> Le 27-avr.-07 à 18:04, Martin Polet a écrit :
>
> Hi,
>
>
> I would like to know how to access my hibernate mapping file from the
> applicationContext.xml.
> I'm using Spring 3 with hibernate 3.
>
> Here is my bean from applicationcontext.xml which call my mapping file:
>
> <bean id="mysessionFactory"
> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>             <property name="dataSource">
>                         <ref bean="dataSource" />
>             </property>
>             <property name="hibernateProperties">
>                         <ref bean="myHibernateProperties" />
>             </property>
>             <property name="mappingResources">
>                         <list>
>
>
>
> <value>/WEB-INF/AbsentiaD.hbm.xml</value>
>
>                         </list>
>             </property>
>     </bean>
>
>
>
>
>
>
> Here is the error:
>
>
> [CODE]
> Caused by:
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'mysessionFactory' defined in class path
> resource [WEB-INF/applicationContext.xml]: Invocation of
> init method failed; nested exception is java.io.FileNotFoundException: class
> path resource [classpath*:**/AbsentiaD.hbm.xml] cannot be
> opened because it does not exist
> Caused by: java.io.FileNotFoundException: class path resource
> [classpath*:**/AbsentiaD.hbm.xml] cannot be opened because
> it does not exist
> [/CODE]
>
>  Thx a lot
>
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: access to hibernate mapping file inside an .aar?

Posted by Martin Polet <im...@skynet.be>.
Unfortunaly, it's not working neither. If i put  
AxisService.class.getClassLoader(),
it doesn't find my applicationContext.xml which was found with  
axisService.getClassLoader();


Le 29-avr.-07 à 03:04, Davanum Srinivas a écrit :

> Try the following:
>
> ClassLoader classLoader = AxisService.class.getClassLoader();
>
> At startup time, the TCCL does not kick in yet.
>
> -- dims
>
> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
>> Actualy, the error occurs when I start tomcat, when it try to  
>> deploy the
>> aar.
>>
>> Here is the stack trace when my SpringInit class (with startUp and  
>> Shutdown
>> method) try to make a refresh on my applicationContext:
>>
>>  public void startUp(ConfigurationContext configurationContext,  
>> AxisService
>> axisService) {
>>         try {
>>             ClassLoader classLoader = axisService.getClassLoader();
>>             ClassPathXmlApplicationContext appCtx = new
>>                     ClassPathXmlApplicationContext(new
>> String[] {"/WEB-INF/applicationContext.xml"}, false);
>>             appCtx.setClassLoader(classLoader);
>>
>>             appCtx.refresh(); //error occurs here...
>>
>>             System.out.println("spring loaded");
>>         }catch (Exception ex) {
>>             ex.printStackTrace();
>>         }
>>     }
>>
>> Here is the stack trace with the method:
>>
>> http://imacx.ath.cx/tmp/axis_error.txt
>>
>>
>>
>>
>> Thx for your help
>>
>>
>>
>> Le 28-avr.-07 à 17:36, Davanum Srinivas a écrit :
>>
>>
>> can u paste a stack trace?
>>
>> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
>> Thx for your answer but i all ready done this.
>>
>> Here is my servide.xml:
>>
>> <serviceGroup>
>>
>> <service name="EawServiceAdb"
>> class="com.unisys.r4egov.eaw.spring.service.SpringInit">
>>  <messageReceivers>
>>  <messageReceiver
>> mep="http://www.w3.org/2004/08/wsdl/in-out"
>> class="com.unisys.r4egov.eaw.axis.EawServiceAdbMessageReceiverInOut"/ 
>> >
>>  </messageReceivers>
>>
>>  <parameter name="ServiceTCCL"
>> locked="false">composite</parameter>
>>  <parameter name="ServiceObjectSupplier"
>> locked="false">org.apache.axis2.extensions.spring.receivers.SpringApp 
>> ContextAwareObjectSupplier</parameter>
>>  <parameter name="SpringBeanName"
>> locked="false">eawServiceAxis</parameter>
>>
>>
>>  <operation name="DeleteEaw"
>> mep="http://www.w3.org/2004/08/wsdl/in-out">
>>  <actionMapping/>
>> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/ 
>> EawPortType/DeleteEawResponse</outputActionMapping>
>>  </operation>
>>  <operation name="AddEaw"
>> mep="http://www.w3.org/2004/08/wsdl/in-out">
>>  <actionMapping/>
>> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/ 
>> EawPortType/AddEawResponse</outputActionMapping>
>>  </operation>
>>  <operation name="GetListEaw"
>> mep="http://www.w3.org/2004/08/wsdl/in-out">
>>  <actionMapping/>
>> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/ 
>> EawPortType/GetListEawResponse</outputActionMapping>
>>  </operation>
>>  <operation name="EditEaw"
>> mep="http://www.w3.org/2004/08/wsdl/in-out">
>>  <actionMapping/>
>> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/ 
>> EawPortType/EditEawResponse</outputActionMapping>
>>  </operation>
>> </service>
>> </serviceGroup>
>>
>> I don't understand why it doesn't find my hibernate file and my
>> applicationContext yes...
>>
>>
>>
>>
>> Le 28-avr.-07 à 15:14, Davanum Srinivas a écrit :
>>
>> Set ServiceTCCL parameter to composite as mentioned here:
>> http://wso2.org/blog/dims/1131
>>
>> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
>> Hi,
>>
>> I will give a little bit more details about my problem:
>>
>> i follow this article:
>>
>> http://ws.apache.org/axis2/1_1_1/spring.html
>>
>> Everything is ok except that my applicationContext can't access my  
>> hibernate
>> file.
>> But, it can access my jdbc.properties which is also in
>> /WEB-INF/jbbc.properties...
>>
>> And the point which is not very clear is the article, is the last  
>> point as
>> follow:
>>
>>  <bean id="mySessionFactory"
>> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>>                 <property name="mappingLocations">
>>
>> <value>classpath*:**/MyEntity.hbm.xml</value>
>>                 </property>
>>                 ...
>>  </bean>
>>
>> how can i fix the "classpath" in the field value?
>>
>>
>> Can someone help me, thank you !
>>
>>
>>
>>
>>
>>
>> Le 27-avr.-07 à 18:04, Martin Polet a écrit :
>>
>> Hi,
>>
>>
>> I would like to know how to access my hibernate mapping file from the
>> applicationContext.xml.
>> I'm using Spring 3 with hibernate 3.
>>
>> Here is my bean from applicationcontext.xml which call my mapping  
>> file:
>>
>> <bean id="mysessionFactory"
>> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>>             <property name="dataSource">
>>                         <ref bean="dataSource" />
>>             </property>
>>             <property name="hibernateProperties">
>>                         <ref bean="myHibernateProperties" />
>>             </property>
>>             <property name="mappingResources">
>>                         <list>
>>
>>
>>
>> <value>/WEB-INF/AbsentiaD.hbm.xml</value>
>>
>>                         </list>
>>             </property>
>>     </bean>
>>
>>
>>
>>
>>
>>
>> Here is the error:
>>
>>
>> [CODE]
>> Caused by:
>> org.springframework.beans.factory.BeanCreationException:
>> Error creating bean with name 'mysessionFactory' defined in class  
>> path
>> resource [WEB-INF/applicationContext.xml]: Invocation of
>> init method failed; nested exception is  
>> java.io.FileNotFoundException: class
>> path resource [classpath*:**/AbsentiaD.hbm.xml] cannot be
>> opened because it does not exist
>> Caused by: java.io.FileNotFoundException: class path resource
>> [classpath*:**/AbsentiaD.hbm.xml] cannot be opened because
>> it does not exist
>> [/CODE]
>>
>>  Thx a lot
>>
>>
>>
>>
>> ____________________________________
>>
>> Martin Polet
>> 15 chemin des hayes
>> 1380 Lasne
>>
>> E-mail: martin.polet@skynet.be
>> GSM: 0477/ 90 48 51
>>
>>
>>
>> ____________________________________
>>
>> Martin Polet
>> 15 chemin des hayes
>> 1380 Lasne
>>
>> E-mail: martin.polet@skynet.be
>> GSM: 0477/ 90 48 51
>>
>>
>>
>>
>>
>> --
>> Davanum Srinivas :: http://davanum.wordpress.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>> ____________________________________
>>
>> Martin Polet
>> 15 chemin des hayes
>> 1380 Lasne
>>
>> E-mail: martin.polet@skynet.be
>> GSM: 0477/ 90 48 51
>>
>>
>>
>>
>>
>> --
>> Davanum Srinivas :: http://davanum.wordpress.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>>
>> ____________________________________
>>
>> Martin Polet
>> 15 chemin des hayes
>> 1380 Lasne
>>
>> E-mail: martin.polet@skynet.be
>> GSM: 0477/ 90 48 51
>>
>>
>
>
> -- 
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>

____________________________________

Martin Polet
15 chemin des hayes
1380 Lasne

E-mail: martin.polet@skynet.be
GSM: 0477/ 90 48 51



Re: access to hibernate mapping file inside an .aar?

Posted by Davanum Srinivas <da...@gmail.com>.
Try the following:

ClassLoader classLoader = AxisService.class.getClassLoader();

At startup time, the TCCL does not kick in yet.

-- dims

On 4/28/07, Martin Polet <im...@skynet.be> wrote:
> Actualy, the error occurs when I start tomcat, when it try to deploy the
> aar.
>
> Here is the stack trace when my SpringInit class (with startUp and Shutdown
> method) try to make a refresh on my applicationContext:
>
>  public void startUp(ConfigurationContext configurationContext, AxisService
> axisService) {
>         try {
>             ClassLoader classLoader = axisService.getClassLoader();
>             ClassPathXmlApplicationContext appCtx = new
>                     ClassPathXmlApplicationContext(new
> String[] {"/WEB-INF/applicationContext.xml"}, false);
>             appCtx.setClassLoader(classLoader);
>
>             appCtx.refresh(); //error occurs here...
>
>             System.out.println("spring loaded");
>         }catch (Exception ex) {
>             ex.printStackTrace();
>         }
>     }
>
> Here is the stack trace with the method:
>
> http://imacx.ath.cx/tmp/axis_error.txt
>
>
>
>
> Thx for your help
>
>
>
> Le 28-avr.-07 à 17:36, Davanum Srinivas a écrit :
>
>
> can u paste a stack trace?
>
> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
> Thx for your answer but i all ready done this.
>
> Here is my servide.xml:
>
> <serviceGroup>
>
> <service name="EawServiceAdb"
> class="com.unisys.r4egov.eaw.spring.service.SpringInit">
>  <messageReceivers>
>  <messageReceiver
> mep="http://www.w3.org/2004/08/wsdl/in-out"
> class="com.unisys.r4egov.eaw.axis.EawServiceAdbMessageReceiverInOut"/>
>  </messageReceivers>
>
>  <parameter name="ServiceTCCL"
> locked="false">composite</parameter>
>  <parameter name="ServiceObjectSupplier"
> locked="false">org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier</parameter>
>  <parameter name="SpringBeanName"
> locked="false">eawServiceAxis</parameter>
>
>
>  <operation name="DeleteEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/DeleteEawResponse</outputActionMapping>
>  </operation>
>  <operation name="AddEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/AddEawResponse</outputActionMapping>
>  </operation>
>  <operation name="GetListEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/GetListEawResponse</outputActionMapping>
>  </operation>
>  <operation name="EditEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/EditEawResponse</outputActionMapping>
>  </operation>
> </service>
> </serviceGroup>
>
> I don't understand why it doesn't find my hibernate file and my
> applicationContext yes...
>
>
>
>
> Le 28-avr.-07 à 15:14, Davanum Srinivas a écrit :
>
> Set ServiceTCCL parameter to composite as mentioned here:
> http://wso2.org/blog/dims/1131
>
> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
> Hi,
>
> I will give a little bit more details about my problem:
>
> i follow this article:
>
> http://ws.apache.org/axis2/1_1_1/spring.html
>
> Everything is ok except that my applicationContext can't access my hibernate
> file.
> But, it can access my jdbc.properties which is also in
> /WEB-INF/jbbc.properties...
>
> And the point which is not very clear is the article, is the last point as
> follow:
>
>  <bean id="mySessionFactory"
> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>                 <property name="mappingLocations">
>
> <value>classpath*:**/MyEntity.hbm.xml</value>
>                 </property>
>                 ...
>  </bean>
>
> how can i fix the "classpath" in the field value?
>
>
> Can someone help me, thank you !
>
>
>
>
>
>
> Le 27-avr.-07 à 18:04, Martin Polet a écrit :
>
> Hi,
>
>
> I would like to know how to access my hibernate mapping file from the
> applicationContext.xml.
> I'm using Spring 3 with hibernate 3.
>
> Here is my bean from applicationcontext.xml which call my mapping file:
>
> <bean id="mysessionFactory"
> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>             <property name="dataSource">
>                         <ref bean="dataSource" />
>             </property>
>             <property name="hibernateProperties">
>                         <ref bean="myHibernateProperties" />
>             </property>
>             <property name="mappingResources">
>                         <list>
>
>
>
> <value>/WEB-INF/AbsentiaD.hbm.xml</value>
>
>                         </list>
>             </property>
>     </bean>
>
>
>
>
>
>
> Here is the error:
>
>
> [CODE]
> Caused by:
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'mysessionFactory' defined in class path
> resource [WEB-INF/applicationContext.xml]: Invocation of
> init method failed; nested exception is java.io.FileNotFoundException: class
> path resource [classpath*:**/AbsentiaD.hbm.xml] cannot be
> opened because it does not exist
> Caused by: java.io.FileNotFoundException: class path resource
> [classpath*:**/AbsentiaD.hbm.xml] cannot be opened because
> it does not exist
> [/CODE]
>
>  Thx a lot
>
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: access to hibernate mapping file inside an .aar?

Posted by Martin Polet <im...@skynet.be>.
Actualy, the error occurs when I start tomcat, when it try to deploy  
the aar.

Here is the stack trace when my SpringInit class (with startUp and  
Shutdown method) try to make a refresh on my applicationContext:

public void startUp(ConfigurationContext configurationContext,  
AxisService axisService) {
         try {
             ClassLoader classLoader = axisService.getClassLoader();
             ClassPathXmlApplicationContext appCtx = new
                     ClassPathXmlApplicationContext(new String[] {"/ 
WEB-INF/applicationContext.xml"}, false);
             appCtx.setClassLoader(classLoader);

             appCtx.refresh(); //error occurs here...

             System.out.println("spring loaded");
         }catch (Exception ex) {
             ex.printStackTrace();
         }
     }

Here is the stack trace with the method:

http://imacx.ath.cx/tmp/axis_error.txt




Thx for your help


Le 28-avr.-07 à 17:36, Davanum Srinivas a écrit :

> can u paste a stack trace?
>
> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
>> Thx for your answer but i all ready done this.
>>
>> Here is my servide.xml:
>>
>> <serviceGroup>
>>
>> <service name="EawServiceAdb"
>> class="com.unisys.r4egov.eaw.spring.service.SpringInit">
>>  <messageReceivers>
>>  <messageReceiver
>> mep="http://www.w3.org/2004/08/wsdl/in-out"
>> class="com.unisys.r4egov.eaw.axis.EawServiceAdbMessageReceiverInOut"/ 
>> >
>>  </messageReceivers>
>>
>>  <parameter name="ServiceTCCL"
>> locked="false">composite</parameter>
>>  <parameter name="ServiceObjectSupplier"
>> locked="false">org.apache.axis2.extensions.spring.receivers.SpringApp 
>> ContextAwareObjectSupplier</parameter>
>>  <parameter name="SpringBeanName"
>> locked="false">eawServiceAxis</parameter>
>>
>>
>>  <operation name="DeleteEaw"
>> mep="http://www.w3.org/2004/08/wsdl/in-out">
>>  <actionMapping/>
>> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/ 
>> EawPortType/DeleteEawResponse</outputActionMapping>
>>  </operation>
>>  <operation name="AddEaw"
>> mep="http://www.w3.org/2004/08/wsdl/in-out">
>>  <actionMapping/>
>> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/ 
>> EawPortType/AddEawResponse</outputActionMapping>
>>  </operation>
>>  <operation name="GetListEaw"
>> mep="http://www.w3.org/2004/08/wsdl/in-out">
>>  <actionMapping/>
>> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/ 
>> EawPortType/GetListEawResponse</outputActionMapping>
>>  </operation>
>>  <operation name="EditEaw"
>> mep="http://www.w3.org/2004/08/wsdl/in-out">
>>  <actionMapping/>
>> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/ 
>> EawPortType/EditEawResponse</outputActionMapping>
>>  </operation>
>> </service>
>> </serviceGroup>
>>
>> I don't understand why it doesn't find my hibernate file and my
>> applicationContext yes...
>>
>>
>>
>>
>> Le 28-avr.-07 à 15:14, Davanum Srinivas a écrit :
>>
>> Set ServiceTCCL parameter to composite as mentioned here:
>> http://wso2.org/blog/dims/1131
>>
>> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
>> Hi,
>>
>> I will give a little bit more details about my problem:
>>
>> i follow this article:
>>
>> http://ws.apache.org/axis2/1_1_1/spring.html
>>
>> Everything is ok except that my applicationContext can't access my  
>> hibernate
>> file.
>> But, it can access my jdbc.properties which is also in
>> /WEB-INF/jbbc.properties...
>>
>> And the point which is not very clear is the article, is the last  
>> point as
>> follow:
>>
>>  <bean id="mySessionFactory"
>> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>>                 <property name="mappingLocations">
>>
>> <value>classpath*:**/MyEntity.hbm.xml</value>
>>                 </property>
>>                 ...
>>  </bean>
>>
>> how can i fix the "classpath" in the field value?
>>
>>
>> Can someone help me, thank you !
>>
>>
>>
>>
>>
>>
>> Le 27-avr.-07 à 18:04, Martin Polet a écrit :
>>
>> Hi,
>>
>>
>> I would like to know how to access my hibernate mapping file from the
>> applicationContext.xml.
>> I'm using Spring 3 with hibernate 3.
>>
>> Here is my bean from applicationcontext.xml which call my mapping  
>> file:
>>
>> <bean id="mysessionFactory"
>> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>>             <property name="dataSource">
>>                         <ref bean="dataSource" />
>>             </property>
>>             <property name="hibernateProperties">
>>                         <ref bean="myHibernateProperties" />
>>             </property>
>>             <property name="mappingResources">
>>                         <list>
>>
>>
>>
>> <value>/WEB-INF/AbsentiaD.hbm.xml</value>
>>
>>                         </list>
>>             </property>
>>     </bean>
>>
>>
>>
>>
>>
>>
>> Here is the error:
>>
>>
>> [CODE]
>> Caused by:
>> org.springframework.beans.factory.BeanCreationException:
>> Error creating bean with name 'mysessionFactory' defined in class  
>> path
>> resource [WEB-INF/applicationContext.xml]: Invocation of
>> init method failed; nested exception is  
>> java.io.FileNotFoundException: class
>> path resource [classpath*:**/AbsentiaD.hbm.xml] cannot be
>> opened because it does not exist
>> Caused by: java.io.FileNotFoundException: class path resource
>> [classpath*:**/AbsentiaD.hbm.xml] cannot be opened because
>> it does not exist
>> [/CODE]
>>
>>  Thx a lot
>>
>>
>>
>>
>> ____________________________________
>>
>> Martin Polet
>> 15 chemin des hayes
>> 1380 Lasne
>>
>> E-mail: martin.polet@skynet.be
>> GSM: 0477/ 90 48 51
>>
>>
>>
>> ____________________________________
>>
>> Martin Polet
>> 15 chemin des hayes
>> 1380 Lasne
>>
>> E-mail: martin.polet@skynet.be
>> GSM: 0477/ 90 48 51
>>
>>
>>
>>
>>
>> --
>> Davanum Srinivas :: http://davanum.wordpress.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>> ____________________________________
>>
>> Martin Polet
>> 15 chemin des hayes
>> 1380 Lasne
>>
>> E-mail: martin.polet@skynet.be
>> GSM: 0477/ 90 48 51
>>
>>
>
>
> -- 
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>

____________________________________

Martin Polet
15 chemin des hayes
1380 Lasne

E-mail: martin.polet@skynet.be
GSM: 0477/ 90 48 51



Re: access to hibernate mapping file inside an .aar?

Posted by Davanum Srinivas <da...@gmail.com>.
can u paste a stack trace?

On 4/28/07, Martin Polet <im...@skynet.be> wrote:
> Thx for your answer but i all ready done this.
>
> Here is my servide.xml:
>
> <serviceGroup>
>
> <service name="EawServiceAdb"
> class="com.unisys.r4egov.eaw.spring.service.SpringInit">
>  <messageReceivers>
>  <messageReceiver
> mep="http://www.w3.org/2004/08/wsdl/in-out"
> class="com.unisys.r4egov.eaw.axis.EawServiceAdbMessageReceiverInOut"/>
>  </messageReceivers>
>
>  <parameter name="ServiceTCCL"
> locked="false">composite</parameter>
>  <parameter name="ServiceObjectSupplier"
> locked="false">org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier</parameter>
>  <parameter name="SpringBeanName"
> locked="false">eawServiceAxis</parameter>
>
>
>  <operation name="DeleteEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/DeleteEawResponse</outputActionMapping>
>  </operation>
>  <operation name="AddEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/AddEawResponse</outputActionMapping>
>  </operation>
>  <operation name="GetListEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/GetListEawResponse</outputActionMapping>
>  </operation>
>  <operation name="EditEaw"
> mep="http://www.w3.org/2004/08/wsdl/in-out">
>  <actionMapping/>
> <outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/EawPortType/EditEawResponse</outputActionMapping>
>  </operation>
> </service>
> </serviceGroup>
>
> I don't understand why it doesn't find my hibernate file and my
> applicationContext yes...
>
>
>
>
> Le 28-avr.-07 à 15:14, Davanum Srinivas a écrit :
>
> Set ServiceTCCL parameter to composite as mentioned here:
> http://wso2.org/blog/dims/1131
>
> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
> Hi,
>
> I will give a little bit more details about my problem:
>
> i follow this article:
>
> http://ws.apache.org/axis2/1_1_1/spring.html
>
> Everything is ok except that my applicationContext can't access my hibernate
> file.
> But, it can access my jdbc.properties which is also in
> /WEB-INF/jbbc.properties...
>
> And the point which is not very clear is the article, is the last point as
> follow:
>
>  <bean id="mySessionFactory"
> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>                 <property name="mappingLocations">
>
> <value>classpath*:**/MyEntity.hbm.xml</value>
>                 </property>
>                 ...
>  </bean>
>
> how can i fix the "classpath" in the field value?
>
>
> Can someone help me, thank you !
>
>
>
>
>
>
> Le 27-avr.-07 à 18:04, Martin Polet a écrit :
>
> Hi,
>
>
> I would like to know how to access my hibernate mapping file from the
> applicationContext.xml.
> I'm using Spring 3 with hibernate 3.
>
> Here is my bean from applicationcontext.xml which call my mapping file:
>
> <bean id="mysessionFactory"
> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>             <property name="dataSource">
>                         <ref bean="dataSource" />
>             </property>
>             <property name="hibernateProperties">
>                         <ref bean="myHibernateProperties" />
>             </property>
>             <property name="mappingResources">
>                         <list>
>
>
>
> <value>/WEB-INF/AbsentiaD.hbm.xml</value>
>
>                         </list>
>             </property>
>     </bean>
>
>
>
>
>
>
> Here is the error:
>
>
> [CODE]
> Caused by:
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'mysessionFactory' defined in class path
> resource [WEB-INF/applicationContext.xml]: Invocation of
> init method failed; nested exception is java.io.FileNotFoundException: class
> path resource [classpath*:**/AbsentiaD.hbm.xml] cannot be
> opened because it does not exist
> Caused by: java.io.FileNotFoundException: class path resource
> [classpath*:**/AbsentiaD.hbm.xml] cannot be opened because
> it does not exist
> [/CODE]
>
>  Thx a lot
>
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: access to hibernate mapping file inside an .aar?

Posted by Martin Polet <im...@skynet.be>.
Thx for your answer but i all ready done this.

Here is my servide.xml:

<serviceGroup>

<service name="EawServiceAdb"  
class="com.unisys.r4egov.eaw.spring.service.SpringInit">
	<messageReceivers>
		<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"  
class="com.unisys.r4egov.eaw.axis.EawServiceAdbMessageReceiverInOut"/>
	</messageReceivers>
	
	<parameter name="ServiceTCCL" locked="false">composite</parameter>
	<parameter name="ServiceObjectSupplier"  
locked="false">org.apache.axis2.extensions.spring.receivers.SpringAppCon 
textAwareObjectSupplier</parameter>
	<parameter name="SpringBeanName" locked="false">eawServiceAxis</ 
parameter>
	
	
	<operation name="DeleteEaw" mep="http://www.w3.org/2004/08/wsdl/in- 
out">
	<actionMapping/>
	<outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/ 
EawPortType/DeleteEawResponse</outputActionMapping>
	</operation>
	<operation name="AddEaw" mep="http://www.w3.org/2004/08/wsdl/in-out">
	<actionMapping/>
	<outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/ 
EawPortType/AddEawResponse</outputActionMapping>
	</operation>
	<operation name="GetListEaw" mep="http://www.w3.org/2004/08/wsdl/in- 
out">
	<actionMapping/>
	<outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/ 
EawPortType/GetListEawResponse</outputActionMapping>
	</operation>
	<operation name="EditEaw" mep="http://www.w3.org/2004/08/wsdl/in-out">
	<actionMapping/>
	<outputActionMapping>http://com.unisys.r4egov.unisys.eaw.axis/xsd/ 
EawPortType/EditEawResponse</outputActionMapping>
	</operation>
</service>
</serviceGroup>

I don't understand why it doesn't find my hibernate file and my  
applicationContext yes...



Le 28-avr.-07 à 15:14, Davanum Srinivas a écrit :

> Set ServiceTCCL parameter to composite as mentioned here:
> http://wso2.org/blog/dims/1131
>
> On 4/28/07, Martin Polet <im...@skynet.be> wrote:
>> Hi,
>>
>> I will give a little bit more details about my problem:
>>
>> i follow this article:
>>
>> http://ws.apache.org/axis2/1_1_1/spring.html
>>
>> Everything is ok except that my applicationContext can't access my  
>> hibernate
>> file.
>> But, it can access my jdbc.properties which is also in
>> /WEB-INF/jbbc.properties...
>>
>> And the point which is not very clear is the article, is the last  
>> point as
>> follow:
>>
>>  <bean id="mySessionFactory"
>> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>>                 <property name="mappingLocations">
>>
>> <value>classpath*:**/MyEntity.hbm.xml</value>
>>                 </property>
>>                 ...
>>  </bean>
>>
>> how can i fix the "classpath" in the field value?
>>
>>
>> Can someone help me, thank you !
>>
>>
>>
>>
>>
>>
>> Le 27-avr.-07 à 18:04, Martin Polet a écrit :
>>
>> Hi,
>>
>>
>> I would like to know how to access my hibernate mapping file from the
>> applicationContext.xml.
>> I'm using Spring 3 with hibernate 3.
>>
>> Here is my bean from applicationcontext.xml which call my mapping  
>> file:
>>
>> <bean id="mysessionFactory"
>> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>>             <property name="dataSource">
>>                         <ref bean="dataSource" />
>>             </property>
>>             <property name="hibernateProperties">
>>                         <ref bean="myHibernateProperties" />
>>             </property>
>>             <property name="mappingResources">
>>                         <list>
>>
>>
>>
>> <value>/WEB-INF/AbsentiaD.hbm.xml</value>
>>
>>                         </list>
>>             </property>
>>     </bean>
>>
>>
>>
>>
>>
>>
>> Here is the error:
>>
>>
>> [CODE]
>> Caused by:
>> org.springframework.beans.factory.BeanCreationException:
>> Error creating bean with name 'mysessionFactory' defined in class  
>> path
>> resource [WEB-INF/applicationContext.xml]: Invocation of
>> init method failed; nested exception is  
>> java.io.FileNotFoundException: class
>> path resource [classpath*:**/AbsentiaD.hbm.xml] cannot be
>> opened because it does not exist
>> Caused by: java.io.FileNotFoundException: class path resource
>> [classpath*:**/AbsentiaD.hbm.xml] cannot be opened because
>> it does not exist
>> [/CODE]
>>
>>  Thx a lot
>>
>>
>>
>>
>> ____________________________________
>>
>> Martin Polet
>> 15 chemin des hayes
>> 1380 Lasne
>>
>> E-mail: martin.polet@skynet.be
>> GSM: 0477/ 90 48 51
>>
>>
>>
>> ____________________________________
>>
>> Martin Polet
>> 15 chemin des hayes
>> 1380 Lasne
>>
>> E-mail: martin.polet@skynet.be
>> GSM: 0477/ 90 48 51
>>
>>
>
>
> -- 
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>

____________________________________

Martin Polet
15 chemin des hayes
1380 Lasne

E-mail: martin.polet@skynet.be
GSM: 0477/ 90 48 51



Re: access to hibernate mapping file inside an .aar?

Posted by Davanum Srinivas <da...@gmail.com>.
Set ServiceTCCL parameter to composite as mentioned here:
http://wso2.org/blog/dims/1131

On 4/28/07, Martin Polet <im...@skynet.be> wrote:
> Hi,
>
> I will give a little bit more details about my problem:
>
> i follow this article:
>
> http://ws.apache.org/axis2/1_1_1/spring.html
>
> Everything is ok except that my applicationContext can't access my hibernate
> file.
> But, it can access my jdbc.properties which is also in
> /WEB-INF/jbbc.properties...
>
> And the point which is not very clear is the article, is the last point as
> follow:
>
>  <bean id="mySessionFactory"
> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>                 <property name="mappingLocations">
>
> <value>classpath*:**/MyEntity.hbm.xml</value>
>                 </property>
>                 ...
>  </bean>
>
> how can i fix the "classpath" in the field value?
>
>
> Can someone help me, thank you !
>
>
>
>
>
>
> Le 27-avr.-07 à 18:04, Martin Polet a écrit :
>
> Hi,
>
>
> I would like to know how to access my hibernate mapping file from the
> applicationContext.xml.
> I'm using Spring 3 with hibernate 3.
>
> Here is my bean from applicationcontext.xml which call my mapping file:
>
> <bean id="mysessionFactory"
> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>             <property name="dataSource">
>                         <ref bean="dataSource" />
>             </property>
>             <property name="hibernateProperties">
>                         <ref bean="myHibernateProperties" />
>             </property>
>             <property name="mappingResources">
>                         <list>
>
>
>
> <value>/WEB-INF/AbsentiaD.hbm.xml</value>
>
>                         </list>
>             </property>
>     </bean>
>
>
>
>
>
>
> Here is the error:
>
>
> [CODE]
> Caused by:
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'mysessionFactory' defined in class path
> resource [WEB-INF/applicationContext.xml]: Invocation of
> init method failed; nested exception is java.io.FileNotFoundException: class
> path resource [classpath*:**/AbsentiaD.hbm.xml] cannot be
> opened because it does not exist
> Caused by: java.io.FileNotFoundException: class path resource
> [classpath*:**/AbsentiaD.hbm.xml] cannot be opened because
> it does not exist
> [/CODE]
>
>  Thx a lot
>
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: access to hibernate mapping file inside an .aar?

Posted by Martin Polet <im...@skynet.be>.
Hi,

I will give a little bit more details about my problem:

i follow this article:

http://ws.apache.org/axis2/1_1_1/spring.html

Everything is ok except that my applicationContext can't access my  
hibernate file.
But, it can access my jdbc.properties which is also in /WEB-INF/ 
jbbc.properties...

And the point which is not very clear is the article, is the last  
point as follow:

  <bean id="mySessionFactory"  
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
                 <property name="mappingLocations">
                    <value>classpath*:**/MyEntity.hbm.xml</value>
                 </property>
                 ...
  </bean>

how can i fix the "classpath" in the field value?


Can someone help me, thank you !





Le 27-avr.-07 à 18:04, Martin Polet a écrit :

> Hi,
>
> I would like to know how to access my hibernate mapping file from  
> the applicationContext.xml.
> I'm using Spring 3 with hibernate 3.
>
> Here is my bean from applicationcontext.xml which call my mapping  
> file:
>
> <bean id="mysessionFactory"  
> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>             <property name="dataSource">
>                         <ref bean="dataSource" />
>             </property>
>             <property name="hibernateProperties">
>                         <ref bean="myHibernateProperties" />
>             </property>
>             <property name="mappingResources">
>                         <list>
>
>                         <value>/WEB-INF/AbsentiaD.hbm.xml</value>
>
>                         </list>
>             </property>
>     </bean>
>
>
>
>
> Here is the error:
>
> [CODE]
> Caused by: org.springframework.beans.factory.BeanCreationException:  
> Error creating bean with name 'mysessionFactory' defined in class  
> path resource [WEB-INF/applicationContext.xml]: Invocation of init  
> method failed; nested exception is java.io.FileNotFoundException:  
> class path resource [classpath*:**/AbsentiaD.hbm.xml] cannot be  
> opened because it does not exist
> Caused by: java.io.FileNotFoundException: class path resource  
> [classpath*:**/AbsentiaD.hbm.xml] cannot be opened because it does  
> not exist
> [/CODE]
>
> Thx a lot
>
>
>
> ____________________________________
>
> Martin Polet
> 15 chemin des hayes
> 1380 Lasne
>
> E-mail: martin.polet@skynet.be
> GSM: 0477/ 90 48 51
>
>

____________________________________

Martin Polet
15 chemin des hayes
1380 Lasne

E-mail: martin.polet@skynet.be
GSM: 0477/ 90 48 51