2

我是新的 JMS,我创建了示例 JMS 应用程序。

Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
props.put(Context.PROVIDER_URL, "iiop://localhost:2809");
InitialContext context = new InitialContext(props);
QueueConnectionFactory qcf = (QueueConnectionFactory) context.lookup("jndi/testQF");
QueueConnection conn = qcf.createQueueConnection();
conn.start();
QueueSession session = (QueueSession) conn.createSession(false,Session.AUTO_ACKNOWLEDGE);
Queue t = (Queue) context.lookup("jndi/testQQ");

我创建了总线 testBus 安全性已禁用,总线成员,队列连接工厂 testQF 选择总线 testBus。创建队列为 testQQ 选择总线作为 testBus 并选择 testPP 队列作为队列名称,该队列名称被创建为服务满足总线目的地作为点对点。

在运行我的应用程序时出现此错误。

SEVERE: JSAS1480I: Security is not enabled because the ConfigURL property file is not set.
Apr 10, 2015 8:12:21 PM null null
WARNING: WSVR0072W: Ignoring undeclared override of interface, com.ibm.tx.jta.transactionManager, with implementation, com.ibm.ws.tx.jta.TranManagerSet
Apr 10, 2015 8:12:21 PM null null
WARNING: WSVR0072W: Ignoring undeclared override of interface, com.ibm.ws.transaction.TransactionInflowProxy, with implementation, com.ibm.ws.tx.jta.TransactionInflowProxyImpl
Apr 10, 2015 8:12:21 PM null null
WARNING: WSVR0072W: Ignoring undeclared override of interface, com.ibm.ws.transaction.UtxImpl, with implementation, com.ibm.ws.tx.jta.UserTransactionImpl
Apr 10, 2015 8:12:21 PM null null
WARNING: WSVR0072W: Ignoring undeclared override of interface, com.ibm.ws.transaction.XATerminator, with implementation, com.ibm.ws.tx.jta.TxXATerminator
Apr 10, 2015 8:12:21 PM null null
WARNING: WSVR0072W: Ignoring undeclared override of interface, com.ibm.ws.uow.UOWManager, with implementation, com.ibm.ws.uow.UOWManagerImpl
Apr 10, 2015 8:12:21 PM null null
INFO: Client code attempting to load security configuration
javax.naming.NameNotFoundException: Context: ADMINIB-3UJMQ4ENode01Cell/nodes/ADMINIB-3UJMQ4ENode01/servers/server1, name: jndi/testQF: First component in name testQF not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
    at com.ibm.ws.naming.jndicos.CNContextImpl.mapNotFoundException(CNContextImpl.java:4564)
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1822)
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1777)
    at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1434)
    at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:616)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:165)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
    at javax.naming.InitialContext.lookup(InitialContext.java:436)
    at MySender.main(MySender.java:31)
Caused by: org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
    at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:95)
    at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(_NamingContextStub.java:506)
    at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2958)
    at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2954)
    at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:871)
    at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:2952)
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1818)
    ... 7 more

我正在从 j2ee 项目类型中的 main 方法运行我的应用程序,这是一个问题吗?请帮我解决这个问题。

谢谢,

CVSR 萨尔玛

4

0 回答 0