WSAD is broken, evil and wrong

Just started working on a project, integrating some new functionality with a pre-developed “framework”. So, the first thing to do is to try and build a really simple application to make sure the framework, “works as advertised”, and to get a little experience with it.
So, after a few hassles getting the environment setup, and we’re using the miserable steaming pile of shit that is WSAD 5.0. Anyway, let’s write a jUnit test to do a JNDI lookup. Seems easy, set up a HashMap, stuff in some properties, grab an InitialContext() and try and do a lookup().
Get some weird-ass error about a PartialResultsException. Hmm, WTF ?
Wander down and chat with Simon Harris who I know has done the same thing, in the same environment, but without needing to use WSAD. Quick chat, basically doing the same thing, but as I wander away, Simon says that “we don’t do anything special, because the IBM JVM 1.3 gets the correct InitialContext()”.
Oh no. This smells bad.
Wander back to Dave Kemp (who’s been working on this all day, and I’ve just inflicted myself on him for the last hour) and we have a look at WSAD. Now, this WSAD is a fresh install, on brand new hardware, with a fresh install of Windows 2k. It doesn’t get any more virgin than this. A JAVA_HOME that points to the bowels of the WSAD installation to get the IBM JVM, but that’s it.
Turns out that WSAD has chosen by default some other JRE as the default runtime JRE, BUT when the internal WebSphere is running, it uses it’s own JRE !!!! How mind-bogglingly stupid is this. A new level of stupidity that only IBM can provide.
Anyway 10 seconds later, green bar, Dave and I are leaping around cheering at this breakthrough.
However, I’m pointing at the screen in an accusing manner saying “this is why you don’t run tests in an IDE”. The stupid things hide far too much, and it’s too easy for different configuration options to be used at different points.
I know people are going to say that we should have CI tools running the tests, and we should have Maven/Ant for running them from the command line. And, you’re all correct, and if we’d done that first, we (well, Dave actually) wouldn’t have suffered as much.
So, learn from this lesson. IDE’s are great for writing code, but test your code outside the IDE please, or at the very least use an IDE that works.

Advertisements

20 thoughts on “WSAD is broken, evil and wrong

  1. Oh yes, WSAD is very evil indeed. I have had the pleasure (cough, cough) of working with it on my current project, and it never fails to add code in the most inopportune places (breaking things, or just destroying any formatting), and it loves to initiate random builds. I dont understand how a piece of software can be so slow, either….

  2. WSAD’s brokenness

    Hey, I agree – WSAD using IBM’s internal JRE is an incredible pain in the neck. We run on Solaris, so we have to use Sun’s VM on our production and staging environments, but ALL of our development boxes are Windows – meaning that our development and

  3. Yeah it takes awhile to get used to IBM world.
    To connect to WAS from an external client you need to use the IBM JDK, since you need to use the IBM ORB libaries. There are some articles in the hell of too much information that is the IBM site that details how to connect to Websphere using a Sun JVM. However I sure never got it working!
    We (SpiderLogic) have a document describing how we were able to get a WebStart app connecting to WAS, it was quite a pain.
    http://www.spiderlogic.com/news_threads/articles/WebsphereMQ.html
    Another good resource is the Websphere 5.0 infocenter:
    http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp
    I’ve been using WSAD/WAS for awhile now, if guys need any help feel free to shoot me an IM.

  4. I feel your guys’ pain. We use WSAD 5.1.2 and have had some good things but many bad things happen. One of the guys here has had a hell of a time getting a local interfaced EJB to work and finally quit and went to a remote one.
    I ran into a junit test yesterday that seems to terminate for no apparent reason in wsad, but runs fine in Eclipse 3. Oh, and wait until you try portlet development…

  5. Any of you Guys know, what are the ways by which we can improve the performance of WSAD ???

  6. Re: performance. WSAD, like most Java apps benefit from tuning the JVM. However, depending on what JVM you are running WSAD under, you may have more or less luck.
    The “standard IBM JVM 1.3” has really limited options, but JDK 1.4.2 has much better capabilities.
    This is what I use for Eclipse and it roughly doubles the performance under Sun JDK 1.4.2
    C:\eclipse\eclipse.exe -data c:\eclipse_work -vmargs -Xverify:none -XX:+UseParallelGC -XX:PermSize=20M -XX:MaxNewSize=32M -XX:NewSize=32M -Xmx160m -Xms160m

  7. WSAD is a marvel compare to ClearCase. Never use ClearCase and WSAD, you will regret it. ClearCase server only run on Windows… you see the picture?
    BTW you should upgrade to WSAD 5.1.1 (or 5.1.2, but I didn’t tested it). 5.1.0 is a kind of alpha testing I guess, because it is so full of stupid bug that it CANNOT be consider as a stable release.
    good luck.

  8. I came across your site when I was researching the exact same problem.
    I’ve got a Java 1.4 project set up in WDAD 5.1.2. I’ve set up an Ant build script with a JUnit task as part of my project. The JUnit task has the attribute “fork” set to “yes”. By default, WSAD forks its own JVM, which by default is version 1.3. Since my code is all 1.4… KABOOM!
    I fixed this by having WSAD start up using a 1.4 JVM. My command line is:
    C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2>wsappdev.exe -vm “runtimes\base_v51\java\jre\bin\java.exe”
    Hope this helps.
    P.S. The eclipse command line options are here:
    http://www.eclipse.org/documentation/html/plugins/org.eclipse.platform.doc.user/doc/tasks/running_eclipse.htm
    Also, to list the extra WSAD command line options you can run: wsappdev.exe -help

  9. TO James Tikalsky: God bless you at least 1000 times, thanks to your post I got rid off a really bad headache. Really helped:)

  10. Hi,
    All the responses about changing the runtime vm in WSAD are for running applications once WSAD has started with the IBM virtual machine, but I would like to know how I can run WSAD with a SUN JVM I need this for the execution of a plugin with this virtual machine.
    Thanks in advance.

  11. i m also having the same problem as others had. trying to move to WAS 5.1 and jdk1.4.2, my current app is running on WAS 4 and jdk 1.3.1. Want to make sure that app compiles under jdk 1.4.2 using WSAD 5. Changing the prefrences to jdk 1.4 complince and j2ee 1.3 does not seems to work. Thats ture that wsad 5 compiles the code with jdk 1.3 but give you warnings for jdk 1.4. (not sure how)
    Also trying to figure out a way to compile my app under 1.4.2 in WSAD 5, but did’nt found much clue. Not a good experience with WSAD 5.

  12. Today there was a problem trying to log in to the CVS, so I tried to reinstall websphere.
    When I was trying to re-install the Websphere Studio Application developer 5.1, I always got the error below. I tried many attemps to install in different methods but couldn’t succeed, I was wondering if any of our team members has encountered this problem before, if yes please advise.
    (Aug 1, 2005 5:47:01 PM), Setup.product.install, com.ibm.mby.install.beans.InstallArchiveSet, err, An error occurred and product installation failed. Look at the log file C:\WSAD\logs\install.log for details.
    (Aug 1, 2005 5:47:01 PM), Setup.product.install, com.ibm.mby.install.beans.InstallArchiveSet, err, ProductException: (error code = 601; message=”err”; additional data = [java.io.IOException: Incorrect function])
    STACK_TRACE: 12
    ProductException: (error code = 601; message=”err”; additional data = [java.io.IOException: Incorrect function])
    at com.ibm.mby.install.beans.InstallArchiveSet.install(Unknown Source)
    at com.installshield.product.service.product.PureJavaProductServiceImpl.installProductAction(PureJavaProductServiceImpl.java:1916)
    at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.getResultForProductAction(PureJavaProductServiceImpl.java:5195)
    at com.installshield.product.service.product.InstallableObjectVisitor.visitComponent(InstallableObjectVisitor.java:369)
    at com.installshield.product.service.product.InstallableObjectVisitor.visitInstallableComponents(InstallableObjectVisitor.java:333)
    at com.installshield.product.service.product.InstallableObjectVisitor.visitProductBeans(InstallableObjectVisitor.java:133)
    at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.install(PureJavaProductServiceImpl.java:4563)
    at com.installshield.product.service.product.PureJavaProductServiceImpl$Installer.execute(PureJavaProductServiceImpl.java:3758)
    at com.installshield.wizard.service.AsynchronousOperation.run(AsynchronousOperation.java:41)
    at java.lang.Thread.run(Thread.java:566)
    (Aug 1, 2005 5:47:01 PM), Setup.product.install, com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct, err, An error occurred and product uninstallation failed. Look at the log file C:\WSAD\logs\install.log for details.
    (Aug 1, 2005 5:47:01 PM), Setup.product.install, com.ibm.mby.install.beans.InstallArchiveSet, err, java.lang.NullPointerException
    STACK_TRACE: 13
    java.lang.NullPointerException
    at com.ibm.mby.install.beans.InstallArchiveSet.removeFiles(Unknown Source)
    at com.ibm.mby.install.beans.InstallArchiveSet.uninstall(Unknown Source)
    at com.installshield.product.service.product.PureJavaProductServiceImpl.uninstallProductAction(PureJavaProductServiceImpl.java:1947)
    at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.processActionsFailed(PureJavaProductServiceImpl.java:5138)
    at com.installshield.product.service.product.InstallableObjectVisitor.visitComponent(InstallableObjectVisitor.java:374)
    at com.installshield.product.service.product.InstallableObjectVisitor.visitInstallableComponents(InstallableObjectVisitor.java:333)
    at com.installshield.product.service.product.InstallableObjectVisitor.visitProductBeans(InstallableObjectVisitor.java:133)
    at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.install(PureJavaProductServiceImpl.java:4563)
    at com.installshield.product.service.product.PureJavaProductServiceImpl$Installer.execute(PureJavaProductServiceImpl.java:3758)
    at com.installshield.wizard.service.AsynchronousOperation.run(AsynchronousOperation.java:41)
    at java.lang.Thread.run(Thread.java:566)
    With regards,
    Kian, Ting
    Analyst Programmer
    Formis Software Dynamics Sdn Bhd
    6th Floor, Menara Aik Hua,
    Cangkat Raja Chulan,
    50200 Kuala Lumpur
    Tel: +603-20264988
    Fax: +603-20264788

  13. I am working on wsad. I have to write a simple junit for my code. I created the test class , no compilation errors etc. Now when i run the test thorugh wsad it asks to browse for my testcase which i am unable to find coz it points to only the xdoclet classes whicha re in lib/build/xdoclet-1.2/xdoclet-1.2jar.
    where as my testclass is in tests/java
    lib and tests in the same hierarchy

  14. Experiencing the same problem. I want WSED 5.1.2 to use a JDK 1.4 when running apps on the server rather than the default running under the default 1.3.1 with which it is shipped. You can execute Java runnable classes in debug and specify the JRE they are to execute under but how do you get WSED (or WSED’s server) to execute with a JRE of 1.4.2..? so that apps running on the server are running under a 1.4.2 scenario..? Any postings answering this appreciated.

  15. I am getting following exception while running junit or standalone program in WSAD which is connecting to database and Queue (JMS) configured in websphere server,
    javax.naming.ConfigurationException: Malformed provider URL: corbaloc:iiop:localhost:2809
    at com.ibm.ws.naming.util.WsnInitCtxFactory.parseBootstrapURL(WsnInitCtxFactory.java:1422)
    at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:368)
    at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:102)
    at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:408)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:131)
    at javax.naming.InitialContext.lookup(InitialContext.java:359)
    at com.ampf.invest.corpact.exception.CorpActErrorNotifier.initialize(CorpActErrorNotifier.java:377)
    at com.ampf.invest.corpact.exception.CorpActErrorNotifier.getInstance(CorpActErrorNotifier.java:102)
    at com.ampf.invest.corpact.helper.CAFileHelper.(CAFileHelper.java:93)
    at com.ampf.invest.corpact.workflow.CAWorkFlowMgrTest.setUp(CAWorkFlowMgrTest.java:79)
    at junit.framework.TestCase.runBare(TestCase.java:125)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:329)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:218)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:151)
    Unable to locate the JNDI object from the JNDI Server ClassName::javax.naming.ConfigurationException Root Cause ::javax.naming.ConfigurationException: Malformed provider URL: corbaloc:iiop:localhost:2809
    Local JNDI Information for Service :SMUPLXA
    javax.naming.Context.INITIAL_CONTEXT_FACTORY=com.ibm.websphere.naming.WsnInitialContextFactory
    javax.naming.Context.PROVIDER_URL=corbaloc:iiop:localhost:2809
    com.ibm.websphere.naming.jndicache.cacheobject=none
    Unable to locate the JNDI object from the JNDI Server ClassName::javax.naming.ConfigurationException Root Cause ::javax.naming.ConfigurationException: Malformed provider URL: corbaloc:iiop:localhost:2809
    Local JNDI Information for Service :SMUPLXA
    javax.naming.Context.INITIAL_CONTEXT_FACTORY=com.ibm.websphere.naming.WsnInitialContextFactory
    javax.naming.Context.PROVIDER_URL=corbaloc:iiop:localhost:2809
    com.ibm.websphere.naming.jndicache.cacheobject=none
    Unable to locate the JNDI object from the JNDI Server ClassName::javax.naming.ConfigurationException Root Cause ::javax.naming.ConfigurationException: Malformed provider URL: corbaloc:iiop:localhost:2809
    Local JNDI Information for Service :SMUPLXA
    javax.naming.Context.INITIAL_CONTEXT_FACTORY=com.ibm.websphere.naming.WsnInitialContextFactory
    javax.naming.Context.PROVIDER_URL=corbaloc:iiop:localhost:2809
    com.ibm.websphere.naming.jndicache.cacheobject=none
    this is not happends while running as application.

  16. TO James Tikalsky: God bless you at least -=2000=- times, thanks to your post I TOO got rid off a really bad headache. Really helped:)

  17. As per our conversation, I have attached the link where you can download the bits for WAS 5.1 Fix Pack 1 http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg24007195. This fix pack contains JDK 1.4.2. After applying the fix pack, please run C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\bin\versionInfo.bat to confirm that JDK 1.4.2 is installed correctly.
    Please use the following steps to apply the fix pack:
    1. Download Fix Pack 1 and extract to C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51
    2. Open command prompt
    3. Run C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\bin\setupCmdLine.bat
    4. Run C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\update\updateWizard.bat
    5. Select C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51 as Installation directory.
    6. Select Install fix packs
    7. Choose fix pack directory.
    8. Next.
    Upgrade WSAD 5.1.2 JRE JDK 1.4.2

  18. >>WSAD is a marvel compare to ClearCase. Never use ClearCase and WSAD, you will regret it. ClearCase server only run on Windows… you see the picture?
    So much people who don’t know what they are talking about in this page, it’s funny.
    Way to fix problems: stop the ranting, start reading documentation.

Comments are closed.