Bug 29667 - Standalone Help working 1.0 and broken in 2.0 and beyond
Summary: Standalone Help working 1.0 and broken in 2.0 and beyond
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 2.0.2   Edit
Hardware: PC Windows 2000
: P3 critical (vote)
Target Milestone: 2.1 M3   Edit
Assignee: Platform-Help-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-16 15:33 EST by wendy henson CLA
Modified: 2003-03-03 19:30 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wendy henson CLA 2003-01-16 15:33:38 EST
I'm having problems with getting eclipse to load files.  I am using version 
2.0.2. 

Here's the problem matrix:
Everything works fine in Eclipse 1.x
Same piece of code started breaking in one application but not another 
application in version 2.x.

The piece of code to which I am referring works fine in a standalone gui to 
test out eclipse.  However, when I add this same piece of code to our larger 
application, it breaks.

The only difference between the two (it is looking like it initializes ok) is 
that the .class file for one is at the top level while the .class file for the 
other is in a jar file and a couple of levels down.  Should that make a 
difference?

Here's the code:

Help helpSystem = new Help("C:\\projects\\olc\\sourceWSWB\\eclipse\\plugins");
helpSystem.start();
helpSystem.displayHelp("/com.ibm.storage.essisa.doc/myFile.html");

The errors I get are:
Could not display help: com.ibm.storage.essisa.doc/myFile.html

It doesn't even start up an eclipse help viewer, which it should do even if the 
file can't be found.  I just get nothing but the error message.  In the 
standalone driver it works perfectly.
Comment 1 Konrad Kolosowski CLA 2003-01-16 16:57:34 EST
Are there any problems reported in the .log file?  The log file is written in 
the %temp%\help_system\.metadata directory.

Does your larger application sets URL Stream Handler Factory [is calling 
java.net.URL.setURLStreamHandlerFactory(URLStreamHandlerFactory fac)]?
Comment 2 Konrad Kolosowski CLA 2003-01-16 17:13:23 EST
Is your application using at least jdk version 1.3.1_06 ?

Does your application use any libraries that are also existent within Eclipse?  
Another words, is there a chance for a collision between classes within Eclipse 
and classes in your application?
Comment 3 wendy henson CLA 2003-01-17 13:08:54 EST
I've figured out what is causing the problem, and a workaround, at least for my 
application.

We use the XML parser libraries in our applications as well.  However, if you 
include any references to xerces.jar or xmlParserAPIs.jar in your classpath - 
either your own, or the ones eclipse ships with, e.g., 
eclipse\plugins\org.apache.xerces_4.0.7
\xercesImpl.jar;eclipse\plugins\org.apache.xerces_4.0.7\xmlParserAPIs.jar, then 
you get the behavior I described - the eclipse viewer will not start.

A workaround for the time being is to unjar the aforementioned jar files and re-
jar them with your own application's jar file.  This works with both the 
application and the eclipse engine.

I do think this should be fixed, however, as it was not broken like this in 1.x.
Comment 4 Konrad Kolosowski CLA 2003-01-17 13:32:00 EST
Wendy,

Try including (either Eclipse's or your app's) xerces libraries in java boot 
path instead of the classpath for your application.  For example:

set JAVA_OPTS=-Xbootclasspath/a:d:\eclipse\plugins\org.apache.xerces_4.0.7
\xercesImpl.jar;d:\eclipse\plugins\org.apache.xerces_4.0.7\xmlParserAPIs.jar

If this works, it eliminates the need to repackage files.  Let us know the 
results here, please.

You have solved the problem when using Eclipse 2.0.2.  In 2.1 this has been 
fixed as Help launches Eclipse as a separate process to avoid such conflicts, 
so I will mark the bug as resolved.
Comment 5 wendy henson CLA 2003-01-17 13:43:59 EST
Thanks for the info.  The following works with either our jar files or 
eclipse's.
   -Xbootclasspath/a:xercesImpl.jar;xmlParserAPIs.jar
Comment 6 Konrad Kolosowski CLA 2003-03-03 19:30:30 EST
Infocenter architecture since 2.1 M3 build does not suffer from this problem.  
Changing target milestone to M3