org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) - java

I am trying to consume a webservice using. My client runs as a JSP pages hosted on Tomcat. While trying to consume the service I get this error:
HTTP Status 500 - Unexpected error: null
I know that this problem is on the server side. I am using a RPC style SOAP request. I am new to JAVA and web services so I need a way to get to the faulty variable. How can I resolve this?
type Exception report
message Unexpected error: null
description The server encountered an internal error that prevented it from fulfilling this request.
exception
Unexpected error: null
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
org.apache.axis.client.Call.invokeEngine(Call.java:2784)
org.apache.axis.client.Call.invoke(Call.java:2767)
org.apache.axis.client.Call.invoke(Call.java:2443)
org.apache.axis.client.Call.invoke(Call.java:2366)
org.apache.axis.client.Call.invoke(Call.java:1812)
com.xxxx.xxxx.xxxx.xxxx.Ouxxxxxxx._xxxx.OutagexxxxxxxStub.newOutageRequest(OxxxxxxxxxxxngStub.java:1986)
com.xxxx.xxxx.xxxx.xxxx.Outxxxxxxxrvice._xxxx.OutxxxxxxxxxxiceProxy.newOutageRequest(Oxxxxxxxxy.java:158)
com.xxxx.xxxxxxxxxx.doPost(SubmxxxxID.java:178)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

Please add activation.jar from the JAF (Java Activation Framework) in your classpath.

Related

Could not load imported ontology HTTP response code: 403

I have the following ontology (https://raw.githubusercontent.com/wiki/ontop/ontop/attachments/Example_MovieOntology/movieontology.owl) stored in OWL File.
I tried to load it:
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
File file = new File("movieontology.owl");
OWLOntology ontology = manager.loadOntologyFromOntologyDocument(file);
But I got this Exception:
Exception in thread "main" org.semanticweb.owlapi.model.UnloadableImportException: Could not load imported ontology: <http://dbpedia.org/ontology/> Cause: Server returned HTTP response code: 403 for URL: http://dbpedia.org/ontology/at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.makeLoadImportRequest(OWLOntologyManagerImpl.java:1766)
at org.semanticweb.owlapi.rdf.rdfxml.parser.TripleHandlers$TPImportsHandler.handleTriple(TripleHandlers.java:1537)
at org.semanticweb.owlapi.rdf.rdfxml.parser.TripleHandlers$HandlerAccessor.handleStreaming(TripleHandlers.java:194)
at org.semanticweb.owlapi.rdf.rdfxml.parser.OWLRDFConsumer.statementWithResourceValue(OWLRDFConsumer.java:1545)
at org.semanticweb.owlapi.rdf.rdfxml.parser.RDFParser.statementWithResourceValue(RDFParser.java:370)
at org.semanticweb.owlapi.rdf.rdfxml.parser.EmptyPropertyElement.startElement(StartRDF.java:236)
at org.semanticweb.owlapi.rdf.rdfxml.parser.PropertyElementList.startElement(StartRDF.java:658)
at org.semanticweb.owlapi.rdf.rdfxml.parser.RDFParser.startElement(RDFParser.java:201)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at org.semanticweb.owlapi.rdf.rdfxml.parser.RDFParser.parse(RDFParser.java:145)
at org.semanticweb.owlapi.rdf.rdfxml.parser.RDFXMLParser.parse(RDFXMLParser.java:73)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OWLOntologyFactoryImpl.java:197)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.actualParse(OWLOntologyManagerImpl.java:1156)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:1112)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:1062)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:1073)
at uk.ac.manchester.owl.owlapi.tutorial.examples.SimpleHierarchyExample.main(SimpleHierarchyExample.java:409)
Caused by: org.semanticweb.owlapi.io.OWLOntologyCreationIOException: Server returned HTTP response code: 403 for URL: http://dbpedia.org/ontology/
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OWLOntologyFactoryImpl.java:207)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.actualParse(OWLOntologyManagerImpl.java:1156)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:1112)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:1014)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadImports(OWLOntologyManagerImpl.java:1723)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.makeLoadImportRequest(OWLOntologyManagerImpl.java:1759)
... 29 more
If I try to load the ontology through a Web-based Visualization of Ontologies (WebVOWL), it loaded without any problems.
How can I solve?
Move to OWLAPI 4.2.3. Content negotiation has been upgraded and should handle any format the caller knows how to parse.
If this dies not work, please raise an issue in the OWLAPI tracker on github.

I am getting following error while deploying application on google cloud appengine

I am getting following error while deploying application on google cloud appengine
I have downloaded appengine-java-sdk-1.9.42 and installed appengine plugins in netbeans.
com.google.apphosting.utils.config.AppEngineConfigException: XML error validating
1
<application>driven-copilot-143702</application>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
</system-properties>
<threadsafe>false</threadsafe>
</appengine-web-app>
against C:\Users\graycell\Downloads\appengine-java-sdk-1.9.42\docs\appengine-web.xsd
at com.google.apphosting.utils.config.XmlUtils.validateXmlContent(XmlUtils.java:120)
at com.google.apphosting.utils.config.XmlUtils.validateXml(XmlUtils.java:91)
at com.google.appengine.tools.admin.Application.<init>(Application.java:227)
at com.google.appengine.tools.admin.Application.readApplication(Application.java:421)
at com.google.appengine.tools.admin.AppCfg.readWar(AppCfg.java:297)
at com.google.appengine.tools.admin.AppCfg.readApplication(AppCfg.java:288)
at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:217)
at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:119)
at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:115)
Caused by: org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 17; cvc-complex-type.2.4.a: Invalid content was found starting with element 'application'. One of '{"http://appengine.google.com/ns/1.0":runtime, "http://appengine.google.com/ns/1.0":module, "http://appengine.google.com/ns/1.0":service, "http://appengine.google.com/ns/1.0":instance-class, "http://appengine.google.com/ns/1.0":automatic-scaling, "http://appengine.google.com/ns/1.0":manual-scaling, "http://appengine.google.com/ns/1.0":basic-scaling, "http://appengine.google.com/ns/1.0":static-files, "http://appengine.google.com/ns/1.0":resource-files, "http://appengine.google.com/ns/1.0":system-properties, "http://appengine.google.com/ns/1.0":vm-settings, "http://appengine.google.com/ns/1.0":beta-settings, "http://appengine.google.com/ns/1.0":vm-health-check, "http://appengine.google.com/ns/1.0":health-check, "http://appengine.google.com/ns/1.0":resources, "http://appengine.google.com/ns/1.0":network, "http://appengine.google.com/ns/1.0":env-variables, "http://appengine.google.com/ns/1.0":ssl-enabled, "http://appengine.google.com/ns/1.0":sessions-enabled, "http://appengine.google.com/ns/1.0":async-session-persistence, "http://appengine.google.com/ns/1.0":user-permissions, "http://appengine.google.com/ns/1.0":public-root, "http://appengine.google.com/ns/1.0":inbound-services, "http://appengine.google.com/ns/1.0":precompilation-enabled, "http://appengine.google.com/ns/1.0":admin-console, "http://appengine.google.com/ns/1.0":static-error-handlers, "http://appengine.google.com/ns/1.0":warmup-requests-enabled, "http://appengine.google.com/ns/1.0":threadsafe, "http://appengine.google.com/ns/1.0":auto-id-policy, "http://appengine.google.com/ns/1.0":code-lock, "http://appengine.google.com/ns/1.0":vm, "http://appengine.google.com/ns/1.0":env, "http://appengine.google.com/ns/1.0":class-loader-config, "http://appengine.google.com/ns/1.0":url-stream-handler, "http://appengine.google.com/ns/1.0":use-google-connector-j, "http://appengine.google.com/ns/1.0":api-config}' is expected.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Unknown Source)
at com.google.apphosting.utils.config.XmlUtils.validateXmlContent(XmlUtils.java:116)
... 8 more
Do you have a <version> tag in your appengine-web.xml? Could you show your complete xml file?
Here's the reference doc for your xml: https://cloud.google.com/appengine/docs/java/config/appref
By the way: People are downvoting you because it's much better to try to explain what you've tried instead of just showing a stacktrace. It makes it much harder to help you this way.

Error while creating BranchType in Clearcase 7.1.2 using CM API through Web View

I am getting error while creating BranchType in Clearcase 7.1.2 using CM API through Web View
Following is my method for creating BranchType :
static void createBranchType(String branchTypeName, CcProvider provider, String repositoryName) throws WvcmException
{
CcBranchType newBr = provider.ccBranchType(provider.userFriendlySelector(Domain.CLEAR_CASE, Namespace.BRTYPE, branchTypeName, repositoryName));
newBr.doCreateCcBranchType(null, null);
}
After running this code I am getting following exception :
CRVAP0236E (not-allowed): Unable to perform operation makeCcResource (CcBranchType.doCreateCcBranchType) on 'cc.brtype:NewBRJava': operation not allowed.
...com.ibm.rational.stp.ws.schema.ErrorFault:
at com.ibm.rational.stp.cs.internal.util.StpExceptionImpl.realException(StpExceptionImpl.java:493)
at com.ibm.rational.stp.cs.internal.util.StpExceptionImpl.(StpExceptionImpl.java:572)
at com.ibm.rational.stp.client.internal.wsutil.DctMethod$WsException.stpException(DctMethod.java:2398)
at com.ibm.rational.stp.client.internal.wsutil.DctMethod.handleErrorFault(DctMethod.java:1763)
at com.ibm.rational.stp.client.internal.wsutil.DctMethod.invoke(DctMethod.java:1114)
at com.ibm.rational.stp.client.internal.wsutil.DctMethod.invoke(DctMethod.java:848)
at com.ibm.rational.stp.client.internal.wsutil.DctMethod.invoke(DctMethod.java:1241)
at com.ibm.rational.stp.client.internal.ccrc.CcMkResource.run(CcMkResource.java:67)
at com.ibm.rational.stp.client.internal.core.CoreResource.runProtocolOp(CoreResource.java:800)
at com.ibm.rational.stp.client.internal.core.CoreResource.runOp(CoreResource.java:746)
at com.ibm.rational.stp.client.internal.cc.CcResourceImpl.runCcMkResourceOpInternal(CcResourceImpl.java:669)
at com.ibm.rational.stp.client.internal.cc.CcResourceImpl.runCcMkResourceOp(CcResourceImpl.java:630)
at com.ibm.rational.stp.client.internal.cc.CcBranchTypeImpl.doCreateCcBranchType(CcBranchTypeImpl.java:52)
at Example.createBranchType(Example.java:327)
at Example.main(Example.java:271)
Caused by: CRVSV0130E No object could be found that allows the requested operation.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.axis.encoding.ser.BeanDeserializer.(BeanDeserializer.java:120)
at org.apache.axis.encoding.ser.BeanDeserializer.(BeanDeserializer.java:106)
at com.ibm.rational.stp.ws.schema.ErrorFault.getDeserializer(ErrorFault.java:345)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)
at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)
at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)
at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)
at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
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:424)
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:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at com.ibm.rational.stp.ws.teamservice.TeamBindingStub.makeCcResource(TeamBindingStub.java:2956)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.ibm.rational.stp.client.internal.wsutil.DctMethod.invoke(DctMethod.java:1020)
... 10 more
I am stuck with this error from lat 5 days. I searched a lot on IBM forum and on google also but still no success.
Thanks in advance.
I solved it finally. The error was because of incorrect repository tag. I was passing the repository name but it requires the repository tag name (VOB tag) in method userFriendlySelector(Domain.CLEAR_CASE, Namespace.BRTYPE, branchTypeName, repositoryName). This should be VOB tag.

How to use an HTTPS wsdl file without downloading to local computer in java

I just implemented my first webservice (client). The URL is HTTPS. I tried to use the URL directly but i could not. So i downloaded the WSDL file and everything worked fine. Now the problem is that when service definition changes i will not know because the code that i wrote is based on the local WSDL i saved. So back to square one. Is it possible to use HTTPS URL directly without downloading it.
The exceptions i got while trying to implement the webservice using the URL are:
Exception in thread "main" javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:151)
at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:101)
at javax.xml.ws.Service.<init>(Unknown Source)
at org.tempuri.Service.<init>(Service.java:43)
at org.tempuri.ServiceSoap_ServiceSoap_Client.main(ServiceSoap_ServiceSoap_Client.java:65)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:100)
at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:204)
at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:149)
... 4 more
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'https myipaddress service.asmx?WSDL'.: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2198)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2390)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2422)
at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:263)
at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:206)
at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:98)
... 6 more
Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2188)
... 11 more
Caused by: java.security.cert.CertificateException: No subject alternative names present
at sun.security.util.HostnameChecker.matchIP(Unknown Source)
at sun.security.util.HostnameChecker.match(Unknown Source)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkIdentity(Unknown Source)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
Please help. Thanks in advance.
The simple answer is yes it is possible to use HTTPS to retrieve the WSDL.
The "No subject alternative names present" is Java's obscure way of telling you that there is a mismatch between the hostname of the URL you are using, and the Common Name (CN) in the hosts Certificate.
The right solution is to either use the hostname that matches the certificate, or get a new certificate issued with the proper hostnames in it.
There is a work around described in this similar question.

How to get reason for exception in web service

How could I get cause of exception that occurs in my web service? (I have jsf 1.2 project and two other projects that I should as web service) I have web service that when get called should do some reading from database and return string as a result, but when ever I try to do it I get following error (BioskopBean method is calling method from web service):
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.userException
faultSubcode:
faultString: java.lang.reflect.InvocationTargetException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:acer-PC
java.lang.reflect.InvocationTargetException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
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 com.majkicservis.bioskop.BioskopSoapBindingStub.getFilmove(BioskopSoapBindingStub.java:115)
at com.majkic.bioskop.BioskopBean.prikaziFilmove(BioskopBean.java:74)
at com.majkic.bioskop.BioskopBean.<init>(BioskopBean.java:33)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:188)
at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:106)
at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:406)
at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:215)
at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:199)
at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:76)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:68)
at org.apache.el.parser.AstValue.getValue(AstValue.java:112)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
at javax.faces.component.UIData.getValue(UIData.java:614)
at javax.faces.component.UIData.getDataModel(UIData.java:1145)
at javax.faces.component.UIData.setRowIndex(UIData.java:451)
at com.sun.faces.renderkit.html_basic.TableRenderer.encodeBegin(TableRenderer.java:77)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:816)
at javax.faces.component.UIData.encodeBegin(UIData.java:983)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:234)
at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:180)
at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:127)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:840)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:840)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:349)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
P.S. I tried to make other web service that just returns string and it works but in project above I can't find out what is causing this error
When interpreting a stack trace, a good starting point is to skip calls to external libraries and find the code that you wrote.
com.majkicservis.bioskop.BioskopSoapBindingStub.getFilmove(BioskopSoapBindingStub.java:115)
From there, something your code is calling threw a java.lang.reflect.InvocationTargetException, which means that it's trying to access a bean property that doesn't exist or whose bean doesn't implement Serializable. Are you expecting an object to be read or written to with the property "hostname"?

Categories