[EJB 3.0] - two beans within single transaction problem
by beep_beep
Hi!
I have very strange exception. I'm quite new in ejbs, so , please, be patient.
My bean (SfSB) called by servlet and invoked method on bean has attribute
TransactionAttributeType.REQUIRED.
Then my bean calls other SfSB bean(injected) and called method is also has
TransactionAttributeType.REQUIRED
On second call I have this annoying exception:
What is wrong here? I have no clue.
Please, help!!
anonymous wrote : javax.ejb.EJBException: java.lang.RuntimeException: cannot import a transaction
| context when a transaction is already associated with the thread
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.ja
| va:69)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java
| :192)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:98)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInt
| erceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:98)
| at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulIn
| stanceInterceptor.java:81)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:98)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(Authentic
| ationInterceptor.java:78)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:98)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterce
| ptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:98)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(Asynchrono
| usInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:98)
| at org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulConta
| iner.java:308)
| at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:104)
| at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRem
| otingInvocationHandler.java:82)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
| at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalCli
| entInvoker.java:72)
| at org.jboss.remoting.Client.invoke(Client.java:525)
| at org.jboss.remoting.Client.invoke(Client.java:488)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemot
| eInterceptor.java:55)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:98)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPr
| opagationInterceptor.java:61)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:98)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityC
| lientInterceptor.java:55)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:98)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.
| java:65)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:98)
| at org.jboss.ejb3.stateful.StatefulRemoteProxy.invoke(StatefulRemoteProx
| y.java:133)
| at $Proxy87.create(Unknown Source)
| at com.sap.xtp.client.simple.ClientServlet.doPost(ClientServlet.java:74)
|
| at com.sap.xtp.client.simple.ClientServlet.doGet(ClientServlet.java:40)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
| lter.java:81)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
| alve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
| alve.java:178)
| at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrinc
| ipalValve.java:39)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
| yAssociationValve.java:159)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
| e.java:59)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
| ava:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
| ava:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
| ve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
| a:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
| :856)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
| ssConnection(Http11Protocol.java:744)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
| int.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
| kerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.RuntimeException: cannot import a transaction context when
| a transaction is already associated with the thread
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInt
| erceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:98)
| at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulIn
| stanceInterceptor.java:81)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:98)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(Authentic
| ationInterceptor.java:78)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:98)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterce
| ptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:98)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(Asynchrono
| usInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:98)
| at org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulConta
| iner.java:308)
| at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:104)
| at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRem
| otingInvocationHandler.java:82)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957224#3957224
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957224
19 years, 9 months
[JBoss jBPM] - Re: Webforms and more info
by motorstock
"koen.aers(a)jboss.com" wrote : If you want to create customized forms, you have to rely on the technology of your choice and use JSF, Struts, etc... The default mechanism uses a simple rendering mechanism that shows forms based on a default task controller.
|
| Regards,
| Koen
Thanks Koen for your answer. as I told you before I´m newbie,and I have investigated a little more, and noted that I could use Jboss Seam, but , on the other hand, may I can use Jboss portal, building Portlets... I´m just almost guessing......
What I´m trying to make for my company, is a trouble ticket application (for help desk), There are groups, with a different skill every one, each group has few agents.
We need to place a ticket for and distribute it in that group, establish and control service level agreetments SLA´s, between groups (when they send the flow to the other group) in a workflow enviroment, with alerts, event notification, and task control.
Every agent or user has different rights to read, modify and collaborate each process instance, depending on his skills and rights.
As you note, we can buy a commercial application for this, but I´m insisting that we can make it under jboss platform.
What a I need is a little orientation about, where do I have to focus my efforts, since there are several web technologies at jboss and I couldn´t follow all projects documentation, as I would like it.
I think portal would be great because it manages users and groups, but I don´t know if that users are integrated with directory service at JBPM.
I could see a Jboss seam demo, and maybe it could work,
So Koen, for mi , it´s a goal to develope this small project using jboss technologies, I really want to take some courses, but currecntly I´m in South America, and there is not any training avaialbility here, so any help is welcome.
Thanks and best regards ans sorry about my English
Mauricio
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957217#3957217
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957217
19 years, 9 months
[Messaging, JMS & JBossMQ] - Re: Problem with ClassNotFoundException while trying to add
by blipsman
jaikiran,
thank you so much for your support and help.
Here is the log4.xml with my additions and modifications:
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
| <!-- ===================================================================== -->
| <!-- -->
| <!-- Log4j Configuration -->
| <!-- -->
| <!-- ===================================================================== -->
|
| <!-- $Id: log4j.xml,v 1.26.2.10 2006/04/21 17:29:20 csuconic Exp $ -->
|
| <!--
| | For more configuration infromation and examples see the Jakarta Log4j
| | owebsite: http://jakarta.apache.org/log4j
| -->
|
| <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
|
| <!-- ================================= -->
| <!-- Preserve messages in a local file -->
| <!-- ================================= -->
|
| <!-- A time/date based rolling appender -->
| <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <param name="File" value="${jboss.server.log.dir}/server.log"/>
| <param name="Append" value="false"/>
|
| <!-- Rollover at midnight each day -->
| <param name="DatePattern" value="'.'yyyy-MM-dd"/>
|
| <!-- Rollover at the top of each hour
| <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
| -->
|
| <layout class="org.apache.log4j.PatternLayout">
| <!-- The default pattern: Date Priority [Category] Message\n -->
| <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
|
| <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
| <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
| -->
| </layout>
| </appender>
|
|
| <!-- ================================= -->
| <!-- use this appender to log my messages in a separate file >
| <!-- ================================= -->
|
| <!-- EXTRA TRACE2 LEVEL -->
| <!-- this level called TRACE2 is
| actually based on Level.DEBUG_INT - 1,
| so it basically between DEBUG and original TRACE of the log4j -->
|
|
| <!-- static public final int TRACE2_INT = Level.DEBUG_INT - 1;
|
| private static String TRACE2_STR = "TRACE2";
|
| public static final MyExtraLevel TRACE2 = new MyExtraLevel (TRACE2_INT, TRACE2_STR, 0);
| -->
|
|
| <appender name="TRACE2_LOG" class="org.apache.log4j.FileAppender">
| <param name="File" value="${jboss.server.log.dir}/MyAppTrace.log
| <param name="Append" value="false"/>
|
|
| <layout class="org.apache.log4j.PatternLayout">
| <param name="ConversionPattern" value="%d{dd MMM yyy HH:mm:ss}, %-6p %C:%M:%L%m%n"/>
|
| </layout>
| </appender>
|
|
|
|
| <!-- A size based file rolling appender
| <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <param name="File" value="${jboss.server.log.dir}/server.log"/>
| <param name="Append" value="false"/>
| <param name="MaxFileSize" value="500KB"/>
| <param name="MaxBackupIndex" value="1"/>
|
| <layout class="org.apache.log4j.PatternLayout">
| <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
| </layout>
| </appender>
| -->
|
| <!-- ============================== -->
| <!-- Append messages to the console -->
| <!-- ============================== -->
|
| <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <param name="Target" value="System.out"/>
| <!-- I set level here to TRACE2, so when I log the mesage to the file
| it is also
| <param name="Threshold" value="INFO"
|
| <layout class="org.apache.log4j.PatternLayout">
| <!-- The default pattern: Date Priority [Category] Message\n -->
| <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
| </layout>
| </appender>
|
|
|
| <!-- ====================== -->
| <!-- More Appender examples -->
| <!-- ====================== -->
|
| <!-- Buffer events and log them asynchronously
| <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <appender-ref ref="FILE"/>
| <appender-ref ref="CONSOLE"/>
| <appender-ref ref="SMTP"/>
| </appender>
| -->
|
| <!-- EMail events to an administrator
| <appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <param name="Threshold" value="ERROR"/>
| <param name="To" value="admin(a)myhost.domain.com"/>
| <param name="From" value="nobody(a)myhost.domain.com"/>
| <param name="Subject" value="JBoss Sever Errors"/>
| <param name="SMTPHost" value="localhost"/>
| <param name="BufferSize" value="10"/>
| <layout class="org.apache.log4j.PatternLayout">
| <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
| </layout>
| </appender>
| -->
|
| <!-- Syslog events
| <appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <param name="Facility" value="LOCAL7"/>
| <param name="FacilityPrinting" value="true"/>
| <param name="SyslogHost" value="localhost"/>
| <layout class="org.apache.log4j.PatternLayout">
| <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
| </layout>
| </appender>
| -->
|
| <!-- Log events to JMS (requires a topic to be created)
| <appender name="JMS" class="org.apache.log4j.net.JMSAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <param name="Threshold" value="ERROR"/>
| <param name="TopicConnectionFactoryBindingName" value="java:/ConnectionFactory"/>
| <param name="TopicBindingName" value="topic/MyErrorsTopic"/>
| </appender>
| -->
|
| <!-- Log events through SNMP
| <appender name="TRAP_LOG" class="org.apache.log4j.ext.SNMPTrapAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <param name="ImplementationClassName" value="org.apache.log4j.ext.JoeSNMPTrapSender"/>
| <param name="ManagementHost" value="127.0.0.1"/>
| <param name="ManagementHostTrapListenPort" value="162"/>
| <param name="EnterpriseOID" value="1.3.6.1.4.1.24.0"/>
| <param name="LocalIPAddress" value="127.0.0.1"/>
| <param name="LocalTrapSendPort" value="161"/>
| <param name="GenericTrapType" value="6"/>
| <param name="SpecificTrapType" value="12345678"/>
| <param name="CommunityString" value="public"/>
| <param name="ForwardStackTraceWithTrap" value="true"/>
| <param name="Threshold" value="DEBUG"/>
| <param name="ApplicationTrapOID" value="1.3.6.1.4.1.24.12.10.22.64"/>
| <layout class="org.apache.log4j.PatternLayout">
| <param name="ConversionPattern" value="%d,%p,[%t],[%c],%m%n"/>
| </layout>
| </appender>
| -->
|
| <!-- Emit events as JMX notifications
| <appender name="JMX" class="org.jboss.monitor.services.JMXNotificationAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
|
| <param name="Threshold" value="WARN"/>
| <param name="ObjectName" value="jboss.system:service=Logging,type=JMXNotificationAppender"/>
|
| <layout class="org.apache.log4j.PatternLayout">
| <param name="ConversionPattern" value="%d %-5p [%c] %m"/>
| </layout>
| </appender>
| -->
|
|
|
| <!-- ================ -->
| <!-- Limit categories -->
| <!-- ================ -->
|
| <!-- define our own category -->
|
| <category name="com.mywebapp">
| <priority value="TRACE2" class="com.mywebapp.logging.MyExtraLevel" />
| <appender-ref ref="TRACE2_LOG" />
| </category>
|
|
|
|
| <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
| <category name="org.apache">
| <priority value="INFO"/>
| </category>
|
| <!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -->
| <category name="org.jboss.serial">
| <priority value="INFO"/>
| </category>
|
| <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
| <category name="org.jgroups">
| <priority value="WARN"/>
| </category>
|
| <!-- Limit the jacorb category to WARN as its INFO is verbose -->
| <category name="jacorb">
| <priority value="WARN"/>
| </category>
|
| <!-- Limit JBoss categories
| <category name="org.jboss">
| <priority value="INFO"/>
| </category>
| -->
|
| <!-- Limit the JSR77 categories -->
| <category name="org.jboss.management">
| <priority value="INFO"/>
| </category>
|
| <!-- Limit Axis based webservice category -->
| <category name="org.jboss.webservice">
| <priority value="DEBUG"/>
| </category>
| <category name="org.jboss.axis">
| <priority value="INFO"/>
| </category>
|
| <!-- Limit JBossWS webservice category
| <category name="org.jboss.ws">
| <priority value="DEBUG"/>
| </category>
| -->
|
| <!-- Decrease the priority threshold for the org.jboss.varia category
| <category name="org.jboss.varia">
| <priority value="DEBUG"/>
| </category>
| -->
|
| <!-- Show the evolution of the DataSource pool in the logs [inUse/Available/Max]
| <category name="org.jboss.resource.connectionmanager.JBossManagedConnectionPool">
| <priority value="TRACE" class="org.jboss.logging.XLevel"/>
| </category>
| -->
|
| <!--
| | An example of enabling the custom TRACE level priority that is used
| | by the JBoss internals to diagnose low level details. This example
| | turns on TRACE level msgs for the org.jboss.ejb.plugins package and its
| | subpackages. This will produce A LOT of logging output.
| <category name="org.jboss.system">
| <priority value="TRACE" class="org.jboss.logging.XLevel"/>
| </category>
| <category name="org.jboss.ejb.plugins">
| <priority value="TRACE" class="org.jboss.logging.XLevel"/>
| </category>
| -->
|
| <!--
| | Logs these events to SNMP:
| - server starts/stops
| - cluster evolution (node death/startup)
| - When an EJB archive is deployed (and associated verified messages)
| - When an EAR archive is deployed
|
| <category name="org.jboss.system.server.Server">
| <priority value="INFO" />
| <appender-ref ref="TRAP_LOG"/>
| </category>
|
| <category name="org.jboss.ha.framework.interfaces.HAPartition.lifecycle">
| <priority value="INFO" />
| <appender-ref ref="TRAP_LOG"/>
| </category>
|
| <category name="org.jboss.deployment.MainDeployer">
| <priority value="ERROR" />
| <appender-ref ref="TRAP_LOG"/>
| </category>
|
| <category name="org.jboss.ejb.EJBDeployer">
| <priority value="INFO" />
| <appender-ref ref="TRAP_LOG"/>
| </category>
|
| <category name="org.jboss.deployment.EARDeployer">
| <priority value="INFO" />
| <appender-ref ref="TRAP_LOG"/>
| </category>
|
| -->
|
|
|
| <!-- ======================= -->
| <!-- Setup the Root category -->
| <!-- ======================= -->
|
|
| <!-- Jaikiran,
| I have added to root attempting to make it work, but it did not work anyway -->
| <root>
| <level value="trace2#com.mywebapp.logging.MyExtraLevel" />
|
| <appender-ref ref="CONSOLE"/>
| <appender-ref ref="FILE"/>
|
|
| </root> <!-- Clustering logging -->
| <!-- Uncomment the following to redirect the org.jgroups and
| org.jboss.ha categories to a cluster.log file.
|
| <appender name="CLUSTER" class="org.jboss.logging.appender.RollingFileAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <param name="File" value="${jboss.server.log.dir}/cluster.log"/>
| <param name="Append" value="false"/>
| <param name="MaxFileSize" value="500KB"/>
| <param name="MaxBackupIndex" value="1"/>
|
| <layout class="org.apache.log4j.PatternLayout">
| <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
| </layout>
| </appender>
| <category name="org.jgroups">
| <priority value="DEBUG" />
| <appender-ref ref="CLUSTER"/>
| </category>
| <category name="org.jboss.ha">
| <priority value="DEBUG" />
| <appender-ref ref="CLUSTER"/>
| </category>
| -->
|
| </log4j:configuration>
|
Thanks again for your help and patience.
Best regards
Boris Lipsman
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957215#3957215
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957215
19 years, 9 months