Help: Problem in running a simple EJB client
Hi All,
I have just started learning EJB and I am facing an issue in running a client for the EJB I developed (a "Hello World" EJB)
I have deployed my application in Sun's reference implementation of j2ee server. I have the following client code through which I intend to access EJB methods
// EJB client code in main()
Context ctx = new InitialContext();
Object hwobj = ctx.lookup("HelloWorldApp");
HelloWorldHome hworldHome = (HelloWorldHome)
PortableRemoteObject.narrow(hwobj,HelloWorldHome.class); // exception here
HelloWorld hworld = hworldHome.create();
String msg = hworld.sayHelloWorld();
System.out.println(msg);
When I am running my client I am getting the following exception. Can anyone tell me why ?
java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at HelloWorldClient.main(HelloWorldClient.java:13)
Thanks
Ratheesh
* I found the solution for this . Add j2ee.jar and Client jar returned by deploytool [ if we check return client jar ] to classpath when running client .
* Then I got CORBA_NO_PERMISSION error . After searching in forum , I found the solution. Posting
Forum Home > Enterprise JavaBeans
Topic: [ J2EE RI Server ] CORBA NO_PERMISSION 0
Welcome ratheeshpai!
Search Forum
Not watching this topic.
This topic has 4 replies on 1 page (Most recent message: Nov 19, 2002 7:59 AM)
[ J2EE RI Server ] CORBA NO_PERMISSION 0
Author: NicholasHsiao Oct 28, 2001 5:51 AM
Hi,
I was trying to deploy one simple session bean into J2EE RI Server. It works fine. And I wrote one client to access this session bean, it show me
java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
org.omg.CORBA.NO_PERMISSION: minor code: 0 completed: No
Context ic = null;
try
ic = new InitialContext();
catch(Exception e)
System.out.println("1: "+e.toString());
This exception is happend when I try to lookup the jndi name
This error message is happend only on J2EE 1.3 (1.3_01) . If I downgrade to J2EE 1.3Beta or even 1.2, everything would be okay. Any one know how to solve such problem ??
Re: [ J2EE RI Server ] CORBA NO_PERMISSION 0
Author: cdunn5
In Reply To: [ J2EE RI Server ] CORBA NO_PERMISSION 0 Oct 31, 2001 10:04 PM
Reply 1 of 4
hi,
I don't know the solution but I have the exact same problem. I see your message was posted in October, have you found any solutions yet?
Re: [ J2EE RI Server ] CORBA NO_PERMISSION 0
Author: scottiep
In Reply To: [ J2EE RI Server ] CORBA NO_PERMISSION 0 Nov 22, 2001 11:21 AM
Reply 2 of 4
Da:Frederik Hansen ([email protected])
Message 2 in thread
Soggetto:Re: J2EE - NO_PERMISSION
Newsgroups:dk.edb.programmering.java
View this article only
Data:2001-11-10 03:32:12 PST
For at svare p� mit eget sp�rgsm�l: Access and Security Issues Q1: Some applications that ran under J2EE SDK 1.3
beta 2 stop running under the 1.3 FCS release with the
following message: java.rmi.AccessException: CORBA
NO_PERMISSION 0 No. Why does this happen and what
can be done about it? When your application ran under the 1.3 beta 2
version of the reference implementation (RI), security permissions may
not have
been checked. For example, the beta 2 RI allowed
calls to enterprise beans that required username-password permission,
even
when the client provided no username-password
information. With 1.3 FCS release, the J2EE SDK became strict
about checking adherence to the security policies of J2EE components. How can you make your application run under the
FCS release? 1.If you don't want security checks, do the
following: Use the deploytool to build a deployment
descriptor that does not require a strict security policy: Under the Security screen of the EJB wizard
or the Security tab of the EJB inspector in deploytool, click
"Deployment
Settings..". Under the box "Client
Authentication", make sure "Support Client Choice" is checked instead of
"Certificate"
or "Password". 2.To require the application pass security
checks to run, do the following: When an enterprise bean specifies
"Certificate" or "Password" as the method of Client Authentication, use
a J2EE
application client, instead of a stand-alone
Java application, to access the bean. You will need to login as a valid
J2EE
user.
By : scottiep
Thanks
Ratheesh
Similar Messages
-
I have a problem when running my own EJB as a TUXEDO service using WTC.
Hello,
I have a problem when running my own EJB as a TUXEDO service using WTC. I am using TUXEDO 8.1 and WL 9.1.
When I am trying to run my own EJB as a TUXEDO service error appears.
TPENOENT(6):0:0:TPED_MINVAL(0):QMNONE(0):0:Could not find service TOUPPER
at weblogic.wtc.gwt.WTCService.getImport(WTCService.java:4988)
at weblogic.wtc.gwt.TuxedoConnection.getImport(TuxedoConnection.java:303)
at weblogic.wtc.gwt.TuxedoConnection.tpcall(TuxedoConnection.java:1302)
at examples.MyTestSessionBean.Toupper(MyTestSessionBean.java:102)
at examples.TestSessionBean_knby6k_EOImpl.Toupper(TestSessionBean_knby6k_EOImpl.java:61)
at net.roseindia.web.servlets.SessionTestServlet.doGet(SessionTestServlet.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3153)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
e8
10
java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NullPointerException
at weblogic.ejb.container.internal.EJBRuntimeUtils.throwRemoteException(EJBRuntimeUtils.java:95)
at weblogic.ejb.container.internal.BaseEJBObject.handleSystemException(BaseEJBObject.java:713)
at weblogic.ejb.container.internal.BaseEJBObject.handleSystemException(BaseEJBObject.java:681)
at weblogic.ejb.container.internal.BaseEJBObject.postInvoke1(BaseEJBObject.java:447)
at weblogic.ejb.container.internal.StatelessEJBObject.postInvoke1(StatelessEJBObject.java:72)
at weblogic.ejb.container.internal.BaseEJBObject.postInvokeTxRetry(BaseEJBObject.java:374)
at examples.TestSessionBean_knby6k_EOImpl.Toupper(TestSessionBean_knby6k_EOImpl.java:75)
at net.roseindia.web.servlets.SessionTestServlet.doGet(SessionTestServlet.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3153)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
Caused by: java.lang.NullPointerException
at examples.MyTestSessionBean.Toupper(MyTestSessionBean.java:130)
at examples.TestSessionBean_knby6k_EOImpl.Toupper(TestSessionBean_knby6k_EOImpl.java:61)
... 15 more
Any clue on this.
With Regards,
MVSIf you are trying to create a Tuxedo service in Java using WTC you need to develop an EJB that implements the TuxedoService interface and register its home in JNDI so WTC can look it up. Once that is done you can then export the service to a remote domain in the WTC configuration.
Regards,
Todd Little
Oracle Tuxedo Chief Architect -
Problem in running a simple session bean in JOnAS
Hi folks ,
I just started to learn J2EE using Netbeans(5.5) and JOnAS (4.8.4 ) . I
tried to run a simple session bean(stateless)
invoked through client application. I successfully deployed in jonas using Netbeans (5.5) but i can't able to successfully run it.
Output i got when i run client application :
==========================
init:
deps-jar:
init:
deps-jar:
compile:
library-inclusion-in-archive:
dist:
compile:
run:
Feb 19, 2007 11:07:08 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at SimpleSessionClient.Main.main(Main.java:34)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
... 12 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
... 13 more
Feb 19, 2007 11:07:10 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at SimpleSessionClient.Main.main(Main.java:34)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
... 12 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
... 13 more
Feb 19, 2007 11:07:11 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at SimpleSessionClient.Main.main(Main.java:34)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
... 12 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
... 13 more
Feb 19, 2007 11:07:13 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at SimpleSessionClient.Main.main(Main.java:34)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
... 12 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
... 13 more
Feb 19, 2007 11:07:14 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at SimpleSessionClient.Main.main(Main.java:34)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
... 12 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
... 13 more
Feb 19, 2007 11:07:15 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at SimpleSessionClient.Main.main(Main.java:34)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
... 12 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
... 13 more
Feb 19, 2007 11:07:17 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at SimpleSessionClient.Main.main(Main.java:34)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
... 12 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
... 13 more
Feb 19, 2007 11:07:18 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at SimpleSessionClient.Main.main(Main.java:34)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
... 12 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
... 13 more
Feb 19, 2007 11:07:19 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at SimpleSessionClient.Main.main(Main.java:34)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
... 12 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
... 13 more
Feb 19, 2007 11:07:20 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at SimpleSessionClient.Main.main(Main.java:34)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
... 12 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
... 13 more
Feb 19, 2007 11:07:22 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at SimpleSessionClient.Main.main(Main.java:34)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
... 12 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
... 13 more
Feb 19, 2007 11:07:23 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at SimpleSessionClient.Main.main(Main.java:34)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
... 12 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(NativThere is a ClassDefNotFound Exception, this means that a class used (probably by the corba marshalling stuff) cannot be located. You'll need to add these classes to the client's CLASSPATH.
Usually a client-jar file can be created or is provided by the j2ee server. If you're using the sun-wapp-server then it is done this way:
- deploy the beans to the server (asadmin deploy)
- create the client-stubs (asadmin client-stubs)
- add the created client-stubs to the clients class path.
I don't remember the exact commands for asadmin. Plz check the help. (asadmin help)
In JBOss youll have to add jboss-all.jar to the client's classpath. It depends on the j2ee server you use. -
Problem in developing a simple ejb app
Hi readers,
i am new to ejb technology, so have doubt in developing and deploying a simple ejb application
i am using EJB 2.0, JBOSS 4.0 , eclipse 3.2 and java 1.5
i searched in the net , got through many materials that can guide to develop one of it.
all are using higher versions of the above, i mean, using ejb 3.0 or using xdoclet etc.
i am need of material which guides me to develop and deploy the ejb application using the same versions of softwares step by step.
please help me in thisHi readers,
i am new to ejb technology, so have doubt in developing and deploying a simple ejb application
i am using EJB 2.0, JBOSS 4.0 , eclipse 3.2 and java 1.5
i searched in the net , got through many materials that can guide to develop one of it.
all are using higher versions of the above, i mean, using ejb 3.0 or using xdoclet etc.
i am need of material which guides me to develop and deploy the ejb application using the same versions of softwares step by step.
please help me in this -
Problem in running a simple html program in netbeans 5.5.1
Dear all
when i am running a simple html program in netbeans 5.5.1, it is not showing the result. In url address is showing defferent. such as
http://localhost 8084/... while i need http://mydocument and setting/...
so i want to set the default address. from where shound i set it, so that in url address should come right.
thanks
From
Rajeev SarawatHi cliff,
Worked as per ur Suggestion , the .tld file had
<!DOCTYPE taglib tag, I removed it, it is still not working , I m using tomcat 3.2
I tried to run the simpletag example given with Tomcat it runs, but when I copied that example to my webapps/TagViews direcotry and corrected the package and made necessary changes in web.xml kept in
WEB-INF direcotry , it gives the same error,
Is there any requirement to make a war file for taglib to run or some thing like that, or is there any other requirement after making
1) The .class file kept in install_dir/webapps/TagViews/WEB-INF/classes/Tagbeans
2) The .tld file kept in
install_dir/webapps/TagViews/WEB-INF/jsp/
3) Made cahnges in web.xml kept in
install_dir/webapps/TagViews/WEB-INF/
4) Made the jsp file kept in
install_dir/webapps/TagViews/jsp/
After doing this I restarted the tomcat server and then tried http://localhost:8080/TagViews/jsp/myTag.jsp -
HELP - problem in running SSLSocket client/server application
Hi,
I want to create a SSLSocket based client/server application for this i have used EchoServer.Java and EchoClient.Java files. Both files are successfully compiled and when i ran EchoServer it throws an exception "Server certificate not found".
I want to make a complete auto-controlled client/server application which will automatically gets certificate and all configuration itself from program because i will use both client and server application in as a servlet part.
I did as per following instructions:
-Create a keystore to hold the private and public keys for the server. e.g.
keytool -genkey -keystore mykeystore -alias "myalias" -keypass "mysecret"
-Export the X509 certificate from this store
keytool -export -alias "myalias" -keystore mykeystore -file mycertfile.cer
-Import this into a trustStore for the client
keytool -import -alias "myalias" -keystore mytruststore -file mycertfile.cer
-Run the server using the keystore
java -Djavax.net.ssl.keyStore=mykeystore -Djavax.net.ssl.keyStorePassword="mysecret" EchoServer
-Run the client using the truststore
java -Djavax.net.ssl.trustStore=mytruststore -Djavax.net.ssl.trustStorePassword="mysecret" EchoClient localhost
EchoServer.Java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.Socket;
import javax.net.ssl.SSLServerSocket;
import javax.net.ssl.SSLServerSocketFactory;
public class EchoServer {
public static int MYECHOPORT = 8189;
public static void main(String argv[]) {
try {
SSLServerSocketFactory factory =
(SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
SSLServerSocket sslSocket =
(SSLServerSocket) factory.createServerSocket(MYECHOPORT);
while (true) {
Socket incoming = sslSocket.accept();
new SocketHandler(incoming).start();
} catch (IOException e) {
e.printStackTrace();
System.exit(30);
class SocketHandler extends Thread {
Socket incoming;
SocketHandler(Socket incoming) {
this.incoming = incoming;
public void run() {
try {
BufferedReader reader =
new BufferedReader(new InputStreamReader(incoming.getInputStream()));
PrintStream out =
new PrintStream(incoming.getOutputStream());
boolean done = false;
while (!done) {
String str = reader.readLine();
if (str == null)
done = true;
else {
System.out.println("Read from client: " + str);
out.println("Echo: " + str);
if (str.trim().equals("BYE"))
done = true;
incoming.close();
} catch (IOException e) {
e.printStackTrace();
EchoClient.Java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
public class EchoClient {
public EchoClient(){}
public static final int MYECHOPORT = 8189;
public static void main(String[] args) {
/*if (args.length != 1) {
System.err.println("Usage: Client address");
System.exit(1);
String sAddress="localhost";
InetAddress address = null;
try {
//address = InetAddress.getByName(args[0]);
address = InetAddress.getByName(sAddress);
} catch (UnknownHostException e) {
e.printStackTrace();
System.exit(2);
Socket sock = null;
try {
sock = new Socket(address, MYECHOPORT);
} catch (IOException e) {
e.printStackTrace();
System.exit(3);
SSLSocketFactory factory =
(SSLSocketFactory) SSLSocketFactory.getDefault();
SSLSocket sslSocket = null;
try {
sslSocket =
(SSLSocket) factory.createSocket(sock, args[0], MYECHOPORT, true);
} catch (IOException e) {
e.printStackTrace();
System.exit(3);
BufferedReader reader = null;
PrintStream out = null;
try {
reader = new BufferedReader(new InputStreamReader(sslSocket.getInputStream()));
out = new PrintStream(sslSocket.getOutputStream());
} catch (IOException e) {
e.printStackTrace();
System.exit(6);
String line = null;
try {
// Just send a goodbye message, for testing
out.println("BYE");
line = reader.readLine();
} catch (IOException e) {
e.printStackTrace();
System.exit(6);
System.out.println(line);
System.exit(0);
} // Client
Can anybody will please help me to solve my problem i am using JDK1.4.2_07
Thanks in advance.Hi,
I want to create a SSLSocket based client/server application for this i have used EchoServer.Java and EchoClient.Java files. Both files are successfully compiled and when i ran EchoServer it throws an exception "Server certificate not found".
I want to make a complete auto-controlled client/server application which will automatically gets certificate and all configuration itself from program because i will use both client and server application in as a servlet part.
I did as per following instructions:
-Create a keystore to hold the private and public keys for the server. e.g.
keytool -genkey -keystore mykeystore -alias "myalias" -keypass "mysecret"
-Export the X509 certificate from this store
keytool -export -alias "myalias" -keystore mykeystore -file mycertfile.cer
-Import this into a trustStore for the client
keytool -import -alias "myalias" -keystore mytruststore -file mycertfile.cer
-Run the server using the keystore
java -Djavax.net.ssl.keyStore=mykeystore -Djavax.net.ssl.keyStorePassword="mysecret" EchoServer
-Run the client using the truststore
java -Djavax.net.ssl.trustStore=mytruststore -Djavax.net.ssl.trustStorePassword="mysecret" EchoClient localhost
EchoServer.Java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.Socket;
import javax.net.ssl.SSLServerSocket;
import javax.net.ssl.SSLServerSocketFactory;
public class EchoServer {
public static int MYECHOPORT = 8189;
public static void main(String argv[]) {
try {
SSLServerSocketFactory factory =
(SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
SSLServerSocket sslSocket =
(SSLServerSocket) factory.createServerSocket(MYECHOPORT);
while (true) {
Socket incoming = sslSocket.accept();
new SocketHandler(incoming).start();
} catch (IOException e) {
e.printStackTrace();
System.exit(30);
class SocketHandler extends Thread {
Socket incoming;
SocketHandler(Socket incoming) {
this.incoming = incoming;
public void run() {
try {
BufferedReader reader =
new BufferedReader(new InputStreamReader(incoming.getInputStream()));
PrintStream out =
new PrintStream(incoming.getOutputStream());
boolean done = false;
while (!done) {
String str = reader.readLine();
if (str == null)
done = true;
else {
System.out.println("Read from client: " + str);
out.println("Echo: " + str);
if (str.trim().equals("BYE"))
done = true;
incoming.close();
} catch (IOException e) {
e.printStackTrace();
EchoClient.Java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
public class EchoClient {
public EchoClient(){}
public static final int MYECHOPORT = 8189;
public static void main(String[] args) {
/*if (args.length != 1) {
System.err.println("Usage: Client address");
System.exit(1);
String sAddress="localhost";
InetAddress address = null;
try {
//address = InetAddress.getByName(args[0]);
address = InetAddress.getByName(sAddress);
} catch (UnknownHostException e) {
e.printStackTrace();
System.exit(2);
Socket sock = null;
try {
sock = new Socket(address, MYECHOPORT);
} catch (IOException e) {
e.printStackTrace();
System.exit(3);
SSLSocketFactory factory =
(SSLSocketFactory) SSLSocketFactory.getDefault();
SSLSocket sslSocket = null;
try {
sslSocket =
(SSLSocket) factory.createSocket(sock, args[0], MYECHOPORT, true);
} catch (IOException e) {
e.printStackTrace();
System.exit(3);
BufferedReader reader = null;
PrintStream out = null;
try {
reader = new BufferedReader(new InputStreamReader(sslSocket.getInputStream()));
out = new PrintStream(sslSocket.getOutputStream());
} catch (IOException e) {
e.printStackTrace();
System.exit(6);
String line = null;
try {
// Just send a goodbye message, for testing
out.println("BYE");
line = reader.readLine();
} catch (IOException e) {
e.printStackTrace();
System.exit(6);
System.out.println(line);
System.exit(0);
} // Client
Can anybody will please help me to solve my problem i am using JDK1.4.2_07
Thanks in advance. -
Hi,
I'm facing a little problem: trying to implement a plain Java client for acessing an CMP Entity Bean I keep getting
the following error:
javax.naming.NoInitialContextException: Cannot instantiate class: com.sap.engine.services.jndi.InitialContextFactoryImpl [Root exception is java.lang.ClassNotFoundException: com.sap.engine.services.jndi.InitialContextFactoryImpl]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at com.test.SimpleEarClient.main(SimpleEarClient.java:65)
Caused by: java.lang.ClassNotFoundException: com.sap.engine.services.jndi.InitialContextFactoryImpl
As I am not a very experienced developer, I don't quite understand what exactly can be the reason
for this. (Maybe there is some additional reference missing?)
The code for it:
private static String userName = "userName";
private static String password = "password";
private static String hostUrl = "localhost:port";
private static String initContextFactory = "com.sap.engine.services.jndi.InitialContextFactoryImpl";
private static final String BIKECMP_LOOKUP_STRING = "sap.com/SimpleEAR/BikeCMPBean";
public static void main(String[] args) {
//Build the InitialContext environment properties
Properties ctxProp = new Properties();
ctxProp.put(Context.INITIAL_CONTEXT_FACTORY,initContextFactory);
ctxProp.put(Context.PROVIDER_URL, hostUrl);
ctxProp.put(Context.SECURITY_PRINCIPAL, userName);
ctxProp.put(Context.SECURITY_CREDENTIALS, password);
BikeCMP bean = null;
String xmlTest;
try{
Context ctx = new InitialContext(ctxProp);
BikeCMPHome home = (BikeCMPHome) ctx.lookup(BIKECMP_LOOKUP_STRING);
bean = home.findByPrimaryKey(new Integer(1));
xmlTest = bean.getXml();
System.out.println("Printing the result of the query: " + xmlTest);
Maybe you can help me on that.
Thanks!
BeataHi all
I am facing a "NoInitialContextException" problem while ejb lookup.
I want to lookup a ejb in the same server as of my java client.
I have added all the required jars and followed each step as in the forums.Is there any other way out.
<u>Error:</u>
<i>javax.naming.NoInitialContextException: Cannot instantiate class: com.sap.engine.services.jndi.InitialContextFactoryImpl [Root exception is java.lang.ClassNotFoundException: com.sap.engine.services.jndi.InitialContextFactoryImpl]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at com.chevron.ccs.mapping.Mapping.main(Mapping.java:96)
Caused by: java.lang.ClassNotFoundException: com.sap.engine.services.jndi.InitialContextFactoryImpl
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
... 4 more</i>
Thanks in Advance
DhanyaR Nair -
Help me to run this simple RMI example
When i m running this example in standalone pc it works but while running on to different pc it gives error though I m giving the IP address from client of server.. If anyone can help me out plz help.
Code:
ReceiveMessageInterface
import java.rmi.*;
public interface ReceiveMessageInterface extends Remote
void receiveMessage(String x) throws RemoteException;
Server code:
import java.rmi.*;
import java.rmi.registry.*;
import java.rmi.server.*;
import java.net.*;
public class RmiServer extends java.rmi.server.UnicastRemoteObject
implements ReceiveMessageInterface
int thisPort;
String thisAddress;
Registry registry; // rmi registry for lookup the remote objects.
// This method is called from the remote client by the RMI.
// This is the implementation of the �ReceiveMessageInterface�.
public void receiveMessage(String x) throws RemoteException
System.out.println(x);
public RmiServer() throws RemoteException
try{
// get the address of this host.
thisAddress= (InetAddress.getLocalHost()).toString();
catch(Exception e){
throw new RemoteException("can't get inet address.");
thisPort=3232; // this port(registry�s port)
System.out.println("this address="+thisAddress+",port="+thisPort);
try{
// create the registry and bind the name and object.
registry = LocateRegistry.createRegistry( thisPort );
registry.rebind("rmiServer", this);
catch(RemoteException e){
throw e;
static public void main(String args[])
try{
RmiServer s=new RmiServer();
catch (Exception e) {
e.printStackTrace();
System.exit(1);
Client code:
import java.rmi.*;
import java.rmi.registry.*;
import java.net.*;
public class RmiClient
static public void main(String args[])
ReceiveMessageInterface rmiServer;
Registry registry;
String serverAddress=args[0];
String serverPort=args[1];
String text=args[2];
System.out.println("sending "+text+" to "+serverAddress+":"+serverPort);
try{
// get the �registry�
registry=LocateRegistry.getRegistry(
serverAddress,
(new Integer(serverPort)).intValue()
// look up the remote object
rmiServer=
(ReceiveMessageInterface)(registry.lookup("rmiServer"));
// call the remote method
rmiServer.receiveMessage(text);
catch(RemoteException e){
e.printStackTrace();
catch(NotBoundException e){
e.printStackTrace();
}When we compile with rmic skeleton and stub get created then we hav to place stub at each client ???Your remote client applcation need only _Stub.class fiels.
Is there way by which we can know how many clients are connected to the
server and there IP address, can anyone give the code... I guess that you should use a RMI login/logout method to register/unregister your client connection information into a databse or a simple static Hashtable(Vector) object. -
Problem of running rmi applet and client for Javacard 3.0.2 Connected
Need help for running rmi application for Java Card 3.0.2 connected version. I am trying to move a working rmi applet & client from 3.0.2 Classic version to Connected version. Then I found that they are so different and I have no idea how to run my application :(
Here are what I have done:
- I have modified the Classic HelloWorld applet to an rmi applet. It is OK when I build and run the application in netbeans. The Applet can be selected successfully.
My problems are:
- How to connect a rmi client to the rmi applet? Here are what I have done:
+ Run rmi applet in netbeans
+ Run 'rmic' command to generate stub
+ Run rmiregistry outside of netbeans
+ Build and run rmi client application outside of netbeans by typing "ant all"
However, the rmi client was not able to connect to the applet:
[java] java.net.ConnectException: Connection refused: connect
Would this be a problem of netbeans? Could someone tell me how to run rmi applet/client within or outside netbeans. Thanks a lot!Well finally I figured out that CREF-emulators (from JCDK 2.2.1, 2.2.2, 3.0.1 classic) do not support cryptographic extensions at all.
BUT JCWDE(from JCDK 2.2.1, 2.2.2) - support, but this kind of simulator quite hard to use, because it does not have state between launches.
About CJCRE(from JCDK 3.0.1 connected) - still don't know, seems not support cryptographic extensions. -
ClassCastException running JDev Generated EJB Client
Hi,
I'm trying to test a CMP entity bean I created by using the JDev903 generated TestClient class. First I run the EJB I want to test, then I attempt to run the Client class. I get a ClassCastException. The exception occurs on the call to PortableRemoteObject.
How do I get this to run? I'm not sure how to get past this exception. Is there something else I need to run? Is there something that needs to be set in a config file.
I kinda expected this to run outta da box.
package Samplecom.ngit.iis.cmedia.cmptest;
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import com.ngit.iis.cmedia.cmptest.Tcmmtpic;
import com.ngit.iis.cmedia.cmptest.TcmmtpicHome;
import java.util.Collection;
import java.util.Iterator;
import javax.naming.NamingException;
public class TcmmtpicClient {
public static void main(String [] args) {
TcmmtpicClient tcmmtpicClient = new TcmmtpicClient();
try {
Context context = getInitialContext();
TcmmtpicHome tcmmtpicHome = (TcmmtpicHome)PortableRemoteObject.narrow(context.lookup("Tcmmtpic"), TcmmtpicHome.class); <=== EXCEPTION OCCURS HERE ===>
Tcmmtpic tcmmtpic;
// Retrieve all instances using the findAll() method
// (CMP Entity beans only)
Collection coll = tcmmtpicHome.findAll();
Iterator iter = coll.iterator();
while (iter.hasNext()) {
tcmmtpic = (Tcmmtpic)iter.next();
System.out.println("tpic_cmvg_id = " + tcmmtpic.getTpic_cmvg_id());
System.out.println("tpic_id = " + tcmmtpic.getTpic_id());
System.out.println("tpic_sequence_no = " + tcmmtpic.getTpic_sequence_no());
System.out.println("tpic_nm = " + tcmmtpic.getTpic_nm());
System.out.println();
} catch(Throwable ex) {
ex.printStackTrace();
private static Context getInitialContext() throws NamingException {
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "admin");
env.put(Context.SECURITY_CREDENTIALS, "welcome");
env.put(Context.PROVIDER_URL, "ormi://localhost:23891/current-workspace-app");
return new InitialContext(env);
Thanks,
ArtI was attempting to run this under JDev. I created a CMP from a table and then created the client to run it. I started the bean and then ran the client with the following result.
The stack trace is listed below.
C:\JDev903\jdk\bin\javaw.exe -ojvm -classpath J:\CM_SOURCE\workspaces\cmee\cmptest\classes;C:\JDev903\jdev\lib\jdev-rt.jar;C:\JDev903\j2ee\home\lib\activation.jar;C:\JDev903\j2ee\home\lib\ejb.jar;C:\JDev903\j2ee\home\lib\jaas.jar;C:\JDev903\j2ee\home\lib\jaxp.jar;C:\JDev903\j2ee\home\lib\jcert.jar;C:\JDev903\j2ee\home\lib\jdbc.jar;C:\JDev903\j2ee\home\lib\jms.jar;C:\JDev903\j2ee\home\lib\jndi.jar;C:\JDev903\j2ee\home\lib\jnet.jar;C:\JDev903\j2ee\home\lib\jsse.jar;C:\JDev903\j2ee\home\lib\jta.jar;C:\JDev903\j2ee\home\lib\mail.jar;C:\JDev903\j2ee\home\oc4j.jar;C:\JDev903\lib\xmlparserv2.jar;C:\JDev903\lib\xmlcomp.jar -Dhttp.proxyHost=spider.northgrum.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=*.ihsxtra.net|*.ihserc.com|*.logicon.com|*.grumman.com|*.northrop.com|*.northgrum.com Samplecom.ngit.iis.cmedia.cmptest.TcmmtpicClient
javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused: connect; nested exception is:
java.net.ConnectException: Connection refused: connect
java.lang.Object com.evermind.server.rmi.RMIContext.lookup(java.lang.String)
RMIContext.java:134
java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
InitialContext.java:350
void Samplecom.ngit.iis.cmedia.cmptest.TcmmtpicClient.main(java.lang.String[])
TcmmtpicClient.java:20
Process exited with exit code 0. -
Problem in running TVApplet code on client machine.
Hi Friends
I installed the JMF windows pack and ran the JMF Diagnostic applet
successfully. Then I compiled and ran the TVApplet example code
given by Sun through a htm file successfully in Internet Explorer on my
machine.
My operating system is Windows 2000 Professional.
My Web server is Tomcat 4.1.31 which is installed at my machine itself.
I am able to run this applet on my machine but when I access this
applet on some different machine it is not running and seeing in Java
Console,Exceptions are found as:-
java.lang.NoClassDefFoundError: javax/media/ControllerListener
Can sombody help me here ???
Why the applet is not running on the client side.
Is the JMF APIs or some of its file required to be present at the client
side.
The client machine is having required version of Internet Explorer and client machine operating system is XP,2000.
Thanksthe jar file reqiured is jmf.jar this jar file will there in
jmf_home/lib
for example in my mechine
C:\Program Files\JMF2.1.1e\lib this jar file contain all the file reqired to run the application
i think you may need some of the dll files also to run see
if reqiured the then it may throw exception
java.lang.UnsatisfiedLinkError then put respective dll file to workiing folder or the system32 folder -
I am using JBuilder 7. and have set all paths including library J2SDK1.4.2.
I have complied a java project which include swing components.
This project was previously compiled and run many time successfully. But few days i did not run on my pc.
I have tested this project on my friends pc and there it ran fine.
I have tested a simple 'Hello World' program on my pc and it compiled and ran fine. But my project did not run.
I reinstalled jdk1.4.2 and jre1.4.2 many times but problem still exists.
My project compiled successfully but on run it gives the error in a message box.
'Java Virial Machine Launcher. Fatal Execption occured. Program will exit'
and shows the following error in message window.
java.lang.SecurityException: no manifiest section for signature file entry com/microsoft/jdbc/vprt/SSLexTableRow.class
at sun.security.util.SignatureFileVerifier.verifySection(SignatureFileVerifier.java:260)
at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:172)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:239)
at java.util.jar.JarVerifier.update(JarVerifier.java:194)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:300)
at java.util.jar.JarFile.getInputStream(JarFile.java:362)
at sun.misc.URLClassPath$5.getInputStream(URLClassPath.java:616)
at sun.misc.Resource.getBytes(Resource.java:57)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at login.LoginFrame.<init>(LoginFrame.java:54)
at login.LoginApplication.<init>(LoginApplication.java:11)
at login.LoginApplication.main(LoginApplication.java:26)I am guessing, based a few non-english Google hits;
the file mssqlserver.jar (*) may be corrupt?
(*) where com/microsoft/jdbc/vprt/SSLexTableRow.class resides? -
HELP - Problem in running a servlet
I have developed an application of internet payment gateway(IPG). The application architecture is a cardholder visits a shoping cart and from the payment page he fill out his payment information such as credit card number, amout etc. on submit this payment form frowards a request to a merchant payment servlet that recieve the request, perform some action on it and forwards a request to the IPG. The IPG servlet receives the merchant servlet request and forward to a switch. Switch performs tranasction and replies back to the IPG servlet and then IPG servlet will response back to the merchant servlet about the transaction response.
The IPG is connected each time with switch on specific IP and Port which is predefined in switch for this IPG and this is only 1 IP and 1 port assigned to this IPG. When IPG servlet completes the transaction request now it is disconnected with Switch.
My issue is when 2 or more transaction request are generated at the same time the IPG servlet processes each request separate in a servlet (as i understand) but due to only 1 IP and Port is assigned to the IPG, the IPG can connect only one time with the switch and if IPG is connected then other requests can not processed by IPG because second and so on request are unable to connect with switch on the same IP and Port when for the first reuest IPG is already connected on this IP and Port.
I have successfully implemented this modal in a desktop application which can handles multiple request on the same IP and Port at a time.
Is there any possibility in servlets that IPG servlet will connects only one time with switch on IP and Port when i started the web server and all request in IPG uses the same channel to forward request to switch and recieve response from the switch.
I will be very very thankfull if anyone will solve my problem because my 3 clients are waiting for my application and i have in trouble to solve the problem.
IT IS A HUMBLE REQUEST AND HOPE YOU WILL REPLY AS SOON AS POSSIBLE.
Thanks
Wajid HussainYour piece code seems fine but just make sure that your switch is as below
Have ReaderThread class implementing Runnable
In your main program create a server socket (in main method or whereever)
ServerSocket listener = new ServerSocket(Integer.parseInt(host.getARValuePort()));now
while(true){
Socket socket = listener.accept();
// after this instantiate ReaderThread as below
ReaderThread theThread = new ReaderThread (socket);
// Start the thread with this ReaderThread object as below
Thread t = new Thread(theThread);
t.start();
}Now ReaderThread is as below
class ReaderThread implements Runnable{
private Socket server;
ReaderThread (Socket server) {
this.server=server;
public void run () {
// Here play around with your socket to read write or what ever and close.
DataInputStream in = new DataInputStream (server.getInputStream());
PrintStream out = new PrintStream(server.getOutputStream());
}Hope the above steps should solve your problem. -
EJB Client Access From JDeveloper9iR2
I seem to be running into a lot of problems when trying to get a simple EJB client to talk to an EJB on our 9IAS platform. I have developed a simple session bean (just to test) which simply returns a string. When I create the default client code this works fine using the embedded OC4J server in Jdeveloper but I can't run a similar client against 9IAS when I deploy the code. When I go through the client wizard it seems to produce the same code as the standalone EJB OC4J client. I simply changed the name of the server (Context.PROVIDER_URL, "ormi://pe2500/). This is the parameter code I use:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "admin");
env.put(Context.SECURITY_CREDENTIALS, "welcome");
env.put(Context.PROVIDER_URL, "ormi://pe2500:23891/MyEJBs");
This is the output I receive:
D:\jdeveloper9ir2\jdk\bin\javaw.exe -ojvm -classpath D:\javadev\ejbservlet\ejbservlet\WEB-INF\classes;D:\jdeveloper9ir2\jdev\lib\jdev-rt.jar;D:\jdeveloper9ir2\j2ee\home\lib\ojsp.jar;D:\jdeveloper9ir2\j2ee\home\jsp\lib\taglib\ojsputil.jar;D:\jdeveloper9ir2\j2ee\home\oc4j.jar;D:\jdeveloper9ir2\j2ee\home\lib\servlet.jar;D:\jdeveloper9ir2\jdev\lib\ojc.jar;D:\jdeveloper9ir2\j2ee\home\lib\activation.jar;D:\jdeveloper9ir2\j2ee\home\lib\ejb.jar;D:\jdeveloper9ir2\j2ee\home\lib\jaas.jar;D:\jdeveloper9ir2\j2ee\home\lib\jaxp.jar;D:\jdeveloper9ir2\j2ee\home\lib\jcert.jar;D:\jdeveloper9ir2\j2ee\home\lib\jdbc.jar;D:\jdeveloper9ir2\j2ee\home\lib\jms.jar;D:\jdeveloper9ir2\j2ee\home\lib\jndi.jar;D:\jdeveloper9ir2\j2ee\home\lib\jnet.jar;D:\jdeveloper9ir2\j2ee\home\lib\jsse.jar;D:\jdeveloper9ir2\j2ee\home\lib\jta.jar;D:\jdeveloper9ir2\j2ee\home\lib\mail.jar;D:\jdeveloper9ir2\j2ee\home\oc4j.jar;D:\jdeveloper9ir2\lib\xmlparserv2.jar;D:\jdeveloper9ir2\lib\xmlcomp.jar;D:\jdeveloper9ir2\j2ee\home\oc4j.jar;D:\jdeveloper9ir2\j2ee\home\lib\servlet.jar Samplemypackage6.ctejb1Client3
javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused: connect; nested exception is:
java.net.ConnectException: Connection refused: connect
java.lang.Object com.evermind.server.rmi.RMIContext.lookup(java.lang.String)
RMIContext.java:134
java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
InitialContext.java:350
void Samplemypackage6.ctejb1Client3.main(java.lang.String[])
ctejb1Client3.java:18
Process exited with exit code 0.
Can anyone tell me if this is the correct communication method for client EJB's talking to the 9IAS server?
Any help really appreciated.
Chris Taylorhi Chris Taylor, did you find the solution for this error. i too get this error and i am looking for the answer. if you find any answer please share with me too. if i get any answer for this i will reply you too.
-
EJB Client - basic programming principles
Hello,
I'm new to the EJB world, can someone please give me some giudelines on basic programming principles on how to write a simple EJB client ?
Thanx people!
SonWe have some very simple "hello, world" examples here :
https://glassfish.dev.java.net/javaee5/ejb/EJB30.html
There is also an EJB FAQ :
https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html
Another resource is the Java EE 5 Tutorial :
http://java.sun.com/javaee/5/docs/tutorial/doc/
--ken
Maybe you are looking for
-
When I try to send back a gift in a Facebook game, there should be a pop-up that appears to allow me to do this. However in the newest version of Firefox, I can not get these pop-ups to appear and I have to have version 6 to be able to work from home
-
Necessary to Embed Fonts?
I'm getting ready to send some stuff off to the printers. I've used an addon font family from the web, and was wondering if it's necessary (or possible) to embed fonts in a .psd so the printer has access to them before printing.
-
3 Phase AC Power Meter/Tran​sducer Drivers
We need to buy some AC digital panel meters with digital output. We can't use just a Transducer and PLC, as we need the digital meter function at the measurement point. We want to use RS232 or 485 output from a meter as input to labview We are me
-
My Iphone 4S has not been jail broken, however I downloaded IOS7 and now it says "Connect to Itunes to use push notifications" I did that and couldnt fix it. Help!!!
-
Reg. Translation of Program Documentation from German to English
Dear Experts, Kindly help me in translating the Program Documentation from German to English version. I have searched the Previous Posts in Forum but still i am not able to find the right post. Regards, Ramesh Manoharan