Bug 136003 - Extension point org.eclipse.jst.server.core.serverProfilers fails to work
Summary: Extension point org.eclipse.jst.server.core.serverProfilers fails to work
Status: CLOSED FIXED
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: jst.server (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows 2000
: P3 blocker (vote)
Target Milestone: 1.5 M6   Edit
Assignee: Arthur Ryman CLA
QA Contact:
URL:
Whiteboard:
Keywords: greatbug
Depends on: 126594
Blocks:
  Show dependency tree
 
Reported: 2006-04-10 17:10 EDT by Eugene Chan CLA
Modified: 2017-10-11 15:59 EDT (History)
4 users (show)

See Also:


Attachments
patch (1.08 KB, patch)
2006-04-12 15:45 EDT, Eugene Chan CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Chan CLA 2006-04-10 17:10:38 EDT
I am trying to use the extension point org.eclipse.jst.server.core.serverProfilers
by adding the following in my plugin.xml file
<extension
         point="org.eclipse.jst.server.core.serverProfilers">
         <serverProfiler
        	id="org.eclipse.tptp.platform.profile.serve.wst.serverProfilter"
        	name="%_1"
        	vmArgs="-XrunpiAgent">
         </serverProfiler>
   </extension>

However, I am getting 'Could not launch in profiling mode because no profilers are configured' error dialog everytime I tried to start a Tomcat server in profile mode.

Looking into the TomcatLaunchConfigurationDelegate code, runner is always null in Profile mode. I think VM returns null runner for profile mode, to workaround the problem, I tried 
	IVMRunner runner = vm.getVMRunner(mode);
	if (runner==null)
	{
	     runner = vm.getVMRunner(ILaunchManager.RUN_MODE);
        }
and it works, server started in profile mode. 

However, I also have extension of org.eclipse.wst.server.core.internalStartup where my implementation code registrate server listener in startup()
        final IServerListener serverListener = new ServerListener();
        IServer[] servers = ServerCore.getServers();
        for (int i = 0; i < servers.length; i++) {
            servers[i].addServerListener(serverListener);
        }
Where listener listens to server starts in Profile mode.
but startup() is never called so my listener fails to prompt user on further configuration after server started in profile mode.

This is blocking TPTP 4.2 i2 (closing Thu Apr 13) from exiting.
Comment 1 Eugene Chan CLA 2006-04-12 15:45:31 EDT
Created attachment 38440 [details]
patch

This is a patch that solve the problem mentioned in Tomcat launch configuration.
Comment 2 Eugene Chan CLA 2006-04-12 16:44:49 EDT
The patch attached only solve the problem in Tomcat launch configuration. The Generic server is not yet migrated to use the new profile adoption feature and hence it also needs to migrate to complete the picture.

The second part of the problem mentioned in my desciption (Startup) is not happening in wtp-I-I200604060720-200604060720 anymore. It maybe a user error I made.
Comment 3 Arthur Ryman CLA 2006-04-13 13:47:30 EDT
Eugene, thx for the patch. Looks simple. I've applied and committed it. I will request approval for this to be released for WTP 1.5 M6 at our status telecon today. Please join the call to champion this patch.
Comment 4 Arthur Ryman CLA 2006-04-13 14:51:35 EDT
[minutes] Approved. Arthur will release asap.
Comment 5 Arthur Ryman CLA 2006-04-13 16:09:57 EDT
Released to WTP 1.5 M6 as v200604131958.

Eugene - please verify on M6.
Comment 6 David Williams CLA 2006-04-13 16:17:00 EDT
Nominated as "greatbug" for M6, since this is a great example of early "cross project" testing the originator not only found the problem, but provided great analysis, detail and even a 'cross project' patch!  Thanks Eugene! 

Comment 7 David Williams CLA 2006-04-13 17:01:08 EDT
Just reopening to set owner. 
Comment 8 David Williams CLA 2006-04-13 17:02:08 EDT
Setting owner to Arthur, since he reviewed and applied patch! 
Comment 9 David Williams CLA 2006-04-13 17:02:31 EDT
moving back to fixed. 
Comment 10 Arthur Ryman CLA 2006-04-13 23:11:10 EDT
Just to clarify for anyone looking at this, this fix was applied to enable TPTP and WTP to work together for profiling Web apps in our M6 drivers.
Comment 11 Eugene Chan CLA 2006-04-14 00:03:04 EDT
verified with wtp-S-1.5M6-200604140226 driver.

Thanks.
Comment 12 Arthur Ryman CLA 2006-05-08 10:00:50 EDT
FYI, I am seeing the failures when running from the PDE custome build script. Here is my initial Wiki entry:

I am hitting sporatic build failures while building modified DITA source files. I have reported this problem to the DITA-OT dev list. The problems occurred while I was connected to my LAN with an Ethernet cable but dissappeared when I was wireless!!!!! 

Here's a snippet from my console in case anyone else sees the same behavior: 


BUILD FAILED D:\workspaces\WTP-Dev\org.eclipse.jst.ws.doc.user\build.xml:45: The following error occurred while executing this line: C:\DITA-OT1.2.1\conductor.xml:83: The following error occurred while executing this line: C:\DITA-OT1.2.1\pretargets.xml:147: Failed to copy D:\workspaces\WTP-Dev\org.eclipse.jst.ws.doc.user\temp\org.eclipse.jst.ws.doc.user\concepts\csoap.dita.pull to D:\workspaces\WTP-Dev\org.eclipse.jst.ws.doc.user\temp\org.eclipse.jst.ws.doc.user\concepts\csoap.dita due to D:\workspaces\WTP-Dev\org.eclipse.jst.ws.doc.user\temp\org.eclipse.jst.ws.doc.user\concepts\csoap.dita (Access is denied) 

I edited another file, i.e. not csoap.dita. 

Retrieved from "http://wiki.eclipse.org/index.php/Authoring_Eclipse_Help_Using_DITA"
Comment 13 Tim deBoer CLA 2006-05-08 11:28:15 EDT
Arthur - did you mean to append that comment to a different bug?
Comment 14 Arthur Ryman CLA 2006-05-08 13:09:35 EDT
Ignore my previous comment. It was meant for the DITA bug.
Comment 15 Arthur Ryman CLA 2006-08-30 21:52:50 EDT
Closing.
Comment 16 Eclipse Genie CLA 2017-10-11 15:59:53 EDT
New Gerrit change created: https://git.eclipse.org/r/107767