[jboss-user] [Messaging, JMS & JBossMQ] - JBossMQ with PostgreSQL : MDB deployment failes, really desp

askesis do-not-reply at jboss.com
Wed Oct 4 07:14:59 EDT 2006


I want to change the JBossMQ database to PostgreSQL. 
All seems to go OK, but if I deploy the same ear that worked with  hsqldb I get the following exception (part of the trace):


  | 2006-10-04 12:43:38,113 TRACE [org.jboss.mq.Connection] addConsumer sub=Subscription[subId=-2147483648connection=ConnectionToken:ID:1/65e3510070c84a046983e850fdc1642f destination=QUEUE.Muntpost/PrintQueue messageSelector=null Local Create]
  | 2006-10-04 12:43:38,113 TRACE [org.jboss.mq.server.TracingInterceptor] CALLED : subscribe
  | 2006-10-04 12:43:38,113 TRACE [org.jboss.mq.server.TracingInterceptor] ARG    : Subscription[subId=-2147483648 destination=QUEUE.Muntpost/PrintQueue messageSelector=null Local Create]
  | 2006-10-04 12:43:38,113 TRACE [org.jboss.mq.security.ServerSecurityInterceptor] Checking subscribe authorize on ConnectionToken:ID:1/65e3510070c84a046983e850fdc1642f sub=Subscription[subId=-2147483648 destination=QUEUE.Muntpost/PrintQueue messageSelector=null Local Create]
  | 2006-10-04 12:43:38,113 DEBUG [org.jboss.mq.security.SecurityManager] No SecurityMetadadata was available for Muntpost/PrintQueue using default security config
  | 2006-10-04 12:43:38,113 TRACE [org.jboss.mq.security.SecurityMetadata] Adding role: Role {name=guest;read=true;write=true;create=true}
  | 2006-10-04 12:43:38,114 TRACE [org.jboss.mq.server.TracingInterceptor] EXCEPTION : subscribe: 
  | java.lang.NullPointerException
  | 	at org.jboss.mq.security.SecurityManager$SubjectInfo.toString(SecurityManager.java:68)
  | 	at org.jboss.mq.security.SecurityManager.authorize(SecurityManager.java:248)
  | 	at org.jboss.mq.security.ServerSecurityInterceptor.authorizeRead(ServerSecurityInterceptor.java:248)
  | 	at org.jboss.mq.security.ServerSecurityInterceptor.subscribe(ServerSecurityInterceptor.java:155)
  | 	at org.jboss.mq.server.TracingInterceptor.subscribe(TracingInterceptor.java:787)
  | 	at org.jboss.mq.server.JMSServerInvoker.subscribe(JMSServerInvoker.java:312)
  | 	at org.jboss.mq.il.jvm.JVMServerIL.subscribe(JVMServerIL.java:329)
  | 	at org.jboss.mq.Connection.addConsumer(Connection.java:789)
  | 	at org.jboss.mq.SpyConnectionConsumer.<init>(SpyConnectionConsumer.java:111)
  | 	at org.jboss.mq.SpyConnection.createConnectionConsumer(SpyConnection.java:209)
  | 	at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:795)
  | 	at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:839)
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  | 	at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 


I think that there is something wrong with my security but I have no idea what. Can anyone help me with this?

The jbossmq-service extract of what I think is the relevent part:

<mbean code="org.jboss.mq.security.SecurityManager" name="jboss.mq:service=SecurityManager">
  |     <attribute name="DefaultSecurityConfig">
  |       <security>
  |         <role name="guest" read="true" write="true" create="true"/>
  |       </security>
  |     </attribute>
  |     <attribute name="SecurityDomain">java:/jaas/jbossmq</attribute>
  |     <depends optional-attribute-name="NextInterceptor">jboss.mq:service=DestinationManager</depends>
  |   </mbean>
  | 

>From the logn-config.xml:


  |    <!-- Security domain for JBossMQ -->
  |     <application-policy name = "jbossmq">
  |        <authentication>
  |           <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
  |              flag = "required">
  |              <module-option name = "unauthenticatedIdentity">guest</module-option>
  |              <module-option name = "dsJndiName">java:/DefaultDS</module-option>
  |              <module-option name = "principalsQuery">SELECT PASSWD FROM JMS_USERS WHERE USERID=?</module-option>
  |              <module-option name = "rolesQuery">SELECT ROLEID, USERID FROM JMS_ROLES WHERE USERID=?</module-option>
  |           </login-module>
  |        </authentication>
  |     </application-policy>
  | 

The xdoclet tags of the MDB:


  | /**
  |  * @ejb.bean name="PrintQueueHandler"
  |  *           display-name="Name for PrintQueueHandler"
  |  *           description="Description for PrintQueueHandler"
  |  *           destination-type="javax.jms.Queue"
  |  *           acknowledge-mode="Auto-acknowledge"
  |  *           
  |  * @jboss.destination-jndi-name name = "queue/Muntpost/PrintQueue"
  |  */
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975989#3975989

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975989



More information about the jboss-user mailing list