2

我正在尝试在 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 打开页面给我以下错误:

错误:

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 上复制文件来成功进行手动部署?

4

0 回答 0