#827  Failure on platforms without JNA support
Released
Jesse Gorzinski opened 2 weeks ago

Trying to deploy on IBM i, which doesn't have JNA support.
Since JNA doesn't work, oshi doesn't work. Since oshi doesn't work, the PerformanceSetting class doesn't work.

I don't see a workaround, but thankfully the use of oshi is not pervasive.

Launching a JVM...
WrapperManager: Initializing...
10:32:08 INFO  i.onedev.commons.bootstrap.Bootstrap - Launching application from '/home/LINUX/onedev/onedev-7.4.9'...
10:32:08 INFO  i.onedev.commons.bootstrap.Bootstrap - Cleaning temp directory...
10:32:17 INFO  io.onedev.commons.loader.AppLoader - Starting server...
10:32:49 ERROR i.onedev.commons.bootstrap.Bootstrap - Error booting application
java.lang.UnsupportedOperationException: Operating system not supported: Unknown
        at oshi.SystemInfo.createHardware(SystemInfo.java:163)
        at oshi.SystemInfo$$Lambda$452/0000000000000000.get(Unknown Source)
        at oshi.util.Memoizer$1.get(Memoizer.java:87)
        at oshi.SystemInfo.getHardware(SystemInfo.java:143)
        at io.onedev.server.model.support.administration.PerformanceSetting.<init>(PerformanceSetting.java:27)
        at io.onedev.server.maintenance.DefaultDataManager.init(DefaultDataManager.java:254)
        at io.onedev.server.persistence.TransactionInterceptor$1.call(TransactionInterceptor.java:23)
        at io.onedev.server.persistence.DefaultTransactionManager$1.call(DefaultTransactionManager.java:72)
        at io.onedev.server.persistence.DefaultSessionManager.call(DefaultSessionManager.java:79)
        at io.onedev.server.persistence.DefaultTransactionManager.call(DefaultTransactionManager.java:60)
        at io.onedev.server.persistence.TransactionInterceptor.invoke(TransactionInterceptor.java:18)
        at io.onedev.server.OneDev.start(OneDev.java:111)
        at io.onedev.commons.loader.DefaultPluginManager.start(DefaultPluginManager.java:44)
        at io.onedev.commons.loader.AppLoader.start(AppLoader.java:73)
        at io.onedev.commons.bootstrap.Bootstrap.main(Bootstrap.java:189)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:349)
        at java.base/java.lang.Thread.run(Thread.java:834)
<-- Wrapper Stopped

Minimally, the PerformanceSetting constructor could catch the UnsupportedOperationException and assume some braindead defaults.
Optimally, this would be user-configurable (with some defaults).

I'm peeking through some surrounding classes, such as DefaultResourceManager, but it is not clear whether the resource management piece would otherwise fail without JNA

Jesse Gorzinski changed fields 2 weeks ago
Name Previous Value Current Value
Assignee
robin
empty
Robin Shen commented 2 weeks ago

OneDev officially supports Mac/Linux/Windows/FreeBSD. For other platforms, I currently do not have test environments, or do you know any place I can test it?

Robin Shen commented 2 weeks ago

Will use a default performance setting in case JNA is not available in next patch release.

OneDev changed state to 'Closed' 2 weeks ago
Previous Value Current Value
Open
Closed
OneDev commented 2 weeks ago

State changed as code fixing the issue is committed

OneDev changed state to 'Released' 2 weeks ago
Previous Value Current Value
Closed
Released
OneDev commented 2 weeks ago

State changed as build #2856 (7.4.10) is successful

issue 1 of 1
Type
Improvement
Priority
Normal
Assignee
Not assigned
Issue Votes (0)
Watchers (4)
Reference
issue onedev/server#827
Please wait...
Page is in error, reload to recover