netbeansglassfishjboss-weldglassfish-embeddedweld

weld-se and netbeans: debugging not working


I am attempting to port a javaSE application to Weld SE to gain dependency injection support. The application starts and behaves correctly (I changed the main to an observer for the ContainerInitialized event, added the beans.xml and I am starting on the org.jboss.weld.environment.se.StartMain class, I also have some injects which appear to work fine).

However it seems that now debugging stopped working in netbeans. I reverted my change to return to the setup without weld SE and debugging started working again.

I am using netbeans 7.3. am I doing something wrong, or is there something special to configure in netbeans for the debugging of Weld SE applications to work as expected?

EDIT: Turns out it's a conflict because this same JavaSE project also has dependencies to glassfish embedded so that it can make JMS requests to a glassfish server:

<dependency>
    <groupId>org.glassfish.main.extras</groupId>
    <artifactId>glassfish-embedded-all</artifactId>
    <version>3.1.2.2</version>
</dependency> 

I guess the weld libraries from glassfish-embedded and from weld-se are fighting with each other or confusing the debugger. Didn't manage to make this work for now.


Solution

  • So as I wrote in the "edit" of the question, it turns out it's a conflict because this same JavaSE project also has dependencies to glassfish embedded so that it can make JMS requests to a glassfish server:

    <dependency>
        <groupId>org.glassfish.main.extras</groupId>
        <artifactId>glassfish-embedded-all</artifactId>
        <version>3.1.2.2</version>
    </dependency> 
    

    I guess the weld libraries from glassfish-embedded and from weld-se are fighting with each other or confusing the debugger. Didn't manage to make this work for now.