Trouble running a simple session bean
I am trying to run a simple stateless session bean given in the book Head First EJB. For this purpose, I am using j2sdkee1.3 and j2sdk1.4.2_08. I successfully started the j2ee server and managed to deploy the bean. But when I try to run the client, I get the following cryptic error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/corba/se/internal/util/JDKBridge
at com.sun.corba.ee.internal.core.IOR$LocalCodeBaseSingletonHolder.<clinit>(IOR.java:79)
at com.sun.corba.ee.internal.core.IOR.<init>(IOR.java:218)
at com.sun.corba.ee.internal.iiop.messages.LocateReplyMessage_1_2.read(LocateReplyMessage_1_2.java:137)
at com.sun.corba.ee.internal.iiop.IIOPInputStream.unmarshalHeader(IIOPInputStream.java:126)
at com.sun.corba.ee.internal.iiop.IIOPConnection.getResponse(IIOPCoonection.java:670)
at com.sun.corba.ee.internal.iiop.IIOPConnection.send(IIOPConnection.java:777)
at com.sun.corba.ee.internal.corba.InitialNamingClient.locateObject(InitialNamingClient.java:786)
at com.sun.corba.ee.internal.corba.InitialNamingClient.getIORUsingHostInfo(InitialNamingClient.java:597)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveCorbaloc(InitialNamingClient.java:573)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingORBInitRef(InitialNamingClient.java:544)
at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1080)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_inital_references(InitalNamingClient.java:981)
at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:2358)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:55)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:154)
at javax.naming.InitialContext.lookup(Unknown Source)
at AdviceClient.go(AdviceClient.java:16)
at AdviceClient.main(AdviceClient.java:10)
I have set my classpath to the following:
CLASSPATH=.;%J2EE_HOME%\lib\j2ee.jar
I would really appreciate if somebody could help me with this error. Thank you.
There 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.
Similar Messages
-
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. -
I create simple session bean in jdeveloper and it has a problem in lookup
the code of bean
import java.util.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import javax.naming.*;
public class CartClient {
public static void main(String[] args) {
try {
Context initial = getInitialContext() ;
// Object objref = initial.lookup("java:comp/env/ejb/SimpleCart");
Object objref = initial.lookup("Cart");
CartHome home =
(CartHome)PortableRemoteObject.narrow(objref,
CartHome.class);
Cart shoppingCart = home.create("Duke DeEarl","123");
shoppingCart.addBook("The Martian Chronicles");
shoppingCart.addBook("2001 A Space Odyssey");
shoppingCart.addBook("The Left Hand of Darkness");
Vector bookList = new Vector();
bookList = shoppingCart.getContents();
Enumeration enumer = bookList.elements();
while (enumer.hasMoreElements()) {
String title = (String) enumer.nextElement();
System.out.println(title);
shoppingCart.removeBook("Alice in Wonderland");
shoppingCart.remove();
System.exit(0);
} catch (BookException ex) {
System.err.println("Caught a BookException: " + ex.getMessage());
System.exit(0);
} catch (Exception ex) {
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
System.exit(1);
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, "admin");
env.put(Context.PROVIDER_URL, "ormi://localhost:23791CartApp");
return new InitialContext(env);
} javax.naming.NameNotFoundException: Cart not found
java.lang.Object com.evermind.server.rmi.RMIContext.lookup(java.lang.String)
RMIContext.java:130
java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
InitialContext.java:350
void CartClient.main(java.lang.String[])
CartClient.ja
exceptionPlease post your question in jdeveloper forum at
JDeveloper and ADF
for quick response.
Regards,
Anupama
http://otn.oracle.com/sample_code/content.html -
Hi,
It depends upon your client program. You can use a java rmi based client or a web application. The good kick start to the problem would be to have a look into the java pet store example and converter example which is using RMI port for client access as well as web based access. Please review the examples shipped along with iAS and I'm sure that you will have a good idea on going about the coding.
Regards
Raj -
I have a simple session bean which i'm trying to access thru a simple java client.
Please tell me what the client program should contain and should i create a client-jar and include in the ear file?
Hi,
It depends upon your client program. You can use a java rmi based client or a web application. The good kick start to the problem would be to have a look into the java pet store example and converter example which is using RMI port for client access as well as web based access. Please review the examples shipped along with iAS and I'm sure that you will have a good idea on going about the coding.
Regards
Raj -
Run time error while running Session Bean sample
Hi,
I am new to EJB. When I try to run one sample session bean, I am getting following exeception.
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:255)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:292)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at RunEJB.main(RunEJB.java:31)
Exception in thread "main"
This exception is thrown by client project. naming.jar file is already include in the class for Client project as well.
I am testing this sample on WSAD.
The code on the client is as follows.
Context initial = new InitialContext();
Context myEnv = (Context)initial.lookup("java:comp/env");
Object objref = myEnv.lookup("ejb/MyTestBeanHome");
MyTestBeanHome home =
(MyTestBeanHome) PortableRemoteObject.narrow(objref, MyTestBeanHome.class);
MyTestBean firstBean = home.create();
firstBean.testMessage();
firstBean.remove();Hi Vikas,
The fact that this client is coded to use java:comp/env means it's a J2EE Application Client component. Application Clients are full-fledged J2EE components that run within an Application Client container. You'll need to consult the documentation for your J2EE implementation to see how to invoke its Application Client container.
--ken -
A simple problem with sateful Session beans
Hi,
I have a really novice problem with stateful session bean in Java EE 5.
I have written a simple session bean which has a counter inside it and every time a client call this bean it must increment the count value and return it back.
I have also created a simple servlet to call this session bean.
Everything seemed fine I opened a firefox window and tried to load the page, the counter incremented from 1 to 3 for the 3 times that I reloaded the page then I opened an IE window (which I think is actually a new client) but the page counter started from 4 not 1 for the new client and it means that the new client has access to the old client session bean.
Am I missing anything here???
Isn�t it the way that a stateful session bean must react?
This is my stateful session bean source.
package test;
import javax.ejb.Stateful;
@Stateful
public class SecondSessionBean implements SecondSessionRemote
private int cnt;
/** Creates a new instance of SecondSessionBean */
public SecondSessionBean ()
cnt=1;
public int getCnt()
return cnt++;
And this is my simple client site servlet
package rezaServlets;
import java.io.*;
import java.net.*;
import javax.ejb.EJB;
import javax.servlet.*;
import javax.servlet.http.*;
import test.SecondSessionRemote;
public class main extends HttpServlet
@EJB
private SecondSessionRemote secondSessionBean;
protected void processRequest (HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
response.setContentType ("text/html;charset=UTF-8");
PrintWriter out = response.getWriter ();
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet main</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Our count is " + Integer.toString (secondSessionBean.getCnt ()) + "</h1>");
out.println("</body>");
out.println("</html>");
out.close ();
protected void doGet (HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
processRequest (request, response);
protected void doPost (HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
processRequest (request, response);
}You are injecting a reference to a stateful session bean to an instance variable in the servlet. This bean instance is shared by all servlet request, and that's why you are seeing this odd behavior.
You can use type-leve injection for the stateful bean, and then lookup the bean inside your request-processing method. You may also save this bean ref in HttpSession.
@EJB(name="ejb/foo", beanName="SecondBean", beanInterface="com.foo.foo.SecondBeanRemote")
public MyServlet extends HttpServlet {
ic.lookup("java:comp/env/ejb/foo");
} -
JDev 10.1.3: Problem deploying a session bean to embedded OC4J
JDeveloper 10.1.3, TopLink, OC4J, WinXP, java 1.4.2_05.
I used TopLink to create a set of Java objects from a DB Schema, then created a simple Session Bean to read some of the objects. Everything compiles fine.
JAVA_HOME points to the JDK (not JRE) and CLASSPATH is empty (undefined).
When I try to Run my session bean in the jdeveloper embedded oc4j, I get this message. Thanks in advance for your help.
Milind
===============
[Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
C:\Tools\jdev_10_1_3\jdev\system\oracle.j2ee.10.1.3.3.51\oc4j-config>
C:\Tools\jdev_10_1_3\jdk\bin\javaw.exe -ojvm -classpath C:\Tools\jdev_10_1_3\j2ee\home\oc4j.jar;C:\Tools\jdev_10_1_3\jdev\lib\jdev-oc4j-embedded.jar -Xverify:none -DcheckForUpdates=adminClientOnly -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doracle.dms.sensors=NONE -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config C:\Tools\jdev_10_1_3\jdev\system\oracle.j2ee.10.1.3.3.51\oc4j-config\server.xml
[waiting for the server to complete its initialization...]
05/03/22 14:43:50 Node started with id=127765687050882
05/03/22 14:43:52 Auto-deploying - applications/admin_ejb.jar (orion-ejb-jar.xml had been updated since the previous deployment)...
05/03/22 14:43:52 Error initializing server: Error initializing ejb-module; Exception null
05/03/22 14:43:53 Fatal error: server exiting
Process exited with exit code 1.Error initializing ejb-module;
Is the EJB Jar structured as
META-INF/
ejb-jar.xml
Bean Class
Home interface Class
Remote interface Class
Does the EJBdeploy in some other server? -
Using BC4J Session Bean in OC4J 10.1.3 with dynamic ports
Hi Folks!
I've benn having trouble connecting my BC4J Session Bean to an Oracle 10gAS R3 server instance tha uses dynamic ports.
After migrating a BC4J/Struts/JSP application from 9iAS to 10gAS R3, I'm trying to connect from a client application to my instace in the server. The problem is that the instance uses dynamic ports, and whenever I deploy my application to the server, I've got to update the port number in the bc4j.xcfg file in the client application, wich has became impossible to maintain.
When I connect to an EJB in the same server, I use the instance name instead of the port number. However, when I do the same with BC4J, I get the following exception:
javax.naming.NamingException [Root exception is java.lang.NumberFormatException: For input string: "OC4J_dvt20"]
at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.remoteLookup(AmHomeImpl.java:131)
at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.getRemoteApplicationModuleHome(AmHomeImpl.java:42)
at oracle.jbo.client.remote.ejb.AbstractApplicationModuleHomeImpl.lookupUsingPlatformContext(AbstractApplicationModuleHomeImpl.java:82)
at oracle.jbo.client.ejb.ApplicationModuleHomeImpl.<init>(ApplicationModuleHomeImpl.java:52)
at oracle.jbo.client.remote.ejb.AbstractApplicationModuleHomeImpl.<init>(AbstractApplicationModuleHomeImpl.java:35)
at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.<init>(AmHomeImpl.java:35)
at oracle.jbo.client.remote.ejb.ias.InitialContextImpl.createJboHome(InitialContextImpl.java:28)
at oracle.jbo.common.JboInitialContext.lookup(JboInitialContext.java:77)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:136)
at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:80)
at oracle.jbo.common.ampool.ApplicationPoolImpl.instantiateResource(ApplicationPoolImpl.java:2468)
at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:536)
at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2094)
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1961)
at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2793)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:424)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:419)
at oracle.jbo.client.Configuration.getApplicationModule(Configuration.java:1546)
at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1504)
at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1476)
at pkg.TesteEjbMCT.findTLS(TesteEjbMCT.java:98)
at pkg.TesteEjbMCT.main(TesteEjbMCT.java:51)
My question is: is there a way to configure my bc4j.xcfg, or another way to connect, in order to skip the use of the port number? Or a way to get the port number from the server before I connect?
Thanks in advance!!!I've just found the solution from Steve Muench weblog, always useful by the way!
You can find the solution at this link http://radio.weblogs.com/0118231/stories/2004/05/07/handcodingDynamicDiscoveryOfEjbdeployedAppmodule.html
In summary, we need to use the class com.evermind.server.rmi.RMIInitialContextFactory, which supports dynamic lookup, and implement the lookup ourselves.
The code I've written to lookup the service is listed below:
public static ApplicationModule getAppModuleManutencao() {
try {
Context ctx = getContext();
ManutencaoFacadeHome home = (ManutencaoFacadeHome) ctx.lookup(EJB_MANUTENCAO_BEAN_NAME);
ApplicationModule am = ApplicationModuleProxy.create(home, null);
return am;
} catch (NamingException nex) {
nex.printStackTrace();
return null;
private static InitialContext getContext() {
try {
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, "opmn:ormi://dsv008:OC4J_dvt20/mct");
env.put(Context.SECURITY_AUTHENTICATION, "simple");
return new InitialContext(env);
}catch (NamingException e) {
e.printStackTrace();
return null;
I hope this helps someone!!!
Cheers! -
Exception while i m looking up my session bean from Client
hi,
actully i try to make a simple session bean ok
first i make a seession bean and make his deployment discriptor
and put all thing a jar file and deployee this file on Server its successfuly
loaded and deploed.
ok the problem is when i make a client bean and try to run it. it give me this exception
javax.naming.NoInitialContextException:
Need to specify class name in environment or system property, or as an applet parameter,
or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:643)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:283)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at HelloClient.main(HelloClient.java:15)
Process Exit...
i where i right the machine name where my appserver is runing. inside lookup method
client bean code is
=====================
import java.rmi.*;
import javax.naming.*;
import java.util.*;
import HASSSAN.*;
public class HelloClient {
public static void main(String arg[]) {
try {
javax.naming.Context ctx =
new javax.naming.InitialContext(System.getProperties());
Object obj = ctx.lookup("HelloBean");
HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class);
Hello hello =home.create();
System.out.println(hello.sayHello());
hello.remove();
System.out.println("Success");
}catch(Exception e) {
e.printStackTrace();
}Two hints:
Need to specify class name in environment or system
property, or as an applet parameter,
javax.naming.Context ctx = new javax.naming.InitialContext(System.getProperties());This means you need to check what you're putting on your command line in the way of "-D" settings.
or in an application resource file:You can get this from the methodology jgongo mentions. -
Session bean deployment problem - Fatal Error
Hi,
I am using OC4J and could not deploy simple session bean. I created correct ear ( Team and TeamHome classes are included).
This error message is meaningless.
Please help !
Auto-deploying tpcontest (Assembly had been updated)...
Fatal Error: Syntax error in source
Team_StatelessSessionBeanWrapper2.java:11: Interface Team of class Team_StatelessSessionBeanWrapper2 not found.
public class Team_StatelessSessionBeanWrapper2 extends com.evermind.server.ejb.StatelessSessionEJBObject implements Team
^
TeamHome_StatelessSessionHomeWrapper3.java:9: Interface TeamHome of class TeamHome_StatelessSessionHomeWrapper3 not found.
public class TeamHome_StatelessSessionHomeWrapper3 extends com.evermind.server.ejb.StatelessSessionEJBHome implements TeamHome
^
2 errors
com.evermind.compiler.CompilationException: Syntax error in source
at com.evermind.compiler.FileLinkedCompilation.run(FileLinkedCompilation.java:90)
at java.security.AccessController.doPrivileged(Native Method)
at com.evermind.compiler.FileLinkedCompiler.compile(FileLinkedCompiler.java:19)
at com.evermind.compiler.Javac.compile(Javac.java:37)
at com.evermind.server.ejb.compilation.Compilation.compileClasses(Compilation.java:335)
at com.evermind.server.ejb.compilation.Compilation.compile(Compilation.java:256)
at com.evermind.server.administration.ServerApplicationInstallation.finish(ServerApplicationInstallation.java:439)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:80)
at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
ejb-jar.xml
<session>
<ejb-name>TeamBean</ejb-name>
<home>TeamHome</home>
<remote>Team</remote>
<ejb-class>TeamBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
orion-ejb-jar.xml
<session-deployment name="TeamBean" location="TeamBean" persistence-filename="TeamBean" />Piotr -- I think that it is saying that it can't compile the stub source it generated since it can't find your home and remote
interfaces. Are your interface classes in a package? You show then not in a package in your descriptor. Can you
double check to make sure your EAR file is correctly constructed. That could be a problem as well.
Thanks -- Jeff -
Trouble running EJB application in jdev 11G
Hi, I am just trying out jdev 11g, everything looks good except i am not able to run my application in either embedded oc4j or standalone oc4j 11g. I don't know, if it is a bug or i am doing something wrong. I also have this question, does jdev 11g support Tomcat 6? I will really appreciate any help regarding this. Thanks
That's the error i get every time i run the application:
[EJB 3.0]: Assigning default-data-source=jdbc/MySQL-Movies_DatabaseDS, specified in projects EJB 3.0 properties
[Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
C:\Documents and Settings\Administrator\Application Data\JDeveloper\system11.1.1.0.17.45.24\o.j2ee\embedded-oc4j\config>
"C:\Jdeveloper 11 Preview\jdk\bin\javaw.exe" -client "-Doracle.home=C:\Jdeveloper 11 Preview" -classpath "C:\Jdeveloper 11 Preview\j2ee\home\oc4j.jar;C:\Jdeveloper 11 Preview\jdev\lib\jdev-oc4j-embedded.jar" -Xverify:none -XX:MaxPermSize=256m -DcheckForUpdates=adminClientOnly -Doracle.application.environment=development -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config "C:\Documents and Settings\Administrator\Application Data\JDeveloper\system11.1.1.0.17.45.24\o.j2ee\embedded-oc4j\config\server.xml"
[waiting for the server to complete its initialization...]
May 13, 2007 12:15:27 PM oracle.security.jps.internal.credstore.ssp.CsfWalletManager openWallet
SEVERE: Could not open wallet. Wallet version not supported
java.io.IOException: Could not open wallet. Wallet version not supported
at oracle.security.pki.OracleWallet.open(OracleWallet)
at oracle.security.jps.internal.credstore.ssp.CsfWalletManager.openWallet(CsfWalletManager.java:130)
at oracle.security.jps.internal.credstore.ssp.SspCredentialStore.<init>(SspCredentialStore.java:108)
at oracle.security.jps.internal.credstore.ssp.SspCredentialStoreProvider.getInstance(SspCredentialStoreProvider.java:83)
at oracle.security.jps.internal.credstore.ssp.SspCredentialStoreProvider.getInstance(SspCredentialStoreProvider.java:45)
at oracle.security.jps.internal.core.runtime.JpsContextFactoryImpl.getServiceInstance(JpsContextFactoryImpl.java:260)
at oracle.security.jps.internal.core.runtime.JpsContextFactoryImpl.getContextFromDesc(JpsContextFactoryImpl.java:352)
at oracle.security.jps.internal.core.runtime.JpsContextFactoryImpl.getContext(JpsContextFactoryImpl.java:279)
at oracle.security.jps.internal.policystore.PolicyUtil$1.run(PolicyUtil.java:541)
at oracle.security.jps.internal.policystore.PolicyUtil$1.run(PolicyUtil.java:536)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.internal.policystore.PolicyUtil.getDefaultPolicyStore(PolicyUtil.java:535)
at oracle.security.jps.internal.policystore.PolicyDelegationController.<clinit>(PolicyDelegationController.java:94)
at oracle.security.jps.internal.policystore.JavaPolicyProvider.<init>(JavaPolicyProvider.java:107)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at oracle.security.jazn.JAZNConfig.setJAASPolicyProvider(JAZNConfig.java:2053)
at oracle.security.jazn.JAZNConfig.setSecurityProperties(JAZNConfig.java:2126)
at oracle.security.jazn.JAZNConfig.setSecurityProperties(JAZNConfig.java:2145)
at com.evermind.server.OC4JServer.main(OC4JServer.java:433)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at oracle.classloader.util.MainClass.invoke(MainClass.java:89)
at oracle.oc4j.loader.boot.BootStrap.main(BootStrap.java:41)
oracle.security.jps.service.credstore.CredStoreException: Could not open wallet. Wallet version not supported
at oracle.security.jps.internal.credstore.ssp.CsfWalletManager.openWallet(CsfWalletManager.java:139)
at oracle.security.jps.internal.credstore.ssp.SspCredentialStore.<init>(SspCredentialStore.java:108)
at oracle.security.jps.internal.credstore.ssp.SspCredentialStoreProvider.getInstance(SspCredentialStoreProvider.java:83)
at oracle.security.jps.internal.credstore.ssp.SspCredentialStoreProvider.getInstance(SspCredentialStoreProvider.java:45)
at oracle.security.jps.internal.core.runtime.JpsContextFactoryImpl.getServiceInstance(JpsContextFactoryImpl.java:260)
at oracle.security.jps.internal.core.runtime.JpsContextFactoryImpl.getContextFromDesc(JpsContextFactoryImpl.java:352)
at oracle.security.jps.internal.core.runtime.JpsContextFactoryImpl.getContext(JpsContextFactoryImpl.java:279)
at oracle.security.jps.internal.policystore.PolicyUtil$1.run(PolicyUtil.java:541)
at oracle.security.jps.internal.policystore.PolicyUtil$1.run(PolicyUtil.java:536)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.internal.policystore.PolicyUtil.getDefaultPolicyStore(PolicyUtil.java:535)
at oracle.security.jps.internal.policystore.PolicyDelegationController.<clinit>(PolicyDelegationController.java:94)
at oracle.security.jps.internal.policystore.JavaPolicyProvider.<init>(JavaPolicyProvider.java:107)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at oracle.security.jazn.JAZNConfig.setJAASPolicyProvider(JAZNConfig.java:2053)
at oracle.security.jazn.JAZNConfig.setSecurityProperties(JAZNConfig.java:2126)
at oracle.security.jazn.JAZNConfig.setSecurityProperties(JAZNConfig.java:2145)
at com.evermind.server.OC4JServer.main(OC4JServer.java:433)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at oracle.classloader.util.MainClass.invoke(MainClass.java:89)
at oracle.oc4j.loader.boot.BootStrap.main(BootStrap.java:41)
Caused by: java.io.IOException: Could not open wallet. Wallet version not supported
at oracle.security.pki.OracleWallet.open(OracleWallet)
at oracle.security.jps.internal.credstore.ssp.CsfWalletManager.openWallet(CsfWalletManager.java:130)
... 28 more
May 13, 2007 12:15:31 PM oracle.dms.trace.TraceManager record_config
INFO: TransactionTracing is enabled at MIN level
07/05/13 12:16:50 Oracle Containers for Java EE (11.1.1.0.0) Technology Preview initialized
Ready message received from Oc4jNotifier.
Embedded OC4J startup time: 112171 ms.Running EJB's seem to work fine for me.
Can you try to create a simple Session bean and run it and see if you get any problems?
As far as support for other application servers, yes JDeveloper will support them, for the technology preview however we just did tests with the Oracle application server. -
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 -
Local Session Bean Call Exception in App Server
I have been having trouble calling a Local Session bean in Glassfish.
I set up an example to show the exception I am having:
MainBeanLocal
package com.test;
import javax.ejb.Local;
@Local
public interface MainBeanLocal {
void testCall();
MainBean:
package com.test;
import javax.ejb.Stateless;
* Session Bean implementation class MainBean
@Stateless(mappedName = "ejb/MainBean")
public class MainBean implements MainBeanLocal {
@Override
public void testCall() {
System.out.println("Test Call Succeeded");
RemoteBeanRemote:
package com.test;
import javax.ejb.Remote;
@Remote
public interface RemoteBeanRemote {
public void callMainBean();
RemoteBean:
package com.test;
import javax.ejb.Stateless;
import javax.naming.InitialContext;
import javax.naming.NamingException;
* Session Bean implementation class RemoteBean
@Stateless(mappedName = "ejb/RemoteBean")
public class RemoteBean implements RemoteBeanRemote {
@Override
public void callMainBean() {
try {
InitialContext ctx = new InitialContext();
MainBeanLocal mb = (MainBeanLocal) ctx.lookup("ejb/MainBean");
mb.testCall();
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Test Code:
package com.test;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class BeanTester {
public static void main(String[] args){
try {
InitialContext ctx = new InitialContext();
RemoteBeanRemote remote = (RemoteBeanRemote) ctx.lookup("ejb/RemoteBean");
remote.callMainBean();
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Output Trace:
INFO: deployed with moduleid = TestEJB
INFO: **RemoteBusinessJndiName: ejb/RemoteBean; remoteBusIntf: com.test.RemoteBeanRemote
INFO: LDR5010: All ejb(s) of [TestEJB] loaded successfully!
WARNING: javax.naming.NameNotFoundException: MainBean not found
at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
at com.sun.enterprise.naming.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:111)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:409)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.test.RemoteBean.callMainBean(RemoteBean.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1011)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:175)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2920)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4011)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:203)
at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:117)
at $Proxy71.callMainBean(Unknown Source)
...What am I doing wrong when calling **MainBeanLocal**? I would like to avoid dependency injection, as if the MainBeanLocal was being called from a POJO.
Note: I have no trouble calling the RemoteBean.. I want to be able to call the local bean from the remote bean.Maik,
If this is still a problem, could you please post the descriptors from the EAR?
Are you using any annotations?
- Tim -
Acquiring database row lock in session bean
I am getting a "ora-01002 fetch out of sequence" exception when trying to acquire a row lock by doing a select for update nowait sql command.
The code that is trying to get the lock is running inside a session bean deployed in both weblogic 6.0 sp2 and JBOSS 3.0.4. I have read some other threads in the JDBC forum and they suggest me to use the con.setAutoCommit(false) to avoid this error. This solution works on weblogic but not on JBOSS. In JBOSS I got a message saying I should not be setting the auto commit value in a container managed transaction.
Is there something I could do to do avoid the error without explicitly setting this value in the code?
Thanks.Below are the settings in my ejb-jar.xml, weblogic-ejb-jar.xml, and jboss.xml. Can you see any wrong with the transaction settings?
Please help.
************ejb-jar.xml*************
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>mybean.MybeanRemoteHome</ejb-name>
<home>testing.mybean.MybeanRemoteHome</home>
<remote>testing.mybean.MybeanRemote</remote>
<ejb-class>mybean.Mybean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<container-transaction>
<method>
<ejb-name>mybean.MybeanRemoteHome</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</ejb-jar>
************weblogic-ejb-jar.xml*************
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>mybean.MybeanRemoteHome</ejb-name>
<stateless-session-descriptor>
<pool>
<max-beans-in-free-pool>10</max-beans-in-free-pool>
<initial-beans-in-free-pool>5</initial-beans-in-free-pool>
</pool>
</stateless-session-descriptor>
<jndi-name>mybean.MybeanRemoteHome</jndi-name>
</weblogic-enterprise-bean>
<transaction-isolation>
<isolation-level>TRANSACTION_READ_COMMITTED</isolation-level>
<method>
<ejb-name>mybean.MybeanRemoteHome</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
</transaction-isolation>
</weblogic-ejb-jar>
************jboss.xml*************
<jboss>
<enterprise-beans>
<session>
<ejb-name>mybean.Mybean</ejb-name>
<jndi-name>mybean.MybeanRemoteHome</jndi-name>
<local-jndi-name>mybean.MybeanLocalHome</local-jndi-name>
</session>
</enterprise-beans>
<resource-managers>
</resource-managers>
</jboss>
Maybe you are looking for
-
How do I copy my MUSIC to my computer from my IPOD.
I lost my operating system, all files, all IPOD data, etc. due to a computer virus. I had to load a complete version of Windows Vista to create a new operating system. Now I only have my music on my IPOD touch and I want to get it back onto my comput
-
Preview.app Glitch throws Display Back to First Page
OS X Yosemite v10.10.2; Preview.app v8.0 I've discovered a very annoying glitch in Preview.app; in which when I select all pages after I showed thumbnails, and then mark all pages with [Command]+[A] and unmark a view pages by holding the Command Key
-
I had a heck of a time getting the xlite to work with this router (wrt54gs) back when I got the phone. I got some good info on triggering that helped a lot and fixed my original connectivity issues with the phone. Recently another issue (or maybe a
-
How to give input parameter to Bapi when executing a method.
Hi All, I have 1 input field and 1 button.I've defined a model node and inside that model attribute in my view.If I enter something in the Input field the value should go to the particular model attribute I defined.How to pass that input parameter.I
-
Cant change my profiles and the code /Applications/Firefox.app/Contents/MacOS/firefox-bin -ProfileManager as stated on the page doesnt work..It says -bash: /Applications/Firefox.app/Contents/MacOS/firefox-bin: No such file or directory...I cant creat