Duplicate beans on JBoss AS 7.2.0

127 views
Skip to first unread message

Harald Wellmann

unread,
Sep 11, 2013, 10:23:03 AM9/11/13
to camunda-...@googlegroups.com
Are there any known issues with Camunda 7.0.0 on JBoss AS 7.2.0?

I'm trying to deploy the bestellprozess-java-ee6 sample, and I'm
getting strange exceptions of the type

WELD-001414 Bean name is ambiguous. Name processDiagramController
resolves to beans [Managed Bean [class
com.camunda.demo.outerspace.wjax.controller.dashboard.ProcessDiagramController]
with qualifiers [@Any @Default @Named], Managed Bean [class
com.camunda.demo.outerspace.wjax.controller.dashboard.ProcessDiagramController]
with qualifiers [@Any @Default @Named]]

In fact, when setting Weld logging to DEBUG, it seems that all managed
beans are deployed twice for some reason.

The problem does not occur on JBoss AS 7.1.3.

Any ideas?

Best regards,
Harald

Bernd Rücker (camunda)

unread,
Sep 12, 2013, 1:33:02 AM9/12/13
to Harald Wellmann, camunda-...@googlegroups.com
Hi Harald.

We actually tested the example only on JBoss 7.1.3 - that's why we haven't
recognized this. I think the problem is that there are two beans.xml in
the application (src/main/resources/META-INF and src/main/webapp/WEB-INF).
Could you delete the one in src/main/resources/META-INF, do a "mvn clean
install" and try it again?

I can make sure that we remove the duplicate beans.xml (which seems to
make no harm on 7.1.3) from the example - thanks for the hint!

Cheers
Bernd

-----Urspr�ngliche Nachricht-----
Von: camunda-...@googlegroups.com
[mailto:camunda-...@googlegroups.com] Im Auftrag von Harald Wellmann
Gesendet: Mittwoch, 11. September 2013 16:23
An: camunda-...@googlegroups.com
Betreff: Duplicate beans on JBoss AS 7.2.0
--
You received this message because you are subscribed to the Google Groups
"camunda BPM users & process application developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.

Bernd Rücker (camunda)

unread,
Sep 12, 2013, 2:14:27 AM9/12/13
to Harald Wellmann, camunda-...@googlegroups.com
Okay - pushed all changes to GitHub - checked that all examples now only
have one beans.xml. Can you please verify that this solves the problem on
AS 7.2.0? Thanks!

-----Urspr�ngliche Nachricht-----
Von: camunda-...@googlegroups.com
[mailto:camunda-...@googlegroups.com] Im Auftrag von Bernd R�cker
(camunda)
Gesendet: Donnerstag, 12. September 2013 07:33
An: 'Harald Wellmann'; camunda-...@googlegroups.com
Betreff: AW: Duplicate beans on JBoss AS 7.2.0

Harald Wellmann

unread,
Sep 12, 2013, 3:10:47 AM9/12/13
to Bernd Rücker (camunda), camunda-...@googlegroups.com
Hi Bernd,

thanks for the quick fix. The sample now runs fine on JBoss AS 7.2.0.

I noticed two more issues:

- The link "bearbeiten" on http://localhost:8080/wjax/taskList.jsf
points to an invalid URL embedded:app:forms/assign-approver.html.jsf
- mvn test fails:

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.camunda.demo.outerspace.wjax.OrderProcessTest
Sep 12, 2013 9:08:12 AM
org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2
execute
Schwerwiegend: [BasicPath
[context=/META-INF/jbosgi-xservice.properties], BasicPath
[context=/META-INF/MANIFEST.MF], BasicPath
[context=/META-INF/services/org.jboss.arquillian.container.test.spi.TestRunner],
BasicPath [context=/META-INF/org.jboss.as.managementConnectionProps],
BasicPath [context=/META-INF/services], BasicPath
[context=/META-INF/services/javax.enterprise.inject.spi.Extension],
BasicPath [context=/META-INF]]
Sep 12, 2013 9:08:12 AM
org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1
call
Warnung: Exception encountered during export of archive
org.jboss.shrinkwrap.api.exporter.ArchiveExportException: Failed to
write asset to output:
/META-INF/services/org.jboss.arquillian.core.spi.ExtensionLoader
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$3.handle(StreamExporterDelegateBase.java:272)
at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:219)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.processNode(StreamExporterDelegateBase.java:233)
at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:105)
at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:109)
at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:109)
at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.doExport(AbstractExporterDelegate.java:95)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.access$001(StreamExporterDelegateBase.java:50)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:121)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:116)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:124)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:118)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.RuntimeException: java.io.IOException: Pipe closed
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:252)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:233)
at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:217)
... 14 more
Caused by: java.io.IOException: Pipe closed
at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:261)
at java.io.PipedInputStream.receive(PipedInputStream.java:202)
at java.io.PipedOutputStream.write(PipedOutputStream.java:122)
at java.util.zip.ZipOutputStream.writeShort(ZipOutputStream.java:580)
at java.util.zip.ZipOutputStream.writeLOC(ZipOutputStream.java:408)
at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:221)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate.putNextExtry(JdkZipExporterDelegate.java:107)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate.putNextExtry(JdkZipExporterDelegate.java:40)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:249)
... 16 more


Best regards,
Harald

2013/9/12 Bernd Rücker (camunda) <bernd....@camunda.com>:
> Okay - pushed all changes to GitHub - checked that all examples now only
> have one beans.xml. Can you please verify that this solves the problem on
> AS 7.2.0? Thanks!
>
> -----Ursprüngliche Nachricht-----
> Von: camunda-...@googlegroups.com
> [mailto:camunda-...@googlegroups.com] Im Auftrag von Bernd Rücker
> (camunda)
> Gesendet: Donnerstag, 12. September 2013 07:33
> An: 'Harald Wellmann'; camunda-...@googlegroups.com
> Betreff: AW: Duplicate beans on JBoss AS 7.2.0
>
> Hi Harald.
>
> We actually tested the example only on JBoss 7.1.3 - that's why we haven't
> recognized this. I think the problem is that there are two beans.xml in
> the application (src/main/resources/META-INF and src/main/webapp/WEB-INF).
> Could you delete the one in src/main/resources/META-INF, do a "mvn clean
> install" and try it again?
>
> I can make sure that we remove the duplicate beans.xml (which seems to
> make no harm on 7.1.3) from the example - thanks for the hint!
>
> Cheers
> Bernd
>
> -----Ursprüngliche Nachricht-----

Bernd Rücker (camunda)

unread,
Sep 12, 2013, 3:28:59 AM9/12/13
to Harald Wellmann, camunda-...@googlegroups.com
Hi Harald.

Two quick answers:
1.) I think you see tasks of other process application in the custom jsf
tasklist example (which was indeed a quick hack ;-)). You could use the
camunda Tasklist which can access all tasks correctly, or filter only the
right tasks only in the demo.

2.) You have to adjust Arquillian to JBoss 7.2.0 I think.

Cheers
BErnd

-----Ursprüngliche Nachricht-----
Von: Harald Wellmann [mailto:hwellm...@gmail.com]
Gesendet: Donnerstag, 12. September 2013 09:11
An: Bernd Rücker (camunda)
Cc: camunda-...@googlegroups.com
Betreff: Re: Duplicate beans on JBoss AS 7.2.0

Harald Wellmann

unread,
Sep 12, 2013, 5:19:30 AM9/12/13
to Bernd Rücker (camunda), camunda-...@googlegroups.com
2013/9/12 Bernd Rücker (camunda) <bernd....@camunda.com>:
>
> 2.) You have to adjust Arquillian to JBoss 7.2.0 I think.
>

No, I just have to realize the test does not work in embedded mode and
that Arquillian is too dumb to log a meaningful error message like
"cannot contact JBoss AS on management port localhost:9999" ;-)

After starting the server and re-running the test, I now get the
following failure:

11:05:20,802 ERROR [org.jboss.arquillian.protocol.jmx.JMXTestRunner]
(pool-1-thread-2) Failed:
com.camunda.demo.outerspace.wjax.OrderProcessTest.testOrderWithItemsOnStock:
java.lang.AssertionError: expected:<1> but was:<2>
at org.junit.Assert.fail(Assert.java:91) [arquillian-service:]
at org.junit.Assert.failNotEquals(Assert.java:645) [arquillian-service:]
at org.junit.Assert.assertEquals(Assert.java:126) [arquillian-service:]
at org.junit.Assert.assertEquals(Assert.java:470) [arquillian-service:]
at org.junit.Assert.assertEquals(Assert.java:454) [arquillian-service:]
at com.camunda.demo.outerspace.wjax.OrderProcessTest.testOrderWithItemsOnStock(OrderProcessTest.java:115)
[classes:]

Might be caused by state from previous manual runs left in the database.

The bottom line is, "mvn clean install" should just work out of the
box in a demo, or else novice users will be confused or deterred. If
it's too hard to make this test self-contained, then maybe you'd
better delete or disable it IMHO...

Best regards,
Harald

Bernd Rücker (camunda)

unread,
Sep 14, 2013, 6:33:59 AM9/14/13
to Harald Wellmann, camunda-...@googlegroups.com
Hi Harald.

Thanks for the feedback.
Agreed that the examples should run out-of-the-box. We should do some Maven
tuning to avoid running the Arquillian tests for remote container on the
normal build. I put it in our backlog - but feel free to send a pull request
:-)

Cheers
Bernd

-----Ursprüngliche Nachricht-----
Von: Harald Wellmann [mailto:hwellm...@gmail.com]
Gesendet: Donnerstag, 12. September 2013 11:20
An: Bernd Rücker (camunda)
Cc: camunda-...@googlegroups.com
Betreff: Re: Duplicate beans on JBoss AS 7.2.0

Reply all
Reply to author
Forward
0 new messages