gradle script fails to load data on Windows 10

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

gradle script fails to load data on Windows 10

Sanjeev Gupta
Hi,
The gradle scripts for windows doesn't seem to be working. I ran "gradlew loadDefault" to build and load demo data for trunk on Window 10 machine, but it fails with the following error :
*****************************************************************************
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar UP-TO-DATE
:assemble UP-TO-DATE
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:check UP-TO-DATE
:build UP-TO-DATE
:ofbiz --load-data
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException
        at org.apache.ofbiz.base.start.Start.main(Start.java:60)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.ParseException
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 1 more
:ofbiz --load-data FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ofbiz --load-data'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_101\bin\java.exe'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
*****************************************************************************


While trying to troubleshoot the issue I copied commons-cli jars, then commons-codec.jar and then log4J jars into ofbiz lib directory. It take the process a bit further but then again fails with the following error
*****************************************************************************
:clean
:cleanAnt
:cleanCatalina
:cleanData
:cleanDownloads
:cleanEclipseClasspath UP-TO-DATE
:cleanEclipseJdt UP-TO-DATE
:cleanEclipseProject UP-TO-DATE
:cleanEclipse UP-TO-DATE
:cleanFooterFiles
:cleanGradle
:cleanIndexes
:cleanLogs
:cleanOutput
:cleanTempfiles
:cleanUploads
:cleanXtra
:cleanAll
:compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:processResources
:classes
:jar
:assemble
:compileTestJava
:processTestResources UP-TO-DATE
:testClasses
:test

org.apache.ofbiz.base.util.template.FreeMarkerWorkerTests > renderTemplateFromString FAILED
    java.lang.ExceptionInInitializerError at FreeMarkerWorkerTests.java:40
        Caused by: java.lang.ClassCastException at FreeMarkerWorkerTests.java:40

org.apache.ofbiz.base.util.UtilCodecTests > testCheckStringForHtmlStrictNone FAILED
    java.lang.StackOverflowError

org.apache.ofbiz.entity.DelegatorUnitTests > delegatorCreationUsingConstructorFailsIfConfigurationIsMissing FAILED
    java.lang.NoClassDefFoundError at DelegatorUnitTests.java:40
    java.lang.NoClassDefFoundError at DelegatorUnitTests.java:46

org.apache.ofbiz.entity.DelegatorUnitTests > delegatorCreationUsingFactoryReturnsNullIfConfigurationIsMissing FAILED
    java.lang.NoClassDefFoundError at DelegatorUnitTests.java:40
    java.lang.NoClassDefFoundError at DelegatorUnitTests.java:46

org.apache.ofbiz.entity.DelegatorUnitTests > delegatorCreationUsingConstructor FAILED
    java.lang.NoClassDefFoundError at DelegatorUnitTests.java:40
    java.lang.NoClassDefFoundError at DelegatorUnitTests.java:46

org.apache.ofbiz.entity.DelegatorUnitTests > delegatorCreationUsingFactoryGetDelegator FAILED
    java.lang.NoClassDefFoundError at DelegatorUnitTests.java:40
    java.lang.NoClassDefFoundError at DelegatorUnitTests.java:46

org.apache.ofbiz.entity.DelegatorUnitTests > delegatorCreationUsingFactoryGetInstance FAILED
    java.lang.NoClassDefFoundError at DelegatorUnitTests.java:40
    java.lang.NoClassDefFoundError at DelegatorUnitTests.java:46

org.apache.ofbiz.entity.util.EntitySaxReaderTests > parse FAILED
    java.lang.NoClassDefFoundError at EntitySaxReaderTests.java:62

org.apache.ofbiz.webapp.control.ControlFilterTests > initSetsProperErrorCode FAILED
    java.lang.NoClassDefFoundError at ControlFilterTests.java:50

22 tests completed, 9 failed
:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///D:/dwacommerce/Instances/trunkLatest/build/reports/tests/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
*****************************************************************************

I'm not at all familiar with gradle, so haven't been able make any further progress with the troubleshooting the issue. But would be happy to provide any other details i can to help troubleshoot the issue.


Rgds
Sanjeev
Rgds
Sanjeev Gupta
www.digitalwebadvisors.com