I am using the pure java version of oc4j -- not the full app server.

Your reference to turn on class loader logging applies to the full app
server. For the pure java version, there is no opmn.xml to add these
settings to.

I guess I will google around to see if there is an alternative.

But thanks for the tip.


Glen Mazza wrote:
> 
> You could be having a classloader problem that is causing this error to
> occur.  OC4J's error messages can be unpredictable when that is happening. 
> I would recommend activating classloader logging[1] to reasonably confirm
> that that is not the problem--but if you see error messages that OC4J
> can't load this jar or that jar, that might be something you need to fix
> first.
> 
> HTH,
> Glen
> 
> [1] http://www.jroller.com/gmazza/date/20060728
> 
> 
> jsolderitsch wrote:
>> 
>> I have used cxf (2.0.6) to create a mock service implementation AND a
>> client from a customer wsdl.
>> 
>> I can deploy the mock service (to oc4j) and get the wsdl back in the
>> browser.
>> 
>> I want to call the client from another web app and so far this is
>> failing.
>> 
>> I have a junit test that I am hoping to use to expose the problem but I
>> am stumped now by a spring error.
>> 
>> The service is accessible via an https url -- ssl seems to be correctly
>> implemented for the test oc4j instance.
>> 
>> When I run the test, I see:
>> 
>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.385 sec
>> <<< FAILURE!
>> testHighLevelSimulatorServiceEstablishConnectionTest(com.gestalt.integration.mde.mdd.SimulatorServiceIntTest)
>>  
>> Time elapsed: 1.345 sec  <<< ERROR!
>> java.lang.RuntimeException:
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean with name
>> 'org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory' defined in
>> class path resource [META-INF/cxf/cxf-extension-http.xml]: Cannot resolve
>> reference to bean 'cxf' while setting bean property 'bus'; nested
>> exception is
>> org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
>> named 'cxf' is defined
>>         at
>> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:96)
>>         at
>> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:87)
>>         at
>> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:65)
>>         at
>> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:54)
>>         at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69)
>>         at
>> org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:106)
>>         at
>> org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:97)
>>         at
>> org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:54)
>>         at javax.xml.ws.Service.<init>(Service.java:57)
>>         at
>> mil.dod.metadata.mdr.ns.mde._1_0.ws.metadatadiscoveryservice.MetadataDiscoveryService_Service.<init>(MetadataDiscoveryService_Service.java:41)
>>         at
>> com.gestalt.integration.mde.mdd.client.impl.MetadataDiscoveryServiceClient.<init>(MetadataDiscoveryServiceClient.java:16)
>>         at
>> com.gestalt.integration.mde.mdd.proxy.impl.MetadataDiscoveryServiceProxyImpl.<init>(MetadataDiscoveryServiceProxyImpl.java:28)
>>         at
>> com.gestalt.integration.mde.mdd.SimulatorServiceIntTest.testHighLevelSimulatorServiceEstablishConnectionTest(SimulatorServiceIntTest.java:54)
>> Caused by: org.springframework.beans.factory.BeanCreationException: Error
>> creating bean with name
>> 'org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory' defined in
>> class path resource [META-INF/cxf/cxf-extension-http.xml]: Cannot resolve
>> reference to bean 'cxf' while setting bean property 'bus'; nested
>> exception is
>> org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
>> named 'cxf' is defined
>> 
>> Our beans file looks like this:
>> 
>> <beans xmlns="http://www.springframework.org/schema/beans";
>>      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>    xmlns:sec="http://cxf.apache.org/configuration/security";
>>    xmlns:http="http://cxf.apache.org/transports/http/configuration";
>>      xmlns:jaxws="http://cxf.apache.org/jaxws";
>>      xsi:schemaLocation="
>>                 http://cxf.apache.org/configuration/security
>>                    http://cxf.apache.org/schemas/configuration/security.xsd
>>            http://cxf.apache.org/transports/http/configuration
>>               http://cxf.apache.org/schemas/configuration/http-conf.xsd
>>      http://www.springframework.org/schema/beans 
>>      http://www.springframework.org/schema/beans/spring-beans.xsd 
>>      http://cxf.apache.org/jaxws 
>>      http://cxf.apache.org/schemas/jaxws.xsd";>
>> <!--
>>      <import resource="classpath:META-INF/cxf/cxf.xml" />
>>      <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>>      <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>> -->
>>      <import resource="classpath:META-INF/cxf/cxf-all.xml" />
>>      <jaxws:endpoint
>>        id="mdd"
>>       
>> implementor="com.gestalt.integration.mde.mdd.service.impl.MetadataDiscoveryServiceSimulatedImpl"
>>  
>>        wsdlLocation="WEB-INF/wsdl/MetadataDiscoveryService.wsdl"
>>        address="/service"  />
>>    <http:conduit name="*.http-conduit">
>>        <http:tlsClientParameters secureSocketProtocol="SSL">
>>        </http:tlsClientParameters>
>>        <http:client AutoRedirect="true" Connection="Keep-Alive"/>
>>    </http:conduit>
>> 
>> </beans>
>> 
>> Note that I just commented out the separate cxf imports in favor of the
>> cxf-all import.
>> 
>> Does this look like I am doing something stupid?
>> 
>> Any hints appreciated.
>> 
>> Jim
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/junit-test-with-spring-and-cxf-failing----no-bean-named-cxf-is-defined-tp17782928p17784415.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to