• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Is it a BUG in WSSAD 5.0 ... strange behaviour.

 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,
I am not able to understand the behaviour of WSSAD 5.0 while compiling jdk1.4 apis.
I imported following packages ..
java.util.logging.*
java.nio.*;
Program compiled wiht no errors.
When i wrote Excepiton class which has been modified and added a new Constructor my class didnt compile and got an error message. ......undefine constructor.
I have already discussed some points regarding JDK1.4 in my precivious post but still not got anuswer what is required.
see here
my post

here is the complete code which didnt compile .
**********************************
( this code is working on 4.0.3)
import java.util.logging.*;
import java.nio.*;
import java.nio.channels.Pipe;
/**
* @author awais
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
public class JDKTest {
public static void main(String[] args) {


Logger log=null;
Pipe obj=null;

Exception e=new Exception(new Exception("Inherited by Throable"));
//i got error over here
}
}
**********************************************
Regards
Awais Bajwa
[ February 06, 2003: Message edited by: Awais Bajwa ]
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This sounds like a classloader issue. What is happening is that the original Exception class is first on the classloader, so that the JVM is not even seeing your new Exception class.
I have to ask this question -- WHY do you need to do this? Will it be so hard to simply NOT use exception chaining in your application?
And another basic question -- are you writing this to run inside WebSphere (e.g. are you writing a J2EE app) or not? If you are, then just DO NOT USE Exception chaining and everything will be fine (yes, it's a rewrite, but darn it, you should find out what version of the JDK your application is going to run on before you write it...). If it isn't going to be a WebSphere application (which I can't tell from your posts) then you just need to use the JDK 1.4 JDK instead of the built-in JDK. There is lots of help in the InfoCenter on doing that...
Kyle
 
Awais Bajwa
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kyle
Actually my whole application is based on the exception chaining concept .I think whatever type of applicatin i am running ,it is not a solution to cut out Exception chaining if it is officialy allowd to use JKD1.4 in WSSAD 5.0(Not talking about Test Environment ).
May i cosider it as a Bug of WSSAD class loader ?? ...kinldy tell me about the Infocenter URL and just for my knowledge where to submit Bugs for IBM tools
Regard
Awais Bajwa
 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Awais, please answer my question -- is this application supposed to run on WebSphere or not? In other words, is this a J2EE application or a completely standealone Java application?
If it is a J2EE application, then there is no way to make it work with JDK 1.4. Period, end of story. It's not a bug, it's as designed.
If it is not supposed to be a J2EE application (e.g. you are simply building it inside a Java project in WSAD) then setting it up to use JDK 1.4 is easy. First go to Window>Preferences, choose "Java" and click on "Installed JRE's". Add the JDK 1.4 JRE (Which you will have to have separately installed). Check the new JDK 1.4 as the "Default" JDK.
Now you can run your Application (I just ran what you posted and it worked fine).
Kyle
 
Awais Bajwa
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kyle
My Application is a J2EE applicaion but i just want to use WSSAD to make some changes in the application and i imported this application as a WAR file and i eventually have to deploy this application in Tomcat whiich supports jdk 1.4 .
So my intend was development of the code inside WSSAD and not to use Websphere for development .
I did perform the same steps to change the default jdk ... window ---->prefernces---> default JDK ... and additionaly i right click on my project in the web prespective went to properties and assigned jdk 1.4 to the current project too. But still i am getting the same error .and I think you are right that this is the Class Loader Probelm as ... java.util.logging package is recognized but Exception Constructor is not .
Keep in mind i am using WSSAD 5.0 trial early release .
Anyway thaks a lot for your help .
Awais Bajwa
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic