I'm trying to publish an extension to which I only added some resources (a folder with jar files). When I publish I get the following  error:

An error occured while publishing the Extension: java.lang.IllegalStateException:Incompatible Java Version: Extension was compiled in OutSystems Integration Studio with a Java version not compatible with the Java version on the OutSystems Platform.
  at outsystems.hubedition.servercommon.utils.XifClassLoader.loadClasses(Unknown Source)
  at outsystems.hubedition.servercommon.utils.XifValidatorUtil.validate(Unknown Source)
  at outsystems.hubedition.servercommon.extensions.ExtensionValidator.validate(Unknown Source)
  at outsystems.hubedition.deploymentcontroller.extensions.XIFPublisher.publishExtension(Unknown Source)
  at outsystems.hubedition.deploymentcontroller.Compiler.publishExtension(Unknown Source)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303)
  at sun.rmi.transport.Transport$1.run(Transport.java:159)
  at java.security.AccessController.doPrivileged(Native Method)
  at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
  at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  at java.lang.Thread.run(Thread.java:662)

If I go to the resources pane and "Exclude from Extension" the mentioned folder it publishes fine!

The error message doesn't make anysense to me. In both tries the Java version used to compile was the same.

Does anybody have some ideas to overcome this?

Hi João,

I had a similar problem and it turned out to be the following: you have to use on your local machine the same java SDK version that you have on your platform server, with the same CPU version (32-bit or 64-bit). It has to be exactly the same. Otherwise you won't be able to publish.

And don't forget to change your JAVA_HOME environment variable to that particular version of the Java SDK. ;-)

Let me know if this helped.

Best regards,
Pedro Vieira
Pedro, you are saying to use the same SDK in both machines... but it seams to me the problem might be the resources!

If I remove them I can publish fine so the problem must be something else. Even though I'll give it try.
Hi everybody.

Although the last post was registered on June, I would like to add another possibility, within Eclipse, which I've faced and fix the same problem.

Once you've loaded the code inside Eclipse, try to change the "JDK Compliance" settings to work under the proper Java version through project's Properties (right click at the desired project on "Project Explorer", select "Properties" and then pick "Java Compiler").

Best regards,

Hi I agree with Luciano in the past I had the same problem. Eclipse set a new version of Java. I set my JAVA_HOME to 1.60.45 but I still have problem so you need to click with right mouse button in your project select properties so select group Java Compiler and after this Enable Project specific settings in Compiler compliance level mark 1.6 in my case. See screen attached.