Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use -source 1.8 and allow running with > 1.8 #103

Closed
maxfieb opened this issue Jan 20, 2020 · 9 comments · Fixed by #207
Closed

use -source 1.8 and allow running with > 1.8 #103

maxfieb opened this issue Jan 20, 2020 · 9 comments · Fixed by #207
Assignees
Milestone

Comments

@maxfieb
Copy link

maxfieb commented Jan 20, 2020

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 instead of , and other things such as HTML entity escaping in javadoc (both of which might be done with a search and replace)

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]
@coudot
Copy link
Member

coudot commented Jan 20, 2020

See also #94

@coudot coudot added this to the 2.2 milestone Feb 10, 2020
@coudot
Copy link
Member

coudot commented Feb 10, 2020

Should be ok with 2.2 release

@coudot
Copy link
Member

coudot commented Jul 15, 2021

See #133

@artlog
Copy link
Contributor

artlog commented Sep 29, 2022

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 #204 with some javadoc fixes to avoid warnings.

working on using source and target 1.8

@artlog
Copy link
Contributor

artlog commented Sep 29, 2022

didn't manage to get it working yet. Playing with dependencies.

@artlog
Copy link
Contributor

artlog commented Sep 29, 2022

could be related to jmockit version
but upgrading it does not work that good, on existing java 7 ( ie not 8 )
0.999.11 works
0.999.12 fails with


[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 .

artlog pushed a commit to Worteks/lsc that referenced this issue Sep 30, 2022
- set versions 1.8 - 8 for maven compiler plugin
- update to jmockit 1.5
- add specific options to run jmockit
  - --add-reads java.base=java.logging does it.
@coudot coudot linked a pull request Sep 30, 2022 that will close this issue
soisik pushed a commit that referenced this issue Sep 30, 2022
- set versions 1.8 - 8 for maven compiler plugin
- update to jmockit 1.5
- add specific options to run jmockit
  - --add-reads java.base=java.logging does it.
@babandiaye
Copy link

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

@coudot
Copy link
Member

coudot commented Feb 27, 2023

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

@amottier
Copy link
Contributor

@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?

@coudot coudot closed this as completed Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants