• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Urgent....Runtime error when running client

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
---------Using J2EE Server on winXP-------
-------Urgent....Runtime error when running client-------
import javax.ejb.EJBObject;
import java.rmi.RemoteException;
public interface Temperature extends EJBObject
{
public double FahrenheitToCelsius(double degree) throws RemoteException;
}
-------------------------
import java.io.Serializable;
import java.rmi.RemoteException;
import javax.ejb.CreateException;
import javax.ejb.EJBHome;
public interface TemperatureHome extends EJBHome
{
Temperature create() throws RemoteException, CreateException;
}
------------------------
import java.rmi.RemoteException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
public class TemperatureEJB implements SessionBean
{
public double FahrenheitToCelsius(double F)
{
double c;
c=((F-32)*5)/9;
return c;
}
public TemperatureEJB(){}
public void ejbCreate() {}
public void ejbRemove() {}
public void ejbActivate() {}
public void ejbPassivate() {}
public void setSessionContext(SessionContext sc) {}
}
-----------------Client Code--------------------
import javax.naming.Context;
import java.io.*;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
/*import Temperature;
import TemperatureHome;*/
public class TemperatureClient
{
public static void main(String args[])
{
TemperatureHome home;
BufferedReader stdin;
try
{
//Locate the home interface
Context initial=new InitialContext();
Object objref=initial.lookup("MyTemperature");
home=(TemperatureHome)PortableRemoteObject.narrow(objref,TemperatureHome.class);
//create the remote interface instance
Temperature degreeConverter=home.create();
try
{
double F=0;
while(F!='q')
{
stdin=new BufferedReader(new InputStreamReader(System.in));
System.out.print("\n\nEnter the temperature in Fahrenheit(Type 'q' to quit):");
F=Double.parseDouble(stdin.readLine());
//invoke a business methods
double Cel=degreeConverter.FahrenheitToCelsius(F);
System.out.println("The temperature in Celsius: " + String.valueOf(Cel));
}
}catch(Exception e){System.out.println("Thank you!"+e);}
degreeConverter.remove();
}
catch(Exception ex)
{
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
}
}
}
-------------
----------------Batch file to run the client------------------
set CPATH=.;c:\j2ee\j2ee.jar;TemperatureAppClient.jar
java -Dorg.CORBA.ORBInitialHost=192.168.1.5 -classpath "%CPATH%" TemperatureClient
---------------RUNTIME ERROR---------------
C:\Temperature>java -Dorg.CORBA.ORBInitialHost=192.168.1.5 -classpath ".;c:\j2ee
\j2ee.jar;TemperatureAppClient.jar" TemperatureClient
java.io.FileNotFoundException: c:\config\security.properties (The system cannot
find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:56
)
at com.sun.enterprise.iiop.POAEJBORB.<clinit>(POAEJBORB.java:83)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at org.omg.CORBA.ORB.create_impl(ORB.java:295)
at org.omg.CORBA.ORB.init(ORB.java:336)
at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:140)
at com.sun.enterprise.util.ORBManager.init(ORBManager.java:69)
at com.sun.enterprise.naming.SerialInitContextFactory.<init>(SerialInitC
ontextFactory.java:35)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
49)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at TemperatureClient.main(TemperatureClient.java:18)
java.io.FileNotFoundException: c:\config\ejb.properties (The system cannot find
the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:56
)
at com.sun.enterprise.iiop.J2EEInitializer.<init>(J2EEInitializer.java:5
7)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at com.sun.corba.ee.internal.Interceptors.PIORB.registerORBInitializers(
PIORB.java:373)
at com.sun.corba.ee.internal.Interceptors.PIORB.parseProperties(PIORB.ja
va:343)
at com.sun.corba.ee.internal.TxPOA.TxPIORB.parseProperties(TxPIORB.java:
116)
at com.sun.corba.ee.internal.corba.ORB.set_parameters(ORB.java:449)
at com.sun.corba.ee.internal.POA.POAORB.set_parameters(POAORB.java:152)
at com.sun.corba.ee.internal.Interceptors.PIORB.set_parameters(PIORB.jav
a:332)
at org.omg.CORBA.ORB.init(ORB.java:337)
at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:140)
at com.sun.enterprise.util.ORBManager.init(ORBManager.java:69)
at com.sun.enterprise.naming.SerialInitContextFactory.<init>(SerialInitC
ontextFactory.java:35)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
49)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at TemperatureClient.main(TemperatureClient.java:18)
Warning: unable to read transaction.interoperability config property
java.io.FileNotFoundException: c:\config\security.properties (The system cannot
find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:56
)
at com.sun.enterprise.iiop.security.SecurityMechanismSelector.<clinit>(S
ecurityMechanismSelector.java:103)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.getEndPointInfo(IIOPSSLS
ocketFactory.java:213)
at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(Connecti
onTable.java:73)
at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(Connecti
onTable.java:68)
at com.sun.corba.ee.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:7
0)
at com.sun.corba.ee.internal.corba.InitialNamingClient.locateObject(Init
ialNamingClient.java:769)
at com.sun.corba.ee.internal.corba.InitialNamingClient.getIORUsingHostIn
fo(InitialNamingClient.java:597)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveCorbaloc(I
nitialNamingClient.java:573)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingORBIn
itRef(InitialNamingClient.java:544)
at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialRefe
rences(InitialNamingClient.java:1080)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_r
eferences(InitialNamingClient.java:981)
at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.ja
va:2358)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.jav
a:55)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:154
)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at TemperatureClient.main(TemperatureClient.java:19)
Caught an unexpected exception!
java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: No
at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.mapSystemExceptio
n(ShutdownUtilDelegate.java:87)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
at _TemperatureHome_Stub.create(Unknown Source)
at TemperatureClient.main(TemperatureClient.java:23)
Caused by: org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed:
No
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at com.sun.corba.ee.internal.iiop.messages.ReplyMessage_1_2.getSystemExc
eption(ReplyMessage_1_2.java:93)
at com.sun.corba.ee.internal.iiop.ClientResponseImpl.getSystemException(
ClientResponseImpl.java:108)
at com.sun.corba.ee.internal.POA.GenericPOAClientSC.invoke(GenericPOACli
entSC.java:136)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
... 2 more
[ January 16, 2004: Message edited by: dimpsonu arora ]
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

java.io.FileNotFoundException: c:\config\security.properties (The system cannot find the path specified)

Does this file exist in your filesystem?
Is that file path something you have specified somewhere (maybe with "-Djava.security.policy=c:\config\security.properties")?
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Security.properties should exist in the folder {j2sdkee_home}\config..In your case copy this to the mentioned folder in the error message
reply
    Bookmark Topic Watch Topic
  • New Topic