Weblogic Server에 jms.queue1 이라는 quque를 만들고 나서 Spring framework을 이용하에 테스트 하는데, 아래와 같은 에러가 계속 발생하였습니다.
Caused by: javax.naming.NameNotFoundException: While trying to lookup 'jms.queue1' didn't find subcontext 'jms'. Resolved '' [Root exception is javax.naming.NameNotFoundException: While trying to lookup 'jms.queue1' didn't find subcontext 'jms'. Resolved '']; remaining name 'jms/queue1'
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at weblogic.jndi.internal.ServerNamingNode_1030_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:392)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:380)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:155)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:153)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)
at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)
at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)
at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:200)
at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:186)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 33 more
Caused by: javax.naming.NameNotFoundException: While trying to lookup 'jms.queue1' didn't find subcontext 'jms'. Resolved ''
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:247)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
마치 jnid name에 '.' 을 사용하면 안되는 것 같아서 '.'을 제거하고 '/'으로 변경도 해봤습니다만 결과는 같았습니다.
한참을 찾아본 결과..Jnid Tree에 jms.queue1 이 존재하지 않았습니다.
즉 queue를 올바르게 만든 것이 아닙니다.(아래그림 참조)
해결방법은 Target이 존재해야합니다.
저는 깜빡하고 JMS Server 부터 만들지 않고 JMS Module 부터 만들었기 때문입니다.
queue름 만들때, target을 설정하는 옵션이 나타나지 않는다면 JMS Server를 만들지 않았기 때문입니다.
참고로 JMS Server 부터 queue까지 만들어 테스트하는 블로그를 링크합니다.
http://weblogic-wonders.com/weblogic/2010/11/30/weblogic-jms-feature-using-a-queue/
댓글 영역