geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasily Zakharov" <...@apache.org>
Subject Re: G2.1/SjAS'04 issue: OPENEJB-700
Date Tue, 04 Mar 2008 17:32:56 GMT
Kevan,

Here, I've reproduced the problem with a simple test. It works ok if
proxy is set appropriately and fails if not, as it tries to download
the http://java.sun.com/dtd/ejb-jar_2_0.dtd and fails.

The stack is generally the same as for Geronimo/OpenEJB/SjAS:

java.net.ConnectException: Connection timed out: connect
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
	at java.net.Socket.connect(Socket.java:516)
	at java.net.Socket.connect(Socket.java:466)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:214)
	at sun.net.www.http.HttpClient.New(HttpClient.java:287)
	at sun.net.www.http.HttpClient.New(HttpClient.java:299)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:795)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:747)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:672)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:916)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:973)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:905)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:872)
	at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:282)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:1021)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
	at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
	at Test.main(Test.java:15)

The test case (effectively extracted from ReadDescriptors.java) is:

import java.net.*;
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
public class Test {
    public static void main(String[] args) throws Exception {
        try {
            URL url = new URL("file:ejb-jar.xml");
            InputSource inputSource = new InputSource(url.openStream());
            SAXParserFactory factory = SAXParserFactory.newInstance();
            factory.setNamespaceAware(true);
            factory.setValidating(false);
            SAXParser parser = factory.newSAXParser();
            parser.parse(inputSource, new DefaultHandler() {
                public void startElement(String uri, String localName,
String qName, Attributes att) throws SAXException {
                    if (!localName.equals("ejb-jar")) throw new
SAXException(localName);
                }
            });
            System.out.println("SUCCESS");
        } catch (Exception e) {
            System.out.print("ERROR: ");
            e.printStackTrace(System.out);
        }
    }
}

The ejb-jar.xml file used in the test is pretty trivial:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar/>

I'm not sure what I maybe doing wrong, but it seems this test exactly
replicates the problem I encounter with Geronimo/SjAS.

Any ideas how to deal with it?

Thanks!

Vasily



On Tue, Mar 4, 2008 at 10:11 AM, Kevan Miller <kevan.miller@gmail.com> wrote:
>
>
> On Mar 1, 2008, at 8:31 PM, Vasily Zakharov wrote:
>
>  I have no idea what's going on with it.  It really ticks me off as
>  that's the kind of feature you should have to enable in a parser not
>  disable.
>
> Is it? I thought the engine should first check if the necessary scheme
> is present locally and only try download if no local copy is present.
> Isnt't it true?
>
> Shouldn't we reopen OPENEJB-700 anyway?
>
> Vasily,
> I just tested using Daytrader. I turned off wireless and unplugged ethernet.
> I was able to deploy without a problem. I wonder if this problem could be
> specific to Windows?
>
>
>
>
>
>  If you have some time to debug, the
>  JaxbJavaee.NamespaceFilter.resolveEntity(...) method should be the one
>  stopping things from downloading.
>
> Ok, I'll check that, thanks.
>
> Vasily
>
>
> On Sun, Mar 2, 2008 at 12:56 AM, David Blevins <david.blevins@visi.com>
> wrote:
>
>  On Feb 29, 2008, at 8:36 AM, Vasily Zakharov wrote:
>
>
> Hi, all,
>
>
>
> I'm once again trying to couple SPECjAppServer2004 with Geronimo, now
>
> version 2.1, and one of the problems I observe is:
>
>
>
> Issue OPENEJB-700 that is now closed as it was fixed in OpenEJB v3.0b2
>
> that is used in G2.1, seems to be still actual for some reason. On
>
> G2.1 I still can't deploy SjAS unless the internet connection is
>
> present and proxy properly configured. The following error is shown by
>
> the Deployer:
>
>
>
> Error: Unable to distribute SPECjAppServer.ear:
>
> org.apache.openejb.OpenEJBException: Cannot read the ejb-jar.xml file:
>
> jar:file:/C:/Temp/geronimo-deploymentUtil48973.jar!/META-INF/ejb-
>
> jar.xml:
>
> Connection timed out: connect
> Could you provide the entire stack trace?
>
> --kevan

Mime
View raw message