You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Vassilis Virvilis <v....@biovista.com> on 2009/04/01 11:43:58 UTC

Re: client apache cxf-2.2 jar dependencies: jax_ws required backtrace

On Tuesday 31 March 2009, Daniel Kulp wrote:
> 
> This one should now be fixed.   It would be great if you can try tomorrows 
> snapshots (will deploy overnight) to double check.   Thanks for catching it.
> 
> Dan

Dan,

It works. I tried it with
	apache-cxf-2.2.1-SNAPSHOT.tar.gz   	 Wed Apr 01 07:28:56 GMT+00:00 2009  	 29806907  	   
The date and time is important otherwise I tested it wrongly (won't be the first time :-))

I was able to get rid of
	geronimo-javamail_1.4_spec-1.5.jar (done in previous step)
	geronimo-jaxws_2.1_spec-1.0.jar
	cxf-rt-transports-http-jetty-2.2.jar

So to recap
Requirements for running a client with the simple frontend with the aegis databinding
-------------------------------------------------------------------------------------
jar count: 21
space in MB: 3.8

jars:

commons-logging-1.1.1.jar
cxf-api-2.2.1-SNAPSHOT.jar
cxf-common-schemas-2.2.1-SNAPSHOT.jar
cxf-common-utilities-2.2.1-SNAPSHOT.jar
cxf-rt-bindings-soap-2.2.1-SNAPSHOT.jar
cxf-rt-core-2.2.1-SNAPSHOT.jar
cxf-rt-databinding-aegis-2.2.1-SNAPSHOT.jar
cxf-rt-databinding-jaxb-2.2.1-SNAPSHOT.jar
cxf-rt-frontend-simple-2.2.1-SNAPSHOT.jar
cxf-rt-transports-http-2.2.1-SNAPSHOT.jar
cxf-tools-common-2.2.1-SNAPSHOT.jar
geronimo-activation_1.1_spec-1.0.2.jar
geronimo-annotation_1.0_spec-1.1.1.jar
geronimo-stax-api_1.0_spec-1.0.1.jar
jaxb-api-2.1.jar
jaxb-impl-2.1.9.jar
neethi-2.0.4.jar
wsdl4j-1.6.2.jar
wstx-asl-3.2.6.jar
xml-resolver-1.2.jar
XmlSchema-1.4.4.jar

Re: client apache cxf-2.2 jar dependencies: jax_ws required backtrace

Posted by Daniel Kulp <dk...@apache.org>.
On Mon April 6 2009 10:15:39 am Vassilis Virvilis wrote:
> > BTW:  On monday, I also made xml-resolver-1.2.jar optional if you aren't
> > using any catalogs.   Thus, you should be able to get rid of that as
> > well.
>
> Indeed, it is not required. I was able to get my client running without it.
> Q: What are the catalogs anyway?

There are XML files that can be used to map locations for imports in 
wsdl/schema to other locations.   For example, if your wsdl imports the ws-
addressing schema from http://w3c.org/..., you can use a catalog to say 
"whenever you hit that schema, load it from this file on my local computer 
instead".

It's very useful for services behind firewalls and such that could not get out 
to internet places to get the schemas.

> > I'm also wondering why commons-logging is required.   Not sure what is
> > bringing that in.  We don't use it.   jaxb doesn't use it.   XmlSchema
> > doesn't.   wstx-asl doesn't.   Not sure wsdl4j.  neethi does use it, but
> > if your wsdl doesn't have any policies in it, then we wouldn't be
> > creating any neethi policies so I don't think the logging there would
> > come into play at all.
>
> That wasn't easy to find since my project actually uses commons logging.
> Q: Why CXF doesn't use it actively?

We just use java.util.Logging, mostly to avoid having to pull in some of these 
extra jars.

> Anyway here is the backtrace. From what I can tell it is originated from
> somewhere in aegis

Yep.  Looking at the code, Aegis DOES use commons/logging.  :-(  That's 
probably leftover code from pulling it from XFire and probably should be 
converted over.

Dan



>
> If you want to actually eliminate the dependancy I am willing to test it...
>
>      [java] Boot: Warning: Unable to locate main/main.jar in the JAR file
> /home/bill/workspace/ACGTLiteratureMiningCXF/dist/ACGTLiteratureMiningCXF.j
>ar [java] 6 Απρ 2009 4:09:00 μμ
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromClass [java] INFO: Creating Service
> {http://iface.ws.lib.biovista.com/}BEAService from class
> com.biovista.lib.ws.iface.BEAService [java]
> Error:java.lang.reflect.InvocationTargetException
>      [java] java.lang.reflect.InvocationTargetException
>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method) [java]     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) [java]     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) [java]     at java.lang.reflect.Method.invoke(Method.java:585)
> [java]     at com.biovista.lib.BRunnable.run(BRunnable.java:51) [java]    
> at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199) [java]
>     at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) [java]     at
> java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.j
>ava:242) [java]     at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.jav
>a:163) [java]     at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
> [java]     at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
> [java]     at
> java.awt.EventDispatchThread.run(EventDispatchThread.java:110) [java]
> Caused by: java.lang.NoClassDefFoundError:
> org/apache/commons/logging/LogFactory [java]     at
> org.apache.cxf.aegis.type.DefaultTypeMapping.<clinit>(DefaultTypeMapping.ja
>va:80) [java]     at
> org.apache.cxf.aegis.AegisContext.initialize(AegisContext.java:143) [java] 
>    at
> org.apache.cxf.aegis.databinding.AegisDatabinding.initialize(AegisDatabindi
>ng.java:258) [java]     at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFro
>mClass(ReflectionServiceFactoryBean.java:375) [java]     at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServi
>ceModel(ReflectionServiceFactoryBean.java:438) [java]     at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflecti
>onServiceFactoryBean.java:194) [java]     at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(Abs
>tractWSDLBasedEndpointFactory.java:100) [java]     at
> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
> [java]     at
> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBea
>n.java:102) [java]     at com.biovista.lib.Net.getProxyClient(Net.java:153)
> [java]     at
> com.biovista.acgt.client.LiteratureMiningServiceClient.<init>(LiteratureMin
>ingServiceClient.java:70) [java]     at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> [java]     at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce
>ssorImpl.java:39) [java]     at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru
>ctorAccessorImpl.java:27) [java]     at
> java.lang.reflect.Constructor.newInstance(Constructor.java:494) [java]    
> at java.lang.Class.newInstance0(Class.java:350)
>      [java]     at java.lang.Class.newInstance(Class.java:303)
>      [java]     at
> com.biovista.lib.Singleton.getInstance(Singleton.java:13) [java]     at
> com.biovista.lib.gui.Application.createMainFrame(Application.java:39)
> [java]     ... 12 more
>
>
>      .bill

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: client apache cxf-2.2 jar dependencies: jax_ws required backtrace

Posted by Vassilis Virvilis <v....@biovista.com>.
Hi Dan,

Sorry for the late reply. I was out of town.

On Wednesday 01 April 2009, Daniel Kulp wrote:
> 
> Thanks for the update.   Glad it works now.

No problem.

> 
> BTW:  On monday, I also made xml-resolver-1.2.jar optional if you aren't using 
> any catalogs.   Thus, you should be able to get rid of that as well.

Indeed, it is not required. I was able to get my client running without it.
Q: What are the catalogs anyway?

> 
> I'm also wondering why commons-logging is required.   Not sure what is 
> bringing that in.  We don't use it.   jaxb doesn't use it.   XmlSchema 
> doesn't.   wstx-asl doesn't.   Not sure wsdl4j.  neethi does use it, but if 
> your wsdl doesn't have any policies in it, then we wouldn't be creating any 
> neethi policies so I don't think the logging there would come into play at 
> all.  
> 

That wasn't easy to find since my project actually uses commons logging.
Q: Why CXF doesn't use it actively?

Anyway here is the backtrace. From what I can tell it is originated from somewhere in aegis

If you want to actually eliminate the dependancy I am willing to test it...

     [java] Boot: Warning: Unable to locate main/main.jar in the JAR file /home/bill/workspace/ACGTLiteratureMiningCXF/dist/ACGTLiteratureMiningCXF.jar
     [java] 6 Απρ 2009 4:09:00 μμ org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
     [java] INFO: Creating Service {http://iface.ws.lib.biovista.com/}BEAService from class com.biovista.lib.ws.iface.BEAService
     [java] Error:java.lang.reflect.InvocationTargetException
     [java] java.lang.reflect.InvocationTargetException
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:585)
     [java]     at com.biovista.lib.BRunnable.run(BRunnable.java:51)
     [java]     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
     [java]     at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
     [java]     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
     [java]     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
     [java]     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
     [java]     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
     [java]     at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
     [java] Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
     [java]     at org.apache.cxf.aegis.type.DefaultTypeMapping.<clinit>(DefaultTypeMapping.java:80)
     [java]     at org.apache.cxf.aegis.AegisContext.initialize(AegisContext.java:143)
     [java]     at org.apache.cxf.aegis.databinding.AegisDatabinding.initialize(AegisDatabinding.java:258)
     [java]     at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:375)
     [java]     at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:438)
     [java]     at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:194)
     [java]     at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
     [java]     at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
     [java]     at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
     [java]     at com.biovista.lib.Net.getProxyClient(Net.java:153)
     [java]     at com.biovista.acgt.client.LiteratureMiningServiceClient.<init>(LiteratureMiningServiceClient.java:70)
     [java]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     [java]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     [java]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     [java]     at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
     [java]     at java.lang.Class.newInstance0(Class.java:350)
     [java]     at java.lang.Class.newInstance(Class.java:303)
     [java]     at com.biovista.lib.Singleton.getInstance(Singleton.java:13)
     [java]     at com.biovista.lib.gui.Application.createMainFrame(Application.java:39)
     [java]     ... 12 more


     .bill

Re: client apache cxf-2.2 jar dependencies: jax_ws required backtrace

Posted by Daniel Kulp <dk...@apache.org>.


On Wed April 1 2009 5:43:58 am Vassilis Virvilis wrote:
> It works. I tried it with
> 	apache-cxf-2.2.1-SNAPSHOT.tar.gz   	 Wed Apr 01 07:28:56 GMT+00:00 2009  	
> 29806907 The date and time is important otherwise I tested it wrongly
> (won't be the first time :-))
>
> I was able to get rid of
> 	geronimo-javamail_1.4_spec-1.5.jar (done in previous step)
> 	geronimo-jaxws_2.1_spec-1.0.jar
> 	cxf-rt-transports-http-jetty-2.2.jar

Thanks for the update.   Glad it works now.

BTW:  On monday, I also made xml-resolver-1.2.jar optional if you aren't using 
any catalogs.   Thus, you should be able to get rid of that as well.

I'm also wondering why commons-logging is required.   Not sure what is 
bringing that in.  We don't use it.   jaxb doesn't use it.   XmlSchema 
doesn't.   wstx-asl doesn't.   Not sure wsdl4j.  neethi does use it, but if 
your wsdl doesn't have any policies in it, then we wouldn't be creating any 
neethi policies so I don't think the logging there would come into play at 
all.  

Dan


>
> So to recap
> Requirements for running a client with the simple frontend with the aegis
> databinding
> ---------------------------------------------------------------------------
>---------- jar count: 21
> space in MB: 3.8
>
> jars:
>
> commons-logging-1.1.1.jar
> cxf-api-2.2.1-SNAPSHOT.jar
> cxf-common-schemas-2.2.1-SNAPSHOT.jar
> cxf-common-utilities-2.2.1-SNAPSHOT.jar
> cxf-rt-bindings-soap-2.2.1-SNAPSHOT.jar
> cxf-rt-core-2.2.1-SNAPSHOT.jar
> cxf-rt-databinding-aegis-2.2.1-SNAPSHOT.jar
> cxf-rt-databinding-jaxb-2.2.1-SNAPSHOT.jar
> cxf-rt-frontend-simple-2.2.1-SNAPSHOT.jar
> cxf-rt-transports-http-2.2.1-SNAPSHOT.jar
> cxf-tools-common-2.2.1-SNAPSHOT.jar
> geronimo-activation_1.1_spec-1.0.2.jar
> geronimo-annotation_1.0_spec-1.1.1.jar
> geronimo-stax-api_1.0_spec-1.0.1.jar
> jaxb-api-2.1.jar
> jaxb-impl-2.1.9.jar
> neethi-2.0.4.jar
> wsdl4j-1.6.2.jar
> wstx-asl-3.2.6.jar
> xml-resolver-1.2.jar
> XmlSchema-1.4.4.jar

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog