Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

swing application with ejb3 framework

  Asked By: Willie    Date: Oct 06    Category: Java    Views: 1396
  

i'm working on swing application with ejb3 framework

wen i try to run my swing application on my computer there is no error and everything works good.
but wen i change my jvm or better say wen i run my swing application in another jvm i encounter to this exception. my port number has been defined constantly and my host name is my server ip.

this is my JNDI properties

prop.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
prop.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
prop.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
prop.setProperty("org.omg.CORBA.ORBInitialHost", "192.68.1.2");
prop.setProperty("org.omg.CORBA.ORBInitialPort", "3700");



Dec 2, 2008 1:31:23 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnection
Impl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR
_TEXT; hostname: 127.0.1.1; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(O
RBUtilSystemException.java:2690)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(O
RBUtilSystemException.java:2711)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(
SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(
SocketOrChannelConnectionImpl.java:274)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.create
Connection(SocketOrChannelContactInfoImpl.java:130)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.begin
Request(CorbaClientRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaC
lientDelegateImpl.java:181)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClie
ntDelegateImpl.java:325)
at org.omg.CORBA.portable.ObjectImpl._is_a(Unknown Source)
at org.omg.CosNaming.NamingContextHelper.narrow(Unknown Source)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.
java:131)
at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialConte
xt.java:220)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.jav
a:160)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398
)
at javax.naming.InitialContext.lookup(Unknown Source)
at bank.app.client.view.LoginForm.login(LoginForm.java:233)
at bank.app.client.view.LoginForm.access$000(LoginForm.java:24)
at bank.app.client.view.LoginForm$3.actionPerformed(LoginForm.java:180)
at javax.swing.JTextField.fireActionPerformed(Unknown Source)
at javax.swing.JTextField.postActionEvent(Unknown Source)
at javax.swing.JTextField$NotifyAction.actionPerformed(Unknown Source)
at javax.swing.SwingUtilities.notifyAction(Unknown Source)
at javax.swing.JComponent.processKeyBinding(Unknown Source)
at javax.swing.JComponent.processKeyBindings(Unknown Source)
at javax.swing.JComponent.processKeyEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)

at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Sour
ce)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Sour
ce)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection ref
used: connect
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSock
etFactory.java:347)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(
SocketOrChannelConnectionImpl.java:244)
... 43 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility
.java:105)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSock
etFactory.java:332)
... 44 more


there is no firewall on server. and i know my 3700 port listener works

first of all y my host name hasnt been changed? it still shows 127.0.1.1
in next exception that comes afther this exception my port number is changed too.!

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Freya Brown     Answered On: Oct 06

1) make sure the jvm  version on the second box is the same as the first one

2) also make sure the port  you're using is not occupied on the second box

 
Answer #2    Answered By: Dep Tran     Answered On: Oct 06

What application  server you are using? JBoss or Glassfish?
if you are using Sun Application server  go to the ORB settings in administrator console and find the ORB listener and check if the given port  and address is correct. by default the address has been set to 0.0.0.0 you may change  it to your server IP

 
Answer #3    Answered By: Cesara Fernandez     Answered On: Oct 06

I think you should have another property in your JNDI props such as:

prop.setProperty("java.naming.provider.url","192.168.1.2:3700");

from your statcktrace it seems that you are still trying to connect to localhost whereas you set to connect to 192.68.1.2 (or may be 192.168.1.2) .

 
Didn't find what you were looking for? Find more on swing application with ejb3 framework Or get search suggestion and latest updates.




Tagged: