[JBoss Messaging] - MBean Servic cannot open jms session
by chip_schoch
I upgraded to JBossAS 4.2.0.GA and JBM1.3.0.GA and when I deploy my message handling MBean I get the following when it tries to create a jms session. I am not quite sure what this is even saying to me. Any insight as to what I need to do to fix this would be sincerely appreciated.
2007-06-03 11:04:37,988 INFO [com.eLynx.Messaging.MessageReceiver] EMail ServiceService MessageReceiver thread started...
| 2007-06-03 11:04:37,988 INFO [com.eLynx.Messaging.MessageReceiver] EMail Service Service started.
| 2007-06-03 11:04:37,988 DEBUG [com.eLynx.Service.EMail.EMailService] Started eLynx.EMail:service=EMailService
| 2007-06-03 11:04:45,315 ERROR [com.eLynx.Messaging.MessageReceiver] Exception running MessageReceiver [thread id=115].
| java.lang.NullPointerException
| at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:86)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate$createSessionDelegate_6052335267724906805.invokeNext(ClientConnectionDelegate$createSessionDelegate_6052335267724906805.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$createSessionDelegate_6052335267724906805.invokeNext(ClientConnectionDelegate$createSessionDelegate_6052335267724906805.java)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate.createSessionDelegate(ClientConnectionDelegate.java)
| at org.jboss.jms.client.JBossConnection.createSessionInternal(JBossConnection.java:269)
| at org.jboss.jms.client.JBossConnection.createSession(JBossConnection.java:91)
| at com.eLynx.Messaging.MessageReceiver.run(MessageReceiver.java:552)
| 2007-06-03 11:04:46,424 ERROR [com.eLynx.Messaging.MessageReceiver] Exception closing JMS Session objects.
| java.lang.NullPointerException
| at org.jboss.jms.client.container.ClosedInterceptor.maintainRelatives(ClosedInterceptor.java:288)
| at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:165)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate$closing_N1847373599029068216.invokeNext(ClientConnectionDelegate$closing_N1847373599029068216.java)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate.closing(ClientConnectionDelegate.java)
| at org.jboss.jms.client.JBossConnection.close(JBossConnection.java:131)
| at com.eLynx.Messaging.MessageReceiver.run(MessageReceiver.java:629)
Here is the code snippet where it occurs:
// Lookup our JMS connection factory
| InitialContext context = getInitialContext ();
| QueueConnectionFactory connFactory = (QueueConnectionFactory) context
| .lookup (getProperty (MessageReceiverProperties
| .PropJMSConnectoryFactory));
|
| // Get our jms connection
| m_jmsConnection = connFactory.createQueueConnection ();
|
| // Get our jms session
| m_jmssession = m_jmsConnection.createSession (false, Session.AUTO_ACKNOWLEDGE);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050748#4050748
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050748
18Â years, 10Â months
[EJB 3.0] - Runtime Exception during deployment with Embedded EJB3
by pKraemer
Hello,
during deployment of my stateless Session Bean I get a RuntimeException:
| java.lang.RuntimeException: bean class has no local, webservice, or remote interfaces defined and does not implement at least one business interface
| at org.jboss.ejb3.ProxyFactoryHelper.getLocalInterfaces(ProxyFactoryHelper.java:107)
| at org.jboss.ejb3.ProxyDeployer.initializeLocalBindingMetadata(ProxyDeployer.java:115)
| at org.jboss.ejb3.SessionContainer.instantiated(SessionContainer.java:110)
| at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:415)
| at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:397)
| at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:378)
| at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:350)
| at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:305)
| at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.create(EJB3StandaloneDeployer.java:440)
|
I wrote a class for Deployment, a ManagedBean (called from a JSF Page) and a Stateless SessionBean implementing a local Interface.
| @Local
| public interface SecurityLocal {
| public void doSomethingElse();
| }
|
|
| @Stateless
| public class SecuritySBean implements SecurityLocal{
| @PersistenceContext(unitName="EnterpriseSaturn")
| EntityManager em;
|
| public void doSomethingElse(){
| System.out.println("Hallo");
| }
| }
|
| //ManagedBean
| public class LoginBean {
| private SecurityLocal securityLoc;
|
| public String doLogin(){
| String rolePage=null;
|
| try{
| if(securityLoc==null){
| deployment.getDeploymentUtil().createDeployer();
| securityLoc=(SecurityLocal)
| deployment.getDeploymentUtil().startDeployment("/SecuritySBean/local");
| }
| securityLoc.doSomethingElse();
| }
| catch(Exception e){
| e.printStackTrace();
| }
| System.out.println("LOOKUP Ergebnis: "+rolePage);
| return rolePage;
| }
| }
|
| public class DeploymentUtil {
|
| private static DeploymentUtil deployment;
| public EJB3StandaloneDeployer deployer;
|
| private DeploymentUtil(){
|
| }
|
| public static DeploymentUtil getDeploymentUtil(){
| if(deployment==null){
| deployment=new DeploymentUtil();
| }
| return deployment;
| }
|
| public void createDeployer(){
| if(deployer==null){
| System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.LocalOnlyContextFactory");
| System.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
| System.out.println("DEPLOYEMENT GESTARTET");
| EJB3StandaloneBootstrap.boot(null);
|
| deployer = EJB3StandaloneBootstrap.createDeployer();
| deployer.getArchivesByResource().add("META-INF/persistence.xml");
| deployer.setJndiProperties(getInitialContextProperties());
|
| try {
| deployer.create();
| deployer.start();
| } catch (Exception e) {
| e.printStackTrace();
| }
| }
| System.out.println("DEPLOYMENT ERFOLGREICH");
| }
| public Object startDeployment(String interfURL){
| System.out.println("LOOKUP for: "+interfURL);
| try {
| InitialContext ctx = getInitialContext();
| return ctx.lookup(interfURL);
| } catch (Exception e) {
| e.printStackTrace();
| }
| return null;
|
| }
| }
|
|
What's going wrong? Can anybody help me please?
Thx
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050747#4050747
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050747
18Â years, 10Â months
[EJB 3.0] - tx attributte - supports doesn't work as expected
by adamzrk
Hi
I've got an EJB:
| @Stateless
| @TransactionAttribute(TransactionAttributeType.SUPPORTS)
| public class AirportDaoBean implements AirportDaoLocal, AirportDaoRemote {
|
| @PersistenceContext
| private EntityManager manager;
|
| @Override
| public void createAirport(Airport airport) {
| manager.persist(airport);
| }
|
| @Override
| public Airport getAirportById(int id) {
| return manager.find(Airport.class, id);
| }
|
| @Override
| public List<Airport> getAll() {
| return manager.createQuery("from Airport order by city.country.name").getResultList();
| }
|
| }
|
As you can see I configured it with SUPPORTS transaction attribute, so when there is a transaction all methods in my bean will use it, when there is no transaction context then bean wouldn't begin a new one. So my question is: why i get the exception:
| Caused by: javax.persistence.TransactionRequiredException: EntityManager must be access within a transaction
| at org.jboss.ejb3.entity.ManagedEntityManagerFactory.verifyInTx(ManagedEntityManagerFactory.java:150)
| at org.jboss.ejb3.entity.TransactionScopedEntityManager.persist(TransactionScopedEntityManager.java:174)
| at master.airport.logic.impl.AirportDaoBean.createAirport(AirportDaoBean.java:24)
| 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.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerIntercepto
|
Regards
Adam
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050744#4050744
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050744
18Â years, 10Â months
[JBoss jBPM] - Problems , when inserting data from the database.
by mr.sathya
Hi Friends and Kukultjee sir,
I am new to jbpm.Hope u will help me in solving this Problem..
I am using Jbpm-3.1.4 and Jboss 4.0.2 as apllication server and database MsSQL ....
I developed processdefinition.xml file and deployed in jbpm-3.1.4 .it is running successfully with hardcoding values...
Now,what i am doing is i am inserting the values from the database using
stored procedure directly to the first node ie.startstate which contains
two textboxes i.e projectname,plan status .after
executing the storedprocedure the corresponding values are populated in
these textboxes..Up to Now..it's Ok..But after clicking the 'Save and Close' button
it is generating the following errors..
exception stacktrace:
14:41:25,436 DEBUG [JbpmContext] closing JbpmContext
14:41:25,436 DEBUG [Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@19707
14:41:25,436 DEBUG [DbPersistenceService] committing hibernate transaction
14:41:25,452 INFO [STDOUT] couldn't commit hibernate session
14:41:25,452 DEBUG [DbPersistenceService] closing hibernate session
14:41:25,452 DEBUG [Services] closing service 'logging': org.jbpm.logging.db.DbLoggingService@6258e1
14:41:25,452 DEBUG [Services] closing service 'authentication': org.jbpm.security.authentication.DefaultAuthenticationSe
rvice@b9242e
14:41:25,452 ERROR [[FacesServlet]] Servlet.service() for servlet FacesServlet threw exception
javax.faces.FacesException: Error calling action method of component with id taskform:transitionButton
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
at javax.faces.component.UICommand.broadcast(UICommand.java:106)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:271)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:56)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{taskBean.saveAndClose}
at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
... 34 more
Caused by: org.jbpm.graph.def.DelegationException
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInstance.java:247)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.getInitializedSwimlaneInstance(TaskMgmtInstance.java:202)
at org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:202)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:157)
at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:177)
at org.jbpm.graph.def.Node.enter(Node.java:321)
at org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke()
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:161)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$1b65fd46.enter()
at org.jbpm.graph.def.Transition.take(Transition.java:129)
at org.jbpm.graph.def.Node.leave(Node.java:399)
at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:213)
at org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke()
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:161)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$1b65fd46.leave()
at org.jbpm.graph.exe.Token.signal(Token.java:181)
at org.jbpm.graph.exe.Token.signal(Token.java:149)
at org.jbpm.graph.exe.Token$$FastClassByCGLIB$$74df1c6e.invoke()
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:161)
at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$82f38682.signal()
at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:469)
at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:408)
at org.jbpm.taskmgmt.exe.TaskInstance$$FastClassByCGLIB$$cb2c21af.invoke()
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:161)
at org.jbpm.taskmgmt.exe.TaskInstance$$EnhancerByCGLIB$$7b99ebe5.end()
at org.jbpm.webapp.bean.TaskBean.saveAndClose(TaskBean.java:189)
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.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
... 35 more
Caused by: org.jbpm.identity.assignment.ExpressionAssignmentException: couldn't resolve assignment expression 'user(Aari
f)'
at org.jbpm.identity.assignment.ExpressionAssignmentHandler.assign(ExpressionAssignmentHandler.java:104)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignmentDelegation(TaskMgmtInstance.java:259)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInstance.java:228)
... 69 more
Caused by: java.lang.NullPointerException
at org.jbpm.identity.hibernate.IdentitySession.getUserByName(IdentitySession.java:168)
at org.jbpm.identity.assignment.ExpressionAssignmentHandler.getUserByName(ExpressionAssignmentHandler.java:226)
at org.jbpm.identity.assignment.ExpressionAssignmentHandler.resolveFirstTerm(ExpressionAssignmentHandler.java:15
6)
at org.jbpm.identity.assignment.ExpressionAssignmentHandler.assign(ExpressionAssignmentHandler.java:80)
... 71 more
I tried and didnt find the solution Hope u will help me in this
Thanx in Advance...
-sathya
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050740#4050740
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050740
18Â years, 10Â months