Chee

Greenhorn
+ Follow
since Jan 23, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Chee

Hi All,
This referes to the StartupClass tag attributes.
In weblogic700 there is an MBean reference called LoadBeforeAppDeployments. The documentation says that if this value is true then the Startup class will be invoked before all the applications and if its false then it will be invoked after all the applications are deployed.
This doesn't work properly irrespective of the value it takes i.e true or false the Startup class is always invoked prior to any application deployment.
Did anyone have a solution for this.
Thanks
Chee.
21 years ago
Hi..
You are using the wrong intial context factory. Pl refer any of samples.
Rgds
Johnson

Originally posted by Venkat Ammisetty:
Hai
Can any one tell me what could be the error in the following code
Hashtable ht2=new Hashtable();
ht2.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.Websphere.naming.WsnInitialContextFactory");
ht2.put(Context.PROVIDER_URL,"iiop://localhost");
Context cxt=new InitialContext(ht2);
I am getting the following exception
[01.09.20 15:03:32:090 PDT] 6130ab1c WebGroup X Servlet Error: Cannot instantiate class: com.ibm.Websphere.naming.WsnInitialContextFactory: javax.naming.NoInitialContextException: Cannot instantiate class: com.ibm.Websphere.naming.WsnInitialContextFactory. Root exception is java.lang.ClassNotFoundException: com.ibm.Websphere.naming.WsnInitialContextFactory
Begin backtrace for rootCause
java.lang.ClassNotFoundException: com.ibm.Websphere.naming.WsnInitialContextFactory
Is any thing wrong in Initial Context Factory?
Thank's in advance
Venkat


23 years ago
Dear Pran
First n Foremost you need to read the naming policy of Java ranch. Else your ID will be disabled. Please take care of that first.
Do go through the previous postings in this forum it has all your answers..
It will be difficult to put here the entire procedure as answer for your question..
23 years ago
Dear Aushutosh
It's right that WebSphere need to run as a service on your machine hence there is no separate version for 98. The other question about VAJ is true that VAJ & WAS goes hand in hand as you can deploy EJB's right from VAJ..and it also a very good debuger tool for your code..
Last but not least you can upgrade your m/c to Win'2000 any version ..WAS is available for all..
All the best..
Cheers..Johnson
23 years ago
HI ALL
Can anyone who has cleared the architect exam tell me what level or depth of EJB have to be covered before appearing for this exam. Do I have to study both 1.0 & 1.1 specification.
Are the questions are from the specification or a practical scenario where in one need to give the solution to it.
Thanks in advance
Cheers..Johnson
Hi Daman,
That was a really silly error..anyway you got it..Congrats..Will really help many in the future..
Cheers..Johnson
23 years ago
Hi
Your code seems to be Ok..I hope you know when do you get a NameNotFound exception. I want to know how you r using your servlet ie by registering it with the server or just calling it through the applet. I would advise you to just run a simple servlet which lookup your bean and excecute the remote methods. If this works then everything will work.
I have invoked an EJB through servlet as well as JSP..So no problem with that.
All the best..Do let me know about your devmts
Cheers..Johnson
23 years ago
Hi Mary,
I have the answer for you....
First of all the lookup you are doing is wrong.
When you are looking up through a servlet you shouldn't use PortableRemoteObject.narrow ..You can directly get the home object through JNDI Name.
From your code :
Context ctx = getInitialContext();
Object obj = ctx.lookup("sample");
sampleHome home = (sampleHome) PortableRemoteObject.narrow(obj, sampleHome.class);
sampleRemote remote = home.create();
s = remote.say("Mary");
Modified Code:
Context ctx = getInitialContext();
sampleHome home = (sampleHome) ctx.lookup("sample");
sampleRemote remote = home.create();
s = remote.say("Mary");
The second reason for your exception ie classCastException is improper setting of your classpath or the Home & Remote class is not availabe in your package which you have stored in your \\weblogic\myserver\servletclasses folder
Cheers..Johnson
Hi
The problem which you are facing is just for lookup. The way the bean has to be looked up through a Standalone client and servlet is different. So Do go through the code below..u"ll understand the diffrence.
Client -ie Your Applet Code.
Properties p=new Properties();
p.put("You know what to put here")
Context ctx=new InitialContext(p);
Object obj=ctx.lookup("JNDI Name");
Home h=(Home)portableRemoteObject.narrow(obj,Home.class);
Servlet Code - Where I think you have made a mistake.
Properties p=new Properties();
p.put("You know what to put here")
Context ctx=new InitialContext(p);
Home h=(Home)ctx.lookup("JNDI Name");
If You don't get it then post your query with your code.
Cheers..Johnson


[This message has been edited by Johnson Irudayaraj (edited February 14, 2001).]
23 years ago
Hi All,
Can anyone explain me what is WLM wrt Deployment of EJB's in WebSphere Application Server.
Cheers..Johnson
[This message has been edited by Johnson Irudayaraj (edited February 14, 2001).]
23 years ago
Hi
It's not at all possible. Let us assume that you have extended a bean class A into bean class b.. In bean class b you"ll be writing all the mandatory methods which means that you are overridding all the mandatory methods in class A.. Hence the reason.
This was just one ex for not extending..There are many more..
Cheers..Johnson
Hi
You should understand the diffrence between a Sub directory and a JAR file.
First n Foremost..Weblogicaux.jar is itself a jar file which holds all the class files need to develop an EJB..Just open it and see.
When you set the classpath to \\weblogic\lib it does not mean that the classfiles can be extracted automatically and referenced in your EJB, Hence we explicitly set the classpath for this particular Jar file.
Cheers Johnson
Hi
First n Foremost we have a diffrent forum for IBM WebSphere..You can post messages there..
Yes I do use IBM Websphere3.5 on NT Platform.. I didnot understand what level or in What context you are asking these question..
As far as performance is concerned It does take lot of Memory resource on NT platform.. and It's implemented on EJB1.0 specification with JDK1.2.2..
If you need any further clarifications..Do mail me \reply to this.
Cheers..Johnson
23 years ago
Hey
Check it out in this link...I have answered there...
http://www.javaranch.com/ubb/Forum46/HTML/000005.html
Johnson
23 years ago
Hi
Set your Classpath properly..It works../go to the bin dir of J2sdkee1.2 folder through command prompt and run setenv and then from the same instance of command prompt type j2ee -verbose it"ll work...
Cheers..Johnson