You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by "Elliot Metsger (JIRA)" <ji...@apache.org> on 2006/05/18 21:15:07 UTC

[jira] Updated: (PLUTO-241) maven deploy fails when http://castor.org is not reachable

     [ http://issues.apache.org/jira/browse/PLUTO-241?page=all ]

Elliot Metsger updated PLUTO-241:
---------------------------------

    Attachment: PLUTO-214.patch

The problem lies in the org.exolab.castor.mapping.Mapping class - you need to set an entity resolver on it using mapping.setEntityResolver().

In order to get 'maven deploy' to work I had to do a couple of things:

1. Apply this patch to AbstractWebAppDescriptorService, instructing Castor to use org.apache.pluto.descriptors.services.impl.EntityResolver.
2. Add the Castor mapping.dtd to descriptors/src/conf/org/apache/pluto/descriptors/services/impl/ (*** Since castor.org was down, I retrieved the mapping.dtd file from Google cache, so before applying the patch we may want to make sure we have the correct mapping.dtd file for the version of Castor used by Pluto).
3. Had to run 'maven fullDeployment' with -Dmaven.test.skip=true.  Some tests create a Mapping object and need an EntityResolver, but the o.a.p.descriptors.services.impl.EntityResolver is package-private so the tests can't see it, and therefore the tests fail.


> maven deploy fails when http://castor.org is not reachable
> ----------------------------------------------------------
>
>          Key: PLUTO-241
>          URL: http://issues.apache.org/jira/browse/PLUTO-241
>      Project: Pluto
>         Type: Bug

>   Components: deployer
>     Versions: 1.0.1
>     Reporter: Elliot Metsger
>  Attachments: PLUTO-214.patch
>
> Today http://castor.org was down, and when I attempted to deploy a portlet using 'maven deploy' I crashed and burned:
> [esm@clue pluto-descriptor-fixes]$ tomcat clean msel-eres-webapp ; maven -Ddeploy=/home/esm/workspace/EreservesPortlet/msel-eres-webapp/target/msel-eres-webapp.war deploy
> Done.
>  __  __
> |  \/  |__ _Apache__ ___
> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
> |_|  |_\__,_|\_/\___|_||_|  v. 1.0.2
> build:start:
> deploy:
>     [echo]
> ************************************************
> * Please ensure that a fullDeployment has      *
> * previously been run if this deploy attempt   *
> * fails.  It is the fullDeployment that        *
> * deploys pluto container and portal driver.   *
> ************************************************
> Starting the reactor...
> Our processing order:
> Pluto Portlet Deployment
> +----------------------------------------
> | Deploy a portlet Pluto Portlet Deployment
> | Memory: 2M/4M
> +----------------------------------------
> build:start:
> deploy:
>     [java] <VERBOSE> Source WebApp: /home/esm/workspace/EreservesPortlet/msel-eres-webapp/target/msel-eres-webapp.war
>     [java] <VERBOSE> Destination:   /home/esm/tc55/webapps
>     [java] <VERBOSE> Portal WebApp: /home/esm/tc55/webapps/pluto
>     [java] <VERBOSE> Portlet Context: /home/esm/tc55/webapps/msel-eres-webapp
>     [java] java.net.ConnectException: Connection refused
>     [java]      at java.net.PlainSocketImpl.socketConnect(Native Method)
>     [java]      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
>     [java]      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
>     [java]      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
>     [java]      at java.net.Socket.connect(Socket.java:452)
>     [java]      at java.net.Socket.connect(Socket.java:402)
>     [java]      at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
>     [java]      at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
>     [java]      at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
>     [java]      at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
>     [java]      at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
>     [java]      at sun.net.www.http.HttpClient.New(HttpClient.java:339)
>     [java]      at sun.net.www.http.HttpClient.New(HttpClient.java:320)
>     [java]      at sun.net.www.http.HttpClient.New(HttpClient.java:315)
>     [java]      at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521)
>     [java]      at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498)
>     [java]      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:626)
>     [java]      at java.net.URL.openStream(URL.java:913)
>     [java]      at org.exolab.castor.util.DTDResolver.resolveEntity(DTDResolver.java:249)
>     [java]      at org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown Source)
>     [java]      at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
>     [java]      at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
>     [java]      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
>     [java]      at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
>     [java]      at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
>     [java]      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     [java]      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     [java]      at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:605)
>     [java]      at org.exolab.castor.mapping.Mapping.loadMappingInternal(Mapping.java:532)
>     [java]      at org.exolab.castor.mapping.Mapping.loadMapping(Mapping.java:435)
>     [java]      at org.apache.pluto.descriptors.services.impl.AbstractWebAppDescriptorService.getCastorMapping(AbstractWebAppDescriptorService.java:134)
>     [java]      at org.apache.pluto.descriptors.services.impl.AbstractCastorDescriptorService.readInternal(AbstractCastorDescriptorService.java:66)
>     [java]      at org.apache.pluto.descriptors.services.impl.AbstractWebAppDescriptorService.read(AbstractWebAppDescriptorService.java:77)
>     [java]      at org.apache.pluto.driver.deploy.Deploy.updateDescriptors(Deploy.java:142)
>     [java]      at org.apache.pluto.driver.deploy.Deploy.deploy(Deploy.java:130)
>     [java]      at org.apache.pluto.driver.deploy.CLI.main(CLI.java:59)
>     [java] Exception in thread "main" java.io.IOException: Nested error: java.net.ConnectException: Connection refused
>     [java]      at org.apache.pluto.descriptors.services.impl.AbstractCastorDescriptorService.readInternal(AbstractCastorDescriptorService.java:77)
>     [java]      at org.apache.pluto.descriptors.services.impl.AbstractWebAppDescriptorService.read(AbstractWebAppDescriptorService.java:77)
>     [java]      at org.apache.pluto.driver.deploy.Deploy.updateDescriptors(Deploy.java:142)
>     [java]      at org.apache.pluto.driver.deploy.Deploy.deploy(Deploy.java:130)
>     [java]      at org.apache.pluto.driver.deploy.CLI.main(CLI.java:59)
>     [java] [ERROR] Java Result: 1
> BUILD SUCCESSFUL
> Total time: 3 seconds
> Finished at: Thu May 18 14:54:16 EDT 2006

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira