Forum Discussion

darensmith's avatar
darensmith
New Contributor
11 years ago

java.net.MalformedURLException: unknown protocol: c

I suddenly began getting the following error with the Maven 4.5.1 plugin from the Ant macro below. Everything was working fine and I haven't made any significant changes to the script. I tried rolling any changes back to the previous known working version with the same results. I know that this error is often due to the encoding of the project file, but that appears to be correct as well. I've tried several known good project files as well with the same results on multiple windows machines. I'm at a loss and anyone that can provide any ideas would be much appreciated. I'm a licensed SoapUI Pro user, but don't have the account credentials to log in there at this time. Thanks in advance.

runTests:
[echo]
[echo] Executing runTest macro for the following:
[echo] **** Running tests from C:\TFS\QA\Automation\Mobile\DEV\W3i.Api\Smoke\smoke-environment.xml: smoke_configuration
[echo]
[echo]
[echo]
[echo] java.net.MalformedURLException: unknown protocol: c
[echo] at java.net.URL.<init>(URL.java:592)
[echo] at java.net.URL.<init>(URL.java:482)
[echo] at java.net.URL.<init>(URL.java:431)
[echo] at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:261)
[echo] at com.eviware.soapui.impl.wsdl.WsdlProjectFactory.createNew(WsdlProjectFactory.java:41)
[echo] at com.eviware.soapui.impl.wsdl.WsdlProjectFactory.createNew(WsdlProjectFactory.java:24)
[echo] at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:337)
[echo] at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:158)
[echo] at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:89)
[echo] at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:115)
[echo] java.lang.Exception: Failed to load soapUI project file [C:\TFS\QA\Automation\Mobile\DEV\W3i.Api\Smoke\smoke-environment.xml]
[echo] at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:341)
[echo] at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:158)
[echo] at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:89)
[echo] at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:115)
[echo]
[echo] **** Completed running tests from C:\TFS\QA\Automation\Mobile\DEV\W3i.Api\Smoke\smoke-environment.xml: smoke_configuration


<macrodef name="runTest">
<attribute name="project"/>
<attribute name="suite"/>

<sequential>
<echo message=""/>
<echo message="Executing runTest macro for the following:"/>
<echo message=" **** Running tests from @{project}: @{suite}"/>
<java
classname="com.eviware.soapui.tools.SoapUITestCaseRunner"
fork="true"
maxmemory="1024m"
output="${dir.temp}/@{project}_testrunner.log"
jvm="${java.exe}"
errorproperty="errorproperty"
outputproperty="outputproperty"
resultproperty="resultproperty">

<!-- -->
<jvmarg value="-Djava.library.path=${jtds.sso}"/>
<jvmarg value="-Djava.library.path=${sqljdbc.sso}"/>

<arg value="-a"/>
<!-- Export all test results for verbose test output -->
<arg value="-j"/>
<!-- Enable Junit report output -->
<arg value="-s@{suite}"/>
<!-- Specifies the test suite to run -->
<arg value="-f${dir.temp}"/>
<!-- Specifies the output directory -->

<!-- Specify any project level properties used in the test run -->
<!-- e.g. jdbcConnectionString=${jdbcConnectionString} -->
<!--
<arg value="-P"/>
<arg value="propertyName=value"/>
-->

<arg value="@{project}"/>

<classpath>
<fileset dir="${basedir}\lib\soapui">
<include name="*.jar"/>
</fileset>
<fileset dir="${basedir}\lib\jdbc">
<include name="*.jar"/>
</fileset>
<fileset dir="${basedir}\lib\cassandra">
<include name="*.jar"/>
</fileset>
<fileset dir="${basedir}\sso\sqljdbc">
<include name="*.jar"/>
</fileset>
</classpath>
</java>
<antcontrib:if>
<not>
<equals arg1="${errorproperty}" arg2=""/>
</not>
<antcontrib:then>
<echo message=""/>
<echo message="${outputproperty}${line.separator}"/>
<echo message="${line.separator}${errorproperty}${line.separator}"/>
<echo message=""/>
</antcontrib:then>
</antcontrib:if>
<echo message=" **** Completed running tests from @{project}: @{suite}${line.separator}"/>

<!-- Set failed.test property if the results returned from java call are not equal to 0 -->
<antcontrib:if>
<not>
<equals arg1="${resultproperty}" arg2="0"/>
</not>
<antcontrib:then>
<property name="test.failed" value="${resultproperty}"/>
</antcontrib:then>
</antcontrib:if>

<antcontrib:propertyregex property="suiteFileName" input="@{suite}" regexp="[\s\.]" replace="_" global="true" override="true"/>
<antcontrib:if>
<not>
<isset property="suiteFileName"/>
</not>
<antcontrib:then>
<property name="suiteFileName" value="@{suite}"/>
</antcontrib:then>
</antcontrib:if>
<basename file="@{project}" property="baseProjectFileName"/>
<antcontrib:propertyregex property="projectFileName" input="${baseProjectFileName}" regexp="\.xml$" replace="" global="true" override="true"/>
<antcontrib:if>
<not>
<isset property="projectFileName"/>
</not>
<antcontrib:then>
<property name="projectFileName" value="@{project}"/>
</antcontrib:then>
</antcontrib:if>
<echo message=" **** Renaming output to ${projectFileName}-${suiteFileName}.xml${line.separator}"/>
<move file="${dir.temp}/TEST-${suiteFileName}.xml" tofile="${dir.temp}/${projectFileName}-${suiteFileName}.xml"/>
<echo message="Exiting runTest macro"/>
<echo message=""/>
</sequential>
</macrodef>