sathiya moorthy

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

Recent posts by sathiya moorthy

hi all
i m using WAS 6 - express and Rational Software Arechitect IDE,
when i run my simple ejb program with standalone client, i m getting following error

java.lang.ClassCastException: org.omg.stub.java.rmi._Remote_Stub
can any one tell me what the jars should be included?

thanks and regards
sathiyan
[ August 16, 2005: Message edited by: sathiya moorthy ]
19 years ago
Hi all
I m very new to IBM websphere, I m using ibm websphere application server6 and rational application developer.
Now I have deployed my jar successfully and whenever I call my client code I m getting error. Can any one please help me

//*** this is client program

package ejbs;

import java.util.Properties;

import javax.naming.InitialContext;
import javax.naming.Context;
import javax.naming.NamingException;

import ejbs.MyFirst;
import ejbs.MyFirstHome;


public class Client {
public static void main(String str[]) {
try {
Properties props = System.getProperties();
System.out.print("1");
props.put (Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
System.out.print("2");
props.put(Context.PROVIDER_URL,"iiop://localhost:2809");
System.out.print("3");
Context context = new InitialContext(props);
System.out.print("4");
MyFirstHome myhome =(MyFirstHome)context.lookup("ejb/ejbs/MyFirstHome");
MyFirst myremote=myhome.create();
String s=myremote.getMSG("from client side");
System.out.print("the total string" +s);
} catch (Exception e) {
e.printStackTrace();
}

}

}
///**** and error is
123May 27, 2005 2:50:47 PM com.ibm.ws.naming.util.CommonHelpers
WARNING: jndiproviderProperties
May 27, 2005 2:50:48 PM com.ibm.ws.naming.util.CommonHelpers
WARNING: jndiproviderProperties
May 27, 2005 2:50:48 PM com.ibm.websphere.naming.WsnInitialContextFactory
WARNING: noInitCtxFactoryImpl
javax.naming.ConfigurationException: The property com.ibm.ws.naming.wsn.factory.initial is not set. The most likely cause is that the jar which contains the file com/ibm/websphere/naming/jndiprovider.properties cannot be found by the class loader.
at com.ibm.websphere.naming.WsnInitialContextFactory.init_implClassCtor(WsnInitialContextFactory.java:194)
at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(WsnInitialContextFactory.java:112)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:675)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:257)
at javax.naming.InitialContext.init(InitialContext.java:233)
at javax.naming.InitialContext.<init>(InitialContext.java:209)
at ejbs.Client.main(Client.java:23)
// ***


Thanks and regards
sathiyan
19 years ago
int a[] = {1, 2, 3};
int b[] = {4, 5, 6};
int c[] = {7, 8, 9};

Object arr[] = new Object[4];
arr[0] = a;
arr[1] = b;
arr[2] = c;
i have arrays like this, now i want to print the values of array a,b,c from the array arr
can any one help me please
19 years ago
hello
can any one please explain me the following doubts
1) what's the use of synchronizing the servlet's service method?
2) what's the difference between single thread model and synchronzied service method?

thanks in advance
sathiyan.v
19 years ago
static { // static block
static int k=100;
}
can any one help me please?
19 years ago
i m not getting your answer, let me tell again
public static void main(String[] args) {
int a=2;
float b=3.45f;
a=(int)b*a;
System.out.println("val....."+a);
}
this code working fine but if
do this way
a=(int)a*b
i m getting compile error why?
any one explain me please?
19 years ago
public static void main(String[] args) {
int a=2;
float b=3.45f;
a=(int)b*a; // this is working
// a=(int)a*b; // it's not working
System.out.println("val....."+a);

}
when i compile this code , i getting error as loss of precision
a=(int)a*b; // it's not working

and when compile like this

a=(int)b*a;

it's works fine
what's different?
any one explain me plz?
second question can i have static variable inside the static block?
like
static{
static int k=100;
}a=(int)b*a; a=(int)a*b;
19 years ago
i have jtabbedpane and tabplacement is left ,
now i need the tab(the place i have the tab name only) should round rectangle instead of rect
and the next is i need to set the gap between tabs
can u help me please?
20 years ago
When run this program i am getting thread count =2, any tell what are those threads and how it's two?

public class thread1 {
public thread1() {
}
public static void main(String[] args) {
Thread t=Thread.currentThread();
System.out.println("Current thread "+t);
t.setName("my thread");
System.out.println("count "+t.activeCount());
}
}
System.out.println("count "+t.activeCount());

[ EJFH: Edited for spelling ]
[ January 03, 2005: Message edited by: Ernest Friedman-Hill ]