1

我的应用程序是一个独立的 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

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

4

2 回答 2

1

这里的正确答案是客户需要下载实际的 WMQ 客户端并将其与您的应用程序一起安装,并且您的应用程序应该在没有 WMQ 客户端 jar 的情况下分发。出于多种原因,这是正确的:

  • 您无权重新分发供应商的代码。当 WMQ 客户端或服务器代码捆绑在 OEM 许可证中时,它是完整的安装,而不仅仅是几个 jar 文件。
  • 安装完整客户端的原因之一是为了获得支持。完整的客户端安装是免费的,包括许多诊断工具。不需要完整安装的唯一原因是方便,如果您为应用程序收费,任何便利都远远超过潜在的责任。
  • 维护。如果客户安装了 WMQ 客户端,那么他们可以应用 IBM 的定期维护,并且知道它是一个完整且完整的分发版。除非您的公司准备好保证他们选择重新分发的组件是有效安装,否则您最好使用官方安装。鉴于问题的性质是询问这个社区什么是有效的非供应商安装,我看不出贵公司如何支持这种 IBM 代码配置。
  • 合规性。如果您的任何客户受 PCI、SOX、HIPAA 或政府法规的约束,则在此配置下无法获得认证。例如,要符合 PCI 标准,部署的应用程序必须在很久以前就应用了 Fix Pack 7.0.1.3。如果没有完整安装,就不可能应用修订包或向审核员证明它是基于 jar 安装的。
  • 安全。如果您不使用 SSL 或退出,那么您的客户可能会冒充另一个或 WMQ 管理帐户。为了使用 SSL,您必须安装 GSKit 中的 IBM JCCE 提供程序,它是完整客户端安装的一部分,包含 jar 文件中可用的本机编译 C 代码。根据应用程序的描述,我猜您的任何客户都可以远程、匿名地管理您的 QMgr 并执行任意操作系统代码。不好。

因此,正确的答案是让您和您的客户去下载并安装完整的 WMQ 客户端 ( SupportPac MQC7 ) 并配置应用程序以在其上运行。任何更少的事情都会使您的客户和您的公司面临风险。

如果您对我提到的安全漏洞有任何疑问,请参阅 IMPACT Hardening WebSphere MQ演示文稿和此处发布的WebSphere MQ 动手安全实验室

于 2011-01-30T18:23:25.110 回答
1

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

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

# 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?
于 2009-10-27T08:53:31.243 回答