Hi,
I have a problem compiling classes inside a BC (Jbi4Corba).
I'm using the java compiler included in tools.jar form the jdk. I've put
tools.jar in the /lib/optional directory of servicemix. To compile my
classes I
need to have in the classpath the jar files deployed with my binding
component.
I call the compiler from within the binding component but it doesn't see the
needed classes.
The compiler classloader is the following:
-----------------------
mainclass: class com.sun.tools.javac.Main classloader:
[EMAIL PROTECTED]
-----------------------
while the component classloader is the following (it's toString is a
bit long):
-----------------------
classloader: [org.apache.xbean.classloader.JarFileClassLoader: name=Component
ClassLoader
urls=[file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/jbi4corba-0.5-SNAPSHOT.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/jaxb-xjc-2.0.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/aopalliance-1.0.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-j2ee-deployment_1.1_spec-1.0.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-ejb_2.1_spec-1.0.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xfire-spring-1.2.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-common-1.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/commons-logging-1.0.4.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xfire-generator-1.2.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/commons-vfs-20050307052300.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/commons-httpclient-3.0.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-core-1.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/stax-api-1.0.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/log4j-1.2.13.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/commons-collections-3.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/servicemix-core-3.0-incubating.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xbean-2.1.0.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xbean-classloader-2.6.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-jta_1.0.1B_spec-1.0.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/hsqldb-1.7.3.3.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/mx4j-3.0.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-deployment-1.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/regexp-1.3.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xercesImpl-2.7.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/commons-codec-1.3.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/servicemix-common-3.0-incubating.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/velocity-dep-1.4.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xstream-1.1.2.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/servicemix-services-3.0-incubating.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-system-1.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xml-resolver-1.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xalan-2.7.0.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-j2ee-management_1.0_spec-1.0.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/mx4j-remote-3.0.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xfire-annotations-1.2.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/mail-1.4.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/velocity-1.4.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/activeio-2.0-r118.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/opensaml-1.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-j2ee-jacc_1.0_spec-1.0.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-kernel-1.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/commons-jelly-tags-velocity-1.0.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/asm-all-2.2.3.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/jsr173_api-1.0.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-util-1.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/activemq-core-4.0.2.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-management-1.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/commons-pool-1.2.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-j2ee-connector_1.5_spec-1.0.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/spring-2.0-rc3.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xbean-kernel-2.6.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/jaxws-api-2.0.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/concurrent-1.3.4.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xapool-without-pool-1.4.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xfire-java5-1.2.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-jms_1.1_spec-1.0.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/bcprov-jdk14-124.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/wstx-asl-3.0.0.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/servicemix-soap-3.0-incubating.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/commons-lang-2.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-naming-1.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/lingo-1.0.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xbean-spring-2.6.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xfire-aegis-1.2.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/commons-dbcp-1.2.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/backport-util-concurrent-2.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/commons-beanutils-1.7.0.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xfire-jsr181-api-1.0-M1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xfire-xmlbeans-1.2.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xfire-jaxb2-1.2.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/jdom-1.0.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/jaxb-api-2.0.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/jaxen-1.1-beta-9.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/jaxb-impl-2.0.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/activation-1.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/howl-logger-0.1.11.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/activeio-core-3.0-beta4.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-servlet_2.4_spec-1.0.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xml-apis-1.3.02.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/wsdl4j-1.5.2.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-connector-1.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-transaction-1.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/commons-attributes-api-2.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/jencks-1.3.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xpp3-1.1.3.3.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/cglib-nodep-2.1_3.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/qdox-1.5.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/XmlSchema-1.0.3.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xbean-server-2.6.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xmlpublic-2.1.0.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/stax-utils-snapshot-20040917.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/xfire-core-1.2.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-security-1.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/geronimo-j2ee-1.1.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/commons-beanutils-core-1.7.0.jar,
file:/home/raffaele/download/esb/apache-servicemix-3.0-incubating/data/smx/components/jbi4corba/version_1/lib/ant-1.5.jar]
[EMAIL PROTECTED]
--------------------------
which of course have the needed classes.
The jdk compiler com.sun.tools.javac.Main seems to get the needed classes from
its class classloader not from the current thread class loader. Any suggestion
on how to make the classes visible?
thanks
Raffaele