Поиск weblogic jndi не работает

Я создал сервер JMS в WebLogic и добавил модуль JMS, подразвертывание JMS и два ресурса JMS, как показано ниже.

enter image description here

enter image description here

enter image description here

enter image description here

И в коде я пытаюсь получить эти ресурсы вот так

@Resource(mappedName="jms/DockerQueue")
private Destination localDockerQueue;

@Resource(mappedName="jms/DockerConnectionFactory")
private ConnectionFactory localDockerConnectionFactory;

Однако я получаю следующую ошибку времени выполнения

Caused By: com.bea.core.repackaged.springframework.beans.factory.NoSuchBeanDefin
itionException: No bean named 'org.javaee7.sample.PersonDatabase/localDockerQueu
e' is defined; nested exception is javax.naming.LinkException:  [Root exception
is javax.naming.NameNotFoundException: Unable to resolve 'jms.DockerQueue'. Reso
lved 'jms'; remaining name 'DockerQueue']; Link Remaining Name: 'jms/DockerQueue
'
        at com.bea.core.repackaged.springframework.beans.factory.support.Default
ListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:701)
        at com.bea.core.repackaged.springframework.beans.factory.support.Abstrac
tBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1180)
        at com.bea.core.repackaged.springframework.beans.factory.support.Abstrac
tBeanFactory.doGetBean(AbstractBeanFactory.java:284)
        at com.bea.core.repackaged.springframework.beans.factory.support.Abstrac
tBeanFactory.getBean(AbstractBeanFactory.java:202)
        at com.bea.core.repackaged.springframework.beans.factory.support.Abstrac
tBeanFactory.doGetBean(AbstractBeanFactory.java:275)
        Truncated. see log file for complete stacktrace
Caused By: javax.naming.LinkException:  [Root exception is javax.naming.NameNotF
oundException: Unable to resolve 'jms.DockerQueue'. Resolved 'jms'; remaining na
me 'DockerQueue']; Link Remaining Name: 'jms/DockerQueue'
        at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingMana
ger.java:114)
        at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.
java:1037)
        at weblogic.jndi.internal.ApplicationNamingNode.resolveObject(Applicatio
nNamingNode.java:186)
        at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.
java:1009)
        at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:22
3)
        Truncated. see log file for complete stacktrace
Caused By: javax.naming.NameNotFoundException: Unable to resolve 'jms.DockerQueu
e'. Resolved 'jms'; remaining name 'DockerQueue'
        at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Basic
NamingNode.java:1292)
        at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.jav
a:354)
        at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.j
ava:227)
        at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:21
4)
        at weblogic.jndi.internal.ServerNamingNode.lookup(ServerNamingNode.java:
527)
        Truncated. see log file for complete stacktrace
>

Кроме того, я не нахожу этих привязок в дереве JNDI. Однако я вижу DockerJMSSystemResource и DockerJMSServer

enter image description here

Как мне правильно внедрить эти ресурсы JMS?

0
0
1 396
1

Ответы 1

Решением было добавить отсутствующую цель к ресурсу JMS.

enter image description here

Другие вопросы по теме