spring-cloud-dataflow

Deploying java 17 apps on Spring cloud data flow 2.9.6


We are using spring cloud data flow version 2.9.6 and all our apps were so far on Java 8, deploying them on to pivotal cloud foundry environment.

But we are in process of migration and upgraded a couple of apps to java 17 and 21 and we tried to deploy the stream by adding these two changes

Added below config in stream definition

 --JBP_CONFIG_OPEN_JDK_JRE='{jre: { version: 17.+ }}'

Added below deployer property for the app

deployer.appname.cloudfoundry.use-spring-application-json: false

But the deployment isnt going thru, the skipper logs gets the error as seen below

      Exception in thread "skipperStateMachineTaskExecutor-4" java.lang.UnsupportedClassVersionError: io/pivotal/cfenv/core/CfEnv has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:348)
      at org.springframework.cloud.deployer.spi.cloudfoundry.CfEnvAwareResource$CfEnvResolver.hasCfEnv(CfEnvAwareResource.java:145)
      at org.springframework.cloud.deployer.spi.cloudfoundry.CfEnvAwareResource.(CfEnvAwareResource.java:53)
      at org.springframework.cloud.deployer.spi.cloudfoundry.CfEnvAwareResource.of(CfEnvAwareResource.java:49)
      at org.springframework.cloud.deployer.spi.cloudfoundry.CfEnvAwareAppDeploymentRequest.(CfEnvAwareAppDeploymentRequest.java:35)
      at org.springframework.cloud.deployer.spi.cloudfoundry.CfEnvAwareAppDeploymentRequest.of(CfEnvAwareAppDeploymentRequest.java:30)
      at org.springframework.cloud.deployer.spi.cloudfoundry.CloudFoundryAppDeployer.deploy(CloudFoundryAppDeployer.java:98)
      at org.springframework.cloud.skipper.server.deployer.DefaultReleaseManager.install(DefaultReleaseManager.java:142)
      at org.springframework.cloud.skipper.server.service.ReleaseService.install(ReleaseService.java:198)
      at org.springframework.cloud.skipper.server.service.ReleaseService.install(ReleaseService.java:184)
      at org.springframework.cloud.skipper.server.service.ReleaseService.install(ReleaseService.java:145)
      at org.springframework.cloud.skipper.server.service.ReleaseService$$FastClassBySpringCGLIB$$f1c5f0a2.invoke()
      at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
      at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
      at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
      at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
      at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
      at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
      at org.springframework.cloud.skipper.server.service.ReleaseService$$EnhancerBySpringCGLIB$$1c3625ff.install()
      at org.springframework.cloud.skipper.server.statemachine.InstallInstallAction.executeInternal(InstallInstallAction.java:69)
      at org.springframework.cloud.skipper.server.statemachine.AbstractAction.execute(AbstractAction.java:41)
      at org.springframework.statemachine.state.AbstractState.executeAction(AbstractState.java:496)
      at org.springframework.statemachine.state.ObjectState.entry(ObjectState.java:158)
      at org.springframework.statemachine.support.AbstractStateMachine.entryToState(AbstractStateMachine.java:1322)
      at org.springframework.statemachine.support.AbstractStateMachine.entryToState(AbstractStateMachine.java:1263)
      at org.springframework.statemachine.support.AbstractStateMachine.setCurrentStateInternal(AbstractStateMachine.java:1059)
      at org.springframework.statemachine.support.AbstractStateMachine.setCurrentState(AbstractStateMachine.java:1033)
      at org.springframework.statemachine.support.AbstractStateMachine.switchToState(AbstractStateMachine.java:926)
      at org.springframework.statemachine.support.AbstractStateMachine.access$500(AbstractStateMachine.java:82)
      at org.springframework.statemachine.support.AbstractStateMachine$3.transit(AbstractStateMachine.java:334)
      at org.springframework.statemachine.support.DefaultStateMachineExecutor.handleInitialTrans(DefaultStateMachineExecutor.java:302)
      at org.springframework.statemachine.support.DefaultStateMachineExecutor.processTriggerQueue(DefaultStateMachineExecutor.java:398)
      at org.springframework.statemachine.support.DefaultStateMachineExecutor.access$200(DefaultStateMachineExecutor.java:64)
      at org.springframework.statemachine.support.DefaultStateMachineExecutor$1.run(DefaultStateMachineExecutor.java:330)
      at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
      at org.springframework.statemachine.support.DefaultStateMachineExecutor.scheduleEventQueueProcessing(DefaultStateMachineExecutor.java:353)
      at org.springframework.statemachine.support.DefaultStateMachineExecutor.execute(DefaultStateMachineExecutor.java:162)
      at org.springframework.statemachine.support.DefaultStateMachineExecutor.doStart(DefaultStateMachineExecutor.java:174)
      at org.springframework.statemachine.support.LifecycleObjectSupport.start(LifecycleObjectSupport.java:120)
      at org.springframework.statemachine.support.AbstractStateMachine.doStart(AbstractStateMachine.java:418)
      at org.springframework.statemachine.support.LifecycleObjectSupport.start(LifecycleObjectSupport.java:120)
      at org.springframework.statemachine.state.StateMachineState.entry(StateMachineState.java:236)
      at org.springframework.statemachine.support.AbstractStateMachine.entryToState(AbstractStateMachine.java:1322)
      at org.springframework.statemachine.support.AbstractStateMachine.entryToState(AbstractStateMachine.java:1263)
      at org.springframework.statemachine.support.AbstractStateMachine.setCurrentStateInternal(AbstractStateMachine.java:1059)
      at org.springframework.statemachine.support.AbstractStateMachine.setCurrentState(AbstractStateMachine.java:1033)
      at org.springframework.statemachine.support.AbstractStateMachine.switchToState(AbstractStateMachine.java:926)
      at org.springframework.statemachine.support.AbstractStateMachine.access$500(AbstractStateMachine.java:82)
      at org.springframework.statemachine.support.AbstractStateMachine$3.transit(AbstractStateMachine.java:337)
      at org.springframework.statemachine.support.DefaultStateMachineExecutor.handleTriggerTrans(DefaultStateMachineExecutor.java:287)
      at org.springframework.statemachine.support.DefaultStateMachineExecutor.handleTriggerTrans(DefaultStateMachineExecutor.java:210)
      at org.springframework.statemachine.support.DefaultStateMachineExecutor.processTriggerQueue(DefaultStateMachineExecutor.java:450)
      at org.springframework.statemachine.support.DefaultStateMachineExecutor.access$200(DefaultStateMachineExecutor.java:64)
      at org.springframework.statemachine.support.DefaultStateMachineExecutor$1.run(DefaultStateMachineExecutor.java:324)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:750)



Is this a limitation based on the version of spring cloud dataflow /skipper server we use or are there any other additional properties that needs tweaked for this to work?


Solution

  • SCDF 2.11.x does provide for deploying Spring Boot 3.x applications and will configure the proper values on CloudFoundry.