[jBPM] - JBPM Hibernate logging
by Tej jbpm
Tej jbpm [http://community.jboss.org/people/tejJBPM] created the discussion
"JBPM Hibernate logging"
To view the discussion, visit: http://community.jboss.org/message/534906#534906
--------------------------------------------------------------
Hi All,
I have implemented JBPM successfully on Apache Tomcat 6.0.20. But I have an annoying problem with the hibernate logs.
The following lines are written to the my Apache log files repeatedly even when the system is not in use( but the Apache is still running).
Can anybody suggest how to turn off logging or reduce it to write only INFO messages.
My hibernate.cfg file looks like this. Can I add some line here or where is the log4j.properties file which these uses.Thanks a lot for your help.
--------------------------------
+<hibernate-configuration>+
++ +<session-factory>+
+
+
++ +<property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>+
++
++ +<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>+
+ <property name="hibernate.connection.url">jdbc:mysql://localhost/project</property>
+
+ <property name="hibernate.connection.username">root</property>+
+ <property name="hibernate.connection.password">root</property>
+
++ + <!--+
++ +<property name="connection.datasource">java:comp/env/jdbc/hsbc</property>+
++ +<property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>+
++ +<property name="jta.UserTransaction">java:comp/UserTransaction</property> -->+
+
+
+ <property name="hibernate.format_sql">true</property>+
++ + +
+ <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>+
+
+
++ +<mapping resource="jbpm.repository.hbm.xml" />+
++ +<mapping resource="jbpm.execution.hbm.xml" />+
++ +<mapping resource="jbpm.history.hbm.xml" />+
++ +<mapping resource="jbpm.task.hbm.xml" />+
++ +<mapping resource="jbpm.identity.hbm.xml" />+
+
+
++ +</session-factory>+
+</hibernate-configuration>+
2010-03-31 13:36:47,399 [DispatcherThread] DEBUG (Log4jLog.java:60) - ----- beginning hibernate tx 13474557 --------------------------------------------------------
2010-03-31 13:36:47,399 [DispatcherThread] DEBUG (Log4jLog.java:60) - ----- committing hibernate tx 23728357 -------------------------------------------------------
2010-03-31 13:36:47,399 [DispatcherThread] DEBUG (Log4jLog.java:60) - ----- beginning hibernate tx 3151278 --------------------------------------------------------
2010-03-31 13:36:47,399 [DispatcherThread] DEBUG (Log4jLog.java:60) - ----- committing hibernate tx 29278373 -------------------------------------------------------
2010-03-31 13:36:47,915 [DispatcherThread] DEBUG (Log4jLog.java:60) - ----- beginning hibernate tx 24882950 --------------------------------------------------------
2010-03-31 13:36:47,915 [DispatcherThread] DEBUG (Log4jLog.java:60) - ----- committing hibernate tx 28170956 -------------------------------------------------------
2010-03-31 13:36:47,915 [DispatcherThread] DEBUG (Log4jLog.java:60) - ----- beginning hibernate tx 27296167 --------------------------------------------------------
2010-03-31 13:36:47,915 [DispatcherThread] DEBUG (Log4jLog.java:60) - ----- committing hibernate tx 30551235 -----------------------
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534906#534906]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
Re: [jboss-user] [jBPM] - How can i get the execution pointer in a process?
by Sameeh Harfoush
Sameeh Harfoush [http://community.jboss.org/people/sameeh.harfoush] replied to the discussion
"How can i get the execution pointer in a process?"
To view the discussion, visit: http://community.jboss.org/message/534895#534895
--------------------------------------------------------------
ok
here is what i did
((ExecutionImpl)pi.findActiveExecutionIn(pi.findActiveActivityNames().iterator().next())).getActivity().getName()
where "pi" is my process instance
i am getting the below exception
### EXCEPTION ###########################################
15:16:35,000 SEV | [BaseJbpmTestCase] TEST THROWS EXCEPTION: no environment to get org.jbpm.pvm.internal.session.RepositorySession
org.jbpm.api.JbpmException: no environment to get org.jbpm.pvm.internal.session.RepositorySession
at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:197)
at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:190)
at org.jbpm.pvm.internal.model.ExecutionImpl.getProcessDefinition(ExecutionImpl.java:1121)
at org.jbpm.pvm.internal.model.ExecutionImpl.getActivity(ExecutionImpl.java:1143)
at com.roxana.test.jpdl.EmployeeTimesheetTest.executeTransitionInTask(EmployeeTimesheetTest.java:169)
at com.roxana.test.jpdl.EmployeeTimesheetTest.testManagerRejectTimesheet(EmployeeTimesheetTest.java:115)
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 junit.framework.TestCase.runTest(TestCase.java:164)
at org.jbpm.test.BaseJbpmTestCase.runTest(BaseJbpmTestCase.java:80)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
### EXCEPTION ###########################################
15:16:35,000 SEV | [BaseJbpmTestCase]
i couldnt find ExecutionImpl in the JPBM API docs, i had to check it from the source
thanks again
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534895#534895]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
[JBoss Messaging Development] - SpyJMSException
by Viswanath Nekkanti
Viswanath Nekkanti [http://community.jboss.org/people/vnekkanti.09] created the discussion
"SpyJMSException"
To view the discussion, visit: http://community.jboss.org/message/534878#534878
--------------------------------------------------------------
We are using JBOSS 4.0.0. RC1. The in-built feature of messaging, which is JBOSS MQ is being used to send messages. Frequently, we are encountered with the following exception while trying to transmit messages to n number of destinations.
org.jboss.mq.SpyJMSException: Connection Failed; - nested throwable: (java.io.IOException: ping timeout.)
at org.jboss.mq.Connection.asynchFailure(Connection.java:436)
at org.jboss.mq.Connection$PingTask.run(Connection.java:1385)
at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.io.IOException: ping timeout.
at org.jboss.mq.Connection$PingTask.run(Connection.java:1377)
Any suggestions?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534878#534878]
Start a new discussion in JBoss Messaging Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
[JBoss Microcontainer Development] - setRequiredStage should also setRequiredState
by Adrian Brock
Adrian Brock [http://community.jboss.org/people/adrian%40jboss.org] created the discussion
"setRequiredStage should also setRequiredState"
To view the discussion, visit: http://community.jboss.org/message/534876#534876
--------------------------------------------------------------
This patch in OSGi shows that there is something wrong with AbstractDeploymentContext.setRequiredStage().
You shouldn't have to explicitly do the ControllerContext.setRequiredState(), that is an implementation detail.
Index: PackageAdminImpl.java
===================================================================
--- PackageAdminImpl.java (revision 103305)
+++ PackageAdminImpl.java (working copy)
@@ -347,6 +347,18 @@
{
log.error("Error resolving bundles: " + resolvableBundles, ex);
allResolved = false;
+
+ // Reset the required state for bundles that didn't get resolved
+ for (OSGiBundleState bundleState : resolvableBundles)
+ {
+ if (bundleState.getState() == Bundle.INSTALLED)
+ {
+ DeploymentUnit unit = bundleState.getDeploymentUnit();
+ unit.setRequiredStage(DeploymentStages.DESCRIBE);
+ ControllerContext ctx = unit.getAttachment(ControllerContext.class);
+ ctx.setRequiredState(ControllerState.newState(DeploymentStages.DESCRIBE.getName()));
+ }
+ }
}
return allResolved;
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534876#534876]
Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
Re: [jboss-user] [JBoss Microcontainer Development] - On demand resolution
by Adrian Brock
Adrian Brock [http://community.jboss.org/people/adrian%40jboss.org] replied to the discussion
"On demand resolution"
To view the discussion, visit: http://community.jboss.org/message/534874#534874
--------------------------------------------------------------
This patch resolves the issue. It was only resetting the state if DeployerClient.change() threw a DeploymentException,
while in this case, there's no exception it is just incomplete.
core/src/main/java/org/jboss/osgi/framework/packageadmin
$ svn diff
Index: PackageAdminImpl.java
===================================================================
--- PackageAdminImpl.java (revision 103305)
+++ PackageAdminImpl.java (working copy)
@@ -347,6 +347,18 @@
{
log.error("Error resolving bundles: " + resolvableBundles, ex);
allResolved = false;
+
+ // Reset the required state for bundles that didn't get resolved
+ for (OSGiBundleState bundleState : resolvableBundles)
+ {
+ if (bundleState.getState() == Bundle.INSTALLED)
+ {
+ DeploymentUnit unit = bundleState.getDeploymentUnit();
+ unit.setRequiredStage(DeploymentStages.DESCRIBE);
+ ControllerContext ctx = unit.getAttachment(ControllerContext.class);
+ ctx.setRequiredState(ControllerState.newState(DeploymentStages.DESCRIBE.getName()));
+ }
+ }
}
return allResolved;
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534874#534874]
Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months