as2.log

17 views
Skip to first unread message

lissette

unread,
Jun 25, 2007, 12:51:58 PM6/25/07
to Hermes 2.0 Discussion List
I obtain this error in as2.log

2007-06-23 18:46:21 [Thread-4 ] <ERROR> <Error in retrieving
incoming messages>
hk.hku.cecid.piazza.commons.dao.DAOException: Unable to begin
transaction
by org.apache.commons.dbcp.SQLNestedException: Could not retrieve
connection info from pool
by java.lang.NullPointerException
at
hk.hku.cecid.piazza.commons.dao.ds.DataSourceTransaction.begin(DataSourceTransaction.java:
96)
at
hk.hku.cecid.piazza.commons.dao.ds.DataSourceProcess.start(DataSourceProcess.java:
84)
at
hk.hku.cecid.piazza.commons.dao.ds.DataSourceDAO.executeQuery(DataSourceDAO.java:
413)
at
hk.hku.cecid.piazza.commons.dao.ds.DataSourceDAO.executeQuery(DataSourceDAO.java:
392)
at
hk.hku.cecid.piazza.commons.dao.ds.DataSourceDAO.find(DataSourceDAO.java:
324)
at
hk.hku.cecid.edi.as2.dao.MessageDataSourceDAO.findMessagesByStatus(MessageDataSourceDAO.java:
39)
at
hk.hku.cecid.edi.as2.module.IncomingMessageList.getTaskList(IncomingMessageList.java:
34)
at
hk.hku.cecid.piazza.commons.module.ActiveTaskModule.execute(ActiveTaskModule.java:
137)
at
hk.hku.cecid.piazza.commons.module.ActiveModule.run(ActiveModule.java:
213)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.commons.dbcp.SQLNestedException: Could not
retrieve connection info from pool
at
org.apache.commons.dbcp.datasources.SharedPoolDataSource.getPooledConnectionAndInfo(SharedPoolDataSource.java:
169)
at
org.apache.commons.dbcp.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:
631)
at
org.apache.commons.dbcp.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:
615)
at
hk.hku.cecid.piazza.commons.dao.ds.DataSourceTransaction.begin(DataSourceTransaction.java:
92)
... 9 more
Caused by: java.lang.NullPointerException
at
org.apache.commons.collections.SequencedHashMap.removeEntry(SequencedHashMap.java:
215)
at
org.apache.commons.collections.SequencedHashMap.removeImpl(SequencedHashMap.java:
473)
at
org.apache.commons.collections.SequencedHashMap.remove(SequencedHashMap.java:
460)
at org.apache.commons.collections.LRUMap.get(LRUMap.java:93)
at
org.apache.commons.dbcp.datasources.SharedPoolDataSource.getUserPassKey(SharedPoolDataSource.java:
176)
at
org.apache.commons.dbcp.datasources.SharedPoolDataSource.getPooledConnectionAndInfo(SharedPoolDataSource.java:
165)
... 12 more

Could you help me?? ebms.log run OK.
thanks very much

Ronnie Kwok

unread,
Jun 25, 2007, 9:34:36 PM6/25/07
to Hermes 2.0 Discussion List
Check if you DB is configured properly, the log indicates it cannot
get a database connection.

> by org.apache.commons.dbcp.SQLNestedException: Could not retrieve
> connection info from pool

ronnie

tvijlbrief

unread,
Jun 27, 2007, 4:52:44 AM6/27/07
to Hermes 2.0 Discussion List

Ronnie Kwok schreef:

I do also occasionally get that message when running H2O in Jboss
and just using the ebms database. It looks that the standard
implementation of
the database pool leaks connections in some way.

I will investigate of using a standard JBoss PostgreSQL datasource
fixes this...

Tom

lissette

unread,
Jun 27, 2007, 5:46:43 AM6/27/07
to Hermes 2.0 Discussion List

Hi tvijlbrief ,

Do you obtain this error??
C:\Tomcat5.5\webapps\test>partnership.bat as2 -a data/as2-a.xml
Exception in thread "main" java.lang.NoClassDefFoundError: hk/hku/
cecid/corvus/partnership/AS2Partnership

I do not why I obtain this error, and ebms partnersip is ok. Could you
help me?
Thanks very much

Ronnie Kwok

unread,
Jun 27, 2007, 6:22:15 AM6/27/07
to Hermes 2.0 Discussion List
Hello Tom,

Please kindly have us updated on the finding, cause we have seen the
leakage before but it should be fixed.

Regards,
ronnie

Ronnie Kwok

unread,
Jun 27, 2007, 6:23:39 AM6/27/07
to Hermes 2.0 Discussion List
I am wondering is it a classpath issue. Can you modify the partnership-
as2.bat and set "echo off" to "echo on", run the batch again and show
us the classpath?

Regards,
ronnie

lissette

unread,
Jun 27, 2007, 6:45:07 AM6/27/07
to Hermes 2.0 Discussion List
I modify partnership-as2.bat and I obtain this:

C:\Tomcat5.5\webapps\test>partnership.bat as2 -a as2-a.xml

C:\Tomcat5.5\webapps\test>SET AS2_PS_CLASSPATH=.;

C:\Tomcat5.5\webapps\test>SET AS2_PS_CLASSPATH=.;.\conf;

C:\Tomcat5.5\webapps\test>REM "Piazza Common Library and it's
dependency"

C:\Tomcat5.5\webapps\test>SET AS2_PS_CLASSPATH=.;.\conf;.\lib\piazza-
commons.jar
;

C:\Tomcat5.5\webapps\test>SET AS2_PS_CLASSPATH=.;.\conf;.\lib\piazza-
commons.jar
;.\lib\commons-collections-3.1.jar;

C:\Tomcat5.5\webapps\test>SET AS2_PS_CLASSPATH=.;.\conf;.\lib\piazza-
commons.jar
;.\lib\commons-collections-3.1.jar;.\lib\commons-dbcp-1.2.1.jar;

C:\Tomcat5.5\webapps\test>SET AS2_PS_CLASSPATH=.;.\conf;.\lib\piazza-
commons.jar
;.\lib\commons-collections-3.1.jar;.\lib\commons-dbcp-1.2.1.jar;.\lib
\commons-po
ol-1.2.jar;

C:\Tomcat5.5\webapps\test>SET AS2_PS_CLASSPATH=.;.\conf;.\lib\piazza-
commons.jar
;.\lib\commons-collections-3.1.jar;.\lib\commons-dbcp-1.2.1.jar;.\lib
\commons-po
ol-1.2.jar;.\lib\corvus-as2-core.jar;

C:\Tomcat5.5\webapps\test>SET AS2_PS_CLASSPATH=.;.\conf;.\lib\piazza-
commons.jar
;.\lib\commons-collections-3.1.jar;.\lib\commons-dbcp-1.2.1.jar;.\lib
\commons-po
ol-1.2.jar;.\lib\corvus-as2-core.jar;.\lib\dom4j-1.4.jar;

C:\Tomcat5.5\webapps\test>SET AS2_PS_CLASSPATH=.;.\conf;.\lib\piazza-
commons.jar
;.\lib\commons-collections-3.1.jar;.\lib\commons-dbcp-1.2.1.jar;.\lib
\commons-po
ol-1.2.jar;.\lib\corvus-as2-core.jar;.\lib\dom4j-1.4.jar;.\lib
\log4j-1.2.8.jar;


C:\Tomcat5.5\webapps\test>SET AS2_PS_CLASSPATH=.;.\conf;.\lib\piazza-
commons.jar
;.\lib\commons-collections-3.1.jar;.\lib\commons-dbcp-1.2.1.jar;.\lib
\commons-po
ol-1.2.jar;.\lib\corvus-as2-core.jar;.\lib\dom4j-1.4.jar;.\lib
\log4j-1.2.8.jar;.
\lib\postgresql-8.0-313.jdbc3.jar;

C:\Tomcat5.5\webapps\test>SET AS2_PS_CLASSPATH=.;.\conf;.\lib\piazza-
commons.jar
;.\lib\commons-collections-3.1.jar;.\lib\commons-dbcp-1.2.1.jar;.\lib
\commons-po
ol-1.2.jar;.\lib\corvus-as2-core.jar;.\lib\dom4j-1.4.jar;.\lib
\log4j-1.2.8.jar;.
\lib\postgresql-8.0-313.jdbc3.jar;.\lib\corvus.loopback.jar

C:\Tomcat5.5\webapps\test>C:\jdk5\jdk\bin\java -classpath .;.\conf;.
\lib\piazza-
commons.jar;.\lib\commons-collections-3.1.jar;.\lib\commons-
dbcp-1.2.1.jar;.\lib
\commons-pool-1.2.jar;.\lib\corvus-as2-core.jar;.\lib\dom4j-1.4.jar;.
\lib\log4j-
1.2.8.jar;.\lib\postgresql-8.0-313.jdbc3.jar;.\lib\corvus.loopback.jar
hk.hku.ce
cid.corvus.partnership.AS2Partnership -a as2-a.xml


Exception in thread "main" java.lang.NoClassDefFoundError: hk/hku/
cecid/corvus/p
artnership/AS2Partnership

C:\Tomcat5.5\webapps\test>goto end

C:\Tomcat5.5\webapps\test>


tvijlbrief

unread,
Jun 27, 2007, 7:24:49 AM6/27/07
to Hermes 2.0 Discussion List

lissette schreef:

In my installation the webapps directory has no /test sub-directory...

You should try running the command in the

C:\Program Files\hermes2\test

directory.

Tom

lissette

unread,
Jun 27, 2007, 7:33:07 AM6/27/07
to Hermes 2.0 Discussion List
tvijlbrief schreef

> In my installation the webapps directory has no /test sub-directory...
>
> You should try running the command in the
>
> C:\Program Files\hermes2\test
>
> directory.

I think that I installer hermes2 under Tomcat5.5, it is correct? or
not it is necesary. I do not understand why ebms run correcty and as2
not.
Thanks very much

Ronnie Kwok

unread,
Jun 27, 2007, 1:19:09 PM6/27/07
to Hermes 2.0 Discussion List
What about you tell us the 2 path that you have selected in the
installer?

The "test" folder should be found from where you install the "Hermes 2
core".

ronnie

Ronnie Kwok

unread,
Jun 27, 2007, 1:24:22 PM6/27/07
to Hermes 2.0 Discussion List
Hang on, there might be a bug in the partnership-as2.bat. Can you open
the file "partnership-as2.bat" and modify the line

SET AS2_PS_CLASSPATH=%AS2_PS_CLASSPATH%.\lib\corvus.loopback.jar

to

SET AS2_PS_CLASSPATH=%AS2_PS_CLASSPATH%.\lib\corvus-loopback.jar

Please save the changes and run again. Let me know if it works.

Regards,
ronnie

tvijlbrief

unread,
Jun 29, 2007, 2:33:46 AM6/29/07
to Hermes 2.0 Discussion List
Hi Ronnie,

I have been running the H2O server for 2 days now, polling every 10
seconds for
messages and no error yet. I used a JBoss defined datasource now,
so I think the problem is related to the database pooling (commons-
dbcp/pool) jars.

Info about running H2O in JBoss did I post earlier in this group
(search for jboss)

I changed the daofactory in ebms.module.xml to:
==================================================================
<component id="daofactory" name="System DAO Factory">
<class>
hk.hku.cecid.piazza.commons.dao.ds.DataSourceDAOFactory
</class>
<parameter name="datasource" value="java:ebms" />
<parameter name="config">
hk/hku/cecid/ebms/spa/conf/DAOMessage.xml,
hk/hku/cecid/ebms/spa/conf/DAORepository.xml,
hk/hku/cecid/ebms/spa/conf/DAOOutbox.xml,
hk/hku/cecid/ebms/spa/conf/DAOInbox.xml,
hk/hku/cecid/ebms/spa/conf/DAOMessageServer.xml,
hk/hku/cecid/ebms/spa/conf/DAOPartnership.xml
</parameter>
</component>
=========================

and created an ebms-ds.xml datasource in the jboss/default/deploy
directory:

=================================
<?xml version="1.0" encoding="UTF-8"?>

<!--
=====================================================================
-->
<!--
-->
<!-- JBoss Server
Configuration -->
<!--
-->
<!--
=====================================================================
-->

<!-- $Id: ebms-ds.xml,v 1.1 2007-06-27 09:13:57 tom Exp $ -->
<!--
==================================================================== --
>
<!-- Datasource config for
Postgres -->
<!--
==================================================================== --
>

<datasources>
<local-tx-datasource>
<jndi-name>ebms</jndi-name>
<connection-url>jdbc:postgresql://localhost/ebms</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>corvus</user-name>
<password>corvus</password>
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml
(optional) -->
<metadata>
<type-mapping>PostgreSQL 7.2</type-mapping>
</metadata>
</local-tx-datasource>

</datasources>
=================================

> > Tom- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

Ronnie Kwok

unread,
Jun 29, 2007, 1:09:37 PM6/29/07
to Hermes 2.0 Discussion List
Hello Tom,

Thanks a lot for your reply! We will have the database pool issue
noted.

BTW, I am now setting up some additional thing for the community web
site and is it OK to put up the information that you have provided
(like this setting and the other Mule related information) for other
to consume later on?

Much appreciated.

ronnie

tvijlbrief

unread,
Jun 30, 2007, 4:04:50 AM6/30/07
to Hermes 2.0 Discussion List

On 29 jun, 19:09, Ronnie Kwok <paperd...@gmail.com> wrote:
> Hello Tom,
>

> Thanks a lot for your reply! We will have the database pool issue
> noted.
>
> BTW, I am now setting up some additional thing for the community web
> site and is it OK to put up the information that you have provided
> (like this setting and the other Mule related information) for other
> to consume later on?

Ofcourse that is OK. It would be nice to have Hermes2
tips and tricks in a central location on the Community Web Site.

tvijlbrief

unread,
Jun 30, 2007, 5:11:05 AM6/30/07
to Hermes 2.0 Discussion List
I discovered that in my post I formatted the xml as:

<class>

hk.hku.cecid.piazza.commons.dao.ds.DataSourceDAOFactory
</class>

The problem is that Hermes does not skip the whitespace (I think
this should be fixed), so that the class is not found.

The xml should read:

<class>hk.hku.cecid.piazza.commons.dao.ds.DataSourceDAOFactory</class>

Another issue, at work I used JBoss 4.0.5 on Windows with no problems,
but when using JBoss 4.0.4 on Linux
at home I get al lot of:

10:48:50,231 ERROR [spa] Error in collecting message from outbox
hk.hku.cecid.piazza.commons.dao.DAOException: Error in executing
hk.hku.cecid.ebms.spa.dao.MessageDataSourceDAO::Process@c4d412
by hk.hku.cecid.piazza.commons.dao.DAOException: Error in
closing result set:
by java.sql.SQLException: Already closed
at
hk.hku.cecid.piazza.commons.dao.ds.DataSourceProcess.start(DataSourceProcess.java:
97)


at
hk.hku.cecid.piazza.commons.dao.ds.DataSourceDAO.executeQuery(DataSourceDAO.java:
413)
at
hk.hku.cecid.piazza.commons.dao.ds.DataSourceDAO.executeQuery(DataSourceDAO.java:
392)
at
hk.hku.cecid.piazza.commons.dao.ds.DataSourceDAO.find(DataSourceDAO.java:
324)
at

hk.hku.cecid.ebms.spa.dao.MessageDataSourceDAO.findMessagesByMessageBoxAndStatus(MessageDataSourceDAO.java:
97)
at
hk.hku.cecid.ebms.spa.task.OutboxCollector.getTaskList(OutboxCollector.java:
51)


at
hk.hku.cecid.piazza.commons.module.ActiveTaskModule.execute(ActiveTaskModule.java:
137)
at
hk.hku.cecid.piazza.commons.module.ActiveModule.run(ActiveModule.java:
213)

at java.lang.Thread.run(Thread.java:619)
Caused by: hk.hku.cecid.piazza.commons.dao.DAOException: Error in
closing result set:
by java.sql.SQLException: Already closed
at
hk.hku.cecid.piazza.commons.dao.ds.DataSourceQuery.doTransaction(DataSourceQuery.java:
144)
at
hk.hku.cecid.piazza.commons.dao.ds.DataSourceProcess.start(DataSourceProcess.java:
89)
... 8 more
Caused by: java.sql.SQLException: Already closed
at
org.jboss.resource.adapter.jdbc.WrappedResultSet.close(WrappedResultSet.java:
178)
at
hk.hku.cecid.piazza.commons.dao.ds.DataSourceQuery.doTransaction(DataSourceQuery.java:
141)
... 9 more

Using jboss4.0.5 on Linux fixes this, so it is related to the jboss
version.
It might indicate an issue in the JDBC code from Hermes, perhaps it is
related to connection
pool problem...

hoc...@gmail.com

unread,
Jun 30, 2007, 12:25:03 PM6/30/07
to Hermes 2.0 Discussion List
Hi,

I think you were just trying to make the setting not even conforming
with what an XML value supposed to be.
I don't really think any application should provide spelling check or
extra resource to correct this in such case.
How about making a space in a class name? Should it be fixed? For me,
it's more like human problem.

For jBoss problem, again, it seems according to what you presented it
may be problem in old version of jBoss.
Just rough searched, some people found problem with jBoss JDBC
DataSource as well.

Philip

tvijlbrief

unread,
Jul 1, 2007, 5:01:06 AM7/1/07
to Hermes 2.0 Discussion List

On 30 jun, 18:25, "hoc...@gmail.com" <hoc...@gmail.com> wrote:
> Hi,
>
> I think you were just trying to make the setting not even conforming
> with what an XML value supposed to be.
> I don't really think any application should provide spelling check or
> extra resource to correct this in such case.
> How about making a space in a class name? Should it be fixed? For me,
> it's more like human problem.

I do not agree. White space IN a class-name is a whole
different matter. The problem was introduced because
I did an auto layout in an XML-editor, which introduced the white
space...

So it is not a regular typo. Most xml applications allow formatting

<X>abc</X>

and

<X>
abc
</X>

without any problems...

Ronnie Kwok

unread,
Jul 1, 2007, 12:37:36 PM7/1/07
to Hermes 2.0 Discussion List
Hello Tom,

Just want to clarify a bit, the XML issues that we are talking about
is the "line break" inserted in the XML document, or the layout of the
XML elements?

<class>

hk.hku.cecid.piazza.commons.dao.ds.DataSourceDAOFactory
</class>

OR

<class>
hk.hku.cecid.piazza.commons.dao.ds.DataSourceDAOFactory
</class>

BTW, will noted about the JBoss version issue. Sometimes, it's
annoying that even minor version has issue of compatibility. I
remember we have similar issue in dealing with JDK minor version
before as well.

Also, stay tuned on the community web site, we are now preparing
additional thing for it. Definitely will try to make it a centralized
place for everything about H2O.

ronnie

tvijlbrief

unread,
Jul 2, 2007, 1:40:08 PM7/2/07
to Hermes 2.0 Discussion List

On 1 jul, 18:37, Ronnie Kwok <paperd...@gmail.com> wrote:
> Hello Tom,
>
> Just want to clarify a bit, the XML issues that we are talking about
> is the "line break" inserted in the XML document, or the layout of the
> XML elements?

It was formatted like this (as in the original posting):

<component id="daofactory" name="System DAO Factory">
<class>

hk.hku.cecid.piazza.commons.dao.ds.DataSourceDAOFactory
</class>
<parameter name="datasource" value="java:ebms" />
<parameter name="config">
hk/hku/cecid/ebms/spa/conf/DAOMessage.xml,
hk/hku/cecid/ebms/spa/conf/DAORepository.xml,
hk/hku/cecid/ebms/spa/conf/DAOOutbox.xml,
hk/hku/cecid/ebms/spa/conf/DAOInbox.xml,
hk/hku/cecid/ebms/spa/conf/
DAOMessageServer.xml,
hk/hku/cecid/ebms/spa/conf/DAOPartnership.xml
</parameter>
</component>

by the xml-editor. One assumes it is formatted ok, but it fails.

This is a bit of a surprise, mainly caused by the free formatting of
the parameter config section
where white-space is not issue...

It is not a big issue, I can live it.

Tom

tvijlbrief

unread,
Jul 2, 2007, 2:05:27 PM7/2/07
to Hermes 2.0 Discussion List

On 2 jul, 19:40, tvijlbrief <tvijlbr...@gmail.com> wrote:
>
> It was formatted like this (as in the original posting):
>
> <component id="daofactory" name="System DAO Factory">
> <class>
>
> hk.hku.cecid.piazza.commons.dao.ds.DataSourceDAOFactory
> </class>

ARGH! Google reformats my messages! :-/

There is no white line after the <class> line,
which would be obviously strangely formatted
and caused Philips remark.

The post from 29 jun 8:33 shows the XML
as used.

Neatly formatted, but not parsed correctly.


Reply all
Reply to author
Forward
0 new messages