我编写了一些与IBM MQ进行包装通信的JAR。当我尝试在其他应用程序中使用JAR时,它只能在IDE中或以Maven身份在控制台中运行时才起作用:
“C:\ProgramFiles\apache\maven\bin\mvn.bat”-dexec.args=“-classpath%classpath xx.xxx.xxx.application”-dexec.executable=“C:\ProgramFiles\java\jdk1.7.0_71\bin\java.exe”-dmaven.ext.class.path=C:\users\myuser\appdata\roaming\netbeans\8.0.1\maven-nblib\netbeans-eventspy.jar;C:\users\myuser\appdata\roaming\netbeans\8.0.1\maven-nblib\netbeans-cos.jar-dfile.encoding=UTF-8 exec-maven-plugin:1.2.1:exec
java-jar myjar.jar
我有错误:
FFDC called in uninitialized Trace module
FDCTitle
Product :- ProductName
Date/Time :- Mon Apr 25 21:27:53 CEST 2016
System time :- 1461612473559
Operating System :- Windows 7
UserID :- myUser
Java Vendor :- Oracle Corporation
Java Version :- 24.71-b01
Source Class :- com.ibm.mq.jmqi.JmqiDefaultThreadPool
Source Method :- enqueue(Runnable)
ProbeID :- XN009001
Thread :- name=main priority=5 group=main ccl=sun.misc.Launcher$AppClassLoader@4bcd2d49
Data
----
| CompCode :- 2
| Reason :- 2195
| exception :- ExceptionDepth is 2
| exception :-
| | Cause:1 :- com.ibm.msg.client.commonservices.CSIException: JMSCS0002
| | Message:1 :- JMSCS0002
| | StackTrace:1 :- com.ibm.msg.client.commonservices.CSIException: JMSCS0002
| | at com.ibm.msg.client.commonservices.workqueue.PIWorkQueueManager.enqueueItem(PIWorkQueueManager.java:54)
| | at com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.enqueue(WorkQueueManager.java:232)
| | at com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.enqueue(WorkQueueManager.java:200)
| | at com.ibm.mq.jmqi.JmqiDefaultThreadPool.enqueue(JmqiDefaultThreadPool.java:78)
| | at com.ibm.mq.jmqi.remote.impl.RemoteConnection.setUpAsyncMode(RemoteConnection.java:1900)
| | at com.ibm.mq.jmqi.remote.impl.RemoteConnection.initSess(RemoteConnection.java:1664)
| | at com.ibm.mq.jmqi.remote.impl.RemoteConnection.connect(RemoteConnection.java:838)
| | at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSessionFromNewConnection(RemoteConnectionSpecification.java:409)
| | at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSession(RemoteConnectionSpecification.java:305)
| | at com.ibm.mq.jmqi.remote.impl.RemoteConnectionPool.getSession(RemoteConnectionPool.java:146)
| | at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1868)
| | at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1396)
| | at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:342)
| | at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:6865)
| | at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:6221)
| | at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl._createConnection(JmsConnectionFactoryImpl.java:285)
| | at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:233)
| | at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6016)
| | at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:111)
| | at xx.xxx.xxx.cepapi.CEPSessionImpl.creteConnection(CEPSessionImpl.java:84)
| | at xx.xxx.xxx.cepapi.CEPSessionImpl.connect(CEPSessionImpl.java:44)
| | at xx.xxx.xxxxxx.cep.CEPManager.connect(CEPManager.java:45)
| | at xx.xxx.xxxxxx.ApplicationManager.initialiceCEP(ApplicationManager.java:33)
| | at xx.xxx.xxxxxx.ApplicationManager.initializeApplication(ApplicationManager.java:23)
| | at xx.xxx.xxxxxx.console.ConsoleAdapter.startAction(ConsoleAdapter.java:93)
| | at xx.xxx.xxxxxx.console.ConsoleAdapter.runConsole(ConsoleAdapter.java:42)
| | at xx.xxx.xxxxxx.Application.main(Application.java:22)
| |
| job :- com.ibm.mq.jmqi.remote.impl.RemoteRcvThread@b7918cf
Version information
-------------------
Java Message Service Client
8.0.0.0
p000-L140506
Production
Component Name: com.ibm.msg.client.jms
CMVC: p000-L140506
Class Name: class com.ibm.msg.client.jms.internal.JMSComponent
Factory Class: null
Version: 8.0.0.0
Component Title: Java Message Service Client
Jar location: file:/D:/Project/XXXXX/target/xxxxx-2.0.0-jar-with-dependencies.jar
WebSphere MQ classes for Java Message Service
8.0.0.0
p000-L140506
Production
Component Name: com.ibm.mq.jms
CMVC: p000-L140506
Class Name: class com.ibm.mq.jms.MQJMSComponent
Factory Class: null
Version: 8.0.0.0
Component Title: WebSphere MQ classes for Java Message Service
Jar location: file:/D:/Project/XXXXX/target/xxxxx-2.0.0-jar-with-dependencies.jar
IBM WebSphere MQ JMS Provider
8.0.0.0
p000-L140506
Production
Component Name: com.ibm.msg.client.wmq
CMVC: p000-L140506
Class Name: class com.ibm.msg.client.wmq.factories.WMQComponent
Factory Class: class com.ibm.msg.client.wmq.factories.WMQFactoryFactory
Version: 8.0.0.0
Component Title: IBM WebSphere MQ JMS Provider
Jar location: file:/D:/Project/XXXXX/target/xxxxx-2.0.0-jar-with-dependencies.jar
Stack trace
-----------
Stack trace to show the location of the FFST call
| FFST Location :- java.lang.Exception
| at com.ibm.msg.client.commonservices.trace.Trace.getCurrentPosition(Trace.java:2049)
| at com.ibm.msg.client.commonservices.trace.Trace.createFFSTString(Trace.java:1960)
| at com.ibm.msg.client.commonservices.trace.Trace.ffstInternal(Trace.java:1847)
| at com.ibm.msg.client.commonservices.trace.Trace.ffst(Trace.java:1657)
| at com.ibm.mq.jmqi.JmqiDefaultThreadPool.enqueue(JmqiDefaultThreadPool.java:92)
| at com.ibm.mq.jmqi.remote.impl.RemoteConnection.setUpAsyncMode(RemoteConnection.java:1900)
| at com.ibm.mq.jmqi.remote.impl.RemoteConnection.initSess(RemoteConnection.java:1664)
| at com.ibm.mq.jmqi.remote.impl.RemoteConnection.connect(RemoteConnection.java:838)
| at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSessionFromNewConnection(RemoteConnectionSpecification.java:409)
| at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSession(RemoteConnectionSpecification.java:305)
| at com.ibm.mq.jmqi.remote.impl.RemoteConnectionPool.getSession(RemoteConnectionPool.java:146)
| at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1868)
| at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1396)
| at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:342)
| at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:6865)
| at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:6221)
| at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl._createConnection(JmsConnectionFactoryImpl.java:285)
| at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:233)
| at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6016)
| at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:111)
| at xx.xxx.xxx.cepapi.CEPSessionImpl.creteConnection(CEPSessionImpl.java:84)
| at xx.xxx.xxx.cepapi.CEPSessionImpl.connect(CEPSessionImpl.java:44)
| at xx.xxx.xxxxxx.cep.CEPManager.connect(CEPManager.java:45)
| at xx.xxx.xxxxxx.ApplicationManager.initialiceCEP(ApplicationManager.java:33)
| at xx.xxx.xxxxxx.ApplicationManager.initializeApplication(ApplicationManager.java:23)
| at xx.xxx.xxxxxx.console.ConsoleAdapter.startAction(ConsoleAdapter.java:93)
| at xx.xxx.xxxxxx.console.ConsoleAdapter.runConsole(ConsoleAdapter.java:42)
| at xx.xxx.xxxxxx.Application.main(Application.java:22)
|
Property Store Contents
-----------------------
All currently set properties
| MQJMS_TRACE_DIR :-
| MQJMS_TRACE_LEVEL :-
| awt.toolkit :- sun.awt.windows.WToolkit
| com.ibm.mq.cfg.Channels.DefRecon :- <null>
| com.ibm.mq.cfg.MQCCSID :- <null>
| com.ibm.mq.cfg.MQCLNTCF :- <null>
| com.ibm.mq.cfg.MQIPADDRV :- <null>
| com.ibm.mq.cfg.MQSSLPOLLTIMEOUT :- <null>
| com.ibm.mq.cfg.MQ_LCLADDR :- <null>
| com.ibm.mq.cfg.TCP.ClntRcvBuffSize :- <null>
| com.ibm.mq.cfg.TCP.ClntSndBuffSize :- <null>
| com.ibm.mq.cfg.TCP.Connect_Timeout :- <null>
| com.ibm.mq.cfg.TCP.EndPort :- <null>
| com.ibm.mq.cfg.TCP.StrPort :- <null>
| com.ibm.mq.cfg.jmqi.AmqRandomNumberType :- <null>
| com.ibm.mq.cfg.jmqi.PasswordProtection :- <null>
| com.ibm.mq.cfg.jmqi.libpath :- <null>
| com.ibm.mq.cfg.jmqi.useMQCSPauthentication :- <null>
| com.ibm.mq.connector.JCARuntimeHelper :- <null>
| com.ibm.mq.jmqi.ignoreCCDTCertificateLabel :- <null>
| com.ibm.mq.jms.replyToStyle :- <null>
| com.ibm.mq.jms.tuning.usePersistenceFromMD :- <null>
| com.ibm.mq.localAddress :-
| com.ibm.msg.client.commonservices.ffst.suppress :- 0
| com.ibm.msg.client.wmq.forceAllowClientConnection :- false
| com.ibm.msg.client.wmq.internal.forceDontUseJmqiWorkerThread :- false
| com.ibm.msg.client.wmq.internal.forceDontUseSharedHconn :- false
| com.ibm.msg.client.wmq.internal.forceUseJmqiWorkerThread :- false
| com.ibm.msg.client.wmq.overrideInheritRRSContext :- false
| com.ibm.msg.client.wmq.overrideProviderVersion :- <null>
| com.ibm.vm.bitmode :- <null>
| file.encoding :- Cp1250
| file.encoding.pkg :- sun.io
| file.separator :- \
| java.awt.graphicsenv :- sun.awt.Win32GraphicsEnvironment
| java.awt.printerjob :- sun.awt.windows.WPrinterJob
| java.class.path :- target\xxxxx-2.0.0-jar-with-dependencies.jar
| java.class.version :- 51.0
| java.endorsed.dirs :- C:\Program Files\Java\jre7\lib\endorsed
| java.ext.dirs :- C:\Program Files\Java\jre7\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
| java.home :- C:\Program Files\Java\jre7
| java.io.tmpdir :- c:\temp\
| java.library.path :- C:\WINDOWS\system32;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\IBM\WebSphere MQ_1
\java\lib;C:\Program Files\IBM\WebSphere MQ_1\java\lib64;C:\Program Files\IBM\WebSphere MQ\java\lib;C:\Program Files\IBM\WebSphere MQ\java\lib64;C:\WINDOWS\system32;C:\WINDOWS;C:\W
INDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Git\bin;D:\Program Files\Apache\maven\bin;C:\Program Files\IB
M\WebSphere MQ\bin64;C:\Program Files\IBM\WebSphere MQ\bin;C:\Program Files\IBM\WebSphere MQ\tools\c\samples\bin;C:\Program Files\IBM\WebSphere MQ_1\bin64;C:\Program Files\IBM\WebS
phere MQ_1\bin;C:\Program Files\IBM\WebSphere MQ_1\tools\c\samples\bin;C:\Program Files (x86)\EasyFrom Trial\;C:\Program Files\Java\jdk1.7.0_71\bin\;C:\Program Files\TortoiseSVN\bi
n;C:\Program Files\nodejs\;C:\Users\myUser\AppData\Roaming\npm;.
| java.runtime.name :- Java(TM) SE Runtime Environment
| java.runtime.version :- 1.7.0_71-b14
| java.specification.name :- Java Platform API Specification
| java.specification.vendor :- Oracle Corporation
| java.specification.version :- 1.7
| java.vendor :- Oracle Corporation
| java.vendor.url :- http://java.oracle.com/
| java.vendor.url.bug :- http://bugreport.sun.com/bugreport/
| java.version :- 1.7.0_71
| java.vm.info :- mixed mode
| java.vm.name :- Java HotSpot(TM) 64-Bit Server VM
| java.vm.specification.name :- Java Virtual Machine Specification
| java.vm.specification.vendor :- Oracle Corporation
| java.vm.specification.version :- 1.7
| java.vm.vendor :- Oracle Corporation
| java.vm.version :- 24.71-b01
| line.separator :-
| os.arch :- amd64
| os.name :- <null>
| os.version :- 6.1
| path.separator :- ;
| sun.arch.data.model :- <null>
| sun.boot.class.path :- C:\Program Files\Java\jre7\lib\resources.jar;C:\Program Files\Java\jre7\lib\rt.jar;C:\Program Files\Java\jre7\
lib\sunrsasign.jar;C:\Program Files\Java\jre7\lib\jsse.jar;C:\Program Files\Java\jre7\lib\jce.jar;C:\Program Files\Java\jre7\lib\charsets.jar;C:\Program Files\Java\jre7\lib\jfr.jar
;C:\Program Files\Java\jre7\classes
| sun.boot.library.path :- C:\Program Files\Java\jre7\bin
| sun.cpu.endian :- little
| sun.cpu.isalist :- amd64
| sun.desktop :- windows
| sun.io.unicode.encoding :- UnicodeLittle
| sun.java.command :- target\xxxxx-2.0.0-jar-with-dependencies.jar
| sun.java.launcher :- SUN_STANDARD
| sun.jnu.encoding :- Cp1250
| sun.management.compiler :- HotSpot 64-Bit Tiered Compilers
| sun.os.patch.level :- Service Pack 1
| user.country :- US
| user.country.format :- PL
| user.dir :- D:\Project\XXXXX
| user.home :- C:\Users\myUser
| user.language :- en
| user.language.format :- pl
| user.name :- myUser
| user.script :-
| user.timezone :- Europe/Belgrade
| user.variant :-
WorkQueueMananger Contents
--------------------------
| Maintain ThreadPool size :- false
| Maximum ThreadPool size :- -1
| ThreadPool inactive timeout :- 0
| unavailable - :- com.ibm.msg.client.commonservices.CSIException: JMSCS0002
Runtime properties
------------------
| Available processors :- 8
| Free memory in bytes (now) :- 87386128
| Max memory in bytes :- 1888485376
| Total memory in bytes (now) :- 127401984
Component Manager Contents
--------------------------
Common Services Components:
Messaging Provider Components:
| CMVC :- p000-L140506
| Class Name :- class com.ibm.msg.client.wmq.factories.WMQComponent
| Component Name :- com.ibm.msg.client.wmq
| Component Title :- IBM WebSphere MQ JMS Provider
| Factory Class :- class com.ibm.msg.client.wmq.factories.WMQFactoryFactory
| Jar location :- file:/D:/Project/XXXXX/target/xxxxx-2.0.0-jar-with-dependencies.jar
| Version :- 8.0.0.0
Provider Specific Information
-----------------------------
Overview of JMS System
Num. Connections : 0
Num. Sessions : 0
Num. Consumers : 0
Num. Producers : 0
Detailed JMS System Information
Connections :
Sessions :
Consumers :
Producers :
FFDC called in uninitialized Trace module
FDCTitle
Product :- ProductName
Date/Time :- Mon Apr 25 21:27:53 CEST 2016
System time :- 1461612473705
Operating System :- Windows 7
UserID :- myUser
Java Vendor :- Oracle Corporation
Java Version :- 24.71-b01
Source Class :- com.ibm.msg.client.commonservices.nls.PINLSServices
Source Method :- getMessage(String,HashMap)
ProbeID :- XC003002
Thread :- name=main priority=5 group=main ccl=sun.misc.Launcher$AppClassLoader@4bcd2d49
Data
----
Data :- none
Version information
-------------------
Java Message Service Client
8.0.0.0
p000-L140506
Production
Component Name: com.ibm.msg.client.jms
CMVC: p000-L140506
Class Name: class com.ibm.msg.client.jms.internal.JMSComponent
Factory Class: null
Version: 8.0.0.0
Component Title: Java Message Service Client
Jar location: file:/D:/Project/XXXXX/target/xxxxx-2.0.0-jar-with-dependencies.jar
WebSphere MQ classes for Java Message Service
8.0.0.0
p000-L140506
Production
Component Name: com.ibm.mq.jms
CMVC: p000-L140506
Class Name: class com.ibm.mq.jms.MQJMSComponent
Factory Class: null
Version: 8.0.0.0
Component Title: WebSphere MQ classes for Java Message Service
Jar location: file:/D:/Project/XXXXX/target/xxxxx-2.0.0-jar-with-dependencies.jar
IBM WebSphere MQ JMS Provider
8.0.0.0
p000-L140506
Production
Component Name: com.ibm.msg.client.wmq
CMVC: p000-L140506
Class Name: class com.ibm.msg.client.wmq.factories.WMQComponent
Factory Class: class com.ibm.msg.client.wmq.factories.WMQFactoryFactory
Version: 8.0.0.0
Component Title: IBM WebSphere MQ JMS Provider
Jar location: file:/D:/Project/XXXXX/target/xxxxx-2.0.0-jar-with-dependencies.jar
Stack trace
-----------
Stack trace to show the location of the FFST call
| FFST Location :- java.lang.Exception
| at com.ibm.msg.client.commonservices.trace.Trace.getCurrentPosition(Trace.java:2049)
| at com.ibm.msg.client.commonservices.trace.Trace.createFFSTString(Trace.java:1960)
| at com.ibm.msg.client.commonservices.trace.Trace.ffstInternal(Trace.java:1847)
| at com.ibm.msg.client.commonservices.trace.Trace.ffst(Trace.java:1657)
| at com.ibm.msg.client.commonservices.nls.PINLSServices.getMessage(PINLSServices.java:132)
| at com.ibm.msg.client.commonservices.nls.NLSServices.getMessage(NLSServices.java:238)
| at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:210)
| at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:406)
| at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:6865)
| at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:6221)
| at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl._createConnection(JmsConnectionFactoryImpl.java:285)
| at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:233)
| at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6016)
| at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:111)
| at xx.xxx.xxx.cepapi.CEPSessionImpl.creteConnection(CEPSessionImpl.java:84)
| at xx.xxx.xxx.cepapi.CEPSessionImpl.connect(CEPSessionImpl.java:44)
| at xx.xxx.xxxxxx.cep.CEPManager.connect(CEPManager.java:45)
| at xx.xxx.xxxxxx.ApplicationManager.initialiceCEP(ApplicationManager.java:33)
| at xx.xxx.xxxxxx.ApplicationManager.initializeApplication(ApplicationManager.java:23)
| at xx.xxx.xxxxxx.console.ConsoleAdapter.startAction(ConsoleAdapter.java:93)
| at xx.xxx.xxxxxx.console.ConsoleAdapter.runConsole(ConsoleAdapter.java:42)
| at xx.xxx.xxxxxx.Application.main(Application.java:22)
|
...
知道那会是什么吗?
解决方案是从JAR外部加载IBM类。
这是我的问题。 我正在使用试用版的。我已经创建了一个队列管理器,一个带有的通道。我已经提供了用户来访问。我正在尝试将消息放入队列。但是在获取队列连接时,我遇到了异常。 com.ibm.msg.client.jms.DetailedJMSSecurityException: JMSWMQ2013:为具有连接模式“客户端”和主机名“(1500)”的QueueManager“MYQM”提供的安全身份验证
问题内容: 我正在编写一个通过System.out输出字符串的Java应用程序,我只想知道如何在IDE外部运行此应用程序。我有一个可执行的jar。如何在控制台中看到此输出? 问题答案: 基本上: Sun网站有更多信息
我想并行运行Junit测试。我遇到了以下问题 这些测试是由其他团队开发的,大约有2500个测试套件。测试和测试框架到处都有静态变量。它们的编写使得它们在一次运行一个套件时可以正常工作。当我构建一组这些测试套件并运行它们时,它们甚至没有完成运行。 为了解决这个问题,我有自己的测试运行程序,它通过不同的类加载器(一次一组测试)加载测试套件。我在多个线程中这样做,并从每个线程调用JunitCore的ru
问题内容: 我想获得的的通过启动到控制台。如何才能做到这一点? 这是一些不完整的代码: 问题答案: 我最近遇到了这个问题,只想提及自从Java 7以来,流程构建器api已得到扩展。现在可以使用以下方法解决此问题:
我编译了测试,并尝试执行以下操作来运行它们: 这引发了一个巨大的异常,开始是这样的: 但基本上说它找不到JUnitExc的类。如果我让控制台启动器查找测试,它找不到任何测试: 我不知道如何在没有IDE的情况下从命令行运行JUnit5测试。 更新: 使用 Maven 运行测试(使用 Surefire 插件)会给我同样的错误。我什至删除了所有测试,但仅导入 junit5 依赖项的测试除外,但我仍然收到
我尝试使用这个存储库https://github.com/ctongfei/progressbar为我的光线跟踪添加进度条。当我运行测试时,我得到很多异常。 我完全不知道它们是什么意思,也不知道如何开始修复它们。 我的测试代码: 我收到的错误消息: 2019年7月15日9:14:57PM org . jline . utils . log logr警告:无法检索哑色Java . io . io类型