Remote Debugging Attachment to a WebLogic Server

Don’t believe everything you’ll find online. If you work in a moderately complex environment (meaning, you’re running a managed server instance via an admin server instance on WebLogic), you’re sure to be led astray by the dozens of articles offering guidance into this elusive technique. You don’t have to emulate Ray Milland, if you follow this advice:

If you Google “Remote debugging WebLogic” you’ll find a host of discussions about modifying the startWebLogic.cmd or startWLS.cmd files. Ignore them all (assuming you’re using WebLogic 8.1 or later)! (Also remember, never verb a noun.)

Let me review the scenario that I am actually addressing here:

  • You will be remote-attaching to a running WebLogic instance, rather than launching the instance from within your IDE. (I use Eclipse, because I’m cheap—and because version 3.1.1 really works great, unlike its predecessors—but these instructions apply to just about anything.)
  • You run your WebLogic application as an instance under a WebLogic managed server, and start/stop it using the Remote Start options in the WebLogic console.
  • You’ve tried desperately to get your debugger to attach, or your breakpoints to be hit, to no avail.
  • You have deadlines looming, and if you don’t get this one problem solved, you can never see your family again.

Okay, perhaps I went a bit overboard on the scenario, but if you’re reading this, I expect, like me, BEA’s WebLogic isn’t a platform you use every day, but one that you need to work on occasionally.

The key is that most of the documentation presumes you won’t be running your application from the WebLogic Server Console, and gives no indication that the JVM arguments, in such a case, go in a completely different place. Here’s how to prove to the world that you weren’t going insane:

  1. Log on to the WebLogic console, via http://{servername}:9999/console. YMMV as far as the port number (after {servername}) is concerned.
  2. Using the navigation tree, click on the domain on which your application resides, open the Servers branch beneath it, and click on your application’s name.
  3. With the Configuration tab in the top row selected, click on the Remote Start tab in the second row. (Be sure you don’t have Control selected in the top row, otherwise you’ll think I am just as batty as the authors of the previous 743 help documents you’ve read.)
  4. Scroll down to the Arguments: field, and add your debug settings to the JVM arguments in that field. In my case, I added -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n, which (among other things that are too cool for me to share) allows the debugger to attach to port 8787 (address=8787), and the server to start without waiting for a debugger to attach (suspend=n).
  5. Click on Apply.
  6. Then click on Control in the first row of tabs, and be sure Start/Stop is selected in the second row of tabs.
  7. Finally, you’ll need to either gracefully or forcefully shut down the server by using the links provided, and then restart the server. (You’re actually only restarting your application; the ambiguous language surrounding server is another problem.)
  8. Attach Eclipse to the server by Configuring a new Remote Java Application under Debug … Feed it parameters of the server name and 8787 (or whatever port you provided in the JVM arguments).
  9. Debug your problem.
  10. For goodness’ sake, go home and see your family!

Drop me an e-mail using the link in the sidebar, or leave a comment, if I’ve goofed anywhere. I never claimed to be perfect. Sheesh.

A Collection of Coolness

Star Wars:

Weather Control:

Natural Disasters:

Tall Buildings:

Robotics (especially for Neal Stephenson fans):

Space Slide Shows:

The Human You Have Reached, Doug Wilcox, Is Not In Service—Civ IV Is on the Way Here

It’s happening … The long-awaited Civilization IV is about to hit store shelves, and a special edition is available for pre-order now, probably shipping tomorrow.

Civilization IV is the latest in the wildly popular series of games from Sid Meier and Firaxis Games.

GameStop has the pre-order version with free 3-day shipping, using coupon code “CIV4.”

I have played untold hours of Alpha Centauri and Civlization III. Few game experiences are more enriching than nurturing a tiny colony into a massive, multicontinental empire—and what fun along the way! Research technology, explore, build wonders, wage war, handle diplomatic agreements, conduct espionage, or even build a spaceship to get to Alpha Centauri (my personally favorite victory condition). Civ IV promises completely reworked, smoother gameplay, a real 3D graphics engine, and a multiplayer mode that is actually playable. Civ IV also brings back “wonder movies,” which existed in Civ II and Alpha Centauri, but were not included in Civ III.

Read the detailed review at IGN, and wander over to the official Civ IV Web site. Best Buy has the system requirements, which aren’t excessive.

Once this game arrives, little is going to be able to drag me away from my keyboard. Hmmm. This will probably be a nationwide phenomenon. I don’t think it’s too late to invest in Maxwell House stock.

Star Trek Tech Coming to Your Home

For those of us who grew up reading the Star Fleet Technical Manual and the Next Generation Technical Manual, the development of real world technology that works just like on Star Trek is always fascinating. One example of this is cell phones, which, in function and actual physical design, work just like Captain Kirk’s [pardon my language] ST:TOS communicator.

Other than space-warp propulsion, artificial gravity, and transporters, the designers of Star Trek typically try to predict everyday technology that is about 20 years away from real-world current technology. (Although researchers have successfully space-shifted a laser beam using quantum mechanics, and suspect being able to do so with a simple atom may not be far off, which gives us a basis for transporter technology.)

The voice-aware communications system employed on the Enterprise may be in your home’s future.

The Palo Alto Research Center (PARC) is working on the problem with Social, Mobile, Audio Spaces, a project designed to create shared audio space so you can be in constant communication with people in other homes. Instead of making phone calls, you’ll have an always-on, hands-free connection that picks up your voice wherever you are. It’s jokingly referred to as “the God phone.”

Read the full article here at PC Magazine Online.

Now, if I were able to go into the 23rd century world of Star Trek, I already know how to make myself rich enough to be the envy of every Ferengi. I’d simply patent a nonexploding control console for use on starships …

Man with a Backhoe

For anyone who tried to post/read the Wilcox Family BLOG yesterday, we were affected by the power outage in Los Angeles. When I noticed our mail server was down, I started to file a help request, and got to this page:

Urgent Notice: 9/12/2005

Currently there is a Major Power Outage that has affected Los Angeles Area where one of our data center currently reside.

About half of the servers are currently running using the backup generators.

Unfortunately, the backup generators are not able to supply enough power for the other half of the servers.

We are currently working with the Los Angeles power department to getting power back up for your server.

To read more about the power outage… http://kcal9.com/topstories/topstoriesla_story_255162353.html.

If you have any questions regarding this matter, please proceed and open a support ticket or give us a call. Thank you.

Sales/Support

Nashua Commuter Rail

Editor’s note: I moved this post to a this page on Monday, October 24, 2005.

Nashua, N.H., seems too far away from Boston to be a “bedroom community,” but in the quest for affordable housing, crime-free neighborhoods, and other prized essentia of suburbia, Nashua is an excellent choice, especially considering its sales-tax-free shopping and vibrant downtown.

After seeing the huge benefits the commuter rail brought to our former hometown of Brockton, Massachusetts, I am eagerly awaiting the day Nashua becomes a stop on the Purple Line.

I thought I’d start tracking some of the articles that come through Google Alerts about the rail project.

Splitting the Mac’s Personality

Remember the line about doing seven impossible things by breakfast?

I am becoming the Apple/Mac/Safari Guy at Kronos. (Safari, for those of you wondering, is Apple’s partly-home-grown Web browser, and it’s the default browser for Mac users.)

One of our problems in development is the rapidity with which Apple releases new versions of its operating system. Unlike Windows, which tends to be fairly stable, we might see Apple users upgrading their operating systems every six months or so. But, our applications need to work on Safari, and it’s considered a good idea to make sure they actually work. The immediate question is which Safari? A user with Safari 1.3 on OS X 10.3.9 is going to get a very different experience from a user with Safari 1.2.4 on OS X 10.3.8 or 10.3.9, and that will vary still from a user with OS X 10.4.1 and Safari 2.0. Nevertheless, these environments are all likely to be encountered by our customers, so we have to test them.

A few days ago, I’d upgraded our G5 Mac to OS X 10.4.1 with the latest patches, and intended to leave OS X 10.3.9 installed on a much-slower iMac that also belongs to our team. But I realized we still needed an environment on which to test the latest builds of Safari and the operating system as we get them from our Apple Developer Connection subscription, which works much like the MSDN subscription does.

The best solution, given that we use the Mac relatively little, would be to put all three builds on the same machine. I’d never set up multiple partitions on a Mac before, and was curious about dual-booting two flavors of OS X. It turned out to be surprisingly easy.

I knew that repartitioning the drive would wipe out all the data. The only items of importance to us on the machine were a few bash scripts Doug “JavaDoug” Ross had written for a massive properties namespace protection/conversion project we’d done. I moved those off to my own machine via FTP.

I popped in the OS X 10.4 DVD (yes, DVD), and chose Restart from the Apple Menu. Holding down “C” allowed me to boot from the DVD, which automatically launched the installer. From the installer menu, I could choose to run the Disk Utility, which is pretty much like fdisk combined with chkdsk, but with a prettier interface.

I realized I should actually create three partitions. The first would be our “main” test setup, which is currently OS X 10.4.1 (and climbing). The second partition would hold the last release of OS X 10.3.9, which is the last version of OS X we support with the release of Kronos Workforce Central 5.1 product suite. The third partitions would be an OS X 10.4.x sandbox, where we can install the latest released-to-developers code without risk to our test machine.

I got OS X 10.4.0 installed, and ran two levels of restart-required patches to bring it up to 10.4.1 with the latest security updates. I verified that everything, including VNC, was running correctly at startup. (Do you think I want to spend my days running back and forth to our hardware lab? Yes, there is a certain Geeky thrill to being in a room with raised flooring and immersed in the overpowering sound of the blowers, but I happen to like my cube–which some have described as a “playpen.”) The first part of the project took less than half an hour. I was only stumped once.

Next came the OS X 10.3.9 installation. The latest disk I had readily available was OS X 10.3.5, but it’s a simple process to patch it to the later version. This time I had to hold Option down at startup, to give me the choice of booting from the install CD or from the OS X 10.4.1 partition.

Picking the installation volume (partition) and getting OS X 10.3.9 running was easy. This version ships on CD instead of DVD, and it took surprisingly longer to set up–over an hour, I would estimate. It’s in the final stage of installing now; I’ve just installed the first 11 items that require a restart, and then the Software Update applet found 7 more items. One interesting bit of trivia: Apple was pitching an Earthlink Internet connection subscription as part of the OS X 10.3.5.

<rant>

That reminds me. Why is it that Apple can do no wrong? It’s guilty of doing things that would land Microsoft in court, but no one seems to care. For example:

  • Apple installs only QuickTime for media playing, and it’s not an optional install, even when choosing the custom installation option. I guess the ability to install a different media player is good enough for Apple in the EU, but not for Microsoft.
  • What’s with the hard sell for Earthlink (then later a pitch for a .Mac account at $100/year)?
  • On a Windows system, why does iTunes install and run (without asking me) both the iPod service and the QuickTime system tray lurker? They are both needless consumers of my computer’s resources, and iTunes ought to even ask if I even own an iPod. Every time I update iTunes, and hence QuickTime, QuickTime can’t remember my preferences about this from the last install!
  • What’s up with the only CD/DVD eject button being on the keyboard? What if I don’t use a Mac keyboard? What if I want to install a second CD/DVD drive internally? There’s no place to put it without taking a hack saw to the beautifully-finished front panel.
  • I know I have a choice since the devices are USB-based, but a one-button mouse is just about as useless as possible. Not even a mousewheel is standard. Remember when Apple had sensible designs? Tell me why control-clicking, which requires two hands, is more intuitive than right-clicking, which requires only one. And, of course, playing Find the Scrollbar is such fun, I can’t imagine why anyone would ever miss their mousewheel!
  • Microsoft wrote a Remote Desktop client for the Mac, which allows Remote Desktop to be used on a Mac to connect to a PC. Guess what platform Apple never bothered to write a remote desktop client for? And guess which company charges a small fortune to even get it’s Remote Desktop application? It’s a good thing there’s OSXVNC and Chicken of the VNC on SourceForge!

</rant>

You might be tempted to think I don’t like OS X or Apple. You’d be wrong. I actually love the Apple, but its defenders seem to be unable to look at it objectively.

My one other gripe is that OS X can be extremely powerful, but that power (think one-button mouse here) is insulated from the users. Mac users fall into two categories: “I can only do e-mail,” and “I’m a ‘Nix propeller-head who thinks any GUI is for the weak.” Like it or not, Windows provides an easy learning path to becoming a power user, with the most advanced features lying under the surface, ready to be explored via right-clicking and choosing “Properties.” Just like Mac users, Windows users can ignore the power, but it’s there when you want it.

On the other hand, most Apple users don’t fear an operating system upgrade. Most applications work fine on the new O/S or patch, and even reinstalling the O/S (if one isn’t repartitioning a drive) can be done without losing existing user accounts or application data. There is much Microsoft could learn from Apple, including the possibility of ditching backward compatibility for something lean-and-mean while providing a good emulator.

Anyway, the third operating system install is in progress (OS X 10.4.1, ready for the latest developer code). It’s been 9 minutes, and the installer predictions about 7 minutes to go. I’ll have to finish configuring it in the morning, because I need to head home, but I can’t believe how easy and quick the installation is.

WordPress 1.5.1.3

We’ve just upgraded to WordPress 1.5.1.3 (a security-only upgrade). This is primarily a test post to make sure everything is still working. To report any problems, use the e-mail link for Doug on the right, or post a comment.

See the BLOG Updates page for more details on the changes that have been made to the BLOG over time.

The Geek Life Begins Early in the Wilcox Family

The other day, I came out of my room to find that Naomi was at the computer with her baby doll, taking the doll’s hand, and trying to “teach” the doll to use the mouse.

I went searching for the camera, and missed that shot, but when I came back I found Naomi had left her doll as the picture above shows.

IBM DeathStar / Down in the Dumps

I don’t usually write about my mood, but today I woke up feeling really down. Thankfully, I haven’t been sent into massive panic attacks over the issues described below. (One of the ironic points of living with an anxiety disorder and being a computer Geek is that a trigger point for my anxiety is problems with my own personal computer.) I am grateful that God convinced me to make a critical backup at just the right time, so everything important is intact and backed up.

It looks like I’m going to have to replace the old IBM drive on my primary computer. I noticed last night that it was an IBM DeskStar drive, which my friend Charlie Dunn said was so prone to failure they nicknamed them “DeathStars” when he was working in IT.

At first it looked like I had a problem with overheating—and that still may be the problem—although it seems to be getting worse. Last weekend Nichelle compalined that her e-mail was missing for a period of several months, but after rebooting the computer, everything was fine. I took the precaution of backing up our photos (most of which are already on CD as yet another backup), financials, and documents folders to a nonused partition on a drive I’d added in December.

A couple of days ago, I logged in to the computer and was notified that numerous updates were ready to be installed to Java and Windows XP. These updates had already been installed, and it was rather obvious what had happened—the primary drive, from which we have been booting for nearly all of the lifetime of the computer had disappeared, and the machine rebooted to an imperfect Windows setup on the second drive. (That setup was toasted, apparently, by a bad power supply, now replaced, that caused some data loss.)

Part of the time the IBM drive isn’t being recognized at all. After a certain amount of time—perhaps due to overheating, perhaps due to another type of drive failure, it won’t be recognized at all. Rebooting the system sometimes catches it and boots to the original drive, especially if the whole system has been off for a while. On a really hot day, or after a period of high disk activity, the drive will fail again and the system will reboot to the bad partition.

I’d like to try copying the image over to a new drive, using Ghost or whatever comes with the new drive (I’m leaning toward Seagate), as it would get me instantly up-and-running without having to reinstall. Of course, I do not have that much hope that the old drive will “hang in there” long enough for such a data-reading-intense operation to happen.

If that doesn’t work, I’m willing to bite the bullet and do a reinstall of XP Pro. However, there is a drive size limitation (I think it’s 120 GB) in the initial release of XP Pro (pre SP-1), which is what I have. Installing from an SP2 CD would be even sweeter, and less prone to failure than upgrading to SP2 from a previous version.

:: sigh ::

Editor’s note added June 13, 2005:

It looks like the drive is only flaking out when it overheats. I think it may fail soon, but letting it cool down with the machine off so far makes it recover. In the mean time, I’m keeping my data backed up daily, and when the drive does fail, I can boot to my “February” installation, and still run all my apps, so replacing the drive is now less urgent, and I can plan for this at my convenience.

Editor’s note added June 21, 2005:

No, it’s not necessarily related to overheating. Or, if it is, the drive is “overheating” at a temperature far below what its temperature sensor would indicate shoud be a problem.

Last night I was running at a reasonably cool 35 degrees C, when the whole things went kablooie. At first I had the usual trouble recognizing the drive. Then, when I finally got it to recognize, it was dog slow, and told me that Windows couldn’t boot because windows/system32/system was missing or corrupt. I had just finished backing up everyone’s e-mail, pictures, etc., except mine.

This morning, after leaving the system off overnight, I got the drive to be recognized by leaving it running for a few minutes, and everything seemed to be fine.

So heat may be playing a factor, but I think it’s time to just retire the drive.

I’m also looking at putting together a new system that would kick butt for as little as $500, but I also need to get this one back to a reliable state.

Editor’s note added June 27, 2005:

Wednesday night after church, I went out and grabbed a 120 GB Seagate Barricuda drive to replace the boot drive. On Wednesday, the IBM DeathStar drive seemed to fail completely, and I was looking at rebuilding my system.

On Thursday evening, I decided to give the IBM drive a few more tries, and got it to recognize at startup!

Hurriedly, I rebooted with the Seagate drive, hoping to be able to copy my IBM drive over to the Seagate drive, which would become the new boot drive, and save me from having to reinstall everything.

Seagate’s drive setup software is supposed to be easier to use than Western Digital’s. I actually didn”t find that to be the case. They both are about the same, but there were some nonintuitive points that I had to keep hitting the help file and documentation for. Once nice thing (which I did not need) is that Seagate lets you print installation instructions that are customized for what you’re actually doing.

It took hours for the drive to copy, mostly due to the read errors (all were being corrected, but it was having to perform each read multiple times) that SMART was reporting. Copying also appeared to be slow because of Seagate’s verification process, but getting an exact drive copy is far more important than getting a fast copy.

I only found three problems:

  1. Trying to access the System Restore tab crashed. It turned that is always caused by a drive copy process, and all I had to do to fix it was disable the System Restore service, then re-enable it.
  2. The next problem was a missing FrontPage icon (the link would work, but the icon itself was the default rectangle). It was looking for something under installs that clearly wasn’t around any more. I simply replaced the shortcuts with new ones.
  3. Lastly, the icons on my own logon are weird. Unless I run in 32-bit color mode, I get ugly 2d, 8-bit icons. It seems to happen only on my account. I find it disturbing, but it can’t be described as much more than a cosmetic issue. Some of the menu colors are off as well. Again, it’s no big deal, but it does bother me.

Other than that, the machine is working perfectly. My friend Phil Luchon came over and brough his machine. We played WarCraft and StarCraft. The Lego Star Wars game, which the kids play every moment we will allow (one hour on weekedays, 2 on weekends), which had been very prone to crashing and lockups, has not had a single failure in 3 days.

Everything involving disk access is much faster on the new drive: booting, loading big programs, virtual memory swapping, etc.