You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Ibrahim El-sanosi (PGR)" <i....@newcastle.ac.uk> on 2014/11/13 17:10:43 UTC
RE: Bug 413368 – Type Cannot switch on a value of type ... Only convertible int values, strings or enum variables are permitted
Hi bit1129,
Make sure you use same java JDK version in compile and run time. Can you tell us how do you compile the code?
Ibrahm
-----Original Message-----
From: bit1129@163.com [mailto:bit1129@163.com]
Sent: Thursday, November 13, 2014 08:17 ص
To: dev; user
Subject: Bug 413368 – Type Cannot switch on a value of type ... Only convertible int values, strings or enum variables are permitted
I download the zookeeper codebase and setup the eclipse project with Ant, but I got the following compiling error:
Description Resource Path Location Type Cannot switch on a value of type AuthFastLeaderElection.ToSend.mType. Only convertible int values, strings or enum variables are permitted AuthFastLeaderElection.java /ZooKeeper/src/java/main/org/apache/zookeeper/server/quorum line 116 Java Problem
I see that this is a long existing eclipse bug(https://bugs.eclipse.org/bugs/show_bug.cgi?id=413368), but there is no definite workaround there.
I just wonder to know how you guys workaround this problem when developing zookeeper, thanks.
bit1129@163.com
Re: RE: Bug 413368 – Type Cannot switch on a value of type ... Only convertible int values, strings or enum variables are permitted
Posted by "bit1129@163.com" <bi...@163.com>.
Hi Ibrahm,
I am using eclipse-jee-kepler-SR2-win32, and I compile the code in Eclipse, first clean the project and then build the project.
The java related settings are:
a). The installed JRE in Eclipse is Java1.7.0_51
b). The java path configured for the system(I am running on Windows) is the same as a)
c). The eclipse.ini is using the default settings:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20140116-2212
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
bit1129@163.com
From: Ibrahim El-sanosi (PGR)
Date: 2014-11-14 00:10
To: dev@zookeeper.apache.org
Subject: RE: Bug 413368 – Type Cannot switch on a value of type ... Only convertible int values, strings or enum variables are permitted
Hi bit1129,
Make sure you use same java JDK version in compile and run time. Can you tell us how do you compile the code?
Ibrahm
-----Original Message-----
From: bit1129@163.com [mailto:bit1129@163.com]
Sent: Thursday, November 13, 2014 08:17 ص
To: dev; user
Subject: Bug 413368 – Type Cannot switch on a value of type ... Only convertible int values, strings or enum variables are permitted
I download the zookeeper codebase and setup the eclipse project with Ant, but I got the following compiling error:
Description Resource Path Location Type Cannot switch on a value of type AuthFastLeaderElection.ToSend.mType. Only convertible int values, strings or enum variables are permitted AuthFastLeaderElection.java /ZooKeeper/src/java/main/org/apache/zookeeper/server/quorum line 116 Java Problem
I see that this is a long existing eclipse bug(https://bugs.eclipse.org/bugs/show_bug.cgi?id=413368), but there is no definite workaround there.
I just wonder to know how you guys workaround this problem when developing zookeeper, thanks.
bit1129@163.com