The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

nkatoch2001 (35) [Avatar] Offline
#1
Hi Reza,

Thanks for your time. I ran this code a couple of days ago but now I am getting the following error while running it:-

Csmilieocuments and SettingsNaveen Katoch>cd C:forGlassFishEJB3glassfishchapter3

C:forGlassFishEJB3glassfishchapter3>ant
Buildfile: build.xml

common:
[echo] BuildName: chapter3
[echo] BuildHome: C:forGlassFishEJB3glassfishchapter3
[echo] BuildFile: C:forGlassFishEJB3glassfishchapter3uild.xml
[echo] BuildJVM: 1.6

java-env-check:

init:
[echo] -----> Initializing project properties

setup:
[echo] -----> Creating the required sub-directories

compile-ejb-classes:
[echo] -----> Compiling EJBs

ejb-descriptor:

package-ejb:
[echo] -----> Create EJB jar file

compile-cli-classes:

cli-descriptor:

package-client:

package-app:

deploy:
[echo] asadmin.bat deploy --user admin --password adminadmin --host localhost --port 4848 --upload=true lib/chapter3.ear
[exec] Command deploy executed successfully.

all:
[echo] -----> Creates and deploys all deployable units for the application

BUILD SUCCESSFUL
Total time: 4 seconds


C:forGlassFishEJB3glassfishchapter3>ant run
Buildfile: build.xml

common:
[echo] BuildName: chapter3
[echo] BuildHome: C:forGlassFishEJB3glassfishchapter3
[echo] BuildFile: C:forGlassFishEJB3glassfishchapter3uild.xml
[echo] BuildJVM: 1.6

java-env-check:

init:
[echo] -----> Initializing project properties

run:
[echo] Executing client class using C:EXAMPLES_HOMEglassfish/bin/appclient.bat
[exec] Dec 17, 2009 6:22:48 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
[exec] WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: naveen.gateway.2wire.net; port: 3700"
[exec] org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
[exec] at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2783)
[exec] at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2804)
[exec] at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:261)
[exec] at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274)
[exec] at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130)
[exec] at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192)
[exec] at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:184)
[exec] at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:32smilie
[exec] at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
[exec] at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
[exec] at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:134)
[exec] at com.sun.enterprise.naming.SerialContext.getCachedProvider(SerialContext.java:259)
[exec] at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:204)
[exec] at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:159)
[exec] at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:409)
[exec] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[exec] at com.sun.enterprise.util.Utility.lookupObject(Utility.java:145)
[exec] at com.sun.enterprise.ServerConfiguration.<init>(ServerConfiguration.java:96)
[exec] at com.sun.enterprise.ServerConfiguration.getConfiguration(ServerConfiguration.java:80)
[exec] at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.createTransactionManager(J2EETransactionManagerImpl.java:294)
[exec] at com.sun.enterprise.appclient.AppContainer.initializeNaming(AppContainer.java:207)
[exec] at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:365)
[exec] at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:260)
[exec] at com.sun.enterprise.appclient.Main.main(Main.java:200)
[exec] Caused by: java.lang.RuntimeException: java.nio.channels.UnresolvedAddressException
[exec] at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
[exec] at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
[exec] ... 21 more
[exec] Caused by: java.nio.channels.UnresolvedAddressException
[exec] at sun.nio.ch.Net.checkAddress(Net.java:30)
[exec] at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:487)
[exec] at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105)
[exec] at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332)
[exec] ... 22 more

Please guide me if you could. I will appreciate it.

Thanks again,

Naveen Katoch
nkatoch2001 (35) [Avatar] Offline
#2
Re: Chapter 3 - Using Glassfish Server 2.1
Hi all,

I have fixed the error in this "glassfish/domains/domain1/config/sun-acc.xml" by changing from this

"<!--<target-server name="naveen.gateway.2wire.net" address="naveen.gateway.2wire.net" port="3700"/>-->

to this
<target-server name="localhost" address="localhost" port="3700"/>

Thanks,

Naveen
ockham (1) [Avatar] Offline
#3
Re: Chapter 3 - Using Glassfish Server 2.1
thank you. i met the same problem and solved it use your method.