OPDK Apigee Edge 4.15.04.03 not working with Java 7

We are trying to upgrade to JDK 7 in order to use Java library from java callout which needs Java 7. After upgrading to Oracle JDK 1.7 the message-processors and routers fail to start. Does OPDK Apigee Edge 4.15.04.03 not work with Java 7?

Solved Solved
0 6 401
1 ACCEPTED SOLUTION

I found my mistake - I was not setting the link to JDK correctly. /apps/apigee4/share/jdk should link to JDK folder and not to jdk_folder/bin/java executable. Thanks @sarthak @Rampradeep Krishnamurthy for replying to the post.

View solution in original post

6 REPLIES 6

sarthak
Participant V
@Vineet Bhatia

http://apigee.com/docs/api-services/reference/supported-software this tells me that Oracle JDK 1.7 is supported for 4.15.04.xx.

Can you specify more details about the error you are seeing ?

@sarthak seeing errors on startup in /apps/apigee4/var/log/apigee/message-processor/logs/system.log

2015-10-29 22:11:38,521  main ERROR KERNEL.DEPLOYMENT - ServiceDeployer.startService() : ServiceDeployer.deploy() : Got a life cycle exception while starting service [ServerRegistrationService, Error while checking path existence for path : /regions/dc-1/pods/gateway-dev/servers/5ee32364-5bc9-42ae-b929-c4d07f9e6240/reachable] : {}
com.apigee.zookeeper.ZooKeeperException: Error while checking path existence for path : /regions/dc-1/pods/gateway-dev/servers/5ee32364-5bc9-42ae-b929-c4d07f9e6240/reachable
	at com.apigee.zookeeper.impl.ZooKeeperServiceImpl.exists(ZooKeeperServiceImpl.java:341) ~[zookeeper-1.0.0.jar:na]
	at com.apigee.zookeeper.impl.ZooKeeperServiceImpl.exists(ZooKeeperServiceImpl.java:325) ~[zookeeper-1.0.0.jar:na]
	at com.apigee.services.repository.zookeeper.ZKRepository.exists(ZKRepository.java:256) ~[repository-impl-1.0.0.jar:na]
	at com.apigee.services.repository.RepositoryServiceImpl.exists(RepositoryServiceImpl.java:223) ~[repository-impl-1.0.0.jar:na]
	at com.apigee.registration.info.StatusBuilder.build(StatusBuilder.java:26) ~[registration-1.0.0.jar:na]
	at com.apigee.registration.ServerRegistrationServiceImpl.buildServerInfo(ServerRegistrationServiceImpl.java:269) ~[registration-1.0.0.jar:na]
	at com.apigee.registration.ServerRegistrationServiceImpl.start(ServerRegistrationServiceImpl.java:118) ~[registration-1.0.0.jar:na]
	at com.apigee.kernel.service.deployment.ServiceDeployer.startService(ServiceDeployer.java:69) [microkernel-1.0.0.jar:na]
	at com.apigee.kernel.service.deployment.ServiceDeployer.deploy(ServiceDeployer.java:59) [microkernel-1.0.0.jar:na]
	at com.apigee.kernel.service.deployment.ServiceDeployer.deployDependantServices(ServiceDeployer.java:255) [microkernel-1.0.0.jar:na]
	at com.apigee.kernel.service.deployment.ServiceDeployer.deploy(ServiceDeployer.java:62) [microkernel-1.0.0.jar:na]
	at com.apigee.kernel.service.deployment.ServiceDeployer.deployDependantServices(ServiceDeployer.java:255) [microkernel-1.0.0.jar:na]
	at com.apigee.kernel.service.deployment.ServiceDeployer.deploy(ServiceDeployer.java:62) [microkernel-1.0.0.jar:na]
	at com.apigee.kernel.MicroKernel.deployAll(MicroKernel.java:157) [microkernel-1.0.0.jar:na]
	at com.apigee.kernel.MicroKernel.start(MicroKernel.java:140) [microkernel-1.0.0.jar:na]
	at com.apigee.kernel.MicroKernel.start(MicroKernel.java:134) [microkernel-1.0.0.jar:na]
	at com.apigee.kernel.MicroKernel.main(MicroKernel.java:85) [microkernel-1.0.0.jar:na]
Caused by: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /regions/dc-1/pods/gateway-dev/servers/5ee32364-5bc9-42ae-b929-c4d07f9e6240/reachable
	at org.apache.zookeeper.KeeperException.create(KeeperException.java:99) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
	at org.apache.zookeeper.KeeperException.create(KeeperException.java:51) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
	at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1045) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
	at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1073) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
	at com.apigee.zookeeper.impl.ZooKeeperServiceImpl.exists(ZooKeeperServiceImpl.java:333) ~[zookeeper-1.0.0.jar:na]
	... 16 common frames omitted
2015-10-29 22:11:38,523  main ERROR KERNEL - MicroKernel.deployAll() : MicroKernel.deployAll() : Error in deploying the deployment : EventService

@Vineet Bhatia Can you check the zookeeper data for any corruption? If you are just upgrading the message processors, the zk node should already exist.

@Rampradeep Krishnamurthy not sure how to check zookeeper data for corruption. Just trying to startup zookeeper ("./apigee-service zookeeper start") is also failing.

Reverting back to Java 6 everything works fine. Not sure why zookeeper fails to startup when using Java 7. Is there any way to get Java callout to use Java 1.7 even when Edge is running Java 1.6?

I found my mistake - I was not setting the link to JDK correctly. /apps/apigee4/share/jdk should link to JDK folder and not to jdk_folder/bin/java executable. Thanks @sarthak @Rampradeep Krishnamurthy for replying to the post.