ERROR - Version number may be negative or greater than 255
Asked by Vikas kottary:

I am new to plugin development,   

Was following developers docs to create

<https://developer.atlassian.com/server/framework/atlassian-sdk/create-a-confluence-hello-world-macro/>

I am facing below error -

Caused by: java.lang.IllegalArgumentException: Invalid version number: Version number may be negative or greater than 255

stack trace -

\[INFO\] \[talledLocalContainer\] java.lang.ExceptionInInitializerError  
\[INFO\] \[talledLocalContainer\] at com.ibm.icu.text.Collator.\<clinit\>(Collator.java:946)  
\[INFO\] \[talledLocalContainer\] at java.lang.Class.forName0(Native Method)  
\[INFO\] \[talledLocalContainer\] at java.lang.Class.forName(Class.java:264)  
\[INFO\] \[talledLocalContainer\] at org.h2.value.CompareMode.\<clinit\>(CompareMode.java:57)  
\[INFO\] \[talledLocalContainer\] at org.h2.engine.SessionRemote.\<init\>(SessionRemote.java:95)  
\[INFO\] \[talledLocalContainer\] at org.h2.jdbc.JdbcConnection.\<init\>(JdbcConnection.java:116)  
\[INFO\] \[talledLocalContainer\] at org.h2.jdbc.JdbcConnection.\<init\>(JdbcConnection.java:100)  
\[INFO\] \[talledLocalContainer\] at org.h2.Driver.connect(Driver.java:69)  
\[INFO\] \[talledLocalContainer\] at org.h2.server.TcpServer.initManagementDb(TcpServer.java:92)  
\[INFO\] \[talledLocalContainer\] at org.h2.server.TcpServer.start(TcpServer.java:238)  
\[INFO\] \[talledLocalContainer\] at org.h2.tools.Server.start(Server.java:484)  
\[INFO\] \[talledLocalContainer\] at com.atlassian.h2.ServerLifecycle.start(ServerLifecycle.java:83)  
\[INFO\] \[talledLocalContainer\] at com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateConfig.getHibernateProperties(ConfluenceHibernateConfig.java:51)  
\[INFO\] \[talledLocalContainer\] at com.atlassian.confluence.setup.DefaultBootstrapManager.getHibernateProperties(DefaultBootstrapManager.java:659)  
\[INFO\] \[talledLocalContainer\] at com.atlassian.confluence.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:343)  
\[INFO\] \[talledLocalContainer\] at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:81)  
\[INFO\] \[talledLocalContainer\] at com.atlassian.confluence.setup.DefaultBootstrapManager.init(DefaultBootstrapManager.java:190)  
\[INFO\] \[talledLocalContainer\] at com.atlassian.config.util.BootstrapUtils.init(BootstrapUtils.java:36)  
\[INFO\] \[talledLocalContainer\] at com.atlassian.confluence.setup.ConfluenceConfigurationListener.initialiseBootstrapContext(ConfluenceConfigurationListener.java:133)  
\[INFO\] \[talledLocalContainer\] at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:64)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4643)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5109)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1858)  
\[INFO\] \[talledLocalContainer\] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)  
\[INFO\] \[talledLocalContainer\] at java.util.concurrent.FutureTask.run(FutureTask.java:266)  
\[INFO\] \[talledLocalContainer\] at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)  
\[INFO\] \[talledLocalContainer\] at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:772)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:426)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1585)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)  
\[INFO\] \[talledLocalContainer\] Dec 26, 2021 11:41:39 PM org.apache.catalina.core.StandardContext startInternal  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)  
\[INFO\] \[talledLocalContainer\] SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file  
\[INFO\] \[talledLocalContainer\] Dec 26, 2021 11:41:39 PM org.apache.catalina.core.StandardContext startInternal  
\[INFO\] \[talledLocalContainer\] SEVERE: Context \[/confluence\] startup failed due to previous errors  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:969)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)  
\[INFO\] \[talledLocalContainer\] at java.util.concurrent.FutureTask.run(FutureTask.java:266)  
\[INFO\] \[talledLocalContainer\] at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)  
\[INFO\] \[talledLocalContainer\] at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.Catalina.start(Catalina.java:682)  
\[INFO\] \[talledLocalContainer\] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
\[INFO\] \[talledLocalContainer\] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  
\[INFO\] \[talledLocalContainer\] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
\[INFO\] \[talledLocalContainer\] at java.lang.reflect.Method.invoke(Method.java:498)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)  
\[INFO\] \[talledLocalContainer\] Caused by: java.lang.IllegalArgumentException: Invalid version number: Version number may be negative or greater than 255  
\[INFO\] \[talledLocalContainer\] at com.ibm.icu.util.VersionInfo.getInstance(VersionInfo.java:191)  
\[INFO\] \[talledLocalContainer\] at com.ibm.icu.impl.ICUDebug.getInstanceLenient(ICUDebug.java:65)  
\[INFO\] \[talledLocalContainer\] at com.ibm.icu.impl.ICUDebug.\<clinit\>(ICUDebug.java:69)  
\[INFO\] \[talledLocalContainer\] ... 61 more  
\[INFO\] \[talledLocalContainer\] 2021-12-26 23:41:39,800 INFO \[main\] \[atlassian.confluence.plugin.PluginFrameworkContextListener\] contextInitialized Initialising plugin system  
\[INFO\] \[talledLocalContainer\] 2021-12-26 23:41:39,800 FATAL \[main\] \[atlassian.spring.container.SpringContainerContext\] getComponent Spring Application context has not been set  
\[INFO\] \[talledLocalContainer\] 2021-12-26 23:41:39,800 ERROR \[main\] \[atlassian.confluence.plugin.PluginFrameworkContextListener\] contextInitialized Error initialising plugin manager: Spring Application context has not been set  
\[INFO\] \[talledLocalContainer\] java.lang.IllegalStateException: Spring Application context has not been set  
\[INFO\] \[talledLocalContainer\] at com.atlassian.spring.container.SpringContainerContext.getComponent(SpringContainerContext.java:48)  
\[INFO\] \[talledLocalContainer\] at com.atlassian.spring.container.ContainerManager.getComponent(ContainerManager.java:33)  
\[INFO\] \[talledLocalContainer\] at com.atlassian.confluence.plugin.PluginFrameworkContextListener.getPluginSystemLifecycle(PluginFrameworkContextListener.java:187)  
\[INFO\] \[talledLocalContainer\] at com.atlassian.confluence.plugin.PluginFrameworkContextListener.contextInitialized(PluginFrameworkContextListener.java:69)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4643)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5109)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1858)  
\[INFO\] \[talledLocalContainer\] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)  
\[INFO\] \[talledLocalContainer\] at java.util.concurrent.FutureTask.run(FutureTask.java:266)  
\[INFO\] \[talledLocalContainer\] at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)  
\[INFO\] \[talledLocalContainer\] at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:772)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:426)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1585)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:969)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)  
\[INFO\] \[talledLocalContainer\] at java.util.concurrent.FutureTask.run(FutureTask.java:266)  
\[INFO\] \[talledLocalContainer\] at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)  
\[INFO\] \[talledLocalContainer\] at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.Catalina.start(Catalina.java:682)  
\[INFO\] \[talledLocalContainer\] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
\[INFO\] \[talledLocalContainer\] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  
\[INFO\] \[talledLocalContainer\] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
\[INFO\] \[talledLocalContainer\] at java.lang.reflect.Method.invoke(Method.java:498)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)  
\[INFO\] \[talledLocalContainer\] at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)  
\[INFO\] \[talledLocalContainer\] 2021-12-26 23:41:39,806 FATAL \[main\] \[atlassian.spring.container.SpringContainerContext\] getComponent Spring Application context has not been set  
\[INFO\] \[talledLocalContainer\] 2021-12-26 23:41:39,806 WARN \[main\] \[atlassian.confluence.plugin.PluginFrameworkContextListener\] contextDestroyed Failed to shut down plugin system during ServletContext shutdown: Spring Application context has not been set


Answers:
author: Nic Brough -Adaptavist-
body: Welcome to the Community!

The h2 errors at the top of this chunk of the log strongly suggest that your database has been damaged, but the error you are reporting is usually down to using an invalid version of Java or bringing in a library that is not compatible with your version of Java and/or other libraries.

Check the versions of Java you are using are recent and support the version of Confluence you are developing for, and what libraries you are importing.

First, look at the rest of the errors that appear around the "invalid version" error message in the log.

comments: author: Vikas kottary
body: where can i find info regarding which version of java supports which version of confluence?

I am using openjdk 1.8.0_312


author: Nic Brough -Adaptavist-
body: See the "supported platforms" guides - <https://confluence.atlassian.com/doc/supported-platforms-207488198.html> has a version selector at the top right.


author: Fr?d?ric Esnault
body: Hi there,

I am testing too, no problem running Jira plugins, but today I created a brand new Confluence plugin, no dev yet, only generated code, and it fails with same error. icu error.

I tried using version 7.0 of confluence, same issue. I'm using java 8

```
java version "1.8.0_271"
Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode)
```

AMPS version 8.0.0.

Is Atlassian JDK broken ?


author: Fr?d?ric Esnault
body: As a dirty workaround, I managed to launch Confluence by replacing every icu jar file to version 64.2. Just grep the target folder, delete icu jar files and copy the 64.2 version everywhere it was before.