java.net.MalformedURLException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • -have a jar containing wsdl, schema and xml catalog, ie the one attached, and let the wsdl refer to the schema using common URL (ie using http or https protocol - generally arbitrary protocol can be used) -now run wsimport for the wsdl in the jar: {code:none} lukas@lucas-ubuntu:/tmp/jxb-issue$ /space/sources/jws/jaxws22/jaxws-ri/dist/jaxws-ri/bin/wsimport.sh -keep -s . -verbose -Xnocompile jar:file:wsdl-lib-1.0-SNAPSHOT.jar\!/ProcessOrder.wsdl {code} => stacktrace similar to the following one appears: {code:none} com.sun.istack.internal.SAXParseException2; IOException thrown when processing "jar:file:wsdl-lib-1.0-SNAPSHOT.jar!http://localhost:8080/WebApplication1/ProcessOrder?xsd=1". Exception: java.net.MalformedURLException: no !/ in spec. at com.sun.tools.internal.xjc.ErrorReceiver.error(ErrorReceiver.java:79) at com.sun.tools.internal.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:391) at com.sun.tools.internal.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:290) at com.sun.tools.internal.xjc.reader.internalizer.AbstractReferenceFinderImpl.startElement(AbstractReferenceFinderImpl.java:100) at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551) at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551) at com.sun.tools.internal.ws.wsdl.parser.DOMForestScanner$LocationResolver.startElement(DOMForestScanner.java:128) at com.sun.xml.internal.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:229) at com.sun.xml.internal.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:266) at com.sun.xml.internal.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:235) at com.sun.xml.internal.bind.unmarshaller.DOMScanner.scan(DOMScanner.java:112) at com.sun.tools.internal.ws.wsdl.parser.DOMForestScanner.scan(DOMForestScanner.java:76) at com.sun.tools.internal.ws.processor.modeler.wsdl.JAXBModelBuilder.internalBuildJAXBModel(JAXBModelBuilder.java:94) at com.sun.tools.internal.ws.processor.modeler.wsdl.JAXBModelBuilder.<init>(JAXBModelBuilder.java:66) at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2213) at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:175) at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:121) at com.sun.tools.internal.ws.wscompile.WsimportTool.run(WsimportTool.java:178) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:120) at com.sun.tools.internal.ws.WsImport.main(WsImport.java:42) Caused by: java.net.MalformedURLException: no !/ in spec at java.net.URL.<init>(URL.java:617) at java.net.URL.<init>(URL.java:480) at java.net.URL.<init>(URL.java:429) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:626) at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:189) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:799) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568) at com.sun.tools.internal.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:383) ... 22 more Caused by: java.lang.NullPointerException: no !/ in spec at sun.net.www.protocol.jar.Handler.parseAbsoluteSpec(Handler.java:170) at sun.net.www.protocol.jar.Handler.parseURL(Handler.java:150) at java.net.URL.<init>(URL.java:612) ... 32 more [ERROR] IOException thrown when processing "jar:file:wsdl-lib-1.0-SNAPSHOT.jar!http://localhost:8080/WebApplication1/ProcessOrder?xsd=1". Exception: java.net.MalformedURLException: no !/ in spec. {code} Problem is that JAXB is looking for 'jar:file:...!http://' URL but it should be looking for 'http://localhost:8080/WebApplication1/ProcessOrder?xsd=1' instead and it should be also able to resolve this URL using user defined catalog (if any)
    via by Lukas Jungmann,
  • "no !/ in spec" error
    via GitHub by mmoayyed
    ,
    • java.net.MalformedURLException: no !/ in spec at java.net.URL.<init>(Unknown Source) at java.net.URL.<init>(Unknown Source) at java.net.URL.<init>(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.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.DOMParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) at com.northwestern.XMLParse.ParseXML.main(ParseXML.java:47) Caused by: java.lang.NullPointerException: no !/ in spec at sun.net.www.protocol.jar.Handler.parseAbsoluteSpec(Unknown Source) at sun.net.www.protocol.jar.Handler.parseURL(Unknown Source) ... 18 more

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,