Thanks to you both for you help.

Here's what I did so far:
-Upgraded from TomEE 1.0.0 to 1.5.1 (not sure if that made a change, but it was a todo anyway)
-Removing the seam-conversation-weld dependency
-Finally, added the following section to my pom:
<dependencyManagement>
<dependencies>
    <dependency>
        <artifactId>cdi-api</artifactId>
        <groupId>javax.enterprise</groupId>
        <scope>provided</scope>
    </dependency>
</dependencies>
</dependencyManagement>
wicket-cdi includes this dependency as "compile" but it is provided by the Java EE container.

Igor: perhaps you could modify your blog post to include the info about changing the scope of cdi-api?

With these changes, I can get @RequestScoped, @SessionScoped and @ApplicationScoped working, although with warnings. I get a ton of log messages of the following type: org.apache.webbeans.component.creation.AnnotatedTypeBeanCreatorImpl defineConstructor INFO: No suitable constructor found for injection target class : [class org.apache.wicket.cdi.DetachEventEmitter]. produce() method does not work!
I can't understand why I get these or what they mean.

As for the conversion scope, from what I understand I should simply have to replace the seam-conversation-weld dependency with seam-conversation-owb to run with OpenWebBeans (used by TomEE). However, when I do that, all wicket pages throw an exception: java.lang.NoSuchMethodError: org.apache.webbeans.conversation.ConversationManager.getInstance()Lorg/apache/webbeans/conversation/ConversationManager;
org.jboss.seam.conversation.plugins.openwebbeans.OpenWebBeansSeamConversationManager.doActivate(OpenWebBeansSeamConversationManager.java:41)
org.jboss.seam.conversation.plugins.openwebbeans.OpenWebBeansHttpSeamConversationContext.doActivate(OpenWebBeansHttpSeamConversationContext.java:44)
org.jboss.seam.conversation.api.AbstractSeamConversationContext.activate(AbstractSeamConversationContext.java:54)
org.apache.wicket.cdi.CdiContainer.activateConversationalContext(CdiContainer.java:94)
org.apache.wicket.cdi.ConversationPropagator.activateConversationIfNeeded(ConversationPropagator.java:147)
org.apache.wicket.cdi.ConversationPropagator.onRequestHandlerResolved(ConversationPropagator.java:123)
org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:155)

I don't need conversion scope right now, but all these warnings and errors worry me.

Kurt, do you get all these errors?

Regards,
Bertrand

On 21/12/2012 2:53 AM, Kurt Sys wrote:
... forgot this one: my full system setup, used jars etc.

http://openejb.979440.n4.nabble.com/tomee-eclipselink-gt-NoClassDefFoundError-ClassNotFoundException-td4658870.html

Kurt

2012/12/20 Igor Vaynberg <igor.vaynb...@gmail.com>:
looks like you have two jars on the classpath that provide the
javax.enterprise.inject.spi.BeanManager interface. maybe one comes
with wicket-cdi and the other one is included in tomee...

-igor

On Thu, Dec 20, 2012 at 12:54 PM, Bertrand Guay-Paquet
<ber...@step.polymtl.ca> wrote:
javax.enterprise.inject.spi.BeanManage
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to