"WARNING: Unable to find required classes" when making a web service client
Asked Answered
K

2

10

I have to make a web service client from an wsdl file. I have followed tutorial to create and test the service client in the eclipse wizard, and (I thought that I have implemented the code to call the service), but I keep getting this stack trace, I know its maybe trivial but I didn't manage to find anything on internet. I have attached these libraries to the path, so i cant understand what this is, I appreciate any help, first time dealing with web services. I am not sure if it is ok to post entire stack trace here, its quite big, but here is part of it.....

Dec 8, 2010 7:10:31 AM org.apache.axis.utils.JavaUtils isAttachmentSupported
WARNING: Unable to find required classes (javax.activation.DataHandler and          javax.mail.internet.MimeMultipart). Attachment support is disabled.
 AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
 faultSubcode: 
 faultString: Fault occurred while processing.
 faultActor: 
 faultNode: 
 faultDetail: 
{http://xml.apache.org/axis/}stackTrace:Fault occurred while processing.
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
atorg.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2938)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at ch.contract.BookCourseServiceEndpointServiceSoapBindingStub.getCourses(BookCourseServiceEndpointServiceSoapBindingStub.java:287)
at ch.contract.RemoteBookCourseServiceProxy.getCourses(RemoteBookCourseServiceProxy.java:62)
at ch.controllers.BookCourseController.getAllCourses(BookCourseController.java:23)
at ch.gui.CourseListFrame.initComponents(CourseListFrame.java:60)
at chbookcourse.gui.CourseListFrame.start(CourseListFrame.java:37)
at ch.bookcourse.Runner.main(Runner.java:9)

{http://xml.apache.org/axis/}hostname:usis-MacBook-Pro-15.local
Klecka answered 8/12, 2010 at 6:25 Comment(0)
P
8

Make sure activation.jar from the JAF (Java Activation Framework) is in your classpath.

P answered 8/12, 2010 at 6:29 Comment(8)
@Asaph: It is there!!! I wrote up in description, i have activation.jar and the mail.jar!Klecka
@Julia: According to the stacktrace, the class javax.activation.DataHandler cannot be found. That class is normally found in activation.jar. I re-read your question and see no mention of activation.jar. Are you certain your running program is using the same classpath you're checking?P
@Julia, you may have it, but it is not present in your classpath at the time of the exception.Roomer
@Asaph: You were right! I added activation, but it was still jar.zip... :/ Sorry for that. I have new stacktrace, quick opinion on that? Or i should edit orignial post?? AxisFault faultCode: {schemas.xmlsoap.org/soap/envelope}Server faultSubcode: faultString: Fault occurred while processing. faultActor: faultNode: faultDetail: {xml.apache.org/axis}stackTrace:Fault occurred while processing. at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)Klecka
@Julia: The stacktrace is too difficult to read as a comment. Please post your new stacktrace in a new question. Also, if you found my answer to this question helpful, please mark it correct.P
@Asaph: I have make new question, can u have look pls:)Klecka
@P - Does not work anymore even after adding activation.jar to the build path. Is it okay if I ignore the warning ?Amorette
directly fetch it from central.maven.org/maven2/javax/activation/activationGarganey
G
4

I solved this warning/error on tomcat 8 with eclipse birt reporting viewer.

Fetch the latest ones from:

and place them into the installation directory (just like in classpath):

  • /apache-tomcat-v/lib/

this should solve your problem

Garganey answered 18/3, 2016 at 16:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.