[JBoss Microcontainer] - Class Loading issues in JBoss 5.1.0
by aitor moragas
aitor moragas [http://community.jboss.org/people/tryasta] created the discussion
"Class Loading issues in JBoss 5.1.0"
To view the discussion, visit: http://community.jboss.org/message/633249#633249
--------------------------------------------------------------
Hi,
I've checked other class loading issues threads in this forum, but no provided solution has worked for me so far. Therefore, I shall post here my problem to check that I am doing things rightly.
I have a jboss instance, which is currently shared by numerous applications. I mean, various applications are deployed there, most of which we cannot touch or control.
Our application is an EAR which includes two modules: an EJB and a WAR.
app.ear
|
|\
| myEjb.jar
\
myWar.war
myEjb.jar uses a class let's call it myClass.class (inside app.ear/lib) whose name is shared by other applications running in this JBoss instance. Therefore, I thought that a classloading file like
<classloading xmlns="urn:jboss:classloading:1.0"
name="app.ear"
domain="app.ear:loader=app.ear"
parent-domain="DefaultDomain"
export-all="NON_EMPTY"
import-all="true"
parent-first="false"/>
would be enough to make sure the classes that both the EJB and the WAR use are the ones inside app.ear.
I also added two class loading files for the EJB and the WAR. They are like these:
<classloading xmlns="urn:jboss:classloading:1.0"
name="myEjb.ejb"
domain="myEjb.ejb"
parent-domain="app.ear:loader=app.ear"
export-all="NON_EMPTY"
import-all="true"
parent-first="false"/>
<classloading xmlns="urn:jboss:classloading:1.0"
name="myWar.war"
domain="myWar.war"
parent-domain="app.ear:loader=app.ear"
export-all="NON_EMPTY"
import-all="true"
parent-first="false"/>
But this configuration is not guaranteeing that the actual myClass that the EJB is loading is the one inside the app.ear/lib directory.
I don't want to set the parent-domain to "ignored" since there are lots of libraries in the common/lib directory that my application needs (spring, hibernate...)
Is there something I should do differently?
Thx
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/633249#633249]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 5 months
[JBoss Tools] - Upcoming talks about JBoss Tools & Friends
by Max Rydahl Andersen
Max Rydahl Andersen [http://community.jboss.org/people/maxandersen] modified the blog post:
"Upcoming talks about JBoss Tools & Friends"
To view the blog post, visit: http://community.jboss.org/community/tools/blog/2011/10/12/upcoming-talks...
--------------------------------------------------------------
European conference season is about to start and I and others will be out and about talking about JBoss Tools and Friends the upcoming weeks/months. Here is an excerpt of those I'll be giving or attending:
h3. Switzerland - Puzzle event & Neuchatel JBUG
Tuesday, 18th October at http://www.puzzle.ch/blog/articles/2011/10/03/puzzle-tech-talk-2011 Puzzle Tech Talk 2011, I'll be giving a short introduction on the various flavors of Red Hat OpenShift.
Wednesday, 19th October at http://jbug-neuchatel.org JBUG Neuchatel, http://community.jboss.org/people/theute Thomas Heute and I will be giving a more http://lanyrd.com/2011/nejbug-october/schedule/ detailed look into using OpenShift Express for scripting languages and especially Java EE development on top of JBoss AS 7.
h3. JUDCon, London
Monday, 31st October I get the pleasure to attend my first http://www.jboss.org/events/JUDCon/2011/london European JUDCon where I'll be taking the stage a few times:
14:30-15:15 - Making Examples accessible (http://lanyrd.com/2011/judconjax-london/shykm/) - talking about the rare subject on how you make your projects examples easy to use and install from both command line and IDE's. *Cancelled.*
19:00-20:00 - Emmanuel Bernard and I will host a http://lanyrd.com/2011/judconjax-london/skgxt/ live JBoss Community Asylum podcast from JUDCon inviting speakers and community members on stage to answer questions from the hosts and audience.
20:00-?? - http://lanyrd.com/2011/judconjax-london/skgxw/ Lightning talk showing five approaches to deploy to JBoss AS 7 in five minutes.
Do not forget to http://www.jboss.org/events/JUDCon/2011/london/register Register for JUDCon !
h3. EclipseCon, Ludwigsburg
This year EclipseCon Europe will be celebrating 10 year annivesary of Eclipse and we'll have two talks there on Thursday, 3rd November.
11:30-12:00 http://community.jboss.org/people/fbricon Fred Bricon will be giving his http://eclipsecon.org/sessions/workaround-driven-development-how-maven-in... Workaround Driven Development : How Maven integrates with Eclipse WTP talk where he will show m2e-wtp and talk about the challenges making it happen within the boundaries of Eclipse WTP.
15:30-16:00 I'm presenting on the http://lanyrd.com/2011/eclipsecon-europe/shhkk/ Good, Bad and Ugly sides of using Tycho for building Eclipse plugins.
h3. Devoxx, Antwerp
My favorite conference in Europe - primarily because of its awesome venue but also that I get to meet up with a large bunch of JBoss colleagues and community members.
Tuesday, 15th November at 13:00-13:15 I'm doing a Quickie talk covering how to http://devoxx.com/display/DV11/Deploy+JEE+applications+to+OpenShift Deploy JEE applications to OpenShift
You'll also find me hanging out/talking at the BOF's concerning JBoss technology: http://devoxx.com/display/DV11/CDI%2C+what+comes+next CDI, what comes next, http://devoxx.com/display/DV11/JBoss+Application+Server+7+-+Community+BOF JBoss Application Server 7 and http://devoxx.com/display/DV11/Seam+Gathering Seam Gathering.
h3. See you there!
For those interesting in stalking conference speakers and events I recommend checking out http://lanyrd.com Lanyrd.com, been using it extensively to be able to write the above pretty fast :) You can see my lanyrd schedule http://lanyrd.com/profile/maxandersen/ here.
See you out there!
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/community/tools/blog/2011/10/12/upcoming-talks...]
14 years, 5 months
[jBPM] - jbpm5 Exception:Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.persistence.processinstance.ProcessInstanceInfo#2]
by cheney-dut
cheney-dut [http://community.jboss.org/people/cheney-dut] created the discussion
"jbpm5 Exception:Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.persistence.processinstance.ProcessInstanceInfo#2]"
To view the discussion, visit: http://community.jboss.org/message/611023#611023
--------------------------------------------------------------
Today, i write a demo. i get the following exception when runing.
Anyone can help?
Thanks!
| 17895 2011-06-20 22:49:50,151[main] ERROR event.def.AbstractFlushingEventListener.performExecutions - Could not synchronize database state with session
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.persistence.processinstance.ProcessInstanceInfo#2]
at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1792)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2435)
at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2335)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2635)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:115)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)
at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:504)
at bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent(BitronixTransaction.java:397)
at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:147)
at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:95)
at com.sinosig.claim.bpm.factory.ProcessInstanceTest.testNext(ProcessInstanceTest.java:60)
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 junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
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:118)
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)
17902 2011-06-20 22:49:50,158[main] WARN bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent - Synchronization.beforeCompletion() call failed for org.hibernate.ejb.AbstractEntityManagerImpl$1@1611aec, marking transaction as rollback only
javax.persistence.OptimisticLockException: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.persistence.processinstance.ProcessInstanceInfo#2]
at org.hibernate.ejb.AbstractEntityManagerImpl.wrapStaleStateException(AbstractEntityManagerImpl.java:630)
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:588)
at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:513)
at bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent(BitronixTransaction.java:397)
at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:147)
at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:95)
at com.sinosig.claim.bpm.factory.ProcessInstanceTest.testNext(ProcessInstanceTest.java:60)
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 junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
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:118)
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)
Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.persistence.processinstance.ProcessInstanceInfo#2]
at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1792)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2435)
at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2335)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2635)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:115)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)
at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:504)
... 21 more |
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/611023#611023]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 5 months
[jBPM] - Configuring and Integrating jBPM with Other UI's
by jDeveloper jD
jDeveloper jD [http://community.jboss.org/people/jdeveloper1987] created the discussion
"Configuring and Integrating jBPM with Other UI's"
To view the discussion, visit: http://community.jboss.org/message/633185#633185
--------------------------------------------------------------
Hello friends ,
I am relatively a newbie to jBPM and I have a couple of questions :
1) Our Application is built using Swing UI and I wish to access the deployed process information from the mysql database and the running jBPM Engine and display it to the user using Swing Form and allow user to interact with the engine by passing the information to the engine using the Swing form. Can I do that ? Are there any specific Api's that I can use ?
2) I use the jbpm-installer build.xml way of loading the process into jBPM engine (using option -Djbpm.console.directory = 'environment path') to load all the processes into the jBPM engine (and access the process information in the deployed User application in jBoss AS ). After the processes are loaded I can view them on the jBPM console on localhost:8080.
. (After modifying the persistence.xml in human task jar along with other file I was able to use jBPM with MySQL database. I use the persistence unit specified in human task jar to create entity manager factory and using JPA knowledge Service to start process. After starting the process I can see the process information in the database along with the task information).
Is this procedure fine to load process definitions (if I do not wish to use Eclipse Guvnor plugin and Designer tool) and interacting with JBPM engine? Just a question for confirming the procedure ?
Thanks
h2.
.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/633185#633185]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 5 months
[JBoss Messaging] - consume message inside a QueueBrowser loop
by everson .
everson . [http://community.jboss.org/people/everjava] created the discussion
"consume message inside a QueueBrowser loop"
To view the discussion, visit: http://community.jboss.org/message/633148#633148
--------------------------------------------------------------
I would like after do something consume/delete/take out the message from queue, but I can't ....
I have 4 messages on queue and I want consume just one
QueueConnectionFactory factory = (QueueConnectionFactory) getInitialContext().lookup("/ConnectionFactory");//java:/ConnectionFactory
Queue queue = (Queue) getInitialContext().lookup("queue/MyQueue");
connection = factory.createQueueConnection();
session = connection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
*QueueBrowser* queueBrowser = session.createBrowser(queue);
Enumeration<ObjectMessage> messages = queueBrowser.getEnumeration();
while (messages.hasMoreElements()) {
ObjectMessage objectMessage = (ObjectMessage) messages.nextElement();
Person p = (Person) objectMessage.getObject();
System.err.println(p.getId());
//do something....
//* after do something take out the message from queue
}
* I tried code below, but i got error
QueueReceiver receiver = session.createReceiver(queue, "JMSMessageID="+objectMessage.getJMSMessageID());
MessageConsumer consumer = session.createConsumer(queue, "JMSMessageID="+objectMessage.getJMSMessageID());
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/633148#633148]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 5 months