运行使用 TPTP 探针套件代理检测的 junit 测试时出现 ClassNoDefFoundError

发布于 2024-12-29 02:30:50 字数 3534 浏览 2 评论 0 原文

我已经处理这个错误消息有一段时间了,但没有人能够帮助我...

我正在尝试使用独立的 TPTPprobekit 代理和以下 linux 命令来探测 java 应用程序:

java '-agentlib:JPIBootLoader=JPIAgent:server=standalone;ProbekitAgent:ext-pk-BCILibraryName=BCIEngProbe,ext-pk-probescript=ome/anis/qf-t/core/probe/testProbe.probescript' junit。 textui.TestRunner Quickfix.test.acceptance.AcceptanceTestSuite

我的应用程序实际上是来自 Quickfixj 的 junit 测试用例包(quickfixj.org)...

运行上面的命令,探测开始,我能够看到运行时跟踪。但是,在执行过程中的某个时刻,我收到运行时异常:

java.lang.NoClassDefFoundError:testProbe_probe$Probe_0

25-Jan-2012 10:25:11 AM quickfix.test.acceptance.ATServer run
SEVERE: error in AT server
java.lang.NoClassDefFoundError: testProbe_probe$Probe_0
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.<init>(DocumentBuilderFactoryImpl.java)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:147)
    at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:233)
    at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:123)
    at quickfix.DataDictionary.load(DataDictionary.java:906)
    at quickfix.DataDictionary.read(DataDictionary.java:893)
    at quickfix.DataDictionary.<init>(DataDictionary.java:109)
    at quickfix.DefaultSessionFactory.getDataDictionary(DefaultSessionFactory.java:325)
    at quickfix.DefaultSessionFactory.createDataDictionary(DefaultSessionFactory.java:219)
    at quickfix.DefaultSessionFactory.processFixtDataDictionaries(DefaultSessionFactory.java:258)
    at quickfix.DefaultSessionFactory.create(DefaultSessionFactory.java:113)
    at quickfix.mina.acceptor.AbstractSocketAcceptor.createSessions(AbstractSocketAcceptor.java:242)
    at quickfix.mina.acceptor.AbstractSocketAcceptor.startAcceptingConnections(AbstractSocketAcceptor.java:99)
    at quickfix.SocketAcceptor.initialize(SocketAcceptor.java:66)
    at quickfix.SocketAcceptor.start(SocketAcceptor.java:59)
    at quickfix.test.acceptance.ATServer.run(ATServer.java:193)
    at java.lang.Thread.run(Thread.java:662)**

表明我的探针文件丢失。但是首先需要这个文件来打印痕迹!!???.....

好吧,这里有一些事实:

  • 我能够探测其他应用程序,包括一个简单的 junit 测试: <块引用>

    java '-agentlib:JPIBootLoader=JPIAgent:server=standalone;ProbekitAgent:ext-pk-BCILibraryName=BCIEngProbe,ext-pk-probescript=ome/anis/qf-t/core/probe/testProbe.probescript' junit。 textui.TestRunner Quickfix.test.acceptance.AnisJUnitTestExample

  • 我能够运行使用junit的quickfix.test.acceptance.AcceptanceTestSuite(无探测):

    <块引用>

    java junit.textui.TestRunner Quickfix.test.acceptance.AcceptanceTestSuite

  • 我已在 CLASSPATH 中设置 testProbe_probe$Probe_0 的路径

  • 我已调用系统我的测试用例中的 .getenv("CLASSPATH") 和 CLASSPATH 似乎很好

  • 我的测试用例处理线程、套接字等

我的系统配置是:

-os: ubuntu 10.04-64bit (on VirtualBox!)

-java version "1.6.0_24"

-junit: junit-4.10.jar

-TPTP agent controller: agntctrl.linux_em64t-TPTP-4.7.2

有什么想法吗?

谢谢, 阿尼斯

I've been dealing with this error message for a while now and nobody has been able to help me...

I am trying to probe a java application using the standalone TPTP probekit agent with the following linux command:

java '-agentlib:JPIBootLoader=JPIAgent:server=standalone;ProbekitAgent:ext-pk-BCILibraryName=BCIEngProbe,ext-pk-probescript=ome/anis/qf-t/core/probe/testProbe.probescript' junit.textui.TestRunner quickfix.test.acceptance.AcceptanceTestSuite

My application is actually a junit testcase from the Quickfixj package (quickfixj.org)...

Running the above command, the probing starts and I am able to see the runtime traces. However, at some point during execution I am getting the runtime exception:

java.lang.NoClassDefFoundError: testProbe_probe$Probe_0

25-Jan-2012 10:25:11 AM quickfix.test.acceptance.ATServer run
SEVERE: error in AT server
java.lang.NoClassDefFoundError: testProbe_probe$Probe_0
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.<init>(DocumentBuilderFactoryImpl.java)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:147)
    at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:233)
    at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:123)
    at quickfix.DataDictionary.load(DataDictionary.java:906)
    at quickfix.DataDictionary.read(DataDictionary.java:893)
    at quickfix.DataDictionary.<init>(DataDictionary.java:109)
    at quickfix.DefaultSessionFactory.getDataDictionary(DefaultSessionFactory.java:325)
    at quickfix.DefaultSessionFactory.createDataDictionary(DefaultSessionFactory.java:219)
    at quickfix.DefaultSessionFactory.processFixtDataDictionaries(DefaultSessionFactory.java:258)
    at quickfix.DefaultSessionFactory.create(DefaultSessionFactory.java:113)
    at quickfix.mina.acceptor.AbstractSocketAcceptor.createSessions(AbstractSocketAcceptor.java:242)
    at quickfix.mina.acceptor.AbstractSocketAcceptor.startAcceptingConnections(AbstractSocketAcceptor.java:99)
    at quickfix.SocketAcceptor.initialize(SocketAcceptor.java:66)
    at quickfix.SocketAcceptor.start(SocketAcceptor.java:59)
    at quickfix.test.acceptance.ATServer.run(ATServer.java:193)
    at java.lang.Thread.run(Thread.java:662)**

which states that my probe file is missing. But this file has been needed in the first place to print the traces!!???.....

Well, here are some facts:

  • I am able to probe other applications, including a simple junit test:

    java '-agentlib:JPIBootLoader=JPIAgent:server=standalone;ProbekitAgent:ext-pk-BCILibraryName=BCIEngProbe,ext-pk-probescript=ome/anis/qf-t/core/probe/testProbe.probescript' junit.textui.TestRunner quickfix.test.acceptance.AnisJUnitTestExample

  • I am able to run the quickfix.test.acceptance.AcceptanceTestSuite using junit (no probing):

    java junit.textui.TestRunner quickfix.test.acceptance.AcceptanceTestSuite

  • I have set the path to testProbe_probe$Probe_0 in CLASSPATH

  • I have called the System.getenv("CLASSPATH") from within my testcase and the CLASSPATH seems to be fine

  • My testcase deals with threads, sockets, etc

And my system configuration is:

-os: ubuntu 10.04-64bit (on VirtualBox!)

-java version "1.6.0_24"

-junit: junit-4.10.jar

-TPTP agent controller: agntctrl.linux_em64t-TPTP-4.7.2

Any ideas??

Thanks,
Anis

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文