Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 84683 invoked from network); 21 Dec 2010 09:30:18 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Dec 2010 09:30:18 -0000 Received: (qmail 43982 invoked by uid 500); 21 Dec 2010 09:30:18 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 43927 invoked by uid 500); 21 Dec 2010 09:30:18 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 43917 invoked by uid 99); 21 Dec 2010 09:30:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Dec 2010 09:30:17 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of xhhsld@gmail.com designates 209.85.210.182 as permitted sender) Received: from [209.85.210.182] (HELO mail-iy0-f182.google.com) (209.85.210.182) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Dec 2010 09:30:09 +0000 Received: by iyb26 with SMTP id 26so3037723iyb.13 for ; Tue, 21 Dec 2010 01:29:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=RplESxILcfBIK2oGH6Jyx//TWKUDCUMlnAs8oqTdCjk=; b=o7Rz2xj+CNrG6zSGzt7dUQH3QhYmP1iniAAOiEZ8cessDAznPJzsoPMgu6/ucyJesk k+zF926y+b7gRLruZscttGcggIO11Z2SIoRpraQxB/COFIa3z7uM0tHVuNqHEczbhNGs 4/YrqwqXWE4cZXRH4SjUmLHv35tYoLMMswC9A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=xBNixrB5FfLpuZ7gM5YiCRMml0JRXhqLMBZ+awczsidO7YlcZ9rIlFJTAOqC9Bd+yT KAicIJOU7bigC8vCsmKLjzICxJR4ebdJzurbGsXI/GNsq2NGabRlAXSDfzYzxYOw0dsJ ZyqP2+BmVwQEZGohRqlS/BaqZf5fhFEp6sBKw= MIME-Version: 1.0 Received: by 10.231.37.70 with SMTP id w6mr5095255ibd.169.1292923788048; Tue, 21 Dec 2010 01:29:48 -0800 (PST) Received: by 10.231.155.146 with HTTP; Tue, 21 Dec 2010 01:29:47 -0800 (PST) In-Reply-To: References: Date: Tue, 21 Dec 2010 17:29:47 +0800 Message-ID: Subject: Fwd: EOFException in ActiveMQ 4.1.2 From: Ivan To: users@activemq.apache.org, dev@geronimo.apache.org Content-Type: multipart/alternative; boundary=002215048dab1bb8600497e84722 X-Virus-Checked: Checked by ClamAV on apache.org --002215048dab1bb8600497e84722 Content-Type: text/plain; charset=ISO-8859-1 Forgot to cc activemq user list. ---------- Forwarded message ---------- From: Ivan Date: 2010/12/21 Subject: Re: EOFException in ActiveMQ 4.1.2 To: dev@geronimo.apache.org Finally, I found the codes caused this, it is related to activemq resource adapter. In the finally block, connection.close() is called, while at this time, the wireformat handshake might not finished, closing the client socket might caused the EOF exception or reset exception on the server side. Another issue is that, I found that the return value of makeConnection() is an instance of ActiveMQConnection, not the ActiveMQXAConnection, so it never returns the XAResource used for transcation recovery. Thougths ? thanks. ---> ActiveMQResourceAdapter.java public XAResource[] getXAResources(ActivationSpec[] activationSpecs) throws ResourceException { Connection connection = null; try { connection = makeConnection(); if (connection instanceof XAConnection) { XASession session = ((XAConnection) connection).createXASession(); XAResource xaResource = session.getXAResource(); return new XAResource[] { xaResource }; } else { return new XAResource[] {}; } } catch (JMSException e) { throw new ResourceException(e); } finally { try { connection.close(); } catch (Throwable ignore) { } } } <--- 2010/12/20 Ivan No, you might find those error messages while restarting the deployed > application sometimes. > > 2010/12/20 Kevan Miller > > >> On Dec 19, 2010, at 7:19 AM, Shawn Jiang wrote: >> >> > Similar exceptions in geronimo 2.2.1 when connecting to derby during a >> recovery process. >> > >> > https://issues.apache.org/jira/browse/GERONIMO-5736 >> > >> > Is it possible that some context is not there when txmanager is trying >> to do the recovery ? >> >> The Derby issue seems different to me, though the underlying processing >> (transaction recovery) is the same. The Derby problem seems to be an >> authentication issue: >> >> [INFO] Caused by: java.sql.SQLException: Connection authentication failure >> occurred. Reason: Invalid authentication.. >> [INFO] at >> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown >> Source) >> [INFO] at >> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown >> Source) >> [INFO] ... 62 more >> >> I assume we're missing appropriate configuration with the recent Embedded >> Derby authentication changes. >> >> The ActiveMQ problem sounds like a timing issue: I would guess that >> perhaps the Server is not always fully started when the managed connections >> are being created? I assume this only happens once and then the problem >> disappears? >> >> --kevan > > > > > -- > Ivan > -- Ivan -- Ivan --002215048dab1bb8600497e84722 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Forgot to cc activemq user list.

--------= -- Forwarded message ----------
From: Ivan= <xhhsld@gmail= .com>
Date: 2010/12/21
Subject: Re: EOFException in ActiveMQ 4.1.2
To: dev@geronimo.apache.org

<= br>Finally, I found the codes caused this, it is related to activemq resour= ce adapter.
In the finally block, connection.close() is called, while at this time, the= wireformat handshake might not finished, closing the client socket might c= aused the EOF exception or reset exception on the server side.
Another issue is that, I found that the return value of makeConnection() is= an instance of ActiveMQConnection, not the ActiveMQXAConnection, so it nev= er returns the XAResource used for transcation recovery.
Thougths ? tha= nks.
--->
ActiveMQResourceAdapter.java
public XAResource[] getXAResourc= es(ActivationSpec[] activationSpecs) throws ResourceException {
=A0=A0= =A0=A0=A0=A0=A0 Connection connection =3D null;
=A0=A0=A0=A0=A0=A0=A0 tr= y {
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 connection =3D makeConnection(); =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (connection instanceof XAConnection) {=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 XASession session =3D ((X= AConnection) connection).createXASession();
=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 XAResource xaResource =3D session.getXAResource();
= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return new XAResource[] { xaR= esource };
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } else {
=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 return new XAResource[] {};
=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 }
=A0=A0=A0=A0=A0=A0=A0 } catch (JMSException e) {
=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 throw new ResourceException(e);
=A0=A0=A0=A0= =A0=A0=A0 } finally {
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 try {
=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 connection.close();
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } catch (Throwable ignore) {
=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 }
=A0=A0=A0=A0=A0=A0=A0 }
=A0=A0=A0 }
<= ;---



2010/12/20 Ivan <xhhsld@gmai= l.com>

No, you might fin= d those error messages while restarting the deployed application sometimes.=

2010/12/20 Kevan Miller &l= t;kevan.miller@= gmail.com>


On Dec 19, 2010, at 7:19 AM, Shawn Jiang wrote:

> Similar exceptions in geronimo 2.2.1 when connecting to der= by during a =A0recovery process.
>
> https://issues.apache.org/jira/browse/GERONIMO-5736
>
> Is it possible that some context is not there when txmanager is trying= to do the recovery ?

The Derby issue seems different to me, though the underlying processi= ng (transaction recovery) is the same. The Derby problem seems to be an aut= hentication issue:

[INFO] Caused by: java.sql.SQLException: Connection authentication failure = occurred. Reason: Invalid authentication..
[INFO] at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Un= known Source)
[INFO] at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTrans= portAcrossDRDA(Unknown Source)
[INFO] ... 62 more

I assume we're missing appropriate configuration with the recent Embedd= ed Derby authentication changes.

The ActiveMQ problem sounds like a timing issue: I would guess that perhaps= the Server is not always fully started when the managed connections are be= ing created? I assume this only happens once and then the problem disappear= s?

--kevan



-- <= br>Ivan



--
Ivan



--
Ivan
--002215048dab1bb8600497e84722--