Menu

Error upon starting service

Help
Antonio
2024-05-27
2024-05-28
  • Antonio

    Antonio - 2024-05-27

    Hi,

    I am currently migrating applications from java 8 to java 17.
    We previously used version 11.11 of YAJSW but not it is not working on java 17 so I am updating it.
    I have read that minimum release version supporting java 9+ is 13.xx so I tried 13.03, 13.09 and 13.12 but I am getting the same error nonetheless.
    I had to change some wrapper.conf properties related how they were configured previously but somehow it worked while now it is not working anymore.
    Still after changing some of those properties it looks okay but while starting the application and while it is still in the wrapper state it throws some weird error stating "Exception in org.rzo.yajsw.log.MyLogger: java.lang.NullPointerException: Cannot invoke "java.nio.ByteBuffer.hasRemaining()" because "this.buf" is null"
    Not sure if this is some bug in the code or maybe the installation doesnt finish properly but I dont get any other errors.
    I will attach my wrapper.log, wrapper.conf and picture of installation of service and its output.
    I am open to provide help with anything and thank you in advance.

    System specs:
    Windows 11
    Java 17 - Amazon corretto-17.0.11
    Maven 3.9.6

     
  • Antonio

    Antonio - 2024-05-27

    Picture of service installation and wrapper.conf

     

    Last edit: Antonio 2024-05-27
  • rzo

    rzo - 2024-05-27

    hello,

    pls set the following configuration:

    wrapper.console.pipestreams = true

    this will give some more information when the startup of the process fails.
    remember to remove it when the issue is solved.

    pls also try setting

    wrapper.java.command= full path to java exe

    make sure that java.exe is executable for all users

    remember to uninstall the service before doing any changes to the conf.

    -- Ron

     
  • Antonio

    Antonio - 2024-05-28

    Hi Ron,

    Thanks for answering.

    Changing wrapper.java.command to full path didnt seem to make any difference.
    Setting wrapper.console.pipestreams=true made the error message to change a bit.
    Now it is instead of a previous error saying "Exception in org.rzo.yajsw.log.MyLogger: java.io.IOException: Stream Closed"

    Attaching log with new error.

    Antonio

     
  • rzo

    rzo - 2024-05-28

    hello,

    the exception that is thrown is not the cause of the issue.
    the main issue, is that the sub process cannot run.
    this is generally due to issues such as user rights, unmapped network drives, unsupported java class version, ...
    the exception only indicates that the wrapper process cannot "connect" to the output of the child process.

    before running as service pls run using yajsw/bat/runconsole.bat, while pipestreams and the java full path are set as described above.
    if this runs without issues, then it is probably a rights issue.
    if not pls check the console output, and evntl post it.

    -- Ron

     
  • Antonio

    Antonio - 2024-05-28

    Hi Ron,

    Thanks for the help.
    It looks like I had some legacy JVM config parameter that was deprecated in newer java versions and wasn't compatible with java 17 and it was stopping JVM from starting which in the end caused all the other previous issues.
    It worked previously on java 8 and that's why I didn't think it was a problem.
    I found out it was causing issues by running the runConsole.bat which showed one line that hinted me the error.
    The parameter was: wrapper.java.additional.3=-XX:PermSize=384m
    Basically this PermSize is what caused the issue.
    I am still not able to fully start my applications but I am not sure yet if this is related to wrapper now or migrating the apps and their code itself.
    However it is nice having a different error message after a few days so I would call it a progress for now :D
    In the meantime I will write if any new errors jump out until the migration process is done and our apps are fully operational like they were on java 8.

    Antonio

     

Log in to post a comment.