-
1. Re: Missing scout-client.jar
beve Nov 28, 2007 2:09 AM (in response to dsun)Hi dsun,
the jars are located in the server/default/deploy/jbossesb.sar/lib directory if you have a deployed version of the ESB.
If you have downloaded/checked out the source code then the jars are located in trunk/product/lib/ext.
I was able to run your example with the following jars in my classpath
commons-codec.jar
jaxr-api-1.0rc1.jar
jbossesb-rosetta.jar
jbossts-common.jar
scout-1.0rc1.jar
xbean.jar
commons-logging.jar
jbossall-client.jar
jboss-messaging.jar
juddi-client-20071022.191630-6.jar
stax-api-1.0.1.jar
xercesImpl.jar
javassist.jar
jboss-aop-jdk50.jar
jboss-remoting.jar
log4j.jar
trove.jar
[list=]
All might not be needed for your example, but this will work if you later need to use the ServiceInvoker.
Regards,
Daniel -
2. Re: Missing scout-client.jar
kurtstam Nov 28, 2007 9:50 AM (in response to dsun)Just to clarify, there is no scout-client.jar. Scout is a JAXR implementation and we have it communicate to a UDDI implementation called jUDDI. You would only need the juddi-client.jar if you want to use RMI as your communication protocol.
--Kurt -
3. Re: Missing scout-client.jar
dsun Nov 28, 2007 11:38 AM (in response to dsun)I included all the jars you mentioned.
1 I first use RMITransport
g4j:WARN Please initialize the log4j system properly.
org.jboss.soa.esb.services.registry.RegistryException: javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.apache.juddi.registry.rmi.InquiryService_Stub (no security manager: RMI class loader disabled)]
2 then I use LocalTransport
I get this exception
java.lang.ClassNotFoundException: org.apache.juddi.registry.local.InquiryService
Do I miss any jars???
Here is my jboss-properties properties in the 2nd try
<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) --> -
4. Re: Missing scout-client.jar
kurtstam Nov 28, 2007 11:43 AM (in response to dsun)1. Do you have a juddi rmi service up and running? A running jbossesb-server will do.
2. If you want to use the localTransport you need the juddi.jar, juddi.properties and make sure it can connect to a juddi DB.
--K -
5. Re: Missing scout-client.jar
dsun Nov 28, 2007 12:03 PM (in response to dsun)I started jbossESB and juddi.properties is in my project root.
I then run the sample program (using RMI transport) as standalong appliocation. I still get this exception:
org.jboss.soa.esb.services.registry.RegistryException: javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.apache.juddi.registry.rmi.InquiryService_Stub (no security manager: RMI class loader disabled)]
at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findAllServices(JAXRRegistryImpl.java:282)
at com.oldlane.esb.eze.test.GetAllServices.main(GetAllServices.java:18)
Caused by: javax.xml.registry.JAXRException: javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.apache.juddi.registry.rmi.InquiryService_Stub (no security manager: RMI class loader disabled)]
at org.apache.ws.scout.registry.BusinessQueryManagerImpl.findOrganizations(BusinessQueryManagerImpl.java:153)
at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findOrganization(JAXRRegistryImpl.java:396)
at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.getJBossESBOrganization(JAXRRegistryImpl.java:665)
at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findAllServices(JAXRRegistryImpl.java:276)
... 1 more
Caused by: javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.apache.juddi.registry.rmi.InquiryService_Stub (no security manager: RMI class loader disabled)]
at org.apache.ws.scout.transport.RMITransport.send(RMITransport.java:91)
at org.apache.ws.scout.registry.RegistryImpl.execute(RegistryImpl.java:271)
at org.apache.ws.scout.registry.RegistryImpl.findBusiness(RegistryImpl.java:666)
at org.apache.ws.scout.registry.BusinessQueryManagerImpl.findOrganizations(BusinessQueryManagerImpl.java:126)
... 4 more -
6. Re: Missing scout-client.jar
kurtstam Nov 28, 2007 12:08 PM (in response to dsun)Did you add a jndi.properties file? You may want to look at the HelloWorld Quickstart. This one works just like you want to set it up.
-
7. Re: Missing scout-client.jar
beve Nov 28, 2007 12:12 PM (in response to dsun)I had to add :
System.setProperty("java.security.policy", "client.policy"); if (System.getSecurityManager() == null) System.setSecurityManager(new RMISecurityManager());
and a client.policy file with this:grant { permission java.security.AllPermission; };
/Daniel -
8. Re: Missing scout-client.jar
dsun Nov 28, 2007 12:32 PM (in response to dsun)when I invoke the following code in my action, yes it works perfect without problem.
registry = RegistryFactory.getRegistry();
Collection cs = registry.findAllServices();
But if I test the program as a standalong application, I will get the above-mentioned exception. I must miss some steps to bridge ESB environment to this standalong application. -
9. Re: Missing scout-client.jar
beve Nov 29, 2007 12:31 AM (in response to dsun)Hi dsun,
the test class I used is a standalone application. This is what it looks like:package com; import java.rmi.RMISecurityManager; import java.util.Collection; import org.jboss.soa.esb.services.registry.RegistryException; import org.jboss.soa.esb.services.registry.RegistryFactory; public class Registry { public static void main(String[] args) throws Exception{ System.setProperty("java.security.policy", "client.policy"); if (System.getSecurityManager() == null) System.setSecurityManager(new RMISecurityManager()); org.jboss.soa.esb.services.registry.Registry registry; try { registry = RegistryFactory.getRegistry(); Collection<String> cs = registry.findAllServices(); for (String str : cs) { System.out.println(str); } } catch (RegistryException e) { e.printStackTrace(); } } }
And I created a file named client.policy as mentioned in my previous post, in the directory where I run this class from.
This works for me.
Regards,
Daniel