0 Replies Latest reply on Sep 25, 2016 11:25 AM by Yuen Lian Wu

    JBOSS unable to retrieve value in java.naming.security.principal proprety due to special characters

    Yuen Lian Wu Newbie

      Hi Team,

       

      I am using JBOSS 6.4.6 and I am using TIBCO EMS as my third party messaging API.

       

      For TIBCO EMS, we need to pass in following parameters in MDB annotation level for activation

       

      @ActivationConfigProperty(propertyName = "connectionFactory", propertyValue = "/uat/db/us/GTO/TRACER/S001UAT/TRACER.ESS.GATEWAY.IN:xatcf"),
      @ActivationConfigProperty(propertyName = "user", propertyValue = "DBJMS_USER"),
      @ActivationConfigProperty(propertyName = "password", propertyValue = "password"),
      @ActivationConfigProperty(

      propertyName = "jndiParameters", propertyValue =

      "java.naming.factory.initial=com.db.appinfra.naming.dbContextFactory;

      java.naming.provider.url=dbnaming:(

      ldap://ldapd1.uk.db.com:389/ou=dbusjms,ou=services,ou=global,dc=dbgroup,dc=com

      ldap://ldapd2.uk.db.com:389/ou=dbusjms,ou=services,ou=global,dc=dbgroup,dc=com

      );

      java.naming.security.principal=uid=dbusjmsuser,ou=Directory Administrators,dc=dbgroup,dc=com;

      java.naming.security.credentials=password;

      java.naming.referral=follow"

      )

       

      The key here is property "java.naming.security.principal=uid=user,ou=Administrators,dc=group,dc=com", the value is list of key value pairs which contains equal sign and comma.

      For some reason, JBOSS is unable to look up(missing) this property during startup as it contains both special characters.

       

      23:05:35,972 ERROR [org.jboss.resource.adapter.jms.inflow.JmsActivation] (default-threads - 1) Unable to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@75799ca7(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@57a0a6fb destination=/uat/db/us/GTO/TRACER/S001UAT/TRACER.ESS.GATEWAY.IN:topic destinationType=javax.jms.Topic acknowledgeMode=Auto-acknowledge subscriptionDurability=false reconnectInterval=30 reconnectAttempts=10 user=DBJMS_USER password=<not shown> maxMessages=1 minSession=1 maxSession=15 connectionFactory=/uat/db/us/GTO/TRACER/S001UAT/TRACER.ESS.GATEWAY.IN:xatcf jndiParameters={java.naming.provider.url=dbnaming:(ldap://ldapd1.uk.db.com:389/ou%3Ddbusjms%2Cou%3Dservices%2Cou%3Dglobal%2Cdc%3Ddbgroup%2Cdc%3Dcom ldap://ldapd2.uk.db.com:389/ou%3Ddbusjms%2Cou%3Dservices%2Cou%3Dglobal%2Cdc%3Ddbgroup%2Cdc%3Dcom), java.naming.factory.initial=com.db.appinfra.naming.dbContextFactory, java.naming.security.credentials=<not shown>, java.naming.referral=follow}): java.lang.ClassCastException: Object at '/uat/db/us/GTO/TRACER/S001UAT/TRACER.ESS.GATEWAY.IN:topic' in context {java.naming.provider.url=dbnaming:(ldap://ldapd1.uk.db.com:389/ou%3Ddbusjms%2Cou%3Dservices%2Cou%3Dglobal%2Cdc%3Ddbgroup%2Cdc%3Dcom ldap://ldapd2.uk.db.com:389/ou%3Ddbusjms%2Cou%3Dservices%2Cou%3Dglobal%2Cdc%3Ddbgroup%2Cdc%3Dcom), java.naming.factory.initial=com.db.appinfra.naming.dbContextFactory, java.naming.ldap.version=3, java.naming.factory.url.pkgs=org.jboss.as.naming.interfaces:org.jboss.ejb.client.naming, java.naming.security.credentials=2Sx4GJac, java.naming.referral=follow} is not an instance of [class=javax.jms.Topic classloader=ModuleClassLoader for Module "javax.jms.api:main" from local module loader @1b26f7b2 (finder: local module finder @491cc5c9 (roots: C:\Applications\jboss\modules,C:\Applications\jboss\modules\system\layers\base\.overlays\layer-base-jboss-eap-6.4.6.CP,C:\Applications\jboss\modules\system\layers\base)) interfaces={interface=javax.jms.Destination classloader=ModuleClassLoader for Module "javax.jms.api:main" from local module loader @1b26f7b2 (finder: local module finder @491cc5c9 (roots: C:\Applications\jboss\modules,C:\Applications\jboss\modules\system\layers\base\.overlays\layer-base-jboss-eap-6.4.6.CP,C:\Applications\jboss\modules\system\layers\base))}] object class is [class=com.db.appinfra.naming.dbContext classloader=ModuleClassLoader for Module "org.jboss.genericjms.provider:main" from local module loader @1b26f7b2 (finder: local module finder @491cc5c9 (roots: C:\Applications\jboss\modules,C:\Applications\jboss\modules\system\layers\base\.overlays\layer-base-jboss-eap-6.4.6.CP,C:\Applications\jboss\modules\system\layers\base)) interfaces={interface=javax.naming.Context classloader=null}]

      at org.jboss.resource.adapter.jms.inflow.JmsActivation.lookup(JmsActivation.java:572) [generic-jms-ra-jar-1.0.7.Final-redhat-1.jar:1.0.7.Final-redhat-1]

      at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDestination(JmsActivation.java:385) [generic-jms-ra-jar-1.0.7.Final-redhat-1.jar:1.0.7.Final-redhat-1]

      at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupActivation(JmsActivation.java:312) [generic-jms-ra-jar-1.0.7.Final-redhat-1.jar:1.0.7.Final-redhat-1]

      at org.jboss.resource.adapter.jms.inflow.JmsActivation.handleFailure(JmsActivation.java:258) [generic-jms-ra-jar-1.0.7.Final-redhat-1.jar:1.0.7.Final-redhat-1]

      at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:545) [generic-jms-ra-jar-1.0.7.Final-redhat-1.jar:1.0.7.Final-redhat-1]

      at org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:215)

      at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)

      at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:808)

      at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)

      at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:828)

      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_101]

      at org.jboss.threads.JBossThread.run(JBossThread.java:122)

       

      Is this a bug ? Or is there any other representation so that this property can be parse by LDAP server successfully?

       

       

      Thanks,

       

      Allen