Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 16 06:11

    dependabot[bot] on maven

    (compare)

  • May 16 06:11

    axkr on master

    Bump maven-bundle-plugin from 5… (compare)

  • May 16 06:11
    axkr closed #522
  • May 16 06:11

    dependabot[bot] on maven

    (compare)

  • May 16 06:11

    axkr on master

    Bump jsoup from 1.14.3 to 1.15.… (compare)

  • May 16 06:11
    axkr closed #523
  • May 16 04:19
    gitpod-io[bot] commented #523
  • May 16 04:19
    gitpod-io[bot] commented #522
  • May 16 04:18
    dependabot[bot] labeled #523
  • May 16 04:18
    dependabot[bot] labeled #523
  • May 16 04:18
    dependabot[bot] opened #523
  • May 16 04:18

    dependabot[bot] on maven

    Bump jsoup from 1.14.3 to 1.15.… (compare)

  • May 16 04:18
    dependabot[bot] labeled #522
  • May 16 04:18
    dependabot[bot] labeled #522
  • May 16 04:18
    dependabot[bot] opened #522
  • May 16 04:17

    dependabot[bot] on maven

    Bump maven-bundle-plugin from 5… (compare)

  • May 15 12:29

    axkr on master

    Bump jackson fasterxml to 2.13.3 (compare)

  • May 14 21:29

    axkr on master

    Add print line to server which … (compare)

  • May 13 06:54

    dependabot[bot] on maven

    (compare)

  • May 13 06:54

    axkr on master

    Bump RoaringBitmap from 0.9.26 … (compare)

TiMauzi
@TiMauzi
If you mean this, then it might hurt a bit but I might be able to solve it in another way.
Axel Kramer
@axkr
I meant "script" packages which could be automatically loaded on startup like this one: https://github.com/axkr/symja_android_library/wiki/context
TiMauzi
@TiMauzi
Oh you mean that >>I<< want to use external files? Then no
In this case I don't need any scripts
I just need the basic symja functionalities @axkr
TiMauzi
@TiMauzi
@axkr So you mentioned an option to skip the autoload part, is there any I'm not aware of? :O
Axel Kramer
@axkr
no I have to introduce it.
I think I will simply skip the part and do some logging like this:
private static final Logger logger = LogManager.getLogger(F.class);

...

...
      try {  
...

...
        } catch (java.security.AccessControlException acex) {
          // no read access for current user
          logger.warn("Cannot read packages in autoload folder:", acex); 
        } catch (RuntimeException ex) {
          logger.error(ex); 
        }
TiMauzi
@TiMauzi
That looks reasonable :)
TiMauzi
@TiMauzi

@axkr Also, part of Symja seems to need the RuntimePermission "shutdownHooks":

[2021-05-14T17:52:09,382][WARN ][stderr                   ] [TIM] java.lang.ExceptionInInitializerError
[2021-05-14T17:52:09,382][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.expression.F.<clinit>(F.java:599)
[2021-05-14T17:52:09,383][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.eval.ExprEvaluator.<clinit>(ExprEvaluator.java:133)
...
[2021-05-14T17:52:09,391][WARN ][stderr                   ] [TIM] Caused by: org.apfloat.ApfloatConfigurationException: Error setting property "cleanupAtExit" to value "true"
[2021-05-14T17:52:09,392][WARN ][stderr                   ] [TIM]       at org.apfloat.ApfloatContext.setProperty(ApfloatContext.java:1025)
[2021-05-14T17:52:09,392][WARN ][stderr                   ] [TIM]       at org.apfloat.ApfloatContext.setProperties(ApfloatContext.java:1270)
[2021-05-14T17:52:09,392][WARN ][stderr                   ] [TIM]       at org.apfloat.ApfloatContext.<init>(ApfloatContext.java:331)
[2021-05-14T17:52:09,392][WARN ][stderr                   ] [TIM]       at org.apfloat.ApfloatContext.<clinit>(ApfloatContext.java:1388)
[2021-05-14T17:52:09,393][WARN ][stderr                   ] [TIM]       ... 28 more
[2021-05-14T17:52:09,393][WARN ][stderr                   ] [TIM] Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "shutdownHooks")
[2021-05-14T17:52:09,393][WARN ][stderr                   ] [TIM]       at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
...

I assume it is caused by the property cleanupAtExit. Is it possible to not let it being set to true?

Axel Kramer
@axkr
@TiMauzi my environment is different from yours. Can you test, if the ApfloatContextcan be changed here:
by adding a line
ctx.setCleanupAtExit(false);
TiMauzi
@TiMauzi
Okay, give me a second
Just a question, you mean in my own code, right?
Because I don't have any ApfloatContext object there
Since it's implicitly created by ExprEvaluator
Axel Kramer
@axkr
Oh, I'd thought you already used a modified Symja version?
TiMauzi
@TiMauzi
No, not at all
Axel Kramer
@axkr
Ok then lets add in your code this test:
ApfloatContext ctx = ApfloatContext.getContext();
      ctx.setNumberOfProcessors(1);
      ctx.setCleanupAtExit(false);
TiMauzi
@TiMauzi
Alright, I'll be back in a moment
Axel Kramer
@axkr
if possible after the initialization of ExprEvaluator
TiMauzi
@TiMauzi
Okay, at the moment I'm trying it before the ExprEvaluator. I'll try the other version after that
Axel Kramer
@axkr
I'll be away for some minutes
TiMauzi
@TiMauzi
Take your time :)
First result after placing the test before the ExprEvaluator initialization:
[2021-05-14T18:23:42,388][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [TIM] fatal error in thread [elasticsearch[TIM][search][T#1]], exiting
java.lang.ExceptionInInitializerError: null
        at org.elasticsearch.index.search.CommutingQuantumScorer$1.run(CommutingQuantumScorer.java:93) ~[?:?]
        at java.security.AccessController.doPrivileged(AccessController.java:312) ~[?:?]
        at org.elasticsearch.index.search.CommutingQuantumScorer.score(CommutingQuantumScorer.java:90) ~[?:?]
...
Caused by: org.apfloat.ApfloatConfigurationException: Error setting property "cleanupAtExit" to value "true"
        at org.apfloat.ApfloatContext.setProperty(ApfloatContext.java:1025) ~[?:?]
        at org.apfloat.ApfloatContext.setProperties(ApfloatContext.java:1270) ~[?:?]
        at org.apfloat.ApfloatContext.<init>(ApfloatContext.java:331) ~[?:?]
        at org.apfloat.ApfloatContext.<clinit>(ApfloatContext.java:1388) ~[?:?]
        ... 26 more
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "shutdownHooks")
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:?]
        at java.security.AccessController.checkPermission(AccessController.java:1036) ~[?:?]
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:408) ~[?:?]
        at java.lang.Runtime.addShutdownHook(Runtime.java:212) ~[?:?]
        at org.apfloat.ApfloatContext.setCleanupAtExit(ApfloatContext.java:901) ~[?:?]
        at org.apfloat.ApfloatContext.setProperty(ApfloatContext.java:1016) ~[?:?]
        at org.apfloat.ApfloatContext.setProperties(ApfloatContext.java:1270) ~[?:?]
        at org.apfloat.ApfloatContext.<init>(ApfloatContext.java:331) ~[?:?]
        at org.apfloat.ApfloatContext.<clinit>(ApfloatContext.java:1388) ~[?:?]
        ... 26 more
fatal error in thread [elasticsearch[TIM][search][T#1]], exiting
...
TiMauzi
@TiMauzi
And a similar error if I place it after ExprEvaluator calcEvaluator = new ExprEvaluator(false, (short) 100);:
[2021-05-14T18:30:37,109][WARN ][stderr                   ] [TIM] java.lang.ExceptionInInitializerError
[2021-05-14T18:30:37,109][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.expression.F.<clinit>(F.java:599)
[2021-05-14T18:30:37,110][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.eval.ExprEvaluator.<clinit>(ExprEvaluator.java:133)
...
[2021-05-14T18:30:37,120][WARN ][stderr                   ] [TIM] Caused by: org.apfloat.ApfloatConfigurationException: Error setting property "cleanupAtExit" to value "true"
[2021-05-14T18:30:37,120][WARN ][stderr                   ] [TIM]       at org.apfloat.ApfloatContext.setProperty(ApfloatContext.java:1025)
...
[2021-05-14T18:30:37,122][WARN ][stderr                   ] [TIM] Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "shutdownHooks")
...
[2021-05-14T18:30:37,124][WARN ][stderr                   ] [TIM]       ... 31 more
[2021-05-14T18:30:37,133][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [TIM] fatal error in thread [elasticsearch[TIM][search][T#1]], exiting
java.lang.NoClassDefFoundError: Could not initialize class org.apfloat.ApfloatContext
        at org.elasticsearch.index.search.CommutingQuantumScorer$1.run(CommutingQuantumScorer.java:95) ~[?:?]
        at java.security.AccessController.doPrivileged(AccessController.java:312) ~[?:?]
...
@axkr So there is not much of a difference whether I place the ApfloatContext test before or after ExprEvaluator
Axel Kramer
@axkr
This seems to come from the apfloat library:
Can you open an issue where and ask how to set the properties to avoid that error, because I don't find a properties file in the apfloat's JAR itself.
TiMauzi
@TiMauzi
@axkr Although I'd like to take your advice and creating a modification of Symja meanwhile... Though, it would be more elegant of course if I could use an original version at some point :)
Axel Kramer
@axkr
Yes of course. You can contribute your changes back with a pull request to Symja if you create a fork on github.
TiMauzi
@TiMauzi
Mhm that might be a good idea... Although I usually use my university's gitlab, I can of course create my symja fork on github :)
TiMauzi
@TiMauzi
@axkr Added you to my fork :)
TiMauzi
@TiMauzi
@axkr The creator of apfloat answered btw :)
TiMauzi
@TiMauzi
@axkr I tried his 4th option, adding the line implementation "org.apfloat:apfloat-applet:1.9.1" to my build.gradle. I think it changed something, but I got a new Symja-related error:
[2021-05-15T01:57:51,755][WARN ][stderr                   ] [TIM] java.lang.NoClassDefFoundError: org/codehaus/commons/compiler/CompileException
[2021-05-15T01:57:51,755][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.builtin.CompilerFunctions$Initializer.init(CompilerFunctions.java:76)
[2021-05-15T01:57:51,756][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.builtin.CompilerFunctions$Initializer.access$200(CompilerFunctions.java:72)
[2021-05-15T01:57:51,756][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.builtin.CompilerFunctions.initialize(CompilerFunctions.java:84)
[2021-05-15T01:57:51,757][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.expression.F.<clinit>(F.java:910)
[2021-05-15T01:57:51,757][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.eval.ExprEvaluator.<clinit>(ExprEvaluator.java:133)
...
[2021-05-15T01:57:51,769][WARN ][stderr                   ] [TIM] Caused by: java.lang.ClassNotFoundException: org.codehaus.commons.compiler.CompileException
...
TiMauzi
@TiMauzi
But I'm checking the class imports at the moment, because I'm feeling suspicious that it has something to do with that
that is part of the Janino compiler
TiMauzi
@TiMauzi
Yes, I found that out, too. Funny thing: Janino is imported perfectly. It's just the "commons" part that doesn't work. I'm at the moment trying if it works when I add this particular artifact
I think it's an Elasticsearch thing with transitive imports again, that just the parent library is importet but not the libraries called by the parent
TiMauzi
@TiMauzi
Yes baby!
[2021-05-15T02:35:13,743][INFO ][stdout                   ] [TIM] doToQuery()
[2021-05-15T02:35:13,745][INFO ][stdout                   ] [TIM] transcribe()
[2021-05-15T02:35:13,745][INFO ][stdout                   ] [TIM] transcribe()
[2021-05-15T02:35:13,746][INFO ][stdout                   ] [TIM] (matchquery$$fuchs&&(matchquery$$schaf||(!matchquery$$schaf&&matchquery$$huhn)))||(!matchquery$$matchquery$$fuchs&&matchquery$$schaf&&matchquery$$wolf)
[2021-05-15T02:35:13,776][INFO ][stdout                   ] [TIM] CommutingQuantumQuery
[2021-05-15T02:35:13,788][INFO ][stdout                   ] [TIM] CommutingQuantumWeight
[2021-05-15T02:35:13,790][INFO ][stdout                   ] [TIM] CommutingQuantumScorer
[2021-05-15T02:35:13,791][INFO ][stdout                   ] [TIM] score()
... no class errors here anymore! :tada:
[2021-05-15T02:35:14,733][INFO ][stdout                   ] [TIM] Index 1 out of bounds for length 1
[2021-05-15T02:35:14,742][WARN ][r.suppressed             ] [TIM] path: /fables/_search, params: {index=fables}
org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed
        at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:661) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
...
Caused by: java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Float (java.lang.Integer and java.lang.Float are in module java.base of loader 'bootstrap')
        at org.elasticsearch.index.search.CommutingQuantumScorer.score(CommutingQuantumScorer.java:91) ~[?:?]
...
Just my own programming mistakes for now
And yes, using the janino commons-compiler artifact worked :)
@axkr So that means, that I actually can use your original Symja (if nothing unexpected happens anymore) :)
Axel Kramer
@axkr
@TiMauzi go ahead ;-)