Java 在Windows上-我要使用的mqji.properties在哪里?

Java 在Windows上-我要使用的mqji.properties在哪里?,java,message-queue,ibm-mq,Java,Message Queue,Ibm Mq,我的应用程序是一个独立的Java应用程序,客户可以下载、安装和运行。它使用MQ与主机通信,主机已工作多年。我自己和客户都没有在他们的Windows机器上安装任何MQ;我们包括并使用com.ibm.mq.jar来完成这项工作 显然,MQ需要类路径中的mqji.properties文件来防止这种情况: Unable to load message catalog - mqji com.ibm.mq.MQException: Message catalog not found 所以我的问题是:我在哪

我的应用程序是一个独立的Java应用程序,客户可以下载、安装和运行。它使用MQ与主机通信,主机已工作多年。我自己和客户都没有在他们的Windows机器上安装任何MQ;我们包括并使用com.ibm.mq.jar来完成这项工作

显然,MQ需要类路径中的mqji.properties文件来防止这种情况:

Unable to load message catalog - mqji
com.ibm.mq.MQException: Message catalog not found

所以我的问题是:我在哪里可以得到一个呢?

这是我的mqji.properties文件的副本

复制并粘贴到文本编辑器中。
另存为mqji.properties
将此文件所在的目录放入类路径

# mqjiEn_US.properties
# Messages produced by the Websphere MQ Java interface classes
# (shared by bindings and by client)
# Messages beginning with MQJI are explanations for exceptions
# Messages beginning with MQJE are errors
#
# From class MQDistributionList
#
1=MQJI001: Queue manager object was null.
2=MQJI002: Not connected to a queue manager.
3=MQJI003: No object records supplied.
4=MQJI004: No response records supplied.
5=MQJI005: Not enough response records supplied.
6=MQJI006: An object or response record was null.
7=MQJI007: openResponse parameter was null.
8=MQJI008: Null message passed to put.
9=MQJI009: Null put message options passed to put.
10=MQJI010: Number of message trackers and response records do not match.
11=MQJI011: The distribution list has been closed.
#
# From class MQEnvironment
#
12=Websphere MQ Client for Java v5.3
#
# From class MQGetMessageOptions
#
13=MQJI013: Unsupported version number - {0}
14=MQJI014: Insufficient data received from queue manager.
15=MQJI015: Erroneous eyecatcher : {0}
#
# From class MQManagedObject
#
16=MQJI016: Object has been closed.
17=MQJI017: No selectors specified.
#
# From class MQMD
#
18=MQJI015: Erroneous eyecatcher : {0}
19=MQJI018: Array copy error in MQMD
#
# From class MQMessage
#
20=MQJI019: Malformed UTF string in MQMessage::readLine
21=MQJI020: Unsupported codeset : {0}
22=MQJI021: String index error occurred during codeset conversion
23=MQJI015: Erroneous eyecatcher : {0}
#
# From class MQOD
#
24=MQJI022: Unmatched number of object and response records
#
# From class MQPutMessageOptions
#
25=MQJI023: Null MQMessageTracker object supplied
#
# From class MQMessageTracker
#
26=MQJI024: Array copy error in MQMessageTracker
#
# From class MQQueue
#
27=MQJI025: Null MQMessage passed to get
28=MQJI026: Null MQGetMessageOptions passed to get
29=MQJI027: The queue has been closed
30=MQJI028: Null MQMessage passed to put
31=MQJI029: Null MQPutMessageOptions passed to put
#
# From class MQQueueManager
#
32=MQJI030: The queue manager does not support distribution lists.
#
# From class MQS390FloatSupport
#
33=MQJI031: Number outside of range for double precision S/390 Float
#
# From class MQS390PackedDecimalSupport
#
34=MQJI032: Invalid sign nibble in packed decimal
35=MQJI033: Packed Decimal digit outside of range 0-9
36=MQJI034: Outside of range for short packed decimal (+/-999)
37=MQJI035: Outside of range for integer packed decimal (+/-9999999)
38=MQJI036: Outside of range for long packed decimal (0+/-999999999999999)
#
# From class MQException
#
39=MQJE001: Completion Code {0}, Reason {1}
40=MQJE001: An MQException occurred: Completion Code {0}, Reason {1}\n{2}
#
# Messages produced by client only classes...
#
41=MQJI037: Error occurred during Websphere MQ API call - reason code {0}
42=MQJI038: Unexpected internal error during string index processing
43=MQJE002: Socket output stream was null
44=MQJE003: IO error transmitting message buffer
45=MQJE004: Socket input stream was null
46=MQJE005: TSH eyecatcher not found.  Eyecatcher was {0}
47=MQJE006: Internal error during array copy
48=MQJE007: IO error reading message data
49=MQJE008: IOException whilst sending status message
50=MQJE009: Failed to build API header
51=MQJE010: Unknown host: {0}
52=MQJE011: Socket connection attempt refused
53=MQJE012: Security error - cannot connect to host {0}
54=MQJE013: Error accessing socket streams
55=MQJE014: Control Point rejected connection
56=MQJE015: Error connecting to Control Point
57=MQJE016: MQ queue manager closed channel immediately during connect\n\Closure reason = {0}
58=MQJE017: MQ queue manager sent status error {0} during connect
59=MQJE018: Protocol error - unexpected segment type received
60=MQJE019: Error creating initial data segment
61=MQJE020: CCSID not supported by queue manager
62=MQJE021: Encoding not supported by queue manager
63=MQJE022: FAP level not supported by queue manager
64=MQJE023: Negotiation failed on maximum messages per batch
65=MQJE024: Sequence wrap value not supported by queue manager
66=MQJE025: Channel closed after two initial changes.  Closure reason {0}
67=MQJE026: Queue manager sent status error {0} during connect
68=MQJE027: Queue manager security exit rejected connection with error code {0}
69=MQJE028: Channel closed during security exchanges
70=MQJE029: Unexpected message type sent by queue manager
71=MQJE030: IOException during security flows
72=MQJE031: Security exit closed the channel
73=MQJE032: Queue manager security exit rejected connection with reason code {0}
74=MQJE033: A required security flow was not sent by the queue manager
75=MQJE034: Unexpected message type sent by queue manager
76=MQJE035: Negotiated maximum transmission size is too small
77=MQJE036: Queue manager rejected connection attempt
78=MQJE037: Remote queue manager closed the connection
79=MQJE038: Unexpected segment type {0} received
80=MQJE039: IOException whilst building connection data stream
81=MQJE040: Channel closed by exit
82=MQJE041: Unsupported version number - (0)
83=MQJE042: Erroneous eyecatcher: {0}
84=MQJE043: Insuffucient data received from queue manager
85=MQJE044: Array copy error in MQMD
86=MQJE045: Malformed UTF string
87=MQJE046: Unsupported codeset : {0}
88=MQJE047: String index error occurred during codeset conversion
89=MQJE048: Invalid sign nibble in packed decimal
90=MQJE049: Packed Decimal digit outside of range 0-9
91=MQJE050: Outside of range for short packed decimal (+/-999)
92=MQJE051: Outside of range for integer packed decimal (+/-9999999)
93=MQJE052: Outside of range for long packed decimal (0+/-999999999999999)
94=Websphere MQ Bindings for Java v5.3
95=MQJE053: The Websphere MQ Bindings for Java library could not be loaded
96=MQJE054: The queue manager does not support distribution lists
97=MQJE055: The queue manager does not support version 2 Websphere MQ API structures
98=MQJE056: Initial negotiation failure
99=MQJE057: Channel closed during security exchanges
100=MQJE058: Invalid number of object or response records
101=MQJE059: String index error
102=MQJE060: Could not find class {0}
103=MQJE061: Could not find field {0}
104=MQJE062: Could not find method {0}
#
# Messages used by MQManagedConnectionJ11, ManagedConnectionFactories
# and MQManagedConnectionMetaData
#
105=MQJI039: Invalid ConnectionRequestInfo object
106=MQJI040: MQManagedConnection already destroyed
107=MQJI041: Method {0} is not supported by Websphere MQ Classes for Java
108=MQJI042: MQManagedConnection is not reusable
#
# Messages from MQManagedConnectionMetaData
#
109=IBM Websphere MQ
110=Command Level {0}
#
# Messages from MQXAi
#
111=Security manager prevented access to native methods library for MQ XA support.
112=Failed to load native methods library for MQ XA support.
#
# Messages from MQXAResource
#
113=xa_open failed
114=XA operation failed, see errorCode
115=XAResource closed

#
# Messages produced by com.ibm.mq.MQMsg2
#
116=MQJE063: Unsupported character set {0}
117=MQJE064: Unsupported version of MQMD structure {0}
118=MQJE065: Inconsistent internal state detected

# message when server doesn't support client XA
119=client connection not XA enabled

#
# Messages produced via SSL options on a client connection
#
120=MQJE066: {0} provided as an unsupported object type
121=MQJE067: Peer name {0} did not match requested name {1}
122=MQJE068: Server certificate has been revoked
123=MQJE069: Unable to contact CertStore
124=MQJE070: SSL Protocol error: Channel not configured for SSL?

这里的正确答案是,客户需要下载实际的WMQ客户机并将其与应用程序一起安装,并且您的应用程序应该在不使用WMQ客户机JAR的情况下分发。这是真实的,原因有很多:

  • 您无权重新分发供应商的代码。当WMQ客户机或服务器代码捆绑在OEM许可证中时,它是完整安装,而不仅仅是几个jar文件
  • 安装完整客户端的原因之一是为了获得支持。完整的客户端安装是免费的,包括许多诊断工具。不需要完全安装的唯一原因是方便,如果你要为应用收费,那么潜在的责任远远超过了任何方便
  • 维修。如果客户安装了WMQ客户机,那么他们可以从IBM应用定期维护,并知道它是一个完整完整的发行版。除非您的公司准备保证他们选择重新分发的组件是有效安装,否则您最好使用正式安装。考虑到问题的本质是询问这个社区什么是有效的非供应商安装,我看不出贵公司如何支持IBM代码的这种配置
  • 法规遵从性。如果您的任何客户受到PCI、SOX、HIPAA或政府法规的约束,则在此配置下无法获得认证。例如,要符合PCI标准,部署的应用程序必须在很久以前应用了FixPack 7.0.1.3。如果没有完整安装,就不可能应用补丁包或向审计员证明它是基于JAR安装的
  • 安全。如果您未使用SSL或出口,则您的客户可能会模拟彼此或WMQ管理帐户。为了使用SSL,您必须安装IBMJCCE提供程序,该提供程序以GSKit的形式提供,它是完整客户端安装的一部分,包含jar文件中可用的本机编译C代码。根据应用程序的描述,我猜您的任何客户都可以远程、匿名地管理您的QMgr并执行任意操作系统代码。不太好
因此,正确的答案是让您和您的客户端下载并安装完整的WMQ客户端(),然后配置应用程序在该客户端上运行。否则,您的客户和公司将面临风险


如果您对我提到的安全风险有任何疑问,请参阅影响强化WebSphere MQ演示文稿和WebSphere MQ动手安全实验室。

如果它已经运行多年,那么旧的会发生什么?你改变了什么,使它突然停止工作?这里有一个基本的问题,这样做的目的是帮助人们以任何可能的方式工作,即使它是不可靠的和脆弱的,或者如果想法是指向他们的答案是可靠的和生产准备。这里有人在生产一种付费的、许可的产品,他们将其他供应商的代码嵌入其中。这不仅是脆弱和不可靠的(问题本身就证明了这一点),而且是非法的,将海报的公司和客户置于风险之中-一个让这些问题永久化的答案。