org.springframework.jndi.JndiLookupFailureException:JndiObjectTargetSource无法获取新的目标对象

时间:2012-07-26 08:13:54

标签: spring spring-mvc jboss jndi jboss-portal

我正在尝试在jboss-portal-2.7.2上部署我的应用程序文件app-ear-1.0.ear和mytest-portlet-1.0.war,并在部署之后(通过复制app-ear-1.0.ear和mytest-portlet-1.0.war到jboss-portal-2.7.2 / server / default / deploy)并用portlet打开页面,它给了我以下错误:

ERROR:

Cause: javax.portlet.PortletException: Request processing failed
Message: Request processing failed
StackTrace: 
javax.portlet.PortletException: Request processing failed
    at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:544)
...
org.springframework.jndi.JndiLookupFailureException: JndiObjectTargetSource failed to obtain new target object; nested exception is javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]]
    at org.springframework.jndi.JndiObjectTargetSource.getTarget(JndiObjectTargetSource.java:139)
..
javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]]
    at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
...
javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]
    at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:274)
...
javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]
    at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
...
java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
...

有谁知道如何解决这个问题?

我的web.xml(mytest-portlet / src / main / webapp / WEB-INF /):

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" 
...

    <jee:jndi-lookup id="myTestService" jndi-name="app-ear-1.0/ejb/APPMyTest/remote"
                     proxy-interface="app.ejb.facade.portlet.mytest.IAPPMyTestService" lookup-on-startup="false">
        <jee:environment>
            java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
            java.naming.provider.url=jnp://localhost:1099
            java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
        </jee:environment>
    </jee:jndi-lookup>
</beans>   

但是在Windows 7上,如果从IntelliJ IDEA进行部署,那么一切正常。在Mac OS X上必须做些什么才能通过在jboss-portal-2.7.2上复制文件来成功进行手动部署?

0 个答案:

没有答案