[ 
https://issues.apache.org/jira/browse/SOLR-11498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erick Erickson resolved SOLR-11498.
-----------------------------------
    Resolution: Not A Problem

Please raise this question on the user's list at [email protected], 
see: (http://lucene.apache.org/solr/community.html#mailing-lists-irc) there are 
a _lot_ more people watching that list who may be able to help. 

If it's determined that this really is a code issue in Solr and not a 
configuration/usage problem, we can raise a new JIRA or reopen this one.

In this case, this question has already been answered: 

Hi,

this has nothing to do with the Java version. I generally ignore this 
Eclipse-failure as I only develop in Eclipse, but run from command line. The 
reason for this behaviour is a problem with Eclipse's resource 
management/compiler with the way how some classes in Solr (especially facet 
component) are setup.

In general, it is nowadays a no-go to have so called "non-inner" pkg-private 
classes. These are classes which share the same source code file, but are not 
nested in the main class. Instead they appear next to each other in the source 
file. This is a relic from Java 1.0 and should really no longer used!

Unfortunately some Solr developers still create such non-nested classes. 
Whenever I see them I change them to be static inner classes. The problem with 
the bug caused by this is that Eclipse randomly fails (it depends on the order 
how it compiles). The problem is that Eclipse (but also other tools) cannot 
relate the non-inner class file to a source file and therefore cannot figure 
out when it needs to be recompiled.

BTW. The same problem applies to other build system like javac and Ant when it 
needs to compile. When you change such an inner non-nested inner class, it 
fails to compile in most cases unless you do "ant clean". The problem is again, 
that the compiler cannot relate the class files to source code files!

We should really fix those classes to be static and inner - or place them in 
separate source files. I am looking to find a solution to detect this with 
forbiddenapis or our Source Code Regexes, if anybody has an idea: tell me!

Uwe

> eclipse error "the type xxx is already define"
> ----------------------------------------------
>
>                 Key: SOLR-11498
>                 URL: https://issues.apache.org/jira/browse/SOLR-11498
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Facet Module
>    Affects Versions: master (8.0)
>            Reporter: jin jing
>             Fix For: master (8.0)
>
>
> i am trying to run solr in eclipse. but got the error "The type 
> FacetDoubleMerger is already defined". accroding communicate with Uwe 
> Schindler , that this is due to the code specification caused by the eclipse 
> compiler error, so I would like to mention a patch to fix this problem



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to