16
votes

We are trying to switch from MyEclipse 10 to Eclipse Indigo. We are currently using WebLogic 9.2, and typically debug directly in Eclipse.

Using MyEclipse, we were able to get the Server defined within the IDE to start/stop the Managed Server directly, having already started the Node Manager and Admin server manually prior. However, with Eclipse and WTP, we have not been able to determine how to do the same.

When defining a server in Eclipse Indigo, it allows us to specify the domain, but when we start it we only get the Admin server started. For writing and debugging applications this is useless. What I am looking for is a means to allow me to start/stop the Managed Server and not the Admin server. I have Google'd repeatedly to no avail as everything I have found walks me through the same process I have already performed. Remote debugging doesn't seem like a good option.

Yes I know we are on an ancient version of WL. Yes I know we really should update for numerous reasons. Those decisions are well above my pay grade, and we have already raised our concerns with the people who have that authority. I just need to get what I have working like I want.

Update I have been searching and playing and searching some more. Tried to simply change the "Start script" in the Debug Configuration to be that of the Managed Server instead of the LocalAdmin. However, if I have the LocalAdmin started via Service or Command line, Eclipse sees this and makes the server in the Server tab as "Running". Trying to start it causes the running LocalAdmin to stop and the Managed Server to start... not what I need.

My next thought was to do what I did in MyEclipse, which was to duplicate the Debug Config and add the appropriate VM args to start the Managed Server, but there is no place to do that as there are no config options to control the VM args.

Finally, I tried to add a "Generic Server", point it to the WebLogic JARs, but I never get an option to "Debug" the Generic Server.

I am not sure what else to try. SOMEONE has to be other there that has debugged a Managed Server within Eclipse! My only other thought is to turn on remote debugging. This seems like a painful option.

It just seems odd that there is no option to attach to a Managed Server. I'd have to think SOMEONE out there has done this, or needed this. Otherwise, what's the point of offering it?

1
A couple questions - for test why not deploy apps to the admin server to see if they work? Can't you just start the managed server with the startManagedWebLogic.sh script? I've remotely debugged a managed server with 9.2 without issuesDisplay Name is missing
With my previous setup, I was debugging the Managed server directly. I was hoping for a more direct way to do this than turn on remote debugging. It just seems useless to only be able to start the Admin server. I did see an option to change which .cmd it was using, but it only lists the startWeblogic.cmd.CodeChimp
Ha you could probably bastardize that same .cmd file to call the start managed script but yeah sounds like that's not what you're looking forDisplay Name is missing
Convenience of having the logs right there in the console, as well as being able to start/stop the server from right in the console.CodeChimp
@Viccari My first comment wasn't a direct answer, but was intended as an indirect answer. The direct answer is that we have ANT scripts that deploy to a specific managed server, and modifying the scripts is out of the question due to many factors beyond my control. I am merely trying to operate in a manner that does not rock the boat, but allows me to get my job done.CodeChimp

1 Answers

2
votes

I have always found that the interfaces provided by various versions of Eclipse for starting and stopping the Weblogic server were painful to use. It is much better to create a modified and renamed startWeblogic.cmd script that includes debug parameters to open a port when starting the server, and then remotely attaching to the machine. This assumes that your code is compiled with debugging enabled.

For example the modified script might include some of the following arguments. %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,suspend=n,server=y

You then create a new remote application in eclipse with Debug As... and attach to the port. In this case 8000.