[JBoss jBPM] - A duplicate mapping error?
by youhaodeyi
When I run my application I got this error:
Caused by: org.hibernate.DuplicateMappingException: Duplicate collection role mapping org.jbpm.bytes.ByteArray.byteBlocks
I set the mapping in this way:
<spring:bean id="jbpmSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<spring:property name="dataSource">
<spring:ref local="jbpmDataSource" />
</spring:property>
<spring:property name="mappingLocations">
<spring:value>classpath*:/org/jbpm/**/*.hbm.xml</spring:value>
</spring:property>
<spring:property name="typeDefinitions">
<spring:ref local="jbpmTypes" />
</spring:property>
<spring:property name="hibernateProperties">
<spring:props>
<spring:prop key="hibernate.dialect">org.hibernate.dialect.DerbyDialect</spring:prop>
<spring:prop key="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</spring:prop>
<!-- Create/update the database tables automatically when the JVM starts up -->
<spring:prop key="hibernate.hbm2ddl.auto">update</spring:prop>
</spring:props>
</spring:property>
</spring:bean>
Does anyone of you know what problem is?
thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4178659#4178659
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4178659
17 years, 9 months
[JBoss Messaging] - JBoss MDB fails to consume from JBoss ESB queue
by idaplan
Hi,
we try to deploy a EJB3 MDB on a JBoss AS 4.2.2.GA which shall consume messages from a remote JBoss ESB 4.2.1.GA queue (both running under Linux).
As I have learned already, the JBoss ESB already uses JBoss Messaging while JBoss AS comes with JBoss MQ by default.
However, we tried to set up the RemoteJMSProvider as described in
http://wiki.jboss.org/wiki/HowDoIConfigureAnEJB3MDBToTalkToARemoteQueue
And we have put the jboss-messaging-client.jar into the JBoss AS's servers lib folder.
The machine boots without errors but once some messages are available for consumption, we get the following error approx every 30 seconds:
05:32:42,366 WARN [BisocketServerInvoker] org.jboss.remoting.transport.bisocket.BisocketServerInvoker$ControlMonitorTimerTask@4672b784: detected failure on control connection Thread[control: Socket[addr=/172.xyz.xyz.xyz,port=3307,localport=42468],5,JBoss Pooled Threads] (4sj74h-ajpkoc-flih1kk3-1-flih2303-b: requesting new control connection
... and no messages are consumed by the MDB.
Do we have to switch the JBoss AS from JBoss MQ completely to JBoss Messaging?
We only want to deploy a simple MDB and we are not using any JMS from the JBoss AS at all!
By the way, we also tried to replace the orignal jboss-remoting.jar 2.2.2.SP1 of the JBoss AS with versions 2.5.0 and 2.2.2.GA.
But with the same result.
Any suggestions?
Stefan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4178652#4178652
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4178652
17 years, 9 months
[EJB 3.0] - @Depends refers to the ear file name - is there another way?
by avogt_sundn
Hi,
JBoss forces me to annotate some of my session beans with a @Depends annotation. I deploy ejbs in several ears at the same time with @EJB injection dependencies in between them. Deployment at server startup only works when i tell ejb container to ignore some @EJB dep for the moment and come back later once the referenced ejb got deployed.
It works fine (like most in JBoss).
But, in the @Depends annotation there is the referenced ejb named not by its jndiname but by its mbean (?) name:
example:
@Depends( "jboss.j2ee:ear=my_ear-1.0-SNAPSHOT.ear,jar=my-ejb-1.0-SNAPSHOT.jar,name=MyServiceEjb,service=EJB3")
as you can see, the ear and the jar file name is now in the Java code!
Now comes Maven which does not allow to change artifact names when installed to repositories! Thats why the maven versions stay in the file names.
Which prevents me from ever changing a maven version of the ear or ejb.jar projects.
Maven has no solution that i was able to find.
Does JBoss have an alternative for declaring some dependency to be resolved later?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4178646#4178646
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4178646
17 years, 9 months
[EJB 3.0] - Re: NullPointerException in JavaEEComponentHelper with JBoss
by JeffBrooks
Interesting responses.
anonymous wrote : That's a pretty rubbish workaround. The only one I've come up with that doesn't involve lots of changes to existing code is to not use JBoss 5. It's very disappointing.
GColeman, I only had to remove two @EJB annotations because the application I'm working on is mostly ejb2.
The only other option appeared to be reworking how everything is packaged which in my case would have taken significantly longer than the few minutes it took to remove the annotations.
anonymous wrote : Couldn't agree more.
Wolfc, I assume you agree with the rubbish comment and not with GColeman's comment about how disappointing JBoss 5 is.
anonymous wrote : So making sure the actual EJBs are not in a jar which is in lib (optionally specifying it as an ejb module in application.xml) should resolve the problem.
Rubbish! ;-)
Your suggestion will take significantly longer than removing two @EJB annotations.
I'm not arguing that removing the @EJB is a good solution but in my case it is a very simple way of getting my application deployed on JBoss 5. It appears that this isn't an option for GColeman.
What I really want is for JBoss 5 to be able to handle @EJB annotations correctly without any workarounds.
Jeff Brooks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4178641#4178641
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4178641
17 years, 9 months