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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
GSM: 0477/ 90 48 51
____________________________________
Martin Polet
15 chemin des hayes
1380 Lasne
E-mail: [EMAIL PROTECTED]
GSM: 0477/ 90 48 51
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
____________________________________
Martin Polet
15 chemin des hayes
1380 Lasne
E-mail: [EMAIL PROTECTED]
GSM: 0477/ 90 48 51
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
____________________________________
Martin Polet
15 chemin des hayes
1380 Lasne
E-mail: [EMAIL PROTECTED]
GSM: 0477/ 90 48 51
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]