You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Scott Eade <se...@backstagetech.com.au> on 2007/03/13 06:54:26 UTC

Torque 3.3.RC2 problem with turbine applications

At some stage between 3.3.RC1 and 3.3.RC2 a change to torque was made 
that broke things for the TurbineAvalonComponentService.

Using turbine (2.3.2) and torque 3.3.RC2, after torque starts up it is 
immediately disposed of and hence any queries that are executed are 
greeted with a TorqueException that indicates "Torque is not initialized".

Here is the relevant chunk of the start up log:

avalon - added Role org.apache.torque.avalon.Torque with shorthand 
torque for org.apache.torque.avalon.TorqueComponent
avalon - looking up shorthand torque, returning 
org.apache.torque.avalon.Torque
avalon - Adding component (org.apache.torque.avalon.Torque = 
org.apache.torque.avalon.TorqueComponent)
avalon - Attempting to get Handler for role 
[org.apache.torque.avalon.Torque]
avalon - Handler type = 
org.apache.avalon.excalibur.component.DefaultComponentHandler
avalon - ComponentHandler initialized for: 
org.apache.torque.avalon.TorqueComponent
avalon - ComponentFactory creating new instance of 
org.apache.torque.avalon.TorqueComponent.
avalon - no logger attribute available, using standard logger
avalon - configure(torque::<no 
value>:@file:/S:/eclipse-workspace/cmes-dev/target/deploy/dev-m2/WEB-INF/conf/componentConfiguration.xml:7:13) 

avalon - Config File is 
S:\eclipse-workspace\cmes-dev\target\deploy\dev-m2\WEB-INF/conf/Torque.properties 

avalon - initialize()
dsfactory.AbstractDataSourceFactory - Starting initCPDS
dsfactory.AbstractDataSourceFactory - 
applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@1a9cf52, 
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf)
dsfactory.AbstractDataSourceFactory - 
applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@31bcc8, 
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf)
dsfactory.AbstractDataSourceFactory - 
setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf, 
driver, org.postgresql.Driver)
dsfactory.AbstractDataSourceFactory - 
setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf, 
url, jdbc:postgresql://127.0.0.1:5432/cmesdev)
dsfactory.AbstractDataSourceFactory - 
setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf, 
user, torque)
dsfactory.AbstractDataSourceFactory - 
setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf, 
password,  (value not logged))
dsfactory.SharedPoolDataSourceFactory - Starting initJdbc2Pool
dsfactory.AbstractDataSourceFactory - 
applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@1ef45e0, 
org.apache.commons.dbcp.datasources.SharedPoolDataSource@1d47f59)
dsfactory.AbstractDataSourceFactory - 
applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@f3770c, 
org.apache.commons.dbcp.datasources.SharedPoolDataSource@1d47f59)
dsfactory.AbstractDataSourceFactory - 
setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1d47f59, 
maxActive, 10)
dsfactory.AbstractDataSourceFactory - 
setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1d47f59, 
testOnBorrow, true)
dsfactory.AbstractDataSourceFactory - 
setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1d47f59, 
validationQuery, SELECT 1)
avaloncomponent.TurbineAvalonComponentService - Lookup for Component 
org.apache.torque.avalon.Torque successful
avalon - ComponentFactory decommissioning instance of 
org.apache.torque.avalon.TorqueComponent.
avalon - dispose()

Jeffery Brekkie has confirmed this behaviour (despite his initial 
comment that RC2 was all good).  There are a few items in the changelog 
that could impact this area.

Jeffery and I have both reverted to RC1 for now pending further 
investigation.

Scott

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: Torque 3.3.RC2 problem with turbine applications

Posted by Scott Eade <se...@backstagetech.com.au>.
Thomas Vandahl wrote:
> Scott Eade wrote:
>   
>> With torque-3.3.RC2 it starts getting the NPEs immediately from BasePeer
>> line 1632:
>>    ColumnMap[] columnMaps = dbMap.getTable(table).getColumns();
>>
>> Would you have any suggestions as to what my problem might be?
>>     
>
> Yes, this made me reopen TORQUE-68. As you know, the Peer classes have
> static constructors. If Tomcat unserializes session objects these are
> called and try to register their MapBuilder with an (at that point)
> uninitialized Torque instance. When initialized with the Avalon
> container a new TorqueInstance is created and the MapBuilders need to be
> rebuilt so I wrote some code to copy them from one instance to another.
>
> Unfortunately I checked for Torque.isInit() which in that special, above
> mentioned case is not true. This is fixed in SVN by now. You can work
> around the issue by either switching off the reloading of session data
> in Tomcat or by calling <YourDataBaseNameHere>MapInit.init() at some
> point before any call to Torque but after initialization.
>   
I'm seeing a couple of other errors in my logs (not sure if they are 
related to TORQUE-68) these seem to be happening when tomcat is 
disposing of an old session:

2007-04-06 22:27:33,647 ERROR [TP-Processor6] torque.UserPeerManager - java.lang.NullPointerException
java.lang.NullPointerException	at org.apache.turbine.services.security.torque.UserPeerManager.getUserObjectdata(UserPeerManager.java:1360)	at org.apache.turbine.services.security.torque.TorqueUser.getObjectdata(TorqueUser.java:397)	at org.apache.turbine.services.security.torque.TorqueUser.getPermStorage(TorqueUser.java:554)	at org.apache.turbine.services.security.torque.TorqueUser.getPerm(TorqueUser.java:621)	at org.apache.turbine.services.security.torque.TorqueUser.getAccessCounter(TorqueUser.java:420)	at org.apache.turbine.services.security.torque.TorqueUser.incrementAccessCounter(TorqueUser.java:451)	at org.apache.turbine.services.rundata.DefaultTurbineRunData.populate(DefaultTurbineRunData.java:1253)	at
...

and:

2007-04-06 22:47:40,533 ERROR [ContainerBackgroundProcessor[StandardEngine[Catalina]]] torque.UserPeerManager - java.lang.NullPointerException
java.lang.NullPointerException	at org.apache.turbine.services.security.torque.UserPeerManager.getName(UserPeerManager.java:840)	at org.apache.turbine.services.security.torque.TorqueUser.getName(TorqueUser.java:183)	at com.backstagetech.cmes.om.CmesUser.valueUnbound(CmesUser.java:737)	at org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1566)	at org.apache.catalina.session.StandardSession.expire(StandardSession.java:708)	at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:566)	at org.apache.catalina.session.StandardManager.processExpires(StandardManager.java:782)	at org.apache.catalina.session.StandardManager.backgroundProcess(StandardManager.java:795)	at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:4640)	 

I am running turbine-2.3.2 with Will's serialization patches.
> Do you have any more information on the ECM issue? My problem is that I
> have no access to such an environment anymore. I'd try to setup one if
> it still really matters...
>   
I saw your note on this - I will try and pull a response together in the 
next few days.

Scott

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: Torque 3.3.RC2 problem with turbine applications

Posted by Scott Eade <se...@backstagetech.com.au>.
Thomas Vandahl wrote:
> Scott Eade wrote:
>   
>> With torque-3.3.RC2 it starts getting the NPEs immediately from BasePeer
>> line 1632:
>>    ColumnMap[] columnMaps = dbMap.getTable(table).getColumns();
>>
>> Would you have any suggestions as to what my problem might be?
>>     
>
> Yes, this made me reopen TORQUE-68. As you know, the Peer classes have
> static constructors. If Tomcat unserializes session objects these are
> called and try to register their MapBuilder with an (at that point)
> uninitialized Torque instance. When initialized with the Avalon
> container a new TorqueInstance is created and the MapBuilders need to be
> rebuilt so I wrote some code to copy them from one instance to another.
>
> Unfortunately I checked for Torque.isInit() which in that special, above
> mentioned case is not true. This is fixed in SVN by now. You can work
> around the issue by either switching off the reloading of session data
> in Tomcat or by calling <YourDataBaseNameHere>MapInit.init() at some
> point before any call to Torque but after initialization.
>   
Or I assume by building and using a snapshot.  I will give that a shot.  
Thanks for this info and fix - very helpful.
> Do you have any more information on the ECM issue? My problem is that I
> have no access to such an environment anymore. I'd try to setup one if
> it still really matters...
>   
Well I guess it may well matter to some.  In my case, as long as the 
MapBuilders issue above is resolved,  I am pushing ahead with 
ACSYaafiComponentService - it would definitely be a good idea to raise 
the profile of this class, commit it, document it, etc.  I guess we 
could argue that this is the path forward.  OTOH there may be some 
people that want to transition on their own time schedule, so it would 
be nice if the ECM issue could be resolved.

I am thinking that it should be fairly easy to set up a dummy Turbine 
project using its META plugin and then update the Torque dependency to 
3.3.RC2 to hit the problem.

Scott

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: Torque 3.3.RC2 problem with turbine applications

Posted by Thomas Vandahl <tv...@apache.org>.
Scott Eade wrote:
> With torque-3.3.RC2 it starts getting the NPEs immediately from BasePeer
> line 1632:
>    ColumnMap[] columnMaps = dbMap.getTable(table).getColumns();
> 
> Would you have any suggestions as to what my problem might be?

Yes, this made me reopen TORQUE-68. As you know, the Peer classes have
static constructors. If Tomcat unserializes session objects these are
called and try to register their MapBuilder with an (at that point)
uninitialized Torque instance. When initialized with the Avalon
container a new TorqueInstance is created and the MapBuilders need to be
rebuilt so I wrote some code to copy them from one instance to another.

Unfortunately I checked for Torque.isInit() which in that special, above
mentioned case is not true. This is fixed in SVN by now. You can work
around the issue by either switching off the reloading of session data
in Tomcat or by calling <YourDataBaseNameHere>MapInit.init() at some
point before any call to Torque but after initialization.

Do you have any more information on the ECM issue? My problem is that I
have no access to such an environment anymore. I'd try to setup one if
it still really matters...

Bye, Thomas.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: Torque 3.3.RC2 problem with turbine applications

Posted by Scott Eade <se...@backstagetech.com.au>.
Thomas Vandahl wrote:
> Jeffrey D. Brekke wrote:
>> Are you useing YAAFI inside turbine 2.3.2 instead of Avalon?
>
> Yes. I use YAAFI as an Avalon container to be precise. There is a 
> TurbineYaafiComponentService in the contrib-directory of YAAFI which 
> can replace the ECM-based AvalonComponentService of Turbine 2.3.2.
> See https://issues.apache.org/jira/browse/TRB-27 for my patches to 
> make this 1:1 compatible.
Thomas, this is really great.  I have been using it all week in my 
development environment and it seems to have worked fine 
(torque-3.3.RC1/RC2 using the maven-jetty-plugin on Java 1.5).

I have just pushed this over to a staging site that runs tomcat 5.0 on 
Java 1.4.2 - initially it worked with torque-3.3.RC1, but eventually it 
starts getting NPEs, either from BasePeer on line 1670:
    ColumnMap[] columnMaps = dbMap.getTable(table).getColumns();
or from SQLBuilder on line 494:
    ColumnMap column = dbMap.getTable(table).getColumn(columnName);

With torque-3.3.RC2 it starts getting the NPEs immediately from BasePeer 
line 1632:
    ColumnMap[] columnMaps = dbMap.getTable(table).getColumns();

Would you have any suggestions as to what my problem might be?

Thanks,

Scott

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: Torque 3.3.RC2 problem with turbine applications

Posted by Thomas Vandahl <th...@tewisoft.de>.
Jeffrey D. Brekke wrote:
> Are you useing YAAFI inside turbine 2.3.2 instead of Avalon?

Yes. I use YAAFI as an Avalon container to be precise. There is a 
TurbineYaafiComponentService in the contrib-directory of YAAFI which can 
replace the ECM-based AvalonComponentService of Turbine 2.3.2.
See https://issues.apache.org/jira/browse/TRB-27 for my patches to make 
this 1:1 compatible.

Bye, Thomas.


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: Torque 3.3.RC2 problem with turbine applications

Posted by "Jeffrey D. Brekke" <jb...@wi.rr.com>.
Thomas Vandahl wrote:
> Scott Eade wrote:
>> At some stage between 3.3.RC1 and 3.3.RC2 a change to torque was made 
>> that broke things for the TurbineAvalonComponentService.
>>
>> Using turbine (2.3.2) and torque 3.3.RC2, after torque starts up it is 
>> immediately disposed of and hence any queries that are executed are 
>> greeted with a TorqueException that indicates "Torque is not 
>> initialized".
> 
> Ok, this is probably my work. In any case, the log file does not show 
> anything problematic, just the disposing of the component. Could you try 
> to find out why the ECM decides to dispose of the component? I have 
> switched to YAAFI for all my installations...

Are you useing YAAFI inside turbine 2.3.2 instead of Avalon?

-- 
=====================================================================
Jeffrey D. Brekke                                   jbrekke@wi.rr.com
Wisconsin,  USA                                     brekke@apache.org
                                                     ekkerbj@yahoo.com
http://www.bloglines.com/blog/jbrekke               ekkerbj@gmail.com


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: Torque 3.3.RC2 problem with turbine applications

Posted by Thomas Vandahl <th...@tewisoft.de>.
Scott Eade wrote:
> At some stage between 3.3.RC1 and 3.3.RC2 a change to torque was made 
> that broke things for the TurbineAvalonComponentService.
> 
> Using turbine (2.3.2) and torque 3.3.RC2, after torque starts up it is 
> immediately disposed of and hence any queries that are executed are 
> greeted with a TorqueException that indicates "Torque is not initialized".

Ok, this is probably my work. In any case, the log file does not show 
anything problematic, just the disposing of the component. Could you try 
to find out why the ECM decides to dispose of the component? I have 
switched to YAAFI for all my installations...

Bye, Thomas.



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org