You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Gilles Durys <gi...@approach.be> on 2007/09/19 15:16:57 UTC

JUnit test with local transport failing to find hibernate session

Hi,

I developed a web service in a cxf-spring-hibernat environment.
It runs in Tomcat fine.
I also wrote some Junit tests that use the same web service with a local
transport. Within these tests, the DAOs fail to find an Hibernate session.
Has anyone a lead on why this fail?

Thanks,
-- 
Gilles Durys

Re: JUnit test with local transport failing to find hibernate session

Posted by Willem Jiang <ni...@iona.com>.
Hi Gilles,

I just committed a quick fix for the issue of the CXF local transport 
direct dispatch model [CXF-1107].
You can try it by using the truck version or waiting few days for the 
next 2.0.3 snapshot.

Willem.

Willem Jiang wrote:
> Hi,
>
> I can reproduce the error, it definitely is a CXF local transport bug.
> I will investigate it later today.
>
> Willem.
>
> Gilles Durys wrote:
>> Willem Jiang wrote:
>>  
>>> Hi, Which CXF version are you using? Can you access the service with
>>> http transport?
>>>
>>> I just checked the code in the trunk XMLStreamWriter xtw =
>>> message.getContent(XMLStreamWriter.class); *
>>> xtw.setPrefix(soapVersion.getPrefix(), soapVersion.getNamespace()); I
>>> guess the NPE is came from xtw, but I have no idea why 
>>> XMLStreamWriter.class is not set into the message. I gripped the code
>>>  and found it should be set to the message by StaxOutInterceptor.
>>>     
>> Hi, I came back to this problem and for what I understand looking at
>> LocalConduit.directDispatch, when using direct dispatch, no content is
>> set on the message.
>>
>>
>>   
>

Re: JUnit test with local transport failing to find hibernate session

Posted by Willem Jiang <ni...@iona.com>.
Hi,

I can reproduce the error, it definitely is a CXF local transport bug.
I will investigate it later today.

Willem.

Gilles Durys wrote:
> Willem Jiang wrote:
>   
>> Hi, Which CXF version are you using? Can you access the service with
>> http transport?
>>
>> I just checked the code in the trunk XMLStreamWriter xtw =
>> message.getContent(XMLStreamWriter.class); *
>> xtw.setPrefix(soapVersion.getPrefix(), soapVersion.getNamespace()); I
>> guess the NPE is came from xtw, but I have no idea why 
>> XMLStreamWriter.class is not set into the message. I gripped the code
>>  and found it should be set to the message by StaxOutInterceptor.
>>     
> Hi, I came back to this problem and for what I understand looking at
> LocalConduit.directDispatch, when using direct dispatch, no content is
> set on the message.
>
>
>   

Re: JUnit test with local transport failing to find hibernate session

Posted by Gilles Durys <gi...@approach.be>.
Willem Jiang wrote:
> Hi, Which CXF version are you using? Can you access the service with
> http transport?
> 
> I just checked the code in the trunk XMLStreamWriter xtw =
> message.getContent(XMLStreamWriter.class); *
> xtw.setPrefix(soapVersion.getPrefix(), soapVersion.getNamespace()); I
> guess the NPE is came from xtw, but I have no idea why 
> XMLStreamWriter.class is not set into the message. I gripped the code
>  and found it should be set to the message by StaxOutInterceptor.
Hi, I came back to this problem and for what I understand looking at
LocalConduit.directDispatch, when using direct dispatch, no content is
set on the message.


-- 
Gilles Durys


Re: JUnit test with local transport failing to find hibernate session

Posted by Willem Jiang <ni...@iona.com>.
Hi,
Which CXF version are you using?
Can you access the service with http transport?

I just checked the code in the trunk
  XMLStreamWriter xtw = message.getContent(XMLStreamWriter.class);
* xtw.setPrefix(soapVersion.getPrefix(), soapVersion.getNamespace());
I guess the NPE is came from xtw, but I have no idea why 
XMLStreamWriter.class is not set into the message. I gripped the code 
and found it should be set to the message by StaxOutInterceptor.

Maybe I need your test case to dig out the real problem.

Willem.





Gilles Durys wrote:
> Jiang, Ning (Willem) wrote:
>   
>> Hi Gilles,
>>
>> Do you need to use the Client to invoke the service in your unit test?
>> If so , you need to use the below code to trigger the LocalConduit direct dispatch.
>>     
> Thank you.
> It works
> But now I have to find why I get a NullPointerException in
> SoapOutInterceptor
>
> java.lang.NullPointerException
> 	at
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnvelopeStart(SoapOutInterceptor.java:94)
> 	at
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(SoapOutInterceptor.java:76)
> 	at
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(SoapOutInterceptor.java:57)
> 	at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
> 	at $Proxy53.getAuthenticationChallenge(Unknown Source)
> 	at
> org.taktik.nadi.ws.NadiWebServicesTest.testAuthenticate(NadiWebServicesTest.java:145)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at junit.framework.TestCase.runTest(TestCase.java:164)
> 	at junit.framework.TestCase.runBare(TestCase.java:130)
> 	at
> org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
> 	at
> org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.access$001(AbstractAnnotationAwareTransactionalTests.java:47)
> 	at
> org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests$1.run(AbstractAnnotationAwareTransactionalTests.java:113)
> 	at
> org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.runTest(AbstractAnnotationAwareTransactionalTests.java:176)
> 	at
> org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.runTestTimed(AbstractAnnotationAwareTransactionalTests.java:150)
> 	at
> org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.runBare(AbstractAnnotationAwareTransactionalTests.java:109)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:120)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:230)
> 	at junit.framework.TestSuite.run(TestSuite.java:225)
> 	at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>
>
>   

Re: JUnit test with local transport failing to find hibernate session

Posted by Gilles Durys <gi...@approach.be>.
Jiang, Ning (Willem) wrote:
> Hi Gilles,
> 
> Do you need to use the Client to invoke the service in your unit test?
> If so , you need to use the below code to trigger the LocalConduit direct dispatch.
Thank you.
It works
But now I have to find why I get a NullPointerException in
SoapOutInterceptor

java.lang.NullPointerException
	at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnvelopeStart(SoapOutInterceptor.java:94)
	at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(SoapOutInterceptor.java:76)
	at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(SoapOutInterceptor.java:57)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
	at $Proxy53.getAuthenticationChallenge(Unknown Source)
	at
org.taktik.nadi.ws.NadiWebServicesTest.testAuthenticate(NadiWebServicesTest.java:145)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at junit.framework.TestCase.runTest(TestCase.java:164)
	at junit.framework.TestCase.runBare(TestCase.java:130)
	at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
	at
org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.access$001(AbstractAnnotationAwareTransactionalTests.java:47)
	at
org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests$1.run(AbstractAnnotationAwareTransactionalTests.java:113)
	at
org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.runTest(AbstractAnnotationAwareTransactionalTests.java:176)
	at
org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.runTestTimed(AbstractAnnotationAwareTransactionalTests.java:150)
	at
org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.runBare(AbstractAnnotationAwareTransactionalTests.java:109)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:120)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)


-- 
Gilles Durys

RE: JUnit test with local transport failing to find hibernate session

Posted by "Jiang, Ning (Willem)" <Ni...@iona.com>.
Hi Gilles,

Do you need to use the Client to invoke the service in your unit test?
If so , you need to use the below code to trigger the LocalConduit direct dispatch.

Willem.


-----Original Message-----
From: Gilles Durys [mailto:gilles.durys@approach.be]
Sent: Thu 9/20/2007 20:13
To: cxf-user@incubator.apache.org
Subject: Re: JUnit test with local transport failing to find hibernate session
 
Willem Jiang wrote:
> Hi
> I just went through the code and Xfire JIRA, it may relate to the
> different send and receive thread on the client side.
> You just need to add this pair
> ("org.apache.cxf.transport.local.LocalConduit.directDispatch, true) in
> your request context,
> to let the LocalConduit not fork a new thread to receive the message.
> Here is a code snippet to show you how to set the request message context.
> 
>            HelloWorldPortType greeter = service.getPort(portName,
> HelloWorldPortType.class);
>            InvocationHandler handler  =
> Proxy.getInvocationHandler(greeter);
>            BindingProvider  bp = null;
>                      if (handler instanceof BindingProvider) {
>                bp = (BindingProvider)handler;             
>                Map<String, Object> requestContext =
> bp.getRequestContext();                           
> requestContext.put(LocalConduit.DIRECT_DISPATCH, true);
>            }
> 
Thank you for your advice.
But my service is an instance of org.apache.cxf.jaxws.EndpointImpl so
this snippet doesn't work.


-- 
Gilles Durys

Developer

Work   : +32 10 83 21 12
Mobile : +32 498 88 21 12
E-mail : gilles.durys@approach.be

Visit our website : http://www.approach.be/

Disclaimer_____________________________________________________________
1.This message is intended for the use of the addressee only and may
contain information that is privileged and confidential.
2.If you are not the intended recipient, you are notified that any
dissemination of this Communication is strictly prohibited.
3.If you have received this communication in error, please notify us
immediately by return of this e-mail.
4.E-mail quotations and proposals are for information only, and
are subject to confirmation by the Signature of the appropriate
contractual documentation by the authorized persons of both parties.


Re: JUnit test with local transport failing to find hibernate session

Posted by Gilles Durys <gi...@approach.be>.
Willem Jiang wrote:
> Hi
> I just went through the code and Xfire JIRA, it may relate to the
> different send and receive thread on the client side.
> You just need to add this pair
> ("org.apache.cxf.transport.local.LocalConduit.directDispatch, true) in
> your request context,
> to let the LocalConduit not fork a new thread to receive the message.
> Here is a code snippet to show you how to set the request message context.
> 
>            HelloWorldPortType greeter = service.getPort(portName,
> HelloWorldPortType.class);
>            InvocationHandler handler  =
> Proxy.getInvocationHandler(greeter);
>            BindingProvider  bp = null;
>                      if (handler instanceof BindingProvider) {
>                bp = (BindingProvider)handler;             
>                Map<String, Object> requestContext =
> bp.getRequestContext();                           
> requestContext.put(LocalConduit.DIRECT_DISPATCH, true);
>            }
> 
Thank you for your advice.
But my service is an instance of org.apache.cxf.jaxws.EndpointImpl so
this snippet doesn't work.


-- 
Gilles Durys

Developer

Work   : +32 10 83 21 12
Mobile : +32 498 88 21 12
E-mail : gilles.durys@approach.be

Visit our website : http://www.approach.be/

Disclaimer_____________________________________________________________
1.This message is intended for the use of the addressee only and may
contain information that is privileged and confidential.
2.If you are not the intended recipient, you are notified that any
dissemination of this Communication is strictly prohibited.
3.If you have received this communication in error, please notify us
immediately by return of this e-mail.
4.E-mail quotations and proposals are for information only, and
are subject to confirmation by the Signature of the appropriate
contractual documentation by the authorized persons of both parties.

Re: JUnit test with local transport failing to find hibernate session

Posted by Willem Jiang <ni...@iona.com>.
Hi
I just went through the code and Xfire JIRA, it may relate to the 
different send and receive thread on the client side.
You just need to add this pair 
("org.apache.cxf.transport.local.LocalConduit.directDispatch, true) in 
your request context,
to let the LocalConduit not fork a new thread to receive the message.
Here is a code snippet to show you how to set the request message context.

            HelloWorldPortType greeter = service.getPort(portName, 
HelloWorldPortType.class);
            InvocationHandler handler  = 
Proxy.getInvocationHandler(greeter);
            BindingProvider  bp = null;
           
            if (handler instanceof BindingProvider) {
                bp = (BindingProvider)handler;              
                Map<String, Object> requestContext = 
bp.getRequestContext();             
                requestContext.put(LocalConduit.DIRECT_DISPATCH, true);
            }

Willem.

Gilles Durys wrote:
> Jiang, Ning (Willem) wrote:
>   
>> Hi ,
>> I don't know if it relates to the http header staff(it is the major different between the http transport and local transport. 
>>  
>> I did not write any code about DAO, so may be I am wrong.
>>
>> Could you send me the stake trace or the work space. May be I can debug it to find out the real reason.
>>
>>     
> Here's the stack trace
>
> org.apache.cxf.interceptor.Fault: No Hibernate Session bound to thread,
> and configuration does not allow creation of non-transactional one here
> 	at
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:86)
> 	at
> org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:82)
> 	at
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:62)
> 	at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:56)
> 	at
> org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
> 	at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:92)
> 	at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
> 	at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73)
> 	at org.apache.cxf.transport.local.LocalConduit$1.run(LocalConduit.java:131)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: org.hibernate.HibernateException: No Hibernate Session bound
> to thread, and configuration does not allow creation of
> non-transactional one here
> 	at
> org.springframework.orm.hibernate3.AbstractSessionFactoryBean$TransactionAwareInvocationHandler.invoke(AbstractSessionFactoryBean.java:299)
> 	at $Proxy0.getCurrentSession(Unknown Source)
> 	at
> org.taktik.nadi.dao.impl.ContextDAOImpl.getContext(ContextDAOImpl.java:38)
> 	at
> org.taktik.nadi.logic.impl.ContextLogicImpl.getContext(ContextLogicImpl.java:92)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
> 	at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
> 	at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
> 	at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
> 	at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
> 	at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
> 	at $Proxy4.getContext(Unknown Source)
> 	at
> org.taktik.ws.impl.NadiWebServicesImpl.authenticate(NadiWebServicesImpl.java:217)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at
> org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:99)
> 	at
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:73)
> 	... 9 more
>
>
> Could this
> http://jira.codehaus.org/browse/XFIRE-605
> be somewhat related?
>
> Thanks.
>   

Re: JUnit test with local transport failing to find hibernate session

Posted by Gilles Durys <gi...@approach.be>.
Jiang, Ning (Willem) wrote:
> Hi ,
> I don't know if it relates to the http header staff(it is the major different between the http transport and local transport. 
>  
> I did not write any code about DAO, so may be I am wrong.
> 
> Could you send me the stake trace or the work space. May be I can debug it to find out the real reason.
> 
Here's the stack trace

org.apache.cxf.interceptor.Fault: No Hibernate Session bound to thread,
and configuration does not allow creation of non-transactional one here
	at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:86)
	at
org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:82)
	at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:62)
	at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:56)
	at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
	at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:92)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
	at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73)
	at org.apache.cxf.transport.local.LocalConduit$1.run(LocalConduit.java:131)
	at java.lang.Thread.run(Thread.java:595)
Caused by: org.hibernate.HibernateException: No Hibernate Session bound
to thread, and configuration does not allow creation of
non-transactional one here
	at
org.springframework.orm.hibernate3.AbstractSessionFactoryBean$TransactionAwareInvocationHandler.invoke(AbstractSessionFactoryBean.java:299)
	at $Proxy0.getCurrentSession(Unknown Source)
	at
org.taktik.nadi.dao.impl.ContextDAOImpl.getContext(ContextDAOImpl.java:38)
	at
org.taktik.nadi.logic.impl.ContextLogicImpl.getContext(ContextLogicImpl.java:92)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
	at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy4.getContext(Unknown Source)
	at
org.taktik.ws.impl.NadiWebServicesImpl.authenticate(NadiWebServicesImpl.java:217)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:99)
	at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:73)
	... 9 more


Could this
http://jira.codehaus.org/browse/XFIRE-605
be somewhat related?

Thanks.
-- 
Gilles Durys

RE: JUnit test with local transport failing to find hibernate session

Posted by "Jiang, Ning (Willem)" <Ni...@iona.com>.
Hi ,
I don't know if it relates to the http header staff(it is the major different between the http transport and local transport. 
 
I did not write any code about DAO, so may be I am wrong.

Could you send me the stake trace or the work space. May be I can debug it to find out the real reason.

Willem. 

-----Original Message-----
From: Gilles Durys [mailto:gilles.durys@approach.be]
Sent: Wed 9/19/2007 21:16
To: cxf-user@incubator.apache.org
Subject: JUnit test with local transport failing to find hibernate session
 
Hi,

I developed a web service in a cxf-spring-hibernat environment.
It runs in Tomcat fine.
I also wrote some Junit tests that use the same web service with a local
transport. Within these tests, the DAOs fail to find an Hibernate session.
Has anyone a lead on why this fail?

Thanks,
-- 
Gilles Durys