Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 95733

Summary: Help is broken
Product: [Eclipse Project] Equinox Reporter: adrian <stori>
Component: FrameworkAssignee: equinox.framework-inbox <equinox.framework-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: christophe.cornu+eclipse, jeffmcaffer, konradk, pascal, tjwatson
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
The Help > Configuration Details on my machine
none
*.bat file to set dev environment
none
Output of doing SET > set.log none

Description adrian CLA 2005-05-18 07:50:54 EDT
This has not worked for me for a while, and it still happens in M7.  I cannot
get any help (except in the new help IDE view).  I see others opening more
specific help problems, so the basic stuff must work for them?!

For example, Help > Help Contents gives me an error:
 There was an error in your action: 
 javax.servlet.ServletException: Class org/eclipse/core/runtime/Preferences
 violates loader constraints: parent and child already loaded different classes 

When I set the External browser to, say, Firefox:
 Lefthand navigation panel:  HTTP Status 500
 type Exception
 message
 description The server encountered an internal error () that prevented it
 from fulfilling this request.

 Righthand panel:
 same as above
Comment 1 Konrad Kolosowski CLA 2005-05-26 15:35:17 EDT
I guess, there is something messing up your Eclipse classpath.  Please install 
eclipse to a clean directory and run with a clean JRE.  If the problem is 
still there, please examin classpath and bootclasspath in Help -> About -> 
Platform Configuration.

You may also check 
workspace\.metadata\.plugins\org.eclipse.tomcat\catalina.*.log.  There might 
be more precise error than shown in the browser.
Comment 2 adrian CLA 2005-05-26 17:25:54 EDT
1.- You're right - I did not set my development environment (which I usually do
through a *.bat file), i.e., no CLASSPATH & no PATH, and help works fine.

BUT: I thought that when I run eclipse.exe it doesn't care about the system
CLASSPATH, it handles only its own environment for each plug-in, etc. - it
certainly didn't care about it in R3.0 and before?!

2.- The catalina.<date>.log says something similar:

. . .
StandardManager[/help]: Seeding of random number generator has been completed
StandardWrapper[/help:default]: Loading container servlet default
StandardWrapper[/help:invoker]: Loading container servlet invoker
ApplicationDispatcher[/help] Servlet.service() for servlet
org.eclipse.help.internal.webapp.jsp.advanced.index_jsp threw exception
javax.servlet.ServletException: Class org/eclipse/core/runtime/Preferences
violates loader constraints:  parent and child already loaded different classes
	at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:536)
	at
org.eclipse.help.internal.webapp.jsp.advanced.index_jsp._jspService(index_jsp.java:142)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
	at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
	at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
	at org.eclipse.help.internal.webapp.jsp.index_jsp._jspService(index_jsp.java:73)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
. . .
Comment 3 Konrad Kolosowski CLA 2005-05-26 17:47:28 EDT
Thanks.
Runtime guys, I think the bug can be closed, but let you look at too, because 
I cannot explain why 3.0 did not exhibit this problem.  It would be good if 
Eclipse 3.1 was as immune to external classes as 3.0.
Comment 4 Pascal Rapicault CLA 2005-05-31 17:01:06 EDT
Tom to verify.
Comment 5 Thomas Watson CLA 2005-06-01 10:15:05 EDT
I cannot explain what is going on here.  If I set a CLASSPATH variable on my 
system the (Windows XP) the java property for the classpath is the following:
 
java.class.path = C:\eclipse\eclipse\startup.jar

My CLASSPATH value is not used by the eclipse.exe to launch java.  Even if the 
CLASSPATH var was being used it still does not explain how the parent 
classloader loaded classes from the app classloader.  The java.class.path 
property indicates what jars are on the classpath of the application 
classloader.  By default plugins use the boot classloader as the parent 
classloader.  So the only way I can see something like this happening is if 
the boot classpath was getting messed up.
Comment 6 adrian CLA 2005-06-01 10:28:13 EDT
Created attachment 22147 [details]
The Help > Configuration Details on my machine

In case it helps any - the configuration details displayed by Eclipse
Comment 7 Thomas Watson CLA 2005-06-01 10:54:04 EDT
Can you try the eclipse.exe from eclipse 3.0.1 in your 3.1 installation and 
see if it still fails?

Just to be sure, you have a CLASSPATH set in your Windows Environment 
Variables, right?  I tried the same thing but cannot seem to reproduce, but I 
just noticed that you are using Windows 2000 in your configuration.
Comment 8 adrian CLA 2005-06-01 11:02:57 EDT
>> Can you try the eclipse.exe from eclipse 3.0.1 in your 3.1 installation

It works fine with 3.0.1's eclipse.exe!!

>> you have a CLASSPATH set in your Windows Environment Variables, right

The environment variables used are set in a "Command Prompt" window with a *.bat
file, they're not Windows-wide (I have different *.bat files for various Eclipse
drivers).  From this MS-DOS prompt window I also start Eclipse.

>> I just noticed that you are using Windows 2000 in your configuration

It fails in the same way on both Win 2000 (at work) and Win XP Home edition (at
home).
Comment 9 Thomas Watson CLA 2005-06-01 11:05:54 EDT
Pascal, who should look into eclipse.exe problems?
Comment 10 Thomas Watson CLA 2005-06-01 11:33:50 EDT
Adrian, please attach the .bat file that you run before launching eclipse for 
the "Command Prompt".  Thanks.
Comment 11 Pascal Rapicault CLA 2005-06-01 12:31:52 EDT
Chris and I will look into it.
Comment 12 adrian CLA 2005-06-01 13:20:23 EDT
Created attachment 22180 [details]
*.bat file to set dev environment

The *.bat file
Comment 13 adrian CLA 2005-06-01 13:21:22 EDT
Created attachment 22181 [details]
Output of doing SET > set.log

C:\> set >set.log
Comment 14 Thomas Watson CLA 2005-06-02 08:51:41 EDT
Giving up ownership.
Comment 15 John Arthorne CLA 2005-06-02 11:10:22 EDT
Updated title. It was, like, totally bothering me.
Comment 16 adrian CLA 2005-06-02 11:21:41 EDT
:-)
Comment 17 Pascal Rapicault CLA 2005-06-10 14:27:16 EDT
I haven't been able to reproduce.
Please reopen if you have more detailed steps.
Comment 18 adrian CLA 2005-06-11 08:16:21 EDT
Trying to narrow down the culprit...  I open a new MS-DOS prompt window (XP
Home), set two things:

C:\> set
CLASSPATH=c:\vabaseR3.1.0\eclipse\plugins\org.eclipse.core.runtime_3.1.0.jar
C:\> set PATH=f:\jdk1.4.2\bin

Then start eclipse:

C:\> cd \vabaseR3.1.0\eclipse
C:\vabaseR3.1.0\eclipse> eclipse

Then select "Help" > "Help Contents".  A separate windows opens, with this (new)
error message:

  There was an error in your action: 
  java.lang.NoClassDefFoundError: org/eclipse/osgi/util/NLS

Something in eclipse is obviously using stuff from the machine's CLASSPATH. I
hope you may be able to reproduce this scenario.

BTW, if I do a
  C:\> set
in the MS-DOS prompt window, I get these settings (which seem all inconsequential):
CLASSPATH=c:\vabaseR3.1.0\eclipse\plugins\org.eclipse.core.runtime_3.1.0.jar
CLIENTNAME=Console
CMVC_AUTH_METHOD=HOST
CMVC_CASESENSE=MIXED
CMVC_FAMILY=orbitsrv
CMVC_HOME=C:\CMVC\exe
CODETMPDIR=F:\WDSC510\TMP
COMPUTERNAME=STORI1
COPYCMD=/Y
DER_DRIVER_PATH=F:\ibmdebug
FP_NO_HOST_CHECK=NO
HELP=F:\WDSC510\HELP
HOMEDRIVE=C:
IMNINST=help
IMNINSTSRV=F:\IMNNQ_XP
IPF_PATH32=F:\WDSC510\SYSTEM
LOGONSERVER=\\STORI1
LPATH4=C:\lpex\as;C:\lpex\macros
NLSPATH=F:\ibmdebug\msg\%%L\%%N
NUMBER_OF_PROCESSORS=1
Path=f:\jdk1.4.2\bin
PCOMM_Root=C:\Program Files\Personal Communications
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 4, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0204
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TC_BECOME=stori
TC_FAMILY=ewb
TC_USER=stori
tvdebugflags=0x260
tvlogsessioncount=5000
USERDOMAIN=STORI1
USERNAME=User
USERPROFILE=C:\Documents and Settings\User
windir=C:\WINDOWS
Comment 19 Pascal Rapicault CLA 2005-06-12 22:14:00 EDT
Why are you putting org.eclipse.core.runtime on the classpath?
Comment 20 adrian CLA 2005-06-13 07:57:29 EDT
I'm putting Eclipse stuff in the classpath in order to run some things outside
the Eclipse IDE.
I can, of course, run Eclipse itself from a different (classpath, etc.)
environment, however I think that Eclipse's sensitivity to the machine classpath
may cause other problems (for others), so it may be worth looking into (as
indicated above, eclipse.exe <= R3.0 didn't have this problem).
Comment 21 Thomas Watson CLA 2005-06-13 12:00:11 EDT
I finally am able to reproduce this.  This happens when an IBM 1.4.2 JRE is 
used.  When using the -jar option the Sun JRE will ignore the CLASSPATH env.  
But the IBM 1.4.2 JRE appears to use the CLASSPATH variable even when using 
the -jar option.

I have no idea what the expected behavior is when -jar is used, but the two 
JREs definately have different behavior.  Prior to Eclispe 3.1 the eclispe.exe 
was setting the CLASSPATH env to the startup.jar which overrode any settings 
the user may have had on their maching.  In Eclipse 3.1 the eclipse.exe has 
moved to using -jar and does not override CLASSPATH env with any value.

Should we consider unsetting CLASSPATH env before launching the JRE from 
eclipse.exe?
Comment 22 Pascal Rapicault CLA 2005-06-13 12:56:08 EDT
Reopening and marking for RC3 to make sure we doucment the behavior somewhere
Comment 23 Thomas Watson CLA 2005-06-13 14:20:30 EDT
Adding the following to the eclipse.ini will workaround the problem

-cp
""

make sure the -cp and "" are on separate lines.  This will force the JRE to 
using an empty string for the classpath setting.
Comment 24 Pascal Rapicault CLA 2005-06-15 19:38:23 EDT
Reassigning to Tom.
Comment 25 Thomas Watson CLA 2006-04-06 15:25:52 EDT
What can we do here?  Is the workaround in comment 23 good enough.  There are other bugs open that complain about the reverse of this bug.  They want the stuff from CLASSPATH to be included on the java.class.path, see 126499.

I recommend we close as wontfix.
Comment 26 Pascal Rapicault CLA 2006-04-06 16:20:01 EDT
Following the recommendation.
Comment 27 Pascal Rapicault CLA 2006-04-06 16:20:28 EDT
*** Bug 126499 has been marked as a duplicate of this bug. ***
Comment 28 Pascal Rapicault CLA 2006-04-06 16:40:41 EDT
Reopening to mark as dup of #126499 because we might still want to do some investigations.
Comment 29 Pascal Rapicault CLA 2006-04-06 16:41:00 EDT

*** This bug has been marked as a duplicate of 126499 ***