Hello JB,

I've tested and experimented more about this issue. First I replaced the
wrapper bundled int Karaf 4.3.0 with the one bundled in Karaf 4.0.7. I get
the same result so the problem is probably not with the wrapper itself.

Next, I replaced all the *use* of variables KARAF_HOME and KARAF_BASE with
the hard coded absolute paths. But it still doesn't work. I get:

INFO   | jvm 1    | 2020/12/17 17:10:20 | Could not create framework:
java.lang.NumberFormatException: null
INFO   | jvm 1    | 2020/12/17 17:10:20 | java.lang.NumberFormatException:
null
INFO   | jvm 1    | 2020/12/17 17:10:20 | at
java.base/java.lang.Integer.parseInt(Integer.java:614)
INFO   | jvm 1    | 2020/12/17 17:10:20 | at
java.base/java.lang.Integer.parseInt(Integer.java:770)
INFO   | jvm 1    | 2020/12/17 17:10:20 | at
org.apache.karaf.main.ConfigProperties.<init>(ConfigProperties.java:251)
INFO   | jvm 1    | 2020/12/17 17:10:20 | at
org.apache.karaf.main.Main.launch(Main.java:262)
INFO   | jvm 1    | 2020/12/17 17:10:20 | at
org.apache.karaf.wrapper.internal.service.Main.start(Main.java:55)
INFO   | jvm 1    | 2020/12/17 17:10:20 | at
org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)

Note that I still had KARAF_HOME and KARAF_BASE set to ".." but I didn't
*use* those variables anywhere so it's not the wrapper that has problems
but some part of Karaf seems to read those variables (are they environment
variables?) and cannot handle that the paths are relative.

/Bengt

Den tors 17 dec. 2020 kl 13:54 skrev Bengt Rodehav <be...@rodehav.com>:

> I am using openjdk15 on Windows 7 and Windows 10 in case that could affect
> this issue.
>
> /Bengt
>
> Den tors 17 dec. 2020 kl 08:51 skrev Bengt Rodehav <be...@rodehav.com>:
>
>> Thanks JB - I appreciate it.
>>
>> /Bengt
>>
>> Den tors 17 dec. 2020 kl 06:08 skrev Jean-Baptiste Onofre <
>> j...@nanthrax.net>:
>>
>>> Hi,
>>>
>>> There were lot of changes between 4.0.x and 4.3.x. I don’t remember
>>> changes about the service wrapper.
>>>
>>> Let me reproduce and do a git bisect to identify the change.
>>>
>>> I will keep you posted.
>>>
>>> Regards
>>> JB
>>>
>>> > Le 16 déc. 2020 à 16:16, Bengt Rodehav <be...@rodehav.com> a écrit :
>>> >
>>> > I am upgrading from Karaf 4.0.7 to 4.3.0 and have run into problems
>>> starting Karaf as a service.
>>> >
>>> > We want to be able to unpack our Karaf based application anywhere so
>>> we need to avoid absolute paths everywhere. In the past, our
>>> karaf-wrapper.conf has contained the following lines:
>>> >
>>> > set.default.KARAF_HOME=..
>>> > set.default.KARAF_BASE=..
>>> > set.default.KARAF_DATA=../data
>>> > set.default.KARAF_ETC=../etc
>>> >
>>> > This has worked fine since the Wrapper always sets the directory in
>>> which karaf-wrapper.exe resides as the working directory. Therefore, since
>>> karaf-wrapper.exe resides in the %KARAF_HOME%/bin directory, ".." takes us
>>> back to %KARAF_HOME%.
>>> >
>>> > However, this does not seem to work in Karaf 4.3.0. I have tried
>>> several relative paths but I cannot figure out what directory ".." seems to
>>> point to in Karaf 4.3.0.
>>> >
>>> > Has anything related to this been changed from Karaf 4.0.7 to Karaf
>>> 4.3.0?
>>>
>>>

Reply via email to