[Remoting] - JBREM-877: New Socket Connection is being Created for Every
by ron.sigal@jboss.com
Statement of problem:
anonymous wrote :
| whenever EJB3 client requests the Server new socket is being created. at the client side the socket connection pool is not being used. Hope there is some issue with the socket connection after getting response from the server,becoz of which the server side the connection is being closed. this increases the CPU utilization,
|
| The same code is running fine in jboss 4.0.4 with jboss remoting 1.4.0
|
| new remoting 2.2.2 SP4 only handling 1/4 of the load with high CPU utilization.
|
"ron" wrote :
| Kumarselvan, what is your evidence for this behavior? Do you have some log file(s)?
|
"Kumarselvan" wrote :
| i am getting the following log:
| 2007-12-17 20:12:33,138 DEBUG [org.jboss.remoting.transport.socket.ClientSocketWrapper] reset timeout: 60000
| 2007-12-17 20:12:33,143 DEBUG [org.jboss.remoting.transport.socket.ServerThread] WorkerThread#1[131.10.20.210:40824] closing socketWrapper: ServerSocketWrapper[Socket[addr=/131.10.20.210,port=40824,localport=3873].229885]
| 2007-12-17 20:12:33,143 DEBUG [org.jboss.remoting.transport.socket.ServerSocketWrapper] wrote CLOSING
| 2007-12-17 20:12:33,143 DEBUG [org.jboss.remoting.transport.socket.SocketWrapper] ServerSocketWrapper[Socket[addr=/131.10.20.210,port=40824,localport=3873].229885] closing
| 2007-12-17 20:12:33,231 DEBUG [org.jboss.remoting.transport.socket.ClientSocketWrapper] reset timeout: 60000
| 2007-12-17 20:12:33,236 DEBUG [org.jboss.remoting.transport.socket.ServerThread] WorkerThread#0[131.10.20.210:40825] closing socketWrapper: ServerSocketWrapper[Socket[addr=/131.10.20.210,port=40825,localport=3873].aea1a2]
| 2007-12-17 20:12:33,236 DEBUG [org.jboss.remoting.transport.socket.ServerSocketWrapper] wrote CLOSING
| 2007-12-17 20:12:33,236 DEBUG [org.jboss.remoting.transport.socket.SocketWrapper] ServerSocketWrapper[Socket[addr=/131.10.20.210,port=40825,localport=3873].aea1a2] closing
| 2007-12-17 20:12:33,247 DEBUG [org.jboss.remoting.transport.socket.ClientSocketWrapper] reset timeout: 60000
| 2007-12-17 20:12:33,252 DEBUG [org.jboss.remoting.transport.socket.ServerThread] WorkerThread#1[131.10.20.210:40826] closing socketWrapper: ServerSocketWrapper[Socket[addr=/131.10.20.210,port=40826,localport=3873].5cf1a4]
| 2007-12-17 20:12:33,252 DEBUG [org.jboss.remoting.transport.socket.ServerSocketWrapper] wrote CLOSING
| 2007-12-17 20:12:33,252 DEBUG [org.jboss.remoting.transport.socket.SocketWrapper] ServerSocketWrapper[Socket[addr=/131.10.20.210,port=40826,localport=3873].5cf1a4] closing
| 2007-12-17 20:12:33,259 DEBUG [org.jboss.remoting.transport.socket.ClientSocketWrapper] reset timeout: 60000
| 2007-12-17 20:12:33,265 DEBUG [org.jboss.remoting.transport.socket.ServerThread] WorkerThread#0[131.10.20.210:40827] closing socketWrapper: ServerSocketWrapper[Socket[addr=/131.10.20.210,port=40827,localport=3873].150a19a]
| 2007-12-17 20:12:33,265 DEBUG [org.jboss.remoting.transport.socket.ServerSocketWrapper] wrote CLOSING
| 2007-12-17 20:12:33,265 DEBUG [org.jboss.remoting.transport.socket.SocketWrapper] ServerSocketWrapper[Socket[addr=/131.10.20.210,port=40827,localport=3873].150a19a] closing
| 2007-12-17 20:12:33,331 DEBUG [org.jboss.remoting.transport.socket.ClientSocketWrapper] reset timeout: 60000
| 2007-12-17 20:12:33,336 DEBUG [org.jboss.remoting.transport.socket.ServerThread] WorkerThread#1[131.10.20.210:40828] closing socketWrapper: ServerSocketWrapper[Socket[addr=/131.10.20.210,port=40828,localport=3873].1c3f810]
| 2007-12-17 20:12:33,336 DEBUG [org.jboss.remoting.transport.socket.ServerSocketWrapper] wrote CLOSING
| 2007-12-17 20:12:33,336 DEBUG [org.jboss.remoting.transport.socket.SocketWrapper] ServerSocketWrapper[Socket[addr=/131.10.20.210,port=40828,localport=3873].1c3f810] closing
| 2007-12-17 20:12:33,372 DEBUG [org.jboss.remoting.transport.socket.ClientSocketWrapper] reset timeout: 60000
| 2007-12-17 20:12:33,376 DEBUG [org.jboss.remoting.transport.socket.ServerThread] WorkerThread#0[131.10.20.210:40829] closing socketWrapper: ServerSocketWrapper[Socket[addr=/131.10.20.210,port=40829,localport=3873].1be1b4]
| "se
|
|
| This is keep on happening.....
|
|
| also i have seen in the netstat -nac | grep 3873
|
| in this i am able to see the client side port is changing and it is increasing for each connections made
|
|
| I am using default configuration of ejb3 remoting conf
|
|
| jboss.aop:service=AspectDeployer
| socket://${jboss.bind.address}:3873
|
|
| org.jboss.aspects.remoting.AOPRemotingInvocationHandler
|
|
|
|
| Is there is any other configration change i need to make it with the current release so that the problem i am having will get resolved...
|
| One thing i am not able to understand is y the connection getting closed for each call at the server side, this closing needs to happen only after the timeout.
| i Hope there is some exception which causes the connection to close forcely...
|
Kumarselvan, after a worker thread [org.jboss.remoting.transport.socket.ServerThread] processes an invocation, it should just go to the top of a loop and wait for the next invocation. If the load is very high, the server will try to close a ServerThread's socket and reuse it with another socket, but I wouldn't expect the regular behavior you're seeing. Another possibility is that some exception is being thrown in the course of handling an invocation, which would cause the socket to be closed.
Could you turn on trace logging so we can get more information? Add
| <category name="org.jboss.remoting">
| <priority value="TRACE"/>
| </category>
|
to jboss-log4j.xml in the conf directory. See http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigureLogging for a discussion of logging in the Application Server. Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114821#4114821
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4114821
18 years, 4 months
[JBoss Seam] - Re: implementing SMPC questions
by asookazian
submit method in SFSB:
@End
| @TransactionAttribute(TransactionAttributeType.REQUIRED) //REQUIRED is default, but added for clarity
| public void submit() {
|
| Object[] myAuditListSelection = getMyAuditListSelection();
|
| TblSecurityAuditWorking tsaw = (TblSecurityAuditWorking)myAuditListSelection[1];
|
| //determine what status to assign to each row/employee based on answers to radio buttons...
|
| //RULES: if yes/yes/yes --> green
| // if any no(s) --> yellow
| // if none selected --> red
|
| Boolean icomsAccountApproved = tsaw.getIcomsAccountApproved()==null?false:tsaw.getIcomsAccountApproved();
| Boolean adjustmentLimitApproved = tsaw.getAdjustmentLimitApproved()==null?false:tsaw.getAdjustmentLimitApproved();
| Boolean securityLevelApproved = tsaw.getSecurityLevelApproved()==null?false:tsaw.getSecurityLevelApproved();
|
| if ( icomsAccountApproved && adjustmentLimitApproved && securityLevelApproved ) {
| //green
| tsaw.setAuditProgress(SecurityAuditConstants.AUDIT_COMPLETE);
| }
| else if ( !icomsAccountApproved || !adjustmentLimitApproved || !securityLevelApproved ) {
| //yellow
| tsaw.setAuditProgress(SecurityAuditConstants.AUDIT_WAITING_ICOMS);
| }
| else {
| //yellow
| tsaw.setAuditProgress(SecurityAuditConstants.AUDIT_WAITING_ICOMS);
| }
|
| emICOMS.merge(tsaw);
|
| //check to see if there are any notes for each radio button for this employee/row
| //then update/insert accordingly
|
| //TO DO: move the hard-coding 3 for # of updateable columns in dataTable to resource bundle
|
| // TO DO: noteAction.submit() was moved to action listener attribute in modalPanels...
| //call submit to ensure new note is added to array
| //noteAction.submit();
|
| for (int i = 0; i < 3; i++) {
| TblSecurityAuditNote note = getTblSecurityAuditNote(currentRowNum, i);
| if (note != null) {
| log.info("myNotes["+currentRowNum+"]["+i+"]: noteText = " + note.getNoteText());
| emICOMS.persist(note);
| }
| }
|
| emICOMS.flush();
|
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114814#4114814
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4114814
18 years, 4 months
[JBoss Seam] - Re: implementing SMPC questions
by asookazian
I got the following exception after successfully integrating SMPC and flushMode=MANUAL to my code. Any idea why it's happening?
| 13:52:47,413 INFO [SecurityAuditAction] in preDestroy
| 13:52:47,429 ERROR [STDERR] Dec 20, 2007 1:52:47 PM javax.faces.event.MethodExpressionActionListener processAction
| SEVERE: Received 'javax.ejb.EJBTransactionRolledbackException' when invoking action listener '#{securityAuditAction.submit}' for component 'submitEmployee'
| 13:52:47,429 ERROR [STDERR] Dec 20, 2007 1:52:47 PM javax.faces.event.MethodExpressionActionListener processAction
| SEVERE: javax.ejb.EJBTransactionRolledbackException: org.hibernate.PersistentObjectException: detached entity passed to persist: com.cox.beans.entity.TblSecurityAuditNote
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:204)
| at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:100)
| at $Proxy113.submit(Unknown Source)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
| at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
| at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
| at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
| at org.javassist.tmp.java.lang.Object_$$_javassist_2.submit(Object_$$_javassist_2.java)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
| at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:341)
| at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
| at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
| at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
| at org.jboss.seam.el.OptionalParameterMethodExpression.invoke(OptionalParameterMethodExpression.java:45)
| at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
| at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:88)
| at javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)
| at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:746)
| at javax.faces.component.UICommand.broadcast(UICommand.java:368)
| at javax.faces.component.UIData.broadcast(UIData.java:854)
| at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184)
| at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162)
| at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350)
| at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Unknown Source)
| Caused by: javax.persistence.PersistenceException: org.hibernate.PersistentObjectException: detached entity passed to persist: com.cox.beans.entity.TblSecurityAuditNote
| at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerIm
| 13:52:47,429 ERROR [STDERR] pl.java:629)
| at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:218)
| at org.jboss.seam.persistence.EntityManagerProxy.persist(EntityManagerProxy.java:135)
| at com.cox.beans.session.SecurityAuditAction.submit(SecurityAuditAction.java:293)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at com.cox.beans.interceptor.ProfilingInterceptor.profile(ProfilingInterceptor.java:23)
| at sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| at com.cox.beans.interceptor.LoggerInterceptor.profile(LoggerInterceptor.java:19)
| at sun.reflect.GeneratedMethodAccessor146.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
| at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:48)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:56)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
| at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
| at sun.reflect.GeneratedMethodAccessor145.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| 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.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| ... 92 more
| Caused by: org.hibernate.PersistentObjectException: detached entity passed to persist: com.cox.beans.entity.TblSecurityAuditNote
| at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:79)
| at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
| at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618)
| at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592)
| at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:596)
| at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:212)
| ... 141 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114813#4114813
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4114813
18 years, 4 months
[JBoss Seam] - Re: Mysql Database Connection Problem Seam
by jazir1979
This could mean you haven't GRANTed the MySQL user connect privileges, eg:
GRANT ALL PRIVILEGES ON abc.* TO 'abc'@'localhost' IDENTIFIED BY 'xyz';
Also try substituting localhost with * if you want to connect from other machines.
"vikramchhetryy" wrote : Hi All,
| I am trying to create a new application in seam my problem is that i am not able to connect to the database.
|
| my connection xml looks like this:-
| | <?xml version="1.0" encoding="UTF-8"?>
| |
| | <!DOCTYPE datasources
| | PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
| | "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
| |
| | <datasources>
| | <local-tx-datasource>
| | <jndi-name>AbcDatasource</jndi-name>
| | <connection-url>jdbc:mysql://127.0.0.1/abc</connection-url>
| | <driver-class>com.mysql.jdbc.Driver</driver-class>
| | <user-name>abc</user-name>
| | <password>xyz</password>
| | <!--
| | <exception-sorter-class-name>
| | org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
| | </exception-sorter-class-name>
| | <metadata>
| | <type-mapping>mySQL</type-mapping>
| | </metadata>
| | -->
| | </local-tx-datasource>
| | </datasources>
| |
|
| The error I get is :-
| java.sql.SQLException: Server configuration denies access to data source
|
| I have tried many combinations for mysql connect url like
| jdbc:mysql://127.0.0.1:3306/abc
|
| I am using :-
| Suse 10.0
| mysql4.1
| seam2.0
| jboss 4.2.2
| ant1.6
| eclipse europa
| mysql-connector-java-3.0.9-stable-bin.jar
|
| i am not sure if i am using right connection jar.
|
| Any help would be appreciated.
|
| Regards,
| Vikram
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114810#4114810
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4114810
18 years, 4 months
[JNDI/Naming/Network] - Problem Using Session Bean In A Simple Seam Web Project
by elvisisking
I'm using Red Hat Develop Studio 1.0.0 CR1 and am new to web development so I'm sure there is a simple solution. These steps recreate the problem:
1. File -> New -> New Seam Web Project (using all defaults)
2. New -> Seam Action. This creates a session bean/seam action and an xhtml page containing a command button referencing the action method. I named the seam component "register" and the Java class "Register."
3. Modified "index.html" so that the home page of the project is this new xhtml page
4. In session bean/action class added "@Stateful" and "@Scope(ScopeType.SESSION)" tags and made class Serializable
5. In session bean/action class added "@Destroy" and "@Remove" tags to new method "destroy()"
6. Refactored out an interface, added "@Local" tag to the interface
7. Select project -> Run As -> Run on Server
8. Noticed this in console log: [Component] Component: register, scope: CONVERSATION, type: STATEFUL_SESSION_BEAN, class: org.domain.simple.session.Register, JNDI: Register/local
9. On web page that displays, hit the command button referencing the session bean/action method and get the following error:
- org.jboss.seam.InstantiationException: Could not instantiate Seam component: register
Caused by: javax.naming.NameNotFoundException: Register not bound
10. I have not changed any configuration file other than "index.html." So the components.properties value for "jndiPattern" is still "#{ejbName}/local"
Thanks for any help you can provide.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114803#4114803
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4114803
18 years, 4 months