|Re: Bug#137822 [message #228969 is a reply to message #228948]
||Sat, 14 March 2009 17:54
| Larry Isaacs
Registered: July 2009
Xia Jun Shi wrote:|
> I am working on the bug 137822. I got the code which throw the
> exception. See: http://xiajunshi.wordpress.com/
> publishServer(kind, ProgressUtil.getSubMonitorFor(monitor, 1000));
> This is the code to throw the exception which is located in
> publisher(int,IProgressMonitor) of ServerBehaviorDelegate.java. I am
> wondering which value of the variables "kind" and "monitor"should be so
> that the server is lanched properly or something is published on the
> server correctly by debugging mode. If I want to want to lanch the
> server properly by debugging mode, which variables and values should I
> focus on to check?
> I hope I can get some hints on how to lanch a server properly by
> debugging mode. Thanks for any help.
I'm afraid these variables aren't related to that bug. Here it another
set of steps that illustrates the problem better than what is given in
the bug. Note that a webapp isn't necessary.
1. Create new Tomcat Runtime and Server.
2. Execute Run -> Run Configurations (or Debug Configurations)
3. Right-click Apache Tomcat and select New
4. Select the Arguments tab and note that the "Program arguments" and
"VM arguments" fields are empty!
The empty "Program arguments" and "VM arguments" fields is the bug.
Executing this launch configuration in its current state is doomed to
fail, as you have seen. To see what should be there, continue with the
5. Click Close to exit the Configurations dialog.
6. Double-click on the Tomcat server in the Servers view to open the
7. In the server editor, click on the "Open launch configuration" link
in the General Information section.
8. Select the Arguments tab and note that the "Program arguments" and
"VM arguments" fields are no longer empty!
The launch configuration is now complete and can be run successfully.
Obviously, step 3 isn't doing something that step 7 is doing. The code
that executes for step 3 needs to include a call to
setupLaunchConfiguration(), or something equivalent, which is what step
7 is doing to set those fields. For Tomcat, it is
TomcatServerBehavior.setupLaunchConfiguration() where the real work is
done to set the values of those fields. Unfortunately, I'm not that
familiar with what actually gets executed in step 3 to say much about
how to hook in the extra handing that is needed.
Powered by FUDForum
. Page generated in 0.01984 seconds