DXLMagic for Dummies
I recently needed to look through an application to determine if a view was used anywhere in the application. A common requirement, right? A quick Tweet, and several people said DXL was the answer to my question. Dump out the design into a file and search through it for the view. Done. But how to accomplish it?
A few posts ago I dabbled in DXL. Just one folder, which I manually exported to a file, but used DXL to create a new one from the file. So, how to export the design of an entire application? Enter Stephan Wissel's completely awesome DXLMagic. I missed this session at Lotusphere, but lucky for me and others that missed it, he's got a ton of great information on his blog.
So I titled this entry DXLMagic for Dummies, because, well, I am a dummy. He has very detailed instructions on his blog about how to get started and I still managed to screw it up. I'm blogging about it in the event someone else is a dummy and runs into the same problem.
Okay, so if you're interested. Go look at Stephan's instructions. Pretty detailed, right? Go to Openntf.org to download the latest and greatest (and it IT great) jar file of DXLMagic. Now, Stephan's instructions say that if you are using a Windows machine (I know, my first mistake) to add three lines to your autoexec.bat file. I can follow instructions pretty well, so I did that. File, open, type type type. Save. Reboot for good measure. Now he lists several commands at our disposal. I was first and foremost interested in DesignExporter.
Note to Dummies: we are going to enter the commands at a command prompt. (You know, Start, Run, cmd).
Another note to Dummies: Stephan's instructions say to start the command with java [command] [parameters]. In my excitement, I missed this for my first several attempts. Surprisingly, it doesn't work if you forget the word java at the beginning.
I got an error. Shocking, right? I checked my Java version. Stephan's instructions do say that this will work with 6, maybe 5, but definitely 6. Okay, I had the latest and greatest from the Java site. Now what? Check my typing in the autoexec.bat. Yep, it all looks good. Per Stephan's instructions, I have my file paths in quotes since Notes is buried under "Program Files", which has a space in it. Still nothing, still getting "NoClassDefFoundError" "java.lang.ClassNotFoundException".
Around this point, I sent out an SOS on Twitter, which Stephan was kind enough to respond to himself. He tried to help me out a bit, but since this wasn't a problem with his code, I felt a bit bad about pestering him. I kept trying on my own. Still nothing. Still the same error.
Messing around a bit more and typing SET in the command prompt showed that the other settings from the autoexec.bat were in effect, except CLASSPATH. For reasons uknown to me, they didn't take. So, I manually typed SET CLASSPATH=[stuff from Stephan's instructions]. This was a test box, so I didn't really care if I broke other things. You may feel differently. I navigated to the directory where the DXLMagic.jar file was located. I have no idea if that mattered, I'm just tellin ya what worked for me. And that did indeed work!
Can I say how fabulous this tool is? IT IS FABULOUS. And so easy to use (you know, once you get it working). And so useful! I had a blast (yes, I am a geek) searching through the design of my application just looking for stuff, because, you know, I could.
So newbies/dummies, don't be afraid of DXL, jump in! Have fun! Check out Stephan's blog!
[ETA: actual error message above]
Comments
And Stephan's blog is DXL Central, as far as I'm concerned. He does more genuinely useful stuff - and explains it better - than any 5 other people out there. That Lotusphere session he gave was absolutely killer. I hope they let him do another DXL session next year.
Posted by Rob McDonagh At 09:20:24 On 14/05/2009 | - Website - |
Posted by Kathy Brown At 09:35:09 On 14/05/2009 | - Website - |