[Messaging, JMS & JBossMQ] - MDB deployment error
by seanshih
Hi,
Can someone help with following?
I am trying to use IBM MQ resource adapter and I got this error when I deploy a MDB instance:
09:31:18,830 INFO [EjbModule] Deploying MDB
09:31:18,959 WARN [JMSContainerInvoker] JMS provider failure detected for MDB
org.jboss.deployment.DeploymentException: Error during queue setup; - nested throwable: (java.lang.ClassCastException: com.ibm.mq.jms.MQQueue cannot be cast to org.jboss.jms.destination.JBossDestination)
at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:811)
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.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 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.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:194)
at org.jboss.ejb.MessageDrivenContainer.startService(MessageDrivenContainer.java:272)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
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 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.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy70.start(Unknown Source)
at org.jboss.ejb.EjbModule.startService(EjbModule.java:429)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
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 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.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy31.start(Unknown Source)
at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:662)
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 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy32.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
Caused by: java.lang.ClassCastException: com.ibm.mq.jms.MQQueue cannot be cast to org.jboss.jms.destination.JBossDestination
at org.jboss.jms.client.container.SessionAspect.handleCreateConnectionConsumer(SessionAspect.java:737)
at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect1.invoke(SessionAspect1.java)
at org.jboss.jms.client.delegate.ClientConnectionDelegate$createConnectionConsumer_7915292773999367429.invokeNext(ClientConnectionDelegate$createConnectionConsumer_7915292773999367429.java)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
at org.jboss.jms.client.delegate.ClientConnectionDelegate$createConnectionConsumer_7915292773999367429.invokeNext(ClientConnectionDelegate$createConnectionConsumer_7915292773999367429.java)
at org.jboss.jms.client.delegate.ClientConnectionDelegate.createConnectionConsumer(ClientConnectionDelegate.java)
at org.jboss.jms.client.JBossConnection.createConnectionConsumer(JBossConnection.java:173)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:795)
... 115 more
09:31:18,966 ERROR [ClosedInterceptor] ClosedInterceptor.ClientConnectionDelegate[z7-8nmfu8df-1-z11es7df-abaxbp-824e6a]: method setExceptionListener() did not go through, the interceptor is CLOSED
09:31:18,967 ERROR [ClosedInterceptor] ClosedInterceptor.ClientConnectionDelegate[z7-8nmfu8df-1-z11es7df-abaxbp-824e6a]: method stop() did not go through, the interceptor is CLOSED
09:31:18,970 INFO [JMSContainerInvoker] Waiting for reconnect internal 10000ms for MDB
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133241#4133241
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133241
17 years
[JBossWS] - How to invoke Java beans <Enitty Home> classes generated by
by jbossdil89
Hello
I have generated codesuing seam gen and it has generated all the JSF files and Java persistence classes. e.g.
package com.test.seam.sessionbeans;
import com.test.seam.entitybeans.*;
import java.util.ArrayList;
import java.util.List;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;
@Name("couponHome")
public class CouponHome extends EntityHome {
public void setCouponCouponId(Integer id) {
setId(id);
}
public Integer getCouponCouponId() {
return (Integer) getId();
}
@Override
protected Coupon createInstance() {
Coupon coupon = new Coupon();
return coupon;
}
public void wire() {
}
public boolean isWired() {
return true;
}
public Coupon getDefinedInstance() {
return isIdDefined() ? getInstance() : null;
}
public List getListItemsCouponses() {
return getInstance() == null ? null : new ArrayList(
getInstance().getListItemsCouponses());
}
}
Now the JSF files generated can invoke the beans, how can i invoke these beans from standalone applications.
Thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133234#4133234
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133234
17 years
[JBoss Portal] - session/transction mandatory when calling UserModule/RoleMod
by je.a.le
I only need read only operations like getting list of role, user, etc...
I notice that in order for a "MBeanProxy" to works, the call must be done inside a session (ok) but into a transaction too (?)
here a working code :
| Session session = null;
| Transaction t = null;
| try {
| SessionFactory identitySessionFactory = (SessionFactory) new InitialContext().lookup("java:/portal/IdentitySessionFactory");
| session = identitySessionFactory.openSession();
| t = session.beginTransaction();
|
| MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
| RoleModule roleModule = (RoleModule) MBeanProxy.get(RoleModule.class,
| new ObjectName("portal:service=Module,type=Role"), mbeanServer);
|
| Set s = roleModule.findRoles();
| Iterator it = s.iterator();
| while (it.hasNext()) {
| // just dump role for the test
| System.out.println("roles : " + it.next());
| }
| } catch (Exception ex) {
| ex.printStackTrace();
| } finally {
| if (t != null) {t.rollback(); }
| if (session != null) {session.close();}
| }
|
It's strange to start a transaction and always call a roolback !?!
Am I actually making the request right !???
My code will not be call from a protlet, mostly servlet/dwr.
anyway adding a trans-attribute to portlet.xml doesn't work for me.
| <transaction>
| <trans-attribute>Required</trans-attribute>
| </transaction>
|
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133226#4133226
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133226
17 years
[JBoss Portal] - cross auth between jportal and dwr/servlet better solution t
by je.a.le
I convert a project from "form" submit based to dwr (ajax) submit. both work fine together.
At the top security(login, portlet access) level i will use jboss.
Like in any project :-) some actions must be valid only to some users. Since dwr is just servet, i must check user right here too.
>From the dwr servlet i succesfully have access to user and role module, but to know who is logged in, the only solution I found so far is by storing the user name into a session attribute.
in portlet with admin/secure op :
| // somewhere in the doView
| String ruser = request.getRemoteUser();
| if (ruser != null) {
| PortletSession sss = request.getPortletSession(true);
| if (sss != null) {
| sss.setAttribute("ruser", ruser, PortletSession.APPLICATION_SCOPE);
| }
| }
|
from a dwr class function
| WebContext ctx = WebContextFactory.get();
| HttpServletRequest req = ctx.getHttpServletRequest();
| HttpSession sss = req.getSession(false);
| if (sss != null) {
| String ruser = (String)sss.getAttribute("ruser");
| if( ruser !=null ){
| // user auth
| // now check againt jboss through role module etc.....
| }
| }
|
So, yes it's working. when loggin out, jboss clean the session too.
But i have 2 questions :
1) is it really secure ?? can an exploit might hack into my dwr function ??? (there's always a risk, I meet hack easily ...)
2) Is there a better solution, to get who's loggin in, direclty by asking jbossportal ???
what I really need, is to have acces to the roles list of the logged in user making the request; that's all (I'm using ejb to external db and jackrabbit)
Thks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133218#4133218
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133218
17 years