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

Bug 131689

Summary: TPTP crashes eclipse help when plugged-in using the links-mechanism
Product: z_Archived Reporter: Michael Moser <mmo>
Component: TPTPAssignee: Hubert Leung <hkyleung>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: closed471

Description Michael Moser CLA 2006-03-14 07:45:38 EST
Since I am fiddling with many different plugins I am generally trying to keep eclipse's plugin directory free from any add-ons and rather add plug-ins by means of the link-mechanism. I.e. rather than unzipping a downloaded plugin directly into the eclipse directory I unzip it to a different directory, usually 

C:\eclipse_plugin\<plugin_name>

and then in the C:\eclipse\links directory I add a simple ASCII text file named "<plugin_name>.link" which contains a single line 
"path=C:/eclipse_plugin/<plugin_name>" (without the quotes).

Using this mechanism one can easily and quickly uninstall an obsolete/faulty/conflicting plugin by simply removing that text-file and you are done.

However, if I add TPTP-4.2.0-200602281515 using that mechanism this crashes the built-in help. If one then clicks Help => Help Content one gets an alert 
----------------------------------
Help can not be displayed. The embedded application server could 
not run help web application. Check the log for details.   [OK]
----------------------------------

The corresponding entry in the log reads:

-----------------------------------
...
!ENTRY org.eclipse.tomcat 4 0 2006-03-09 14:03:20.436
!MESSAGE Exception occurred starting the embedded application server.
!STACK 0
org.apache.commons.logging.LogConfigurationException: 
org.apache.commons.logging.LogConfigurationException: 
org.apache.commons.logging.LogConfigurationException: Class 
org.apache.commons.logging.impl.Log4JLogger does not implement Log 
 at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:532)
 at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:272)
 at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:414)
 at org.apache.commons.digester.Digester.<init>(Digester.java:346)
 at org.apache.catalina.realm.MemoryRealm.getDigester(MemoryRealm.java:278)
 at org.apache.catalina.realm.MemoryRealm.start(MemoryRealm.java:348)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1173)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363)
 at org.apache.catalina.startup.Embedded.addEngine(Embedded.java:464)
 at org.eclipse.tomcat.internal.TomcatAppServer.start(TomcatAppServer.java:146)
 at org.eclipse.help.internal.appserver.AppserverPlugin.startWebappServer(AppserverPlugin.java:143)
 at org.eclipse.help.internal.appserver.AppserverPlugin.getAppServer(AppserverPlugin.java:41)
 at org.eclipse.help.internal.appserver.WebappManager.start(WebappManager.java:58)
 at org.eclipse.help.internal.base.BaseHelpSystem.ensureWebappRunning(BaseHelpSystem.java:246)
 at org.eclipse.help.internal.base.HelpDisplay.displayHelpURL(HelpDisplay.java:164)
 at org.eclipse.help.internal.base.HelpDisplay.displayHelp(HelpDisplay.java:54)
 at org.eclipse.help.ui.internal.DefaultHelpUI.displayHelp(DefaultHelpUI.java:122)
 at org.eclipse.ui.internal.help.WorkbenchHelpSystem.displayHelp(WorkbenchHelpSystem.java:822)
 at org.eclipse.ui.internal.actions.HelpContentsAction$1.run(HelpContentsAction.java:83)
 at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
 at org.eclipse.ui.internal.actions.HelpContentsAction.run(HelpContentsAction.java:81)
 at org.eclipse.jface.action.Action.runWithEvent(Action.java:492)
 at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:530)
 at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:480)
 at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:392)
 at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled Code))
 at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:925)
 at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3287)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2907)
 at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1899)
 at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1863)
 at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:417)
 at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
 at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106)
 at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:99)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:374)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
 at java.lang.reflect.Method.invoke(Method.java:391)
 at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338)
 at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
 at org.eclipse.core.launcher.Main.run(Main.java:977)
 at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: org.apache.commons.logging.LogConfigurationException: 
org.apache.commons.logging.LogConfigurationException: Class 
org.apache.commons.logging.impl.Log4JLogger does not implement Log
 at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:416)
 at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525)
 ... 47 more
Caused by: org.apache.commons.logging.LogConfigurationException: Class 
org.apache.commons.logging.impl.Log4JLogger does not implement Log
 at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:412)
 ... 48 more
-----------------------------------

Obviously, eclipse proper and TPTP are using different log4j versions.

I counter-checked and also installed TPTP directly into a copy of my eclipse installation and then things worked. The TPTP extraction had replaced the corresponding eclipse .jar file and thus the base eclipse and TPTP were now using the same version and both were happy.

However, IMHO it should remain possible to install plugins using the links-mechanism described above and that means a plugin must not come with and depend on a different version of a plugin that's already in the eclipse base!

Michael
Comment 1 Ruth Lee CLA 2006-03-21 10:12:47 EST
Hi Michael,

Navid pointed me to your post describing this problem. I'm returning this bugzilla a duplicate of 132184 because I've already made a Platform bug depend on that one. When I step-debugged the problem I found that it was a difference not between Log4J versions, but whether Log4J could be loaded at all. You say that a .jar file was replaced; can you provide details, please?

--Ruth.

*** This bug has been marked as a duplicate of 132184 ***
Comment 2 Michael Moser CLA 2006-03-28 05:03:33 EST
I have to admit that this was more an "assumption" rather than an observed fact.

Since things worked when installed into the same plugin directory (but not when kept in different places) I had assumed, that it must have overwritten the offending version. But maybe its also just some coincidence due to the loading and/or search algorithm that this way of installing causes the "right" version to be found first and then it "just happened" to work.

Michael
Comment 3 Kathy Chan CLA 2010-11-18 18:53:40 EST
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.