membrane / soa-model

Toolkit and Java API for WSDL, WADL and XML Schema.
http://www.membrane-soa.org/soa-model/
Apache License 2.0
94 stars 73 forks source link

scripts files need update #234

Open pv7721 opened 9 years ago

pv7721 commented 9 years ago

Looking at: https://github.com/membrane/soa-model/tree/master/distribution/scripts we see that the .bat file haven't been updated in two years, there are several issues, for instance with wsdldiff.bat

The documentation mentions only 3 parameters, 2 mandatory (the wsdl files) and the output folder (optional): http://www.membrane-soa.org/soa-model-doc/1.4/cmd-tool/wsdldiff-tool.htm

But the command line has 6 parameters: java -classpath "%CLASSPATH%" org.membrane_soa.soa_model.diff.WSDLDiffCLI %1 %2 %3 %4 %5 %6

no information whatsoever what the other 3 might be.

The logic of populating the CLASSPATH is a little bit faulty, i.e. the jars are added each time the .bat is run, so the CLASSPATH keeps growing. So maybe two solutions: either saving the existing classpath in a temporary variable, setting CLASSPATH to null and then populate it, and at the end restore it, or use a different variable.

Moreover, in the latest version 1.5.1 groovy jars have been updated to 2.3.9 (except the groovy jar itself) but I think this one should be updated as well the references in the wsdldiff scripts.

In version 1.5.1 another jar needs to be added in the CP:

set "CLASSPATH=%CLASSPATH%;%SOA_MODEL_HOME%/lib/slf4j-api-1.7.9.jar"

otherwise there's Class Not found thrown:

Exception in thread "main" [Loaded java.lang.Throwable$PrintStreamOrWriter from shared objects file] [Loaded java.lang.Throwable$WrappedPrintStream from shared objects file] [Loaded java.util.IdentityHashMap$KeySet from shared objects file] java.lang.NoClassDefFoundError: Lorg/slf4j/Logger; at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Unknown Source) at java.lang.Class.getDeclaredFields(Unknown Source) at org.codehaus.groovy.reflection.CachedClass$1$1.run(CachedClass.java:48) at java.security.AccessController.doPrivileged(Native Method) at org.codehaus.groovy.reflection.CachedClass$1.initValue(CachedClass.java:45) at org.codehaus.groovy.reflection.CachedClass$1.initValue(CachedClass.java:43) at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46) at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33) at org.codehaus.groovy.reflection.CachedClass.getFields(CachedClass.java:254) at groovy.lang.MetaClassImpl.addFields(MetaClassImpl.java:2363) at groovy.lang.MetaClassImpl.inheritFields(MetaClassImpl.java:2358) at groovy.lang.MetaClassImpl.setupProperties(MetaClassImpl.java:2248) at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:3255) at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3226) at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:210) at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:241) at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:255) at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:859) at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallConstructorSite(CallSiteArray.java:84)

    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:186)
    at org.membrane_soa.soa_model.diff.WSDLDiffCLI.getParser(WSDLDiffCLI.groovy:254)
    at org.membrane_soa.soa_model.diff.AbstractDiffCLI.setUp(AbstractDiffCLI.groovy:54)
    at org.membrane_soa.soa_model.diff.AbstractDiffCLI$setUp$0.callCurrent(Unknown Source)

    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
    at org.membrane_soa.soa_model.diff.AbstractDiffCLI.start(AbstractDiffCLI.groovy:39)
    at org.membrane_soa.soa_model.diff.AbstractDiffCLI$start.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.membrane_soa.soa_model.diff.WSDLDiffCLI.main(WSDLDiffCLI.groovy:29)

Caused by: java.lang.ClassNotFoundException: org.slf4j.Logger

    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 35 more