0
votes

following this link

While created XACML policy in wso2is accessing from wso2AM created one POST type function and while sending request in wso2AM store getting an error

[2019-01-14 16:19:07,008] ERROR - JMSConnectionFactory Error acquiring a Connection from the JMS CF : jmsEventPublisher using properties : {transport.jms.ConcurrentPublishers=allow, java.naming.provider.url=repository/conf/jndi.properties, java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory, transport.jms.DestinationType=topic, transport.jms.ConnectionFactoryJNDIName=TopicConnectionFactory, transport.jms.Destination=throttleData} javax.jms.JMSException: Error creating connection: Unable to Connect at org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:346) at org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:53) at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSUtils.createConnection(JMSUtils.java:387) at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory.createConnection(JMSConnectionFactory.java:268) at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory$PoolableJMSConnectionFactory.makeObject(JMSConnectionFactory.java:356) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1181) at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory.getConnectionFromPool(JMSConnectionFactory.java:286) at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSMessageSender.send(JMSMessageSender.java:86) at org.wso2.carbon.event.output.adapter.jms.JMSEventAdapter$JMSSender.run(JMSEventAdapter.java:284) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.wso2.andes.AMQConnectionFailureException: Unable to Connect at org.wso2.andes.client.AMQConnection.(AMQConnection.java:485) at org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:328) ... 13 more [2019-01-14 16:19:07,016] ERROR - JMSConnectionFactory Error acquiring a Connection from the JMS CF : jmsEventPublisher using properties : {transport.jms.ConcurrentPublishers=allow, java.naming.provider.url=repository/conf/jndi.properties, java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory, transport.jms.DestinationType=topic, transport.jms.ConnectionFactoryJNDIName=TopicConnectionFactory, transport.jms.Destination=throttleData} org.wso2.carbon.event.output.adapter.core.exception.OutputEventAdapterRuntimeException: Error acquiring a Connection from the JMS CF : jmsEventPublisher using properties : {transport.jms.ConcurrentPublishers=allow, java.naming.provider.url=repository/conf/jndi.properties, java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory, transport.jms.DestinationType=topic, transport.jms.ConnectionFactoryJNDIName=TopicConnectionFactory, transport.jms.Destination=throttleData} at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory.handleException(JMSConnectionFactory.java:197) at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory.createConnection(JMSConnectionFactory.java:278) at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory$PoolableJMSConnectionFactory.makeObject(JMSConnectionFactory.java:356) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1181) at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory.getConnectionFromPool(JMSConnectionFactory.java:286) at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSMessageSender.send(JMSMessageSender.java:86) at org.wso2.carbon.event.output.adapter.jms.JMSEventAdapter$JMSSender.run(JMSEventAdapter.java:284) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: javax.jms.JMSException: Error creating connection: Unable to Connect at org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:346) at org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:53) at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSUtils.createConnection(JMSUtils.java:387) at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory.createConnection(JMSConnectionFactory.java:268) ... 10 more Caused by: org.wso2.andes.AMQConnectionFailureException: Unable to Connect at org.wso2.andes.client.AMQConnection.(AMQConnection.java:485) at org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:328) ... 13 more [2019-01-14 16:19:07,018] ERROR - JMSMessageSender java.lang.NullPointerException at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSMessageSender.send(JMSMessageSender.java:88) at org.wso2.carbon.event.output.adapter.jms.JMSEventAdapter$JMSSender.run(JMSEventAdapter.java:284) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) [2019-01-14 16:19:07,488] WARN - ConnectCallback Connection refused or failed for : localhost/127.0.0.1:9776

1
Have you updated the jndi.properties properly?dilin993
why should i update jndi.properties. I haven't find any clue to update this file. And i also don't know what should i update in jndi.properties fileAvinash Tiwari
@dilin993 i have update jndi.properties file comment second '/test' url line after that i am getting error. error here linkAvinash Tiwari

1 Answers

0
votes

I recently faced this error and was able to fix this by help of this page.

If you have changed the password of the super admin from /repository/conf/user-mgt.xml you need to change it in /repository/conf/jndi.properties as well.

One important thing that you need to take care of is that the special characters in passsword string in jndi.properties need to be encrypted. For example if password is admin?= in user-mgt.xml, you need to write it as admin%3F%3D in jndi.properties