Win a copy of Terraform in Action this week in the Cloud forum!

Ajoy Sharma

Greenhorn
+ Follow
since Feb 24, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ajoy Sharma

Thanks everybody for your help. I will download these tools and go from there.
Also, I would ask the architect what development procedure he follows if he does not store the source code files on a UNIX system from where the actual application runs.

Thanks,
Anand.
17 years ago
Hi,
I am a beginner java programmer and have been entrusted with learning our company's Java application. The architect of the application is not forthcoming in sharing information and so I need help in tracing the source code for the application. I know where the .jar files are stored but I don't know where the actual .java or .class files are stored.

In the .profile file, I see the classpaths set to various jar files. eg.

CLASSPATH=$PATH:/eaid01_apps/merc01/libs/tools/java/drivers/bin/eaiRun.jar

When I view this jar file with command "jar tf eaiRun.jar", it displays all the files under it. Onc such listing is as following:

citi/eai/EAI.class
citi/eai/Interface.class

I want to go to that specific directory on our file system which is storing these .class or.java file. From what I have learned about packages, I should find some folder called 'citi' ,'eai'.
However I am not able to find these folders anywhere on file system. Is there a way I can find where the actual souce code is by looking at the jar files.

Please help. Let me know if you need more information.
thanks,
Anand.
17 years ago
HI,
I have successfully deployed my EJB stateless bean application on weblogic 8.1 server.
iam getting following error that my class unable to access data from EJB bean.
any bodu can give me what is cause behind this error
plz help me.
the error is here:::
Caught an unexpected exception!
java.rmi.UnmarshalException: Could not unmarshal method ID; nested exception is:
java.rmi.UnmarshalException: Method not found: 'dollarToYen(D)'
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
at ConverterBean2_5dab3i_EOImpl_812_WLStub.dollarToYen(Unknown Source)
at ConverterClient.main(ConverterClient.java:120)
Caused by: java.rmi.UnmarshalException: Method not found: 'dollarToYen(D)'
at weblogic.rmi.internal.MethodDescriptor.init(MethodDescriptor.java:155)
at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:265)
at weblogic.rjvm.RJVMImpl.dispatchRequest(RJVMImpl.java:923)
at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:844)
at weblogic.rjvm.ConnectionManagerServer.handleRJVM(ConnectionManagerServer.java:222)
at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:794)
at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:570)
at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:105)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Hi,
Iam New for EJB. I downloades weblogic server8.1 .
I want to deplo my application on this server.
Any body suggest me which software should i use for deploying and creating .ear file.
ur help will be highly appriciated.
thanks,
Ajoy
17 years ago
IHi,
Iam trying to run my first application on WEBLOGIC SERVER 8.1. I have already deploed class file on server.i have already set path for my client jar .
When I use my client run on JDK to access the application.
I got following errror::::
Naming Error: catch block of getInitalContext()
javax.naming.NoInitialContextException: Cannot instantiate
class: weblogic.jndi.WLInitialContextFactory [Root exception is
java.lang.ClassNotFoundException:
weblogic.jndi.WLInitialContextFactory]
from catch block of jMenuItem1
error from NamingException.getMessage()is: Cannot instantiate
class: weblogic.jndi.WLInitialContextFactory

HERE IS THE CODE FOR CLIENT:
import java.awt.event.*;
import javax.rmi.*;
import java.rmi.*;
import javax.swing.event.*;
import javax.swing.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import java.util.Hashtable;
import java.util.Properties;
import javax.ejb.CreateException;
import org.omg.CosNaming.*;
import java.util.Hashtable;
import weblogic.jndi.*;
//import javax.weblogic.jndi.WLInitialContext;
public class Client {
public static void main(String[] args){

Context context= null;
Hashtable h = new Hashtable();

h.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
h.put(Context.PROVIDER_URL,"t3://localhost:7001");

try{
context = new InitialContext(h);
Object obj = context.lookup("ServerObject"); //Server ejb-name

System.out.println(obj.getClass());

ServerHome serverhome =(ServerHome) javax.rmi.PortableRemoteObject.narrow(context.lookup("ServerObject"),ServerHome.class);
Server server = serverhome.create();
String Message = JOptionPane.showInputDialog("Enter Your Message");
JOptionPane.showMessageDialog(null, server.performAction(Message) );

}
catch(Exception e){
JOptionPane.showMessageDialog(null ,"Exception is " +e);
}
}
}
code for bean:::::::
//package EJBExample;
import javax.ejb.*;
import java.rmi.*;
import javax.swing.*;
public class ServerBean implements SessionBean
{
private SessionContext stx;
//In following five methods create is by contract others to be implemented by Container
public void ejbCreate(){}
public void ejbRemove(){}
public void ejbActivate(){}
public void ejbPassivate(){}
public void setSessionContext(SessionContext ctx)
{
17 years ago
Hi ,
My BMP is working and connected with the Database.
But i have problem with CMp.Becuase i dint find any setting where i can use pass word and login name.
could u guide me plz.
Hi,
Iam facing problem that i am unable to deploy simple Conatiner managed bean on J2EE 1.4 server.
And i have also problem to connect Oracle database. I dont find any pane or field where i can put my oracle server database login name, password.
Iam not sure about that i will use ejb1.1 and ejb 2.1.
plz help me.
thanks
Anand
Hi,
Iam facing problem that i am unable to deploy simple Conatiner managed bean on J2EE 1.4 apps server.
And i have also problem to connect Oracle database. I dont find any pane or field where i can put my oracle server database login name, password.
Iam not sure about that i will use ejb1.1 and ejb 2.1.
plz help me.
thanks
Anand
hi ,
thanks for reply.
Iam using sun "J2EE 1.4 Application Server".
Hi,
Iam facing problem that i am unable to deploy simple Conatiner managed bean on J2EE 1.4 server.
And i have also problem to connect Oracle database. I dont find any pane or field where i can put my oracle server database login name, password.
Iam not sure about that i will use ejb1.1 and ejb 2.1.
plz help me.
thanks
Anand
Iam facing this problem .Could some help me to resolve this problem.
Iam struggling from last four days.
plzzzzzzzzzzz help me.
Caught an unexpected exception!
java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
at ConverterClient.main(ConverterClient.java:69)
Code or Clenit:
Client Code is given below:
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import java.util.Properties;
import javax.ejb.CreateException;
// NOT NECESSARY import Converter;
// NOT NECESSARY import ConverterHome;
public class ConverterClient {
public static void main(String[] args) {
try {
Properties env = new Properties();
env.put("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
env.put("java.naming.provider.url", "iiop://localhost:3700");
Context initial = new InitialContext(env);
ConverterHome home =(ConverterHome)PortableRemoteObject.narrow(initial.lookup("MyConverter"),ConverterHome.class);

// Create converter session bean
Converter currencyConverter = home.create();
// Calculate from dollars to yen
double amount = currencyConverter.dollarToYen(100.00);
System.out.println("100 Dollars is " + String.valueOf(amount) + " Yen");
// Calculate from yen to dollars
amount = currencyConverter.yenToEuro(100.00);
System.out.println("100 Yen is " + String.valueOf(amount) + " Dollars");
} catch (Exception ex) {
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
}
}
}

thnsk waiting for ur response.
Anand
Caught an unexpected exception!
java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
at ConverterClient.main(ConverterClient.java:69)
Code or Clenit:
Client Code is given below:
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import java.util.Properties;
import javax.ejb.CreateException;
// NOT NECESSARY import Converter;
// NOT NECESSARY import ConverterHome;
public class ConverterClient {
public static void main(String[] args) {
try {
Properties env = new Properties();
env.put("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
env.put("java.naming.provider.url", "iiop://localhost:3700");
Context initial = new InitialContext(env);
ConverterHome home =(ConverterHome)PortableRemoteObject.narrow(initial.lookup("MyConverter"),ConverterHome.class);

// Create converter session bean
Converter currencyConverter = home.create();
// Calculate from dollars to yen
double amount = currencyConverter.dollarToYen(100.00);
System.out.println("100 Dollars is " + String.valueOf(amount) + " Yen");
// Calculate from yen to dollars
amount = currencyConverter.yenToEuro(100.00);
System.out.println("100 Yen is " + String.valueOf(amount) + " Dollars");
} catch (Exception ex) {
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
}
}
}

thnsk waiting for ur response.
Anand
Thanks For reply.
I try ur logic but iam still unable to resolve this problem.
Could u tell me what i will do next to resolve this problem.
I am struggling from last 4 days. could u help me plz.
when i use ur code
System.out.println(objref.getClass());
this gives out put :::
class com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1

Caught an unexpected exception!
java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
at ConverterClient.main(ConverterClient.java:69)
thnsk waiting for ur response.
Anand
HI Nandini,
Iam still facing this problem. Iam struggling from last 4 days to resolve this problem.plz help me to resolve this problem.
If u find any solution Plz mail me: anand_m_sharma@yahoo.com
Error :
Caught an unexpected exception!
java.lang.ClassCastException at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
at ConverterClient.main(ConverterClient.java:59)
Hi,
Iam facing this problem .Any body can help me to solve this problem.
Caught an unexpected exception!
java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
at ConverterClient.main(ConverterClient.java:50)
Client Code is given below:
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import java.util.Properties;
import javax.ejb.CreateException;
// NOT NECESSARY import Converter;
// NOT NECESSARY import ConverterHome;
public class ConverterClient {
public static void main(String[] args) {
try {
Properties env = new Properties();
env.put("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
env.put("java.naming.provider.url", "iiop://localhost:3700");
Context initial = new InitialContext(env);
ConverterHome home =(ConverterHome)PortableRemoteObject.narrow(initial.lookup("MyConverter"),ConverterHome.class);

// Create converter session bean
Converter currencyConverter = home.create();
// Calculate from dollars to yen
double amount = currencyConverter.dollarToYen(100.00);
System.out.println("100 Dollars is " + String.valueOf(amount) + " Yen");
// Calculate from yen to dollars
amount = currencyConverter.yenToEuro(100.00);
System.out.println("100 Yen is " + String.valueOf(amount) + " Dollars");
} catch (Exception ex) {
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
}
}
}