Hello again Siva,
I apologize for the problem previously presented with the ant script
failure. I was missing the necessary password in the admin-password.txt
file. Thank your for your help with checking it out.
Sivakumar Thyagarajan wrote:
>
>
>> Even with the Glassfish server (earth - my PC) connectionFactory with the
>> added Property and the App Server 9.1 (jupiter - admin network server)
>> setup
>> I still get the following when running my Consumer.
>>
>>
>> # /opt/SUNWappserver/bin/appclient -client SimpleSynchConsumer.jar queue
>> Destination type is queue
>> Dec 14, 2007 9:14:14 AM com.sun.messaging.jmq.jmsclient.ExceptionHandler
>> logCaughtException
>> WARNING: [I500]: Caught JVM Exception: java.io.EOFException
>> Dec 14, 2007 9:14:14 AM com.sun.messaging.jms.ra.ManagedConnection <init>
>> SEVERE: MQJMSRA_MC4001: constructor:Aborting:JMSException on
>> createConnection=[C4060]: Login failed: user=admin,
>> broker=admin:7676(37393)
>> com.sun.messaging.jms.JMSSecurityException: [C4060]: Login failed:
>> user=admin, broker=admin:7676(37393)
>> at
>> com.sun.messaging.jmq.jmsclient.ProtocolHandler.authenticate(ProtocolHandler.java:1086)
>
> I am sorry I don't know exactly what the tutorial does. Is this the
> main error while running the appclient? Could you provide the full
> log? Have you changed the username/password for admin user in the
> local broker? Are you able to say list the destinations in the local
> broker via:
> $INSTALLROOT/publish/glassfish/imq/bin/imqcmd list dst -u admin and
> typing in admin for password?
>
Here is where I am at in my work.
Summary of Current Tutorial testing.
From The Java EE 5 Tutorial – Writing A Simple JMS Client Applications
Initially I used the example ‘producer’ to create ‘SimpleProducer.java’ and
‘synchconsumer’ to create ‘SimpleSynchConsumer.java’. These two were
written for ‘earth’ (my PC) and I used both asadmin and Glassfish V2 b53 to
setup and AppServer with the appropriate connectionFactories and queue/topic
resources. I ran these successfully to write messages to and read messages
from a queue. The last test was to write 100 messages to the queue using
the SimpleProducer then shutdown my PC overnight. In the morning I used the
SimpleSynchConsumer to read the messages back from the queue as expected.
My next task (the current one I am dealing with) is to run on Multiple
Systems, i.e. from ‘earth’ (my local PC having Glassfish v2 b53) to
‘jupiter’ (my ‘admin’ network Solaris server). To do so (according to the
tutorial instructions) I had to modify the SimpleProducer and
SimpleSynchConsumer to point to jms/AdminConnectionFactory (in the tutorial
it is the jms/JupiterConnectionFactory). I setup Glassfish v2 b53 as
having a remote factory connection jms/AdminConnectionFactory with the
Property AddressList=admin:7676 (with your help). I setup the
jms/AdminConnectionFactory as local on the network server admin (‘jupiter’).
The same queues and topics have also been created on both systems. In the
tutorial at the bottom of page 932 (pdf version) the final paragraph reads,
When you run the programs, they will work as shown in Figure 31.6.
It is at this point I am attempting to ‘run the programs’ as I did when both
were on the same system. My difficulty is understanding and causing the two
Systems (PC & network server), the two AppServers (Glassfish v2 b53 &
AppServer 9.1), and SimpleProducer on ‘earth’ and SimpleSynchConsumer on
‘jupiter’ (my ‘admin’) to communicate.
On my Windows PC (‘earth’).
C:\source\projects\JMS\SimpleProducer>C:\Progra~1\glassfish-v2-b53\imq\bin\imqcmd
list dst -u admin
Password: admin
Listing all the destinations on the broker specified by:
-------------------------
Host Primary Port
-------------------------
localhost 7676
------------------------------------------------------------------------
Name Type State Producers Consumers Msgs
Total Count UnAck Avg Size
------------------------------------------------------------------------
mq.sys.dmq Queue RUNNING 0 0 0 0 0.0
queue Queue RUNNING 0 0 26 0 139.1923
Successfully listed destinations.
C:\source\projects\JMS\SimpleProducer>
On the Sun Solaris network server (‘admin’ a.k.a. ‘jupiter’):
$ /opt/SUNWappserver/imq/bin/imqcmd list dst -u admin
Password:
Listing all the destinations on the broker specified by:
-------------------------
Host Primary Port
-------------------------
localhost 7676
------------------------------------------------------------------------
Name Type State Producers Consumers Msgs
Total Count UnAck Avg Size
------------------------------------------------------------------------
mq.sys.dmq Queue RUNNING 0 0 0 0 0.0
Successfully listed destinations.
$
I have two build.properties files (one for SimpleProducer on the PC and the
other for SimpleSynchConsumer on the network server). I switch them out
between running the ant build for each on my PC.
I use the same commands I used when both jar files (SimpleProducer and
SimpleSynchConsumer) were on my PC. In this case they both fail creating
the connection from the connectionFactory.
For SimpleProducer:
C:\source\projects\JMS\SimpleProducer\dist>appclient -client
SimpleProducer.jar queue 13
Destination type is queue
Dec 18, 2007 1:46:29 PM com.sun.messaging.jmq.jmsclient.ExceptionHandler
logCaughtException
WARNING: [I500]: Caught JVM Exception: java.io.EOFException
Dec 18, 2007 1:46:29 PM com.sun.messaging.jms.ra.ManagedConnection <init>
SEVERE: MQJMSRA_MC4001: constructor:Aborting:JMSException on
createConnection=[C4060]: Login failed: user=admin,
broker=admin:7676(37393)
com.sun.messaging.jms.JMSSecurityException: [C4060]: Login failed:
user=admin, broker=admin:7676(37393)
at
com.sun.messaging.jmq.jmsclient.ProtocolHandler.authenticate(ProtocolHandler.java:1086)
at
com.sun.messaging.jmq.jmsclient.ProtocolHandler.hello(ProtocolHandler.java:993)
at
com.sun.messaging.jmq.jmsclient.ProtocolHandler.hello(ProtocolHandler.java:888)
at
com.sun.messaging.jmq.jmsclient.ConnectionImpl.hello(ConnectionImpl.java:528)
at
com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:2310)
at
com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:1012)
at
com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:414)
at
com.sun.messaging.jmq.jmsclient.UnifiedConnectionImpl.<init>(UnifiedConnectionImpl.java:60)
at
com.sun.messaging.jmq.jmsclient.XAConnectionImpl.<init>(XAConnectionImpl.java:58)
at
com.sun.messaging.XAConnectionFactory.createXAConnection(XAConnectionFactory.java:91)
at
com.sun.messaging.jms.ra.ManagedConnection.<init>(ManagedConnection.java:193)
at
com.sun.messaging.jms.ra.ManagedConnectionFactory.createManagedConnection(ManagedConnectionFactory.java:213)
at
com.sun.enterprise.resource.ConnectorAllocator.createResource(ConnectorAllocator.java:136)
at
com.sun.enterprise.resource.AbstractResourcePool.createSingleResource(AbstractResourcePool.java:891)
at
com.sun.enterprise.resource.AbstractResourcePool.createResourceAndAddToPool(AbstractResourcePool.java:1750)
at
com.sun.enterprise.resource.AbstractResourcePool.createResources(AbstractResourcePool.java:917)
at
com.sun.enterprise.resource.AbstractResourcePool.initPool(AbstractResourcePool.java:225)
at
com.sun.enterprise.resource.AbstractResourcePool.internalGetResource(AbstractResourcePool.java:516)
at
com.sun.enterprise.resource.AbstractResourcePool.getResource(AbstractResourcePool.java:443)
at
com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:248)
at
com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:176)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:337)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:235)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158)
at
com.sun.messaging.jms.ra.ConnectionFactoryAdapter._allocateConnection(ConnectionFactoryAdapter.java:179)
at
com.sun.messaging.jms.ra.ConnectionFactoryAdapter.createConnection(ConnectionFactoryAdapter.java:166)
at
com.sun.messaging.jms.ra.ConnectionFactoryAdapter.createConnection(ConnectionFactoryAdapter.java:148)
at com.davisco.jms.SimpleProducer.main(SimpleProducer.java:116)
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.util.Utility.invokeApplicationMain(Utility.java:266)
at
com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:417)
at
com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
at com.sun.enterprise.appclient.Main.main(Main.java:200)
Dec 18, 2007 1:46:29 PM com.sun.enterprise.connectors.ConnectionManagerImpl
internalGetConnection
WARNING: RAR5117 : Failed to obtain/create connection from connection pool [
jms/AdminConnectionFactory ]. Reason : MQJMSRA_MC4001:
constructor:Aborting:JMSException on createConnection=[C4060]: Login failed:
user=admin, broker=admin:7676(37393)
Exception occurred: com.sun.messaging.jms.JMSException: MQRA:CFA:allocation
failure:createConnection:Error in allocating a connection. Cause:
MQJMSRA_MC4001: constructor:Aborting:JMSException on
createConnection=[C4060]: Login failed: user=admin,
broker=admin:7676(37393)
C:\source\projects\JMS\SimpleProducer\dist>
For the SimpleSynchConsumer:
# /opt/SUNWappserver/bin/appclient -client SimpleSynchConsumer.jar queue
Destination type is queue
Dec 18, 2007 1:53:22 PM com.sun.messaging.jmq.jmsclient.ExceptionHandler
logCaughtException
WARNING: [I500]: Caught JVM Exception: java.io.EOFException
Dec 18, 2007 1:53:22 PM com.sun.messaging.jms.ra.ManagedConnection <init>
SEVERE: MQJMSRA_MC4001: constructor:Aborting:JMSException on
createConnection=[C4060]: Login failed: user=admin,
broker=admin:7676(37393)
com.sun.messaging.jms.JMSSecurityException: [C4060]: Login failed:
user=admin, broker=admin:7676(37393)
at
com.sun.messaging.jmq.jmsclient.ProtocolHandler.authenticate(ProtocolHandler.java:1086)
at
com.sun.messaging.jmq.jmsclient.ProtocolHandler.hello(ProtocolHandler.java:993)
at
com.sun.messaging.jmq.jmsclient.ProtocolHandler.hello(ProtocolHandler.java:888)
at
com.sun.messaging.jmq.jmsclient.ConnectionImpl.hello(ConnectionImpl.java:528)
at
com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:2310)
at
com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:1012)
at
com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:414)
at
com.sun.messaging.jmq.jmsclient.UnifiedConnectionImpl.<init>(UnifiedConnectionImpl.java:60)
at
com.sun.messaging.jmq.jmsclient.XAConnectionImpl.<init>(XAConnectionImpl.java:58)
at
com.sun.messaging.XAConnectionFactory.createXAConnection(XAConnectionFactory.java:91)
at
com.sun.messaging.jms.ra.ManagedConnection.<init>(ManagedConnection.java:193)
at
com.sun.messaging.jms.ra.ManagedConnectionFactory.createManagedConnection(ManagedConnectionFactory.java:213)
at
com.sun.enterprise.resource.ConnectorAllocator.createResource(ConnectorAllocator.java:136)
at
com.sun.enterprise.resource.AbstractResourcePool.createSingleResource(AbstractResourcePool.java:891)
at
com.sun.enterprise.resource.AbstractResourcePool.createResourceAndAddToPool(AbstractResourcePool.java:1750)
at
com.sun.enterprise.resource.AbstractResourcePool.createResources(AbstractResourcePool.java:917)
at
com.sun.enterprise.resource.AbstractResourcePool.initPool(AbstractResourcePool.java:225)
at
com.sun.enterprise.resource.AbstractResourcePool.internalGetResource(AbstractResourcePool.java:516)
at
com.sun.enterprise.resource.AbstractResourcePool.getResource(AbstractResourcePool.java:443)
at
com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:248)
at
com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:176)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:337)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:235)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158)
at
com.sun.messaging.jms.ra.ConnectionFactoryAdapter._allocateConnection(ConnectionFactoryAdapter.java:179)
at
com.sun.messaging.jms.ra.ConnectionFactoryAdapter.createConnection(ConnectionFactoryAdapter.java:166)
at
com.sun.messaging.jms.ra.ConnectionFactoryAdapter.createConnection(ConnectionFactoryAdapter.java:148)
at
com.davisco.jms.SimpleSynchConsumer.main(SimpleSynchConsumer.java:96)
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.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
at
com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:417)
at
com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
at com.sun.enterprise.appclient.Main.main(Main.java:200)
Dec 18, 2007 1:53:22 PM com.sun.enterprise.connectors.ConnectionManagerImpl
internalGetConnection
WARNING: RAR5117 : Failed to obtain/create connection from connection pool [
jms/AdminConnectionFactory ]. Reason : MQJMSRA_MC4001:
constructor:Aborting:JMSException on createConnection=[C4060]: Login failed:
user=admin, broker=admin:7676(37393)
Exception occurred: com.sun.messaging.jms.JMSException: MQRA:CFA:allocation
failure:createConnection:Error in allocating a connection. Cause:
MQJMSRA_MC4001: constructor:Aborting:JMSException on
createConnection=[C4060]: Login failed: user=admin,
broker=admin:7676(37393)
#
Again, I know it is simply a setup issue. This is my first attempt at doing
this. I am the first of our programmers to attempt using JMS. We
previously had a reliable software vendor's software to take care of the
messaging needs, but that is no longer the case. I do appreciate your
help. Thank you.
Richard
--
View this message in context: http://www.nabble.com/JMS---Netbeans---Glassfish-tp14284564p14403677.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.