1

我正在尝试将 javaSE 应用程序移植到 Weld SE 以获得依赖注入支持。应用程序启动并正常运行(我将 main 更改为 ContainerInitialized 事件的观察者,添加 beans.xml 并从 org.jboss.weld.environment.se.StartMain 类开始,我还有一些出现的注入工作正常)。

然而,现在调试似乎停止在 netbeans 中工作。我恢复了我的更改以返回没有焊接 SE 的设置,并且调试再次开始工作。

我正在使用netbeans 7.3。我做错了什么,还是在 netbeans 中配置了一些特殊的东西来调试 Weld SE 应用程序以按预期工作?

编辑:原来这是一个冲突,因为同一个 JavaSE 项目还具有对 glassfish 嵌入的依赖项,因此它可以向 glassfish 服务器发出 JMS 请求:

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

我猜 glassfish-embedded 和weld-se 的焊接库相互冲突或混淆了调试器。暂时无法完成这项工作。

4

1 回答 1

0

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.

于 2013-07-06T10:27:38.233 回答