Thanks, I think I have gotten past the ClassCastException by moving all of the code and jars out of my war so that it should be picked up by the 'application' classloader, with the exception of the qname.jar fix for weblogic. The weblogic.xml suggestion didn't seem to work but putting the jar at the front of the classpath in the start .cmd file worked. The only way weblogic seems to be able to find my XFIRE jars is by putting them in the applications\APP_INF\lib folder. I have tried putting them in the WEB-INF/lib folder of the WAR file and in the applications folder for weblogic (application level, I think). Now I still seem to have a classloader issue but can't really tell what it is. I get a ServletException that I can't seem to catch. I wrapped my XFire initialization in try/catch (Throwable) but the ServletException seems to skip past me. As best I can tell from the debugging I have done thru XFire, the code is in the middle of setting up the default binding mapping types for Aegis. When the code attempts to 'register' the XMLStreamType, it fails somewhere there - the debugger is getting the logger and next thing I know, I am outside my servlet with a ServletException! So either this is some type of classloader issue with Log4j or something to do with the XMLStreamType.
Date: Thu, 2 Aug 2007 10:45:53 +0200From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: [xfire-user] Suggestions on resolving ClassClassException in Weblogic due to ClassLoader issu I do the same. The principle is to set the service class to your EJB remote interface After it’s practically the same as an EJB client. - Get the home interface - Instanciate your remote interface by the home create method - Call your services by using: method.invoke(InterfaceObject, params); From: Mike Miller [mailto:[EMAIL PROTECTED] Sent: 01 August 2007 19:32To: [EMAIL PROTECTED]: RE: [xfire-user] Suggestions on resolving ClassClassException in Weblogic due to ClassLoader issu Thanks, I was just in the middle of reading the first link, and already setup Weblogic with the weblogic.xml as stated. We are on Weblogic 8.1.3. Apparently it has something to do with how I get access to the service. Did you use the EJBInvoker? I used the copy of the documentation and changed it slightly. Rather than the EJBInvoker taking a EJBHome object, I pass it the service class and then use our ServiceLoader class to load the service and get the EJBHome from there. Thanks for the input! /** * XFire EJB Invoker - lifted directly from the XFire documentation and then * slightly modified. Getting the EJBHome from our service. * * @param class class name of the ejb to be exposed */ public EJBInvoker(String clazz) { try { //EJBObject svc = (EJBObject) Services.get(Class.forName(clazz)); EJBObject svc = (EJBObject) ServiceLoader.getService(Class.forName(clazz)); this.home = svc.getEJBHome(); if (!home.getEJBMetaData().isSession() || !home.getEJBMetaData().isStatelessSession()) { throw new IllegalArgumentException("home must be for a stateless session bean"); } createMethod = home.getClass().getMethod("create", new Class[0]); } catch (Exception ex) { throw new IllegalArgumentException("Unable to initialize invoker: " + ex); } } Date: Wed, 1 Aug 2007 19:13:51 +0200From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: [xfire-user] Suggestions on resolving ClassClassException in Weblogic due to ClassLoader issues Try to see: http://e-docs.bea.com/wls/docs81/programming/classloading.html http://docs.codehaus.org/display/XFIRE/XFire+on+Weblogic+8.1 Do this and normally it deploys ws. I did the same things : EJB exposed as WS on Weblo 8.1 SP5 From: Mike Miller [mailto:[EMAIL PROTECTED] Sent: 01 August 2007 18:02To: xfireSubject: [xfire-user] Suggestions on resolving ClassClassException in Weblogic due to ClassLoader issues I am trying to expose one of our EJBs as a web service. We have a 'startup' servlet that initializes our service locator component and then starts some our internal startup tasks. I have added a new servlet that extends XFireConfigurableServlet and points to my services.xml. The startup servlet is started first and the new servlet is the last servlet started. I get a ClassCastException within Weblogic when XFire attempts to initialize my EJBInvoker. I believe this is class loader related but that is about as intelligently as I can speak of the problem. Should there be a problem loading the service from the second servlet? I am on a very tight schedule and need to find a solution fairly quickly. Any suggestion would be appreciated! Local listings, incredible imagery, and driving directions - all in one place! Find it! This email was sent to you by Reuters, the global news and information company.To find out more about Reuters visit www.about.reuters.com Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Limited. Reuters Limited is part of the Reuters Group of companies, of which Reuters Group PLC is the ultimate parent company. Reuters Group PLC - Registered office address: The Reuters Building, South Colonnade, Canary Wharf, London E14 5EP, United KingdomRegistered No: 3296375Registered in England and Wales PC Magazine’s 2007 editors’ choice for best web mail—award-winning Windows Live Hotmail. Check it out!This email was sent to you by Reuters, the global news and information company.To find out more about Reuters visit www.about.reuters.com Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Limited. Reuters Limited is part of the Reuters Group of companies, of which Reuters Group PLC is the ultimate parent company. Reuters Group PLC - Registered office address: The Reuters Building, South Colonnade, Canary Wharf, London E14 5EP, United KingdomRegistered No: 3296375Registered in England and Wales _________________________________________________________________ See what you’re getting into…before you go there. http://newlivehotmail.com