lsc
lsc copied to clipboard
use -source 1.8 and allow running with > 1.8
is it time to bump master to the minimum -source level 1.8 to support jdk's > 1.8 ?
This is also relevant as sun has already stopped support for jdk's other than 1.8.x, newer javac refuse (i tried jdk 13) -source under 1.8.
With the orable jdk having development only licence these days, running openjdk 13 seems a good possibility, if -source is set to 1.8 during compilation, under jdk 13 compiles with only a few test failures around javascript, maybe simple for somebody more familar with the code ?
I had to disable javadoc creation, as new java is checking javadoc for invalid html fragments, eg. in some cases complaining about
Test Results (openjdk 13, using -source 1.8) :
Failed tests: testModify(org.lsc.utils.output.LdifLayoutTest): expected:<# [Wed Dec 12 16:25:01 CET 2012](..)
testRemove(org.lsc.utils.output.LdifLayoutTest): expected:<# [Wed Dec 12 16:25:01 CET 2012](..)
testAdd(org.lsc.utils.output.LdifLayoutTest): expected:<# [Wed Dec 12 16:25:01 CET 2012](..)
Tests in error:
testDelimiters(org.lsc.beans.syncoptions.PropertiesBasedSyncOptionsTest)
test1(org.lsc.beans.syncoptions.PropertiesBasedSyncOptionsTest)
testJS(org.lsc.beans.syncoptions.PropertiesBasedSyncOptionsTest)
testCalculateModificationType(org.lsc.beans.BeanComparatorTest)
testCalculateModificationsWithEmptyFieldsAdd(org.lsc.beans.BeanComparatorTest)
testCalculateModificationsWithEmptyFieldsModify(org.lsc.beans.BeanComparatorTest)
testGetValuesToSet(org.lsc.beans.BeanComparatorTest)
testGetValuesToSetWithDelimitersForDefault(org.lsc.beans.BeanComparatorTest)
testGetValuesToSetWithDelimitersForCreate(org.lsc.beans.BeanComparatorTest)
testGetValuesToSetWithDelimitersForForce(org.lsc.beans.BeanComparatorTest)
testOkLdap(org.lsc.jndi.JScriptEvaluatorTest): javax.script.ScriptException: ReferenceError: "ldap" is not defined in nashorn:mozilla_compat.js at line number 69
Javascript is having some issues though, perhaps around bridge nashorn -> mozilla API :
11:45:16.104 [main] ERROR org.lsc.utils.JScriptEvaluator - Fail to compute expression: ldap.or(ldap.attribute('ou=People,dc=lsc-project,dc=org','ou'), ldap.fsup('ou=People,dc=lsc-project,dc=org','dc=*')) on unknown id !
Reason: javax.script.ScriptException: ReferenceError: "ldap" is not defined in nashorn:mozilla_compat.js at line number 69
11:45:16.107 [main] DEBUG org.lsc.utils.JScriptEvaluator - javax.script.ScriptException: ReferenceError: "ldap" is not defined in nashorn:mozilla_compat.js at line number 69
javax.script.ScriptException: ReferenceError: "ldap" is not defined in nashorn:mozilla_compat.js at line number 69
at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470) ~[nashorn.jar:na]
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:454) ~[nashorn.jar:na]
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406) ~[nashorn.jar:na]
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402) ~[nashorn.jar:na]
See also https://github.com/lsc-project/lsc/pull/94
Should be ok with 2.2 release
See #133
javadoc requires to disable lint due to JAXB xsd that generate java code with unbalanced
.
<!-- xsd generation creates invalid javadoc in java 8 those are errors -->
<doclint>none</doclint>
This was integrated in https://github.com/lsc-project/lsc/pull/204 with some javadoc fixes to avoid warnings.
working on using source and target 1.8
didn't manage to get it working yet. Playing with dependencies.
could be related to jmockit version
but upgrading it does not work that good, on existing java 7 ( ie not 8 )
[ERROR] org.lsc.utils.output.LdifLayoutTest.testAdd Time elapsed: 0.005 s <<< ERROR!
java.lang.IllegalArgumentException
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:377)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:284)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:248)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:167)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:456)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:169)
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:595)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:581)
[INFO]
[ERROR] Errors:
[ERROR] LdifLayoutTest.testAdd » IllegalArgument
[ERROR] LdifLayoutTest.testModify » IllegalArgument
[ERROR] LdifLayoutTest.testRemove » IllegalArgument
[INFO]
[ERROR] Tests run: 88, Failures: 0, Errors: 3, Skipped: 0
knowing that jmockit is now in 1.49 and api did change on the road...
https://jmockit.github.io/changes.html still 11 years of changes .
Hello i'm new user of LSC and i try to config it on Ubuntu 20.04 with Java 8 JRE But i always failed to start the service $JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ lsc: [INFO] Using /etc/default/lsc for configuration lsc: [INFO] Launching LSC configuration test... lsc: [OK] LSC configuration test successful root@server:/home/pabn# /etc/init.d/lsc start lsc: [INFO] Using /etc/default/lsc for configuration lsc: [INFO] Launching LSC configuration test... lsc: [OK] LSC configuration test successful lsc: [INFO] Launching LSC... lsc: [OK] Using LSC JMX port 1099 lsc: [INFO] Waiting 1s for LSC java process to launch lsc: [INFO] Waiting 30s for LSC java process to launch lsc: [INFO] Waiting 31s for LSC java process to launch
Hello i'm new user of LSC and i try to config it on Ubuntu 20.04 with Java 8 JRE
This does not seem linked to this issue. Please register to lsc-users mailing list and ask your question on the list. https://lsc-project.org/doku.php/community#mailing_lists
@artlog @soisik it seems #207 fix this issue (and I can actually successfully build and run test using Java 8) so I guess that the issue can be closed? But maybe it should remain open until version 2.2
publication?