[JBoss Getting Started Documentation] - Trailblazer fails to start
by manemannen
Hi,
I followed the TrailBlazer tutorial (http://trailblazer.demo.jboss.com/EJB3Trail/). Since I am new to both JBoss and EJBs I started a scratch EJB project (in Eclipse) and added the code provided in the tutorial. The Project deploys fine on JBoss but the Message beans fails to connect to their corresponding queues. It seems to be a security issue but I can't figure out the problem - and I spent the entire day trying :( Below is an excerpt of the error log. Could anyone give my a clue?
19:30:57,476 INFO [JmsActivation] Attempting to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@aaee6d(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter(a)fe437f destination=queue/mdb isTopic=false tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
19:30:57,514 ERROR [JmsActivation] Unable to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@aaee6d(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter(a)fe437f destination=queue/mdb isTopic=false tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
javax.jms.JMSSecurityException: Connection not authorized to subscribe to destination: mdb
at org.jboss.mq.security.ServerSecurityInterceptor.subscribe(ServerSecurityInterceptor.java:156)
at org.jboss.mq.server.TracingInterceptor.subscribe(TracingInterceptor.java:643)
at org.jboss.mq.server.JMSServerInvoker.subscribe(JMSServerInvoker.java:177)
at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:188)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:419)
at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:398)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
at java.lang.Thread.run(Thread.java:619)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179631#4179631
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179631
16 years, 3 months
[Security & JAAS/JBoss] - Re: Invoke secured EJB from standalone Tomcat
by craig1980
Hi.
I have tried by using this environment for my JNDI Lookup (for now i have used fixed credentials but it's more important the result forme):
| java.naming.provider.url=jnp://xxx.xxx.xxx.xxx:1099,
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory,
| java.naming.security.principal=username,
| java.naming.factory.url.pkgs=org.jnp.interfaces,
| java.naming.security.credentials=password
|
The error on the client is the same.
On the server (My Jboss server) by eneabling the security log i have this stack trace:
|
| 2008-09-30 18:45:19,468 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] Begin getAppConfigurationEntry(wfdemopluto), size=8
| 2008-09-30 18:45:19,468 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] getAppConfigurationEntry(wfdemopluto), no entry in appConfigs, tyring parentCont: null
| 2008-09-30 18:45:19,468 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] getAppConfigurationEntry(wfdemopluto), no entry in parentConfig, trying: other
| 2008-09-30 18:45:19,468 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] End getAppConfigurationEntry(wfdemopluto), authInfo=AppConfigurationEntry[]:
| [0]
| LoginModule Class: org.jboss.security.auth.spi.UsersRolesLoginModule
| ControlFlag: LoginModuleControlFlag: required
| Options:
| 2008-09-30 18:45:19,468 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] initialize, instance=@21756776
| 2008-09-30 18:45:19,468 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] Security domain: other
| 2008-09-30 18:45:19,468 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] findResource: null
| 2008-09-30 18:45:19,468 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] Properties file=file:/C:/jboss-4.0.5.GA/server/default/conf/users.properties, defaults=null
| 2008-09-30 18:45:19,468 DEBUG [org.jboss.security.auth.spi.UsersRolesLoginModule] Loaded properties, users=[ML, root, ang, operatore, Admin, operatoreCartografico, angpippo, cost]
| 2008-09-30 18:45:19,468 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] findResource: null
| 2008-09-30 18:45:19,468 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] Properties file=file:/C:/jboss-4.0.5.GA/server/default/conf/roles.properties, defaults=null
| 2008-09-30 18:45:19,468 DEBUG [org.jboss.security.auth.spi.UsersRolesLoginModule] Loaded properties, users=[ML, root, ang, operatore, Admin, operatoreCartografico, angpippo, cost]
| 2008-09-30 18:45:19,468 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] login
| 2008-09-30 18:45:19,468 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] Authenticating as unauthenticatedIdentity=null
| 2008-09-30 18:45:19,468 DEBUG [org.jboss.security.auth.spi.UsersRolesLoginModule] Bad password for username=null
| 2008-09-30 18:45:19,468 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] abort
| 2008-09-30 18:45:19,468 TRACE [org.jboss.security.plugins.JaasSecurityManager.wfdemopluto] Login failure
| javax.security.auth.login.FailedLoginException: Password Incorrect/Password Required
| at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:213)
| at org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:152)
| 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 javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
| at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
| at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
| at java.security.AccessController.doPrivileged(Native Method)
| at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
| at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
| at org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
| at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
| at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
| at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:211)
| at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:135)
| at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
| at org.jboss.ejb.SessionContainer.internalInvokeHome(SessionContainer.java:637)
| at org.jboss.ejb.Container.invoke(Container.java:975)
| 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 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:819)
| at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
| 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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
| at sun.rmi.transport.Transport$1.run(Transport.java:153)
| at java.security.AccessController.doPrivileged(Native Method)
| at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
| at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
| at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
| at java.lang.Thread.run(Thread.java:595)
| 2008-09-30 18:45:19,468 TRACE [org.jboss.security.plugins.JaasSecurityManager.wfdemopluto] End isValid, false
| 2008-09-30 18:45:20,437 DEBUG [org.apache.catalina.session.ManagerBase] Start expire sessions StandardManager at 1222793120437 sessioncount 0
| 2008-09-30 18:45:20,437 DEBUG [org.apache.catalina.session.ManagerBase] End expire sessions StandardManager processingTime 0 expired sessions: 0
| 2008-09-30 18:45:20,437 DEBUG [org.apache.catalina.session.ManagerBase] Start expire sessions StandardManager at 1222793120437 sessioncount 0
| 2008-09-30 18:45:20,437 DEBUG [org.apache.catalina.session.ManagerBase] End expire sessions StandardManager processingTime 0 expired sessions: 0
| 2008-09-30 18:45:20,437 DEBUG [org.apache.catalina.session.ManagerBase] Start expire sessions StandardManager at 1222793120437 sessioncount 0
| 2008-09-30 18:45:20,437 DEBUG [org.apache.catalina.session.ManagerBase] End expire sessions StandardManager processingTime 0 expired sessions: 0
| 2008-09-30 18:45:20,437 DEBUG [org.apache.catalina.session.ManagerBase] Start expire sessions StandardManager at 1222793120437 sessioncount 0
| 2008-09-30 18:45:20,437 DEBUG [org.apache.catalina.session.ManagerBase] End expire sessions StandardManager processingTime 0 expired sessions: 0
| 2008-09-30 18:45:20,437 DEBUG [org.apache.catalina.session.ManagerBase] Start expire sessions StandardManager at 1222793120437 sessioncount 0
| 2008-09-30 18:45:20,437 DEBUG [org.apache.catalina.session.ManagerBase] End expire sessions StandardManager processingTime 0 expired sessions: 0
|
It seems as on JBoss side the Principal is null.
Now my auth.conf for my web client configuration is this one:
|
| PortalRealm {
| com.liferay.portal.kernel.security.jaas.PortalLoginModule required;
| org.jboss.security.ClientLoginModule required;
| };
|
|
I must use both PortalLoginModule and ClientLoginModule (this last one is usefull for JBoss, infact by a simple java client i'm able in invocking my EJB)
I don't understand where i'm missing myself.
Any suggestion more pls?
Thnx to all
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179625#4179625
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179625
16 years, 3 months
[JBossMQ] - Re: Singleton MDB and FIFO on retry/rollback
by adrian@jboss.org
It is virtually impossible for a JMS to guarantee this behaviour and still be efficient.
The problem comes because a rollback/retry maybe initiated at some later date
by the transaction manager for in-doubt transactions.
The in-doubt transaction could be in an unfinished state because another branch
of the XA transaction (e.g. database updates) may not be able to proceed
through the commit stage (e.g. the database has crashed and needs recovering).
This is not an issue unique to JBoss, e.g.
http://www.devwebsphere.com/devwebsphere/2005/06/total_jms_messa.html
which also identifies some of the other pitfalls which presumably you're less likely to
make since they are more under your control. ;-)
Having said that, it can be done and there a feature request for it:
https://jira.jboss.org/jira/browse/JBMESSAGING-1151
so you can vote for it.
The main issue with this solution (don't deliver any other message
to clients until you get an ACK from the one message that is allowed to be delivered)
is that any in doubt XA transaction would have to be resolved
in order to resume message delivery and there is increased latency
for normal message delivery.
If you want to implement it yourself then the MDB has to be aware of the order
and NACK/rollback message deliveries that appear out of order.
Again not very efficient, and not that easy to do across redeploys of the MDB
without persisting the lastest order number somewhere.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179615#4179615
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179615
16 years, 3 months
[Security & JAAS/JBoss] - Re: login-config.xml defining new login-module
by ragavgomatam
JAAS Control Flags
If a security realm has multiple Authentication providers configured, the Control Flag attribute on the Authenticator provider determines the ordered execution of the Authentication providers. The values for the Control Flag attribute are as follows:
REQUIRED -- This LoginModule must succeed. Even if it fails, authentication proceeds down the list of LoginModules for the configured Authentication providers. This setting is the default.
REQUISITE -- This LoginModule must succeed. If other Authentication providers are configured and this LoginModule succeeds, authentication proceeds down the list of LoginModules. Otherwise, return control to the application.
SUFFICIENT --This LoginModule needs not succeed. If it does succeed, return control to the application. If it fails and other Authentication providers are configured, authentication proceeds down the LoginModule list.
OPTIONAL --The user is allowed to pass or fail the authentication test of this Authentication providers. However, if all Authentication providers configured in a security realm have the JAAS Control Flag set to OPTIONAL, the user must pass the authentication test of one of the configured providers.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179612#4179612
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179612
16 years, 3 months