I have deployed a simple session bean with one business method.I created a simple java client to access.
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
Similar Messages
-
Can Entity Bean with Home Business Method replace Stateless Session Bean?
Since Entity Bean can have business methods in the Home Interface, can we use Entity Bean with Home Business Methods to replace Stateless Session Bean?
I am assuming we can get better performance by doing this since the overhead of creating Component Object can be avoided as compared to stateless session beans.Requires-new makes the container start a new transaction. Only use that flag
at the point that you are certain that a NEW transaction should BEGIN. I
suggest you use Required as your default for all methods in the application,
and only change that to anything else when you are certain that you should.
Peace,
Cameron Purdy
Tangosol Inc.
<< Tangosol Server: How Weblogic applications are customized >>
<< Download now from http://www.tangosol.com/download.jsp >>
"A.J,LEE" <[email protected]> wrote in message
news:3ba5adb2$[email protected]..
>
> I find it result in "dead lock"
> when I call RequiresNew attributed CMP method in session Bean.
> Then, Is it possible to use CMP which is set with "RequiresNew"
transaction attribute?
>
> I Wonder why.
>
> Thanx in advance.
-
Session bean with 2 entity bean
i have a phonebook manager (session bean) taht controls the category of contacts such as group a , group b, group c and group d. where group a b c and d are all entity beans.
may i know how to control a session bean so that it can diferent which entity beans to invoke ?Group might be a table in a database,
GroupEJB referes to Entity Bean.
with the following fields. Group Id , Group disciption. where group ID is primary Key.
Use a session bean and create your group A B C D.( EJB create method).
Simple i guess.
Enjoy
Zoha. -
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. -
Stateful Session Bean with BMT: JDBCpmf or EEpmf?
Quote:
For the record: when using BMT as David described, you should use a JDBCPersistenceManagerFactory
instead of an EEPersistenceManagerFactory. EEPersistenceManagerFactory is only appropriate when
transaction synchronization is desired.
-Patrick
Hi Patrick,
I wanted to follow up on this. In the case of Kodo, the JDBCpmf does not turn on the
UserTransaction in a managed environment, while the EEpmf does. My question: isn't is necessary to
turn on the UserTransaction in a stateful session bean with BMT? If this doesn't happen, isn't
there a danger, if the bean allows transactions to span business method invocations, that the
container will passivate the bean while a transaction is active? Since the PM can't be saved during
passivation, the tx would be interrupted by passivation -- something that would not happen if the
container were aware that a tx was active.
David EzzioDavid,
My interpretation of your initial post was that you were using fully
unmanaged transactions in your bean. That is, that you were not using the
UserTransaction, but were just using the javax.jdo.Transaction for
transactional data store access.
In the situation I just described, using the EEPMF would result in changes
to the UserTransaction. If your goal was to manage the UserTransaction in
the bean, then yes, you'd still want to use the EEPMF.
-Patrick
On 7/25/02 7:17 PM, "David Ezzio" <[email protected]> wrote:
Quote:
For the record: when using BMT as David described, you should use a
JDBCPersistenceManagerFactory
instead of an EEPersistenceManagerFactory. EEPersistenceManagerFactory is only
appropriate when
transaction synchronization is desired.
-Patrick
Hi Patrick,
I wanted to follow up on this. In the case of Kodo, the JDBCpmf does not turn
on the
UserTransaction in a managed environment, while the EEpmf does. My question:
isn't is necessary to
turn on the UserTransaction in a stateful session bean with BMT? If this
doesn't happen, isn't
there a danger, if the bean allows transactions to span business method
invocations, that the
container will passivate the bean while a transaction is active? Since the PM
can't be saved during
passivation, the tx would be interrupted by passivation -- something that
would not happen if the
container were aware that a tx was active.
David Ezzio--
Patrick Linskey [email protected]
SolarMetric Inc. http://www.solarmetric.com -
Entity Beans and Session beans to represet Business lOgic
How cam we implement Entity Beans and Session beans to represent Business Logic.
Can anyone explain how can we do this.
Regards...I have session beans calling method in entity beans and any client
doesn't have access to entity beans, only via session beans.
If i define security policy and method permissions for session beans
only, do entity beans use that permissions when calling their methods
from sessions beans OR should i define the security policy for entity
beans separately?If you want to set the permission on individual
methods of entity bean ( with different roles)
you have to do it separately.
If you want to delegate the Authenticated user along with
the method call to the Entity Bean you can use
run-as-identity-principal.
For more detail please check out the EJB2.0 Spec.
-utpal -
i have a long-existing iPhone 4s with one apple id and started a job where I received a macbook with another apple id. how do i get my phone to sync with the Mac Pro and secondly how do i get my music on there?
No not bothered about sycing apps etc it is all about calendars and maybe notes. IN terms of how its done I just want it the easiest way and preferably so that if an entry is made on one calendar then it populates the other.
Thgius is beacuse I have my work diary on outlok, which I then link with my ical. I want to make sure that information is then shared with her.
Chris -
What is the best method for creating a simple DVD from X?
Now that I no longer have DVD SP on my system, I need to know the preferred method of creating a simple menu driven DVD. The DVD needs to have a simple (one click) since the local cable company needs that so it will trigger at a specified time. I shoot in 720p 60. The DVD is SD. I do have Toast, Compressor, and iDVD on the computer. Any input will really be appreciated. Thanks in advance.
Cheers.
TomThanks Luis.
Can't beleive I missed that. I am so used to using Compressor or Toast. This method works great. Thanks.
Best.
Tom -
Creating and deploying ejb 3.0 session bean with annotated pojo
I try to create and deploy a EJB 3.0 stateless session bean (and associated webservice) with the following steps:
1) Create Interface "Repository"
package de.xxx.config;
import java.rmi.Remote;
import java.rmi.RemoteException;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService
public interface Repository extends Remote {
@WebMethod(operationName = "findCampaignByChannel")
public String findCampaignByChannel(String channelName) throws RemoteException;
2) create dummy "RepositoryImpl"
package de.xxx.config;
import java.rmi.RemoteException;
import javax.ejb.Stateless;
import javax.jws.WebService;
@WebService(endpointInterface="de.xxx.config.Repository")
@Stateless
public class RepositoryImpl implements Repository {
public String findCampaignByChannel(String channelName) throws RemoteException {
return null;
3) The two class files are packaged into a jar without any further descriptors
4) The jar is deployed with admin_client into the oc4j instance using the commands:
-deploy -file <jarfile> -deploymentName <name>
Result:
An ear was constructed and started but no session bean or webservice is found (using the console). But according to to the docs a jar file without a ejb-jar.xml should be recognized as a EJB 3.0 ejb-jar file and the necessary steps to create session bean and expose webservice should be done automatically.
My question:
Which step do i miss here ?
Tools used:
Eclipse 3.2 for the jar file
SoaSuite 10.1.3.1 for oc4janother strange problem.
i have an APplication server added ( JBOSS ).
when i create deployment profile (EAR ) application server is showed in the ComboBox .
But when i create Java Test Client for some EJB and when i check " Connect Remote Application server" there is 2 comboboxes
J2EE Application
App Server Connection.
first combo is ok there is EJB applicaiton
Secound is empty .. but i Have App Server.
Another think is that when i create EJB 3.0 its BAD to see J2EE app it must be J EE 5 app or just Java EE app -
Deploying session beans with weblogic 5.1 in NT
Hello ,
I have a problem with deploying session beans in weblogic 5.0. I have
written the code and compiled it. My Compilation is fine. Cud any one give
me a step by step of how I should deploy my bean with weblogic 5.0 on
windows NT.
Raj UrsHello ,
I have a problem with deploying session beans in weblogic 5.0. I have
written the code and compiled it. My Compilation is fine. Cud any one give
me a step by step of how I should deploy my bean with weblogic 5.0 on
windows NT.
Raj Urs -
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. -
Using a Statefull Session Bean with RMI on Multiple JSP pages
Heya all,
i have a JBoss server running with a statefull bean on it. I want to use it on my JSP pages. But every time I start my JSP-page a NEW INSTANTION of the bean is created! For each user using my page, I want ONE bean.
Is there anyway to do this? ANything with the sessioncontext?
I can do it with local beans, using the simple tags in the JSP-page, but they do not work for Remote Beans.
(I use JNDI)hi,
statefull session beans are client session specific. the instance will exists if client session exits.
now since u are loading the jsp page again in the other browser, a new instance will be associated with the current session.
hope it will work.
sameer -
Problem Deploying EJB3 Stateless session bean in Jboss4.0.3
Hi All,
I have developed an EJB 3 Stateless session bean and tried to deploy in JBoss 4.0.3 , But i get the following Exception.
javax.naming.NameNotFoundException: ejb not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
at org.jnp.server.NamingServer.lookup(NamingServer.java:249)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.apache.jsp.session_jsp._jspService(org.apache.jsp.session_jsp:69)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:157)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
I am sorry if the question is silly..... My Remote Interface will be one like this
import javax.ejb.Remote;
@Remote
public interface CityService {
public String getCity();
And My Bean Class will be
import javax.ejb.EJB;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.EntityTransaction;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
@EJB
@Remote(CityService.class)
@Stateless(mappedName="ejb/CityService")
public class CityServiceBean implements CityService {
public String getCity(){
return "Chennai Metropolitan";
And the client which invokes the bean will be
InitialContext ctx = new InitialContext();
CityService c = (CityService)ctx.lookup("ejb/CityService");
System.out.println("Msg from Bean"+c.getCity());
please help me out of this issue....
Thanks in advanceford wrote:
If you deploy your application in a .ear, you also can use this:
You have to set a name to your EJBBean -> @Stateless(name = "XXX")
The client for remote interface -> cxt.lookup(Name_of_your_own_ear_without_extension + "/XXX/Remote");
The client for local interface -> cxt.lookup(Name_of_your_own_ear_without_extension + "/XXX/Local");the problem with this approach is that if you version your ears, the version numbers show up in the jndi names, and your client code will be hard coded to specific server versions. -
Deploying EJB 3 session beans on OC4J 10.1.3.0.0 Standalone
Guys,
I am unable to deploy any EJB 3.0 session beans on my freshly installed OC4J 10.1.3.0.0 instance. I also have tried to deploy the EAR created by the "Develop a Stateless Session Bean using EJB 3.0" to eliminate problems in the deployed archive, but itfails with the exact same stacktrace:
06/06/05 14:38:52 SEVERE: ProgressObjectImpl.reportError java.lang.InstantiationException: Error initializing ejb-module
s: nested exception is: java.lang.reflect.InvocationTargetExceptionoracle.oc4j.admin.jmx.shared.exceptions.InternalExcep
tion: java.lang.InstantiationException: Error initializing ejb-modules: nested exception is: java.lang.reflect.Invocatio
nTargetException
at oracle.oc4j.admin.jmx.shared.deploy.NotificationUserData.<init>(NotificationUserData.java:107)
at oracle.oc4j.admin.internal.Notifier.reportError(Notifier.java:429)
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:123)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:819)
at java.lang.Thread.run(Thread.java:595)
Caused by: oracle.oc4j.admin.internal.DeployerException: java.lang.InstantiationException: Error initializing ejb-module
s: nested exception is: java.lang.reflect.InvocationTargetException
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:126)
... 4 more
Caused by: java.lang.InstantiationException: Error initializing ejb-modules: nested exception is: java.lang.reflect.Invo
cationTargetException
at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:1056)
at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:210)
at com.evermind.server.Application.setConfig(Application.java:391)
at com.evermind.server.Application.setConfig(Application.java:308)
at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1771)
at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:507)
at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:191)
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
... 4 more
Caused by: javax.ejb.EJBException: nested exception is: java.lang.reflect.InvocationTargetException
at com.evermind.server.ejb.EJBUtils.createEJBException(EJBUtils.java:352)
at com.evermind.server.ejb.EJBUtils.createEJBException(EJBUtils.java:343)
at com.evermind.server.ejb.POJOEntityAnnotationListener.parseAnnotatedClass(POJOEntityAnnotationListener.java:56
at com.evermind.server.ejb.AnnotationParser.notifyAnnotationListeners(AnnotationParser.java:197)
at com.evermind.server.ejb.AnnotationParser.parseAnnotations(AnnotationParser.java:69)
at com.evermind.server.ejb.EJBPackageDeployment.parseMetaData(EJBPackageDeployment.java:964)
at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:831)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
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 com.evermind.server.ejb.POJOEntityAnnotationListener.parseAnnotatedClass(POJOEntityAnnotationListener.java:48
... 15 more
Caused by: java.lang.NullPointerException
at java.lang.Class.getAnnotation(Class.java:2956)
... 20 more
Also, and this is probably related, when starting up it the app server prints:
6-06-05 14:38:51.777 WARNING J2EE EJB5003 EJB 3.0 enabled but JDK 1.5 is not in use. No annotations will be parsed.
Which is not true as I am running JDK 5.0_6 and I have tested/validated this by deploying a working (working as in putting stuff in and pulling stuff out of a db) EJB 3.0 Persistence project in there, which uses annotations.
I really hope somebody on the OC4J team can help me out on this, as I am guessing a lot of people will run into this.
Kind regards,
MikWell, I think I at least isolated the problem:
My installation was not as fresh as I thought. It had to do with my trying to get the latest version of TopLink (the final EJB 3.0 RI one) running on the latest OC4J standalone. For this I deleted the j2ee/home/persistence.jar and replaced it by toplink-essentials.jar. I apparently misjudged the differences that occured in the last steps of the EJB 3 specs.
So let me rephrase my question: is there a way to get the latest version of TopLink (the one packaged as the EJB3 Persistence RI) in the OC4J 10.1.3.0 Standalone container? And if not, when will there be one?
Mik -
HOWTO:Deploy BC4J as Session Bean in Weblogic
This document describes Howto deploy a BC4J Appmodule as EJB Session Bean to Weblogic and
test the appmodule through the BC4J tester.
=>create a BC4J Application using Business Components Wizard.
=>test it using BC4J tester
=>make the Application Module Remotable [list]
[*]Select Appmodule and right mouse on it to select the edit option
[*]Select Remote tab
[*]Select the check box for Remotable Application Module
[*]Select EJB Session Bean and shuttle it from Available list to Selected list
[*]Click on the finish button[list]
=> Do File| Save All and a Rebuild on the project
=> create the weblogic XML Deployment Descriptor[list]
[*]Choose File|New
[*]Select the web objects tab
[*]Select XML and click ok
[*]Rename the file as ejb-jar.xml using File|Rename
[*]Save it in the JDEV_HOME/myclasses/META-INF directory.
[*]Open the xml file by double clicking on it.
[*]Paste the following into the file
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>wl.WlModule</ejb-name>
<home>wl.common.ejb.WlModuleHome</home>
<remote>wl.common.ejb.RemoteWlModule</remote>
<ejb-class>wl.server.ejb.WlModuleServerEJB</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
</assembly-descriptor>
</ejb-jar>
[*]Choose File|New
[*]Select the web objects tab
[*]Select XML and click ok
[*]Rename the file as weblogic-ejb-jar.xml using File|Rename
[*]Save it in the JDEV_HOME/myclasses/META-INF directory.
[*]Open the xml file by double clicking on it.
[*]Paste the following into the file
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>wl.WlModule</ejb-name>
<caching-descriptor>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
<max-beans-in-cache>100</max-beans-in-cache>
<idle-timeout-seconds>60</idle-timeout-seconds>
</caching-descriptor>
<jndi-name>wl.WlModule</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
In this example "wl" is the package name and "WlModule" is the Appmodule name.[list]
=> generate the jar file for appmodule along with xml deployment descriptors[list]
[*]from the command line in JDEV_HOME/myclasses directory run
[*]jar cvf0 wlappmodule.jar wl META-INF[list]
=> edit the setenv.cmd file in WEBLOGIC_HOME directory[list]
[*]set JAVA_HOME=f:\jdev32\java1.2
[*]set JBOLIB=f:\jdev32\lib
[*]set JDBC_CLASSES=f:\jdev32\jdbc\lib\oracle8.1.7\classes12.zip
[*]set JBO_RUNTIME=%JBOLIB%\jboorasql.zip;%JDBC_CLASSES%;%JBOLIB%\jbodatum12.zip;%JBOLIB%\xmlparserv2.jar;%JBOLIB%\jbomt.zip;%JBOLIB%\jboejb.jar
[*]add JBO_RUNTIME in the set CLASSPATH variable[list]
=> create a bc4j deploy batch file "Deploybc4j.cmd" in the WEB_LOGIC HOME
which will generate the server side jar files
@setlocal
set JAVA=java
set JAVAC=javac
set BEAN_JAR=%1
set EJB_TEMP=f:\jdev32\myclasses\wl
set XMLPARSERV2=f:\jdev32\lib\xmlparserv2.jar;
set JDBC_LIBS=f:\jdev32\jdbc\oracle8.1.7\lib\classes12.zip
set JBO_EJB_RUNTIME=f:\jdev32\lib\jbomt.zip;f:\jdev32\lib\jboejb.jar;%XMLPARSERV2%;%JDBC_LIBS%
set CLASSPATH=%CLASSPATH%;%JBO_EJB_RUNTIME%;%BEAN_JAR%;%EJB_TEMP%
%JAVA% weblogic.ejbc -compiler javac f:\jdev32\myclasses\wlappmodule.jar f:\jdev32\myclasses\wlAppModuleGenerated.jar;f:\jdev32\lib\jbodomorcl.zip
pushd %EJB_TEMP%
@endlocal
Note: substittue appropriate jar file and directory structure names
=> Run setenv.cmd
=> Run deploybc4j.cmd
=> Configure Weblogic server[list]
If your weblogic server is residing on a different machine then
[*]copy wlAppModuleGenerated.jar (generated jar file from deploybc4j.cmd)
[*]Copy classes12.zip from JDEV_HOME/jdbc/lib/oracle8.1.7/ directory
[*]Copy jbodomorcl.zip
[*]jbodatum12.zip
[*]xmlparserv2.jar
[*]jbomt.zip
[*]jboejb.jar from JDEV_HOME/lib directory
[*]edit weblogic.properties file in WEBLOGIC_HOME directory
[*]In the WEBLOGIC EJB DEMO PROPERTIES sectio
[*]add weblogic.ejb.deploy=E:/weblogic/myserver/wlAppModuleGenerated.jar
(generated jar file from deploybc4j.cmd file)
[*]edit startweblogic.cmd file in WEBLOGIC_HOME directory
[*]set POST_CLASSPATH=f:\jdev32\jdbc\oracle8.1.7\lib\classes12.zip;f:\jdev32\lib\jboorasql.zip;f:\jdev32\lib\jbodatum12.zip;f:\jdev32\lib\xmlparserv2.jar;f:\jdev32\lib\jbomt.zip;f:\jdev32 \lib\jboEJB.jar;f:\jdev32\lib\jbodomorcl.zip
[*]add E:/weblogic/myserver/wlAppModuleGenerated.jar
(generated jar file from deploybc4j.cmd file) in the weblogic_classpath setting[list]
Note: modify the directory structure of jar files as apporpriate
=> Run the BC4J tester to test the deployed BC4J Appmodule as session bean to Weblogic[list]
[*]Add a new library
[*]Select the Project in which you developed the BC4J Appmodule
[*]Project | Project Properties
[*]select libraries tab
[*]Click on Add
[*]Click on New
[*]Specify "JBO WL Client" in the NAME
[*]Click on ... button for adding the jar files
[*]Click on Add/Zip jar button to add the following files
weblogicaux.jar
jboremoteejb.zip
jboremote.zip
<Weblogic_home>/classes
[*]Click on OK
[*]Start the weblogic server
[*]Bring the BC4J Tester by doing a right mouse on the appmodule and selecting Test option
[*]In the Middle Tier Server Type Select "Weblogic"
[*]Specify Host name and port # of weblogic server
[*]Click on Connect[list]
raghu
nullAlthough this explains how to then deploy to Weblogic on another server, it still presumes that it is installed on the same computer as JDev. I moved the weblogic.jar file over to the computer and fudged a few things to get it to work.
Also, I am testing this with Weblogic 6.0, so some of the information does not work as prescribed. I edited the config.xml instead of the weblogic.properties file. I am trying to figure out where to put all of the *.jar and *.zip files that I copied over to the Solaris machine with Weblogic. Any suggestions?
And one of the steps in the section to create the deploybc4j.cmd file is wrong. It says
"%JAVA% weblogic.ejbc -compiler javac f:\jdev32\myclasses\wlappmodule.jar f:\jdev32\myclasses\wlAppModuleGenerated.jar;f:\jdev32\lib\jbodomorcl.zip"
Which does not work. I took off the last part:
"%JAVA% weblogic.ejbc -compiler javac f:\jdev32\myclasses\wlappmodule.jar f:\jdev32\myclasses\wlAppModuleGenerated.jar"
and it worked. It was getting that whole last part and trying to create a directory with that name and failing.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by David Shanes ([email protected]):
This seems to assume that JDev and Weblogic are installed on the same server (I refer to the section on setting the setenv.cmd file in the WEBLOGIC_HOME dir that includes the path to the JDev install.
I have JDev installed on a Win 2k box and Weblogic installed on a Solaris. Any suggestions? I got all the way up to the setenv.cmd step fine.<HR></BLOCKQUOTE>
null
Maybe you are looking for
-
Multiple phones share one Icloud account. We use it to schedule jobs and crew leaders read the cloud to get the information of the job that needs to be done. However, we recently had a change of leadership and we think this person might have logged i
-
I have created some code in c# to compare PDF's in Acrobat V9. I was wondering how to programmatically determine when the comparison is finished. If you run the comparison by interactively a progress bar is shows, perhaps I can access this. I woul
-
I just installed iLife 08. I opened an existing project, and the screen is black. If I play the title, I get audio, but no file shows video. Any ideas what might be wrong?
-
ISight camera exposure time control for astrophotography
Does anyone know of a way, or an application that allows you to control the shutter speed/exposure time when taking a photo with an external iSight camera? I am trying to adapt an external iSight camera for astro-photography. There are some excellen
-
Table Re-org using OEM - Space did not released
All, I'm in the process of doing online table re-org using oem segment advisor. But even after the i re-organized the table it is showing the same space that means the recommended was not reclaimed. Any one having idea about table re-org using OEM Ve