You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "bit1129@163.com" <bi...@163.com> on 2014/11/13 09:16:46 UTC

Bug 413368 C 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: Bug 413368 – Type Cannot switch on a value of type ... Only convertible int values, strings or enum variables are permitted

Posted by Flavio Junqueira <fp...@yahoo.com.INVALID>.
I'm actually able to compile just fine with the 1.7.0_51 jdk on eclipse. But, to be fair, I do remember some time back having this issue. I think eclipse was just not pointing to the right jdk, but again I can't remember for sure.

-Flavio

On 13 Nov 2014, at 12:39, bit1129@163.com wrote:

> Thanks Flavio for the reply. 
> The details is that I am trying to compile the zookeeper codebase from trunk http://svn.apache.org/repos/asf/zookeeper/trunk/
> 
> And I am using Java1.7.0_51.
> 
> 
> 
> bit1129@163.com
> 
> 发件人: FPJ
> 发送时间: 2014-11-13 20:22
> 收件人: user@zookeeper.apache.org
> 主题: RE: Bug 413368 – Type Cannot switch on a value of type ... Only convertible int values, strings or enum variables are permitted
> What are you trying to compile? Is it trunk or distro? What version of java
> are you using?
> 
> -Flavio
> 
>> -----Original Message-----
>> From: bit1129@163.com [mailto:bit1129@163.com]
>> Sent: 13 November 2014 12:02
>> To: dev@zookeeper.apache.org; user@zookeeper.apache.org
>> Subject: 回复: Bug 413368 – Type Cannot switch on a value of type ...
> Only
>> convertible int values, strings or enum variables are permitted
>> 
>> No one likes to answer this question?
>> 
>> 
>> 
>> bit1129@163.com
>> 
>> 发件人: bit1129@163.com
>> 发送时间: 2014-11-13 16:16
>> 收件人: dev; user
>> 主题: 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: Bug 413368 C 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>.
Thanks Flavio for the reply. 
The details is that I am trying to compile the zookeeper codebase from trunk http://svn.apache.org/repos/asf/zookeeper/trunk/

And I am using Java1.7.0_51.



bit1129@163.com
 
�����ˣ� FPJ
����ʱ�䣺 2014-11-13 20:22
�ռ��ˣ� user@zookeeper.apache.org
���⣺ RE: Bug 413368 �C Type Cannot switch on a value of type ... Only convertible int values, strings or enum variables are permitted
What are you trying to compile? Is it trunk or distro? What version of java
are you using?
 
-Flavio
 
> -----Original Message-----
> From: bit1129@163.com [mailto:bit1129@163.com]
> Sent: 13 November 2014 12:02
> To: dev@zookeeper.apache.org; user@zookeeper.apache.org
> Subject: �ظ�: Bug 413368 �C Type Cannot switch on a value of type ...
Only
> convertible int values, strings or enum variables are permitted
> 
> No one likes to answer this question?
> 
> 
> 
> bit1129@163.com
> 
> �����ˣ� bit1129@163.com
> ����ʱ�䣺 2014-11-13 16:16
> �ռ��ˣ� dev; user
> ���⣺ Bug 413368 �C 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: Bug 413368 C Type Cannot switch on a value of type ... Only convertible int values, strings or enum variables are permitted

Posted by FPJ <fp...@yahoo.com.INVALID>.
What are you trying to compile? Is it trunk or distro? What version of java
are you using?

-Flavio

> -----Original Message-----
> From: bit1129@163.com [mailto:bit1129@163.com]
> Sent: 13 November 2014 12:02
> To: dev@zookeeper.apache.org; user@zookeeper.apache.org
> Subject: �ظ�: Bug 413368 �C Type Cannot switch on a value of type ...
Only
> convertible int values, strings or enum variables are permitted
> 
> No one likes to answer this question?
> 
> 
> 
> bit1129@163.com
> 
> �����ˣ� bit1129@163.com
> ����ʱ�䣺 2014-11-13 16:16
> �ռ��ˣ� dev; user
> ���⣺ Bug 413368 �C 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


回复: Bug 413368 C 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>.
No one likes to answer this question? 



bit1129@163.com
 
�����ˣ� bit1129@163.com
����ʱ�䣺 2014-11-13 16:16
�ռ��ˣ� dev; user
���⣺ Bug 413368 �C 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

RE: Bug 413368 – Type Cannot switch on a value of type ... Only convertible int values, strings or enum variables are permitted

Posted by "Ibrahim El-sanosi (PGR)" <i....@newcastle.ac.uk>.
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

回复: Bug 413368 C 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>.
No one likes to answer this question? 



bit1129@163.com
 
�����ˣ� bit1129@163.com
����ʱ�䣺 2014-11-13 16:16
�ռ��ˣ� dev; user
���⣺ Bug 413368 �C 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