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 "Thomas Vandahl (JIRA)" <ji...@apache.org> on 2006/11/26 20:07:21 UTC
[jira] Created: (TORQUE-68) DatabaseMap remains empty if Torque is
stopped and restarted, causes NPEs
DatabaseMap remains empty if Torque is stopped and restarted, causes NPEs
-------------------------------------------------------------------------
Key: TORQUE-68
URL: http://issues.apache.org/jira/browse/TORQUE-68
Project: Torque
Issue Type: Bug
Components: Generator, Runtime
Affects Versions: 3.3
Environment: Avalon, JUnit-Tests
Reporter: Thomas Vandahl
When running tests with the Fulcrum-Testcontainer, the TorqueComponent is instantiated on every lookup (setUp()) and shutdown on every tearDown(). In this scenario the first test succeeds and all others fail because the DatabaseMap contains no tables. This is probably caused by invalid static references to the DatabaseMap of the previous instance. This situation causes NullPointerExceptions in several BasePeer methods(e.g. processTables()).
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] Commented: (TORQUE-68) DatabaseMap remains empty if Torque
is stopped and restarted, causes NPEs
Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/TORQUE-68?page=comments#action_12460652 ]
Thomas Vandahl commented on TORQUE-68:
--------------------------------------
I actually am in favour for 2), but let's talk about this in the 4.0 development. For 3.3, the problem might not be as bad as it sounds. My further investigations show that the problem buried here has been addressed by some measures but is not completely resolved. So what happens is this:
When Torque is shutdown and restarted, a new instance is created. There is some code which tries to deal with unserialized om objects, but in our case, the static constructor of the peer class is not executed. So the Mapbuilder of the class is not registered with Torque and cannot be put into the BasePeer mapBuilders Hashtable. However, the mapBuilders Hashtable inside BasePeer is static itself and contains old and invalid entries from the previous run. It might be sufficient to clear this Hashtable during shutdown(). I'll check that out.
> DatabaseMap remains empty if Torque is stopped and restarted, causes NPEs
> -------------------------------------------------------------------------
>
> Key: TORQUE-68
> URL: http://issues.apache.org/jira/browse/TORQUE-68
> Project: Torque
> Issue Type: Bug
> Components: Runtime, Generator
> Affects Versions: 3.3
> Environment: Avalon, JUnit-Tests
> Reporter: Thomas Vandahl
>
> When running tests with the Fulcrum-Testcontainer, the TorqueComponent is instantiated on every lookup (setUp()) and shutdown on every tearDown(). In this scenario the first test succeeds and all others fail because the DatabaseMap contains no tables. This is probably caused by invalid static references to the DatabaseMap of the previous instance. This situation causes NullPointerExceptions in several BasePeer methods(e.g. processTables()).
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] Commented: (TORQUE-68) DatabaseMap remains empty if Torque
is stopped and restarted, causes NPEs
Posted by "Thomas Fischer (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/TORQUE-68?page=comments#action_12459344 ]
Thomas Fischer commented on TORQUE-68:
--------------------------------------
In principle I agree. But you are opening a big box here. If you remove all static references to runtime-dependent objects, I can see two options:
1) move all static fields to an application-wide context, or
2) do not use any central information any more.
I am not sure if 2) is feasible without rewriting all of Torque. 1) is also difficult because you have to replace the self-registering mechanism of the peer classes when they are loaded (they register themselves in a central database map). But how should the peers register zhen ? The peer classes do not know which is the current context (there may be several of them), and the context does not know which peers are around (because they are classes provided by the user, and the context is compiled without these).
The only sensible way around this is the mechanism which Greg introduced with the DatabaseMap.initialize() method, which uses a generated map of all database peer classes. The main argument against that approach was startup-time (if you have some hundred tables defined, and only need some of them, all the unused peer and map builder classes must be loaded); but maybe this can be improved if all the map builders are generated within one initializing class (or maybe one per database).
But this is nothing which can be addressed in the 3.3 release cycle in my opinion.
> DatabaseMap remains empty if Torque is stopped and restarted, causes NPEs
> -------------------------------------------------------------------------
>
> Key: TORQUE-68
> URL: http://issues.apache.org/jira/browse/TORQUE-68
> Project: Torque
> Issue Type: Bug
> Components: Runtime, Generator
> Affects Versions: 3.3
> Environment: Avalon, JUnit-Tests
> Reporter: Thomas Vandahl
>
> When running tests with the Fulcrum-Testcontainer, the TorqueComponent is instantiated on every lookup (setUp()) and shutdown on every tearDown(). In this scenario the first test succeeds and all others fail because the DatabaseMap contains no tables. This is probably caused by invalid static references to the DatabaseMap of the previous instance. This situation causes NullPointerExceptions in several BasePeer methods(e.g. processTables()).
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] Updated: (TORQUE-68) DatabaseMap remains empty if Torque is
stopped and restarted, causes NPEs
Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TORQUE-68?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Vandahl updated TORQUE-68:
---------------------------------
Component/s: (was: Generator)
Fix Version/s: (was: 3.3-RC2)
3.3
Affects Version/s: (was: 3.3)
3.3-RC2
> DatabaseMap remains empty if Torque is stopped and restarted, causes NPEs
> -------------------------------------------------------------------------
>
> Key: TORQUE-68
> URL: https://issues.apache.org/jira/browse/TORQUE-68
> Project: Torque
> Issue Type: Bug
> Components: Runtime
> Affects Versions: 3.3-RC2
> Environment: Avalon, JUnit-Tests
> Reporter: Thomas Vandahl
> Assigned To: Thomas Vandahl
> Fix For: 3.3
>
>
> When running tests with the Fulcrum-Testcontainer, the TorqueComponent is instantiated on every lookup (setUp()) and shutdown on every tearDown(). In this scenario the first test succeeds and all others fail because the DatabaseMap contains no tables. This is probably caused by invalid static references to the DatabaseMap of the previous instance. This situation causes NullPointerExceptions in several BasePeer methods(e.g. processTables()).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] Assigned: (TORQUE-68) DatabaseMap remains empty if Torque is
stopped and restarted, causes NPEs
Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TORQUE-68?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Vandahl reassigned TORQUE-68:
------------------------------------
Assignee: Thomas Vandahl
> DatabaseMap remains empty if Torque is stopped and restarted, causes NPEs
> -------------------------------------------------------------------------
>
> Key: TORQUE-68
> URL: https://issues.apache.org/jira/browse/TORQUE-68
> Project: Torque
> Issue Type: Bug
> Components: Generator, Runtime
> Affects Versions: 3.3
> Environment: Avalon, JUnit-Tests
> Reporter: Thomas Vandahl
> Assigned To: Thomas Vandahl
>
> When running tests with the Fulcrum-Testcontainer, the TorqueComponent is instantiated on every lookup (setUp()) and shutdown on every tearDown(). In this scenario the first test succeeds and all others fail because the DatabaseMap contains no tables. This is probably caused by invalid static references to the DatabaseMap of the previous instance. This situation causes NullPointerExceptions in several BasePeer methods(e.g. processTables()).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] Commented: (TORQUE-68) DatabaseMap remains empty if Torque
is stopped and restarted, causes NPEs
Posted by "Thomas Fischer (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/TORQUE-68?page=comments#action_12459263 ]
Thomas Fischer commented on TORQUE-68:
--------------------------------------
The title of this issue is misleading. Not the torque shutdown and reinitialisation is the problem, but the reinstantiation of the avalon component.
This said, the problem is probably the constructor in the TorqueComponent clas. It just replaces the TorqueInstance in the torque class with itself, but it should also copy the Database maps (and maybe other stuff ?) to itself before discarding the old instance.
> DatabaseMap remains empty if Torque is stopped and restarted, causes NPEs
> -------------------------------------------------------------------------
>
> Key: TORQUE-68
> URL: http://issues.apache.org/jira/browse/TORQUE-68
> Project: Torque
> Issue Type: Bug
> Components: Runtime, Generator
> Affects Versions: 3.3
> Environment: Avalon, JUnit-Tests
> Reporter: Thomas Vandahl
>
> When running tests with the Fulcrum-Testcontainer, the TorqueComponent is instantiated on every lookup (setUp()) and shutdown on every tearDown(). In this scenario the first test succeeds and all others fail because the DatabaseMap contains no tables. This is probably caused by invalid static references to the DatabaseMap of the previous instance. This situation causes NullPointerExceptions in several BasePeer methods(e.g. processTables()).
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] Resolved: (TORQUE-68) DatabaseMap remains empty if Torque is
stopped and restarted, causes NPEs
Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TORQUE-68?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Vandahl resolved TORQUE-68.
----------------------------------
Resolution: Incomplete
Fix Version/s: 3.3
3.3-RC1
Allow repeated lookups to the Torque Avalon Component. The component now registers the existing MapBuilders with the new instance so that they are re-built during initialization. This is considered a temporary hack until the static constructors of the generated Peer classes go away.
> DatabaseMap remains empty if Torque is stopped and restarted, causes NPEs
> -------------------------------------------------------------------------
>
> Key: TORQUE-68
> URL: https://issues.apache.org/jira/browse/TORQUE-68
> Project: Torque
> Issue Type: Bug
> Components: Generator, Runtime
> Affects Versions: 3.3
> Environment: Avalon, JUnit-Tests
> Reporter: Thomas Vandahl
> Assigned To: Thomas Vandahl
> Fix For: 3.3-RC1, 3.3
>
>
> When running tests with the Fulcrum-Testcontainer, the TorqueComponent is instantiated on every lookup (setUp()) and shutdown on every tearDown(). In this scenario the first test succeeds and all others fail because the DatabaseMap contains no tables. This is probably caused by invalid static references to the DatabaseMap of the previous instance. This situation causes NullPointerExceptions in several BasePeer methods(e.g. processTables()).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
Re: ECM Issue (Was: Re: [jira] Resolved: (TORQUE-68) DatabaseMap
remains empty if Torque is stopped and restarted, causes NPEs)
Posted by Thomas Vandahl <tv...@apache.org>.
Scott Eade wrote:
> Does this change have any other implications?
I don't think so. Actually the whole thing was probably caused by a
brain knot of mine, mixing up single threaded with singleton. In an
Avalon container such as ECM the difference is important because it
defines not only the life cycle of a component but also the life style.
As TorqueInstance is used as a thread safe singleton, TorqueComponent
should work the same way. I'll fix this in SVN.
Thanks for taking the time for digging into this.
Bye, Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
Re: ECM Issue (Was: Re: [jira] Resolved: (TORQUE-68) DatabaseMap
remains empty if Torque is stopped and restarted, causes NPEs)
Posted by Scott Eade <se...@backstagetech.com.au>.
Thomas Vandahl wrote:
> Hi Scott,
>
> Thomas Vandahl wrote:
>
>> Scott, would you please check the following for me: Remove the
>> SingleThreaded entry from the implements line of TorqueComponent and
>> if that doesn't help, replace it with ThreadSafe. Then check again.
>
> After looking at the decommission() method in
>
> http://svn.apache.org/viewvc/excalibur/tags/excalibur-component-2.1-Release/deprecated/component/src/java/org/apache/avalon/excalibur/component/DefaultComponentFactory.java?revision=264009&view=markup
>
> I'm pretty sure that marking TorqueComponent as ThreadSafe again would
> cure the problem. In the method code attached you can see the log
> message you observed and a call to
>
> ContainerUtil.dispose( decommissionComponent );
>
> which is exactly what happens.
>
> Please check the change nevertheless, to be sure.
Yes you are right - switching from implementing SingleThreaded to
ThreadSafe results in the component no longer being decommissioned and
subsequent queries execute correctly. Well spotted!
Does this change have any other implications?
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
Re: ECM Issue (Was: Re: [jira] Resolved: (TORQUE-68) DatabaseMap
remains empty if Torque is stopped and restarted, causes NPEs)
Posted by Thomas Vandahl <th...@tewisoft.de>.
Hi Scott,
Thomas Vandahl wrote:
> Scott, would you please check the following for me: Remove the
> SingleThreaded entry from the implements line of TorqueComponent and if
> that doesn't help, replace it with ThreadSafe. Then check again.
After looking at the decommission() method in
http://svn.apache.org/viewvc/excalibur/tags/excalibur-component-2.1-Release/deprecated/component/src/java/org/apache/avalon/excalibur/component/DefaultComponentFactory.java?revision=264009&view=markup
I'm pretty sure that marking TorqueComponent as ThreadSafe again would
cure the problem. In the method code attached you can see the log
message you observed and a call to
ContainerUtil.dispose( decommissionComponent );
which is exactly what happens.
Please check the change nevertheless, to be sure.
Bye, Thomas.
for reference:
---8<---
public void decommission( final Object component )
throws Exception
{
if( getLogger().isDebugEnabled() )
{
getLogger().debug( "ComponentFactory decommissioning
instance of " +
m_componentClass.getName() + "." );
}
// See if we need to unwrap this component. It may have been
wrapped in a proxy
// by the ProxyGenerator.
Object decommissionComponent = m_componentProxies.remove(
component );
if ( null == decommissionComponent )
{
// It was not wrapped.
decommissionComponent = component;
}
ContainerUtil.stop( decommissionComponent );
ContainerUtil.dispose( decommissionComponent );
/*if ( decommissionComponent instanceof Composable )
{
// A proxy will have been created. Ensure that components
created by it
// are also released.
((ComponentManagerProxy)m_composableProxies.remove(
decommissionComponent )).
releaseAll();
}
if ( decommissionComponent instanceof Serviceable )
{
// A proxy will have been created. Ensure that components
created by it
// are also released.
((ServiceManagerProxy)m_serviceableProxies.remove(
decommissionComponent )).
releaseAll();
}*/
}
---8<---
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
Re: ECM Issue (Was: Re: [jira] Resolved: (TORQUE-68) DatabaseMap
remains empty if Torque is stopped and restarted, causes NPEs)
Posted by Thomas Vandahl <th...@tewisoft.de>.
Scott Eade wrote:
> I have confirmed that the problem is still present when using runtime
> trunk.
I still cannot reproduce this in my environment. But by looking at your
log output again I got an idea. Because there is absolutely no error
visible, this may well be "working as designed", based on the Avalon
lifecycle contract. What the TurbineAvalonComponentService does is
looking up the component and releasing it right away (to force
initialization). Because the TorqueComponent is marked as SingleThreaded
this may cause the observed behavior. Now, because Torque is used over
its static accessor and not over the ususal lookup/release operations,
this may leave an uninitialized instance. Just a wild guess, but at
least one handle to pull on.
Scott, would you please check the following for me: Remove the
SingleThreaded entry from the implements line of TorqueComponent and if
that doesn't help, replace it with ThreadSafe. Then check again.
Thanks in advance,
Thomas.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
Re: ECM Issue (Was: Re: [jira] Resolved: (TORQUE-68) DatabaseMap
remains empty if Torque is stopped and restarted, causes NPEs)
Posted by Scott Eade <se...@backstagetech.com.au>.
Scott Eade wrote:
> I'll cut myself a snapshot of the runtime trunk and try again
> and then have a crack at isolating it with my own hellowworld.
I have confirmed that the problem is still present when using runtime trunk.
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
Re: ECM Issue (Was: Re: [jira] Resolved: (TORQUE-68) DatabaseMap
remains empty if Torque is stopped and restarted, causes NPEs)
Posted by Thomas Vandahl <th...@tewisoft.de>.
Scott Eade wrote:
> FYI: The issue partially described here turned out to be totally
> unrelated to Turbine and Yaafi - I have now switched back to
> ACSYaafiComponentService and it is working like a charm.
>
> As I have mentioned previously, it would be good to increase the
> visibility of this class.
I'd suggest to integrate it into the 2.3 branch. After all it was made
for that purpose. It would give users the additional advantage to choose
from two different containers for their applications.
Bye, Thomas.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
Re: ECM Issue (Was: Re: [jira] Resolved: (TORQUE-68) DatabaseMap
remains empty if Torque is stopped and restarted, causes NPEs)
Posted by Scott Eade <se...@backstagetech.com.au>.
Scott Eade wrote:
> Unfortunately I have also run into problems with the work around which
> was using your ACSYaafiComponentService class and Yaafi. This one is
> even more enigmatic than the ECM issue - I cannot even say that it
> relates to the mentioned configuration, all I know is that when I
> deployed to production the system would after some time become
> unresponsive (no problems are apparent in my development and staging
> environments and the problem is certainly not load related). I have
> nothing whatsoever to go on - very frustrating. Anyway, this is a
> totally different issue.
FYI: The issue partially described here turned out to be totally
unrelated to Turbine and Yaafi - I have now switched back to
ACSYaafiComponentService and it is working like a charm.
As I have mentioned previously, it would be good to increase the
visibility of this class.
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
ECM Issue (Was: Re: [jira] Resolved: (TORQUE-68) DatabaseMap remains
empty if Torque is stopped and restarted, causes NPEs)
Posted by Scott Eade <se...@backstagetech.com.au>.
Thomas Vandahl wrote:
> Thomas Fischer wrote:
>
>> Sorry for not knowing what I'm talking about, but does this also fix the
>> Turbine problem ?
>>
>
> No it doesn't. I tried to set up the original environment to reproduce
> the failure but everything works for me. Scott promised to provide me
> with more information from his setup RSN. However I don't think the two
> problems are directly related.
>
I have reconstructed my environment today and with 3.3.RC2 it is
certainly still running into the problem whereby TorqueComponent is
decommissioned by avalon immediately following initialization thus:
2007-04-17 15:09:06,796 INFO [main ] services.BaseServiceBroker -
Start Initializing service (early): AvalonComponentService
2007-04-17 15:09:06,828 DEBUG [main ]
avaloncomponent.TurbineAvalonComponentService - Config File:
S:\eclipse-workspace\cmes-dev\src\main\webapp\WEB-INF\conf\componentConfiguration.xml
2007-04-17 15:09:06,828 DEBUG [main ]
avaloncomponent.TurbineAvalonComponentService - Role File:
S:\eclipse-workspace\cmes-dev\src\main\webapp\WEB-INF\conf\roleConfiguration.xml
2007-04-17 15:09:06,890 DEBUG [main ] avalon - added Role
org.apache.torque.avalon.Torque with shorthand torque for
org.apache.torque.avalon.TorqueComponent
2007-04-17 15:09:06,921 DEBUG [main ]
avaloncomponent.TurbineAvalonComponentService - Application Root is
S:\eclipse-workspace\cmes-dev\src\main\webapp
2007-04-17 15:09:06,921 DEBUG [main ] avalon - looking up shorthand
torque, returning org.apache.torque.avalon.Torque
2007-04-17 15:09:06,921 DEBUG [main ] avalon - Adding component
(org.apache.torque.avalon.Torque = org.apache.torque.avalon.TorqueComponent)
2007-04-17 15:09:06,937 DEBUG [main ] avalon - Attempting to get
Handler for role [org.apache.torque.avalon.Torque]
2007-04-17 15:09:06,953 DEBUG [main ] avalon - Handler type =
org.apache.avalon.excalibur.component.DefaultComponentHandler
2007-04-17 15:09:07,000 DEBUG [main ] avalon - ComponentHandler
initialized for: org.apache.torque.avalon.TorqueComponent
2007-04-17 15:09:07,015 DEBUG [main ] avalon - ComponentFactory
creating new instance of org.apache.torque.avalon.TorqueComponent.
2007-04-17 15:09:07,015 DEBUG [main ] avalon - no logger attribute
available, using standard logger
2007-04-17 15:09:07,015 DEBUG [main ] avalon -
configure(torque::<no
value>:@file:/S:/eclipse-workspace/cmes-dev/src/main/webapp/WEB-INF/conf/componentConfiguration.xml:9:10)
2007-04-17 15:09:07,015 DEBUG [main ] avalon - Config File is
S:\eclipse-workspace\cmes-dev\src\main\webapp\WEB-INF/conf/Torque.properties
2007-04-17 15:09:07,015 DEBUG [main ] avalon - initialize()
2007-04-17 15:09:07,015 DEBUG [main ] torque.TorqueInstance -ad52
2007-04-17 15:09:07,015 DEBUG [main ] torque.TorqueInstance -
init(org.apache.commons.configur
init(S:\eclipse-workspace\cmes-dev\src\main\webapp\WEB-INF/conf/Torque.properties)
2007-04-17 15:09:07,015 DEBUG [main ] torque.TorqueInstance -
Config Object is
org.apache.commons.configuration.PropertiesConfiguration@1c8ation.PropertiesConfiguration@1c8ad52)
2007-04-17 15:09:07,015 DEBUG [main ] torque.TorqueInstance -
setConfiguration(org.apache.commons.configuration.PropertiesConfiguration@1c8ad52)
2007-04-17 15:09:07,015 DEBUG [main ] torque.TorqueInstance -
initialize()
2007-04-17 15:09:07,031 DEBUG [main ] torque.TorqueInstance -
setConfiguration(org.apache.commons.configuration.SubsetConfiguration@128453c)
2007-04-17 15:09:07,031 DEBUG [main ] torque.TorqueInstance -
initAdapters(org.apache.commons.configuration.SubsetConfiguration@128453c)
2007-04-17 15:09:07,078 DEBUG [main ] torque.TorqueInstance -
Adding postgresql -> ppdb as Adapter
2007-04-17 15:09:07,093 DEBUG [main ] torque.TorqueInstance -
initDataSourceFactories(org.apache.commons.configuration.SubsetConfiguration@128453c)
2007-04-17 15:09:07,093 DEBUG [main ] torque.TorqueInstance -
handle: ppdb DataSourceFactory:
org.apache.torque.dsfactory.SharedPoolDataSourceFactory
2007-04-17 15:09:07,109 DEBUG [main ] torque.TorqueInstance -
getConfiguration() =
org.apache.commons.configuration.SubsetConfiguration@128453c
2007-04-17 15:09:07,109 DEBUG [main ]
dsfactory.AbstractDataSourceFactory - Starting initCPDS
2007-04-17 15:09:07,125 DEBUG [main ] torque.TorqueInstance -
getConfiguration() =
org.apache.commons.configuration.SubsetConfiguration@128453c
2007-04-17 15:09:07,125 DEBUG [main ]
dsfactory.AbstractDataSourceFactory -
applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@904f75,
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@5098f9)
2007-04-17 15:09:07,125 DEBUG [main ]
dsfactory.AbstractDataSourceFactory -
applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@b1bed2,
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@5098f9)
2007-04-17 15:09:07,250 DEBUG [main ]
dsfactory.AbstractDataSourceFactory -
setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@5098f9,
driver, org.postgresql.Driver)
2007-04-17 15:09:07,250 DEBUG [main ]
dsfactory.AbstractDataSourceFactory -
setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@5098f9,
url, jdbc:postgresql://127.0.0.1:5432/cmesdev)
2007-04-17 15:09:07,250 DEBUG [main ]
dsfactory.AbstractDataSourceFactory -
setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@5098f9,
user, torque)
2007-04-17 15:09:07,250 DEBUG [main ]
dsfactory.AbstractDataSourceFactory -
setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@5098f9,
password, (value not logged))
2007-04-17 15:09:07,250 DEBUG [main ]
dsfactory.SharedPoolDataSourceFactory - Starting initJdbc2Pool
2007-04-17 15:09:07,265 DEBUG [main ] torque.TorqueInstance -
getConfiguration() =
org.apache.commons.configuration.SubsetConfiguration@128453c
2007-04-17 15:09:07,265 DEBUG [main ]
dsfactory.AbstractDataSourceFactory -
applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@cf17c3,
org.apache.commons.dbcp.datasources.SharedPoolDataSource@2130c2)
2007-04-17 15:09:07,265 DEBUG [main ]
dsfactory.AbstractDataSourceFactory -
applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@c9f93f,
org.apache.commons.dbcp.datasources.SharedPoolDataSource@2130c2)
2007-04-17 15:09:07,281 DEBUG [main ]
dsfactory.AbstractDataSourceFactory -
setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@2130c2,
maxActive, 10)
2007-04-17 15:09:07,281 DEBUG [main ]
dsfactory.AbstractDataSourceFactory -
setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@2130c2,
testOnBorrow, true)
2007-04-17 15:09:07,281 DEBUG [main ]
dsfactory.AbstractDataSourceFactory -
setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@2130c2,
validationQuery, SELECT 1)
2007-04-17 15:09:07,281 DEBUG [main ] torque.TorqueInstance -
Adding the DatasourceFactory from database ppdb onto database default
2007-04-17 15:09:07,281 INFO [main ]
avaloncomponent.TurbineAvalonComponentService - Lookup for Component
org.apache.torque.avalon.Torque successful
2007-04-17 15:09:07,281 DEBUG [main ] avalon - ComponentFactory
decommissioning instance of org.apache.torque.avalon.TorqueComponent.
2007-04-17 15:09:07,281 DEBUG [main ] avalon - dispose()
2007-04-17 15:09:07,281 INFO [main ] services.BaseServiceBroker -
Finish Initializing service (early): AvalonComponentService
Relevant configuration (tell me if you need anything more):
---- pom.xml ----
<dependency>
<groupId>org.apache.db.torque</groupId>
<artifactId>runtime</artifactId>
<version>3.3-RC2</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
---- TurbineResources.properties ----
services.AvalonComponentService.classname=org.apache.turbine.services.avaloncomponent.TurbineAvalonComponentService
services.AvalonComponentService.componentConfiguration =
WEB-INF/conf/componentConfiguration.xml
services.AvalonComponentService.componentRoles =
WEB-INF/conf/roleConfiguration.xml
services.AvalonComponentService.lookup = org.apache.torque.avalon.Torque
---- componentConfiguration.xml ----
<componentConfig>
<torque>
<configfile>WEB-INF/conf/Torque.properties</configfile>
</torque>
</componentConfig>
---- roleConfiguration.xml ----
<role-list>
<role name="org.apache.torque.avalon.Torque"
shorthand="torque"
default-class="org.apache.torque.avalon.TorqueComponent"/>
</role-list>
---- Torque.properties ----
torque.earlyInit = true
torque.database.default = ppdb
torque.database.ppdb.adapter = postgresql
torque.dsfactory.ppdb.factory =
org.apache.torque.dsfactory.SharedPoolDataSourceFactory
torque.dsfactory.ppdb.pool.maxActive = 10
torque.dsfactory.ppdb.pool.testOnBorrow = true
torque.dsfactory.ppdb.pool.validationQuery = SELECT 1
torque.dsfactory.ppdb.connection.driver = org.postgresql.Driver
torque.dsfactory.ppdb.connection.url =
jdbc:postgresql://127.0.0.1:5432/cmesdev
torque.dsfactory.ppdb.connection.user = torque
torque.dsfactory.ppdb.connection.password = ********
torque.manager.useCache = true
So because Torque is shutting down immediately after initialization, any
attempt to retrieve data results in an exception that is ultimately
caused by:
org.apache.torque.TorqueException: Torque is not initialized
Unfortunately I have also run into problems with the work around which
was using your ACSYaafiComponentService class and Yaafi. This one is
even more enigmatic than the ECM issue - I cannot even say that it
relates to the mentioned configuration, all I know is that when I
deployed to production the system would after some time become
unresponsive (no problems are apparent in my development and staging
environments and the problem is certainly not load related). I have
nothing whatsoever to go on - very frustrating. Anyway, this is a
totally different issue.
Let me know if the above enables you to reproduce the problem I am
hitting. I'll cut myself a snapshot of the runtime trunk and try again
and then have a crack at isolating it with my own hellowworld.
Thanks for the help and patience,
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
Re: [jira] Resolved: (TORQUE-68) DatabaseMap remains empty if Torque
is stopped and restarted, causes NPEs
Posted by Thomas Vandahl <tv...@apache.org>.
Thomas Fischer wrote:
> Sorry for not knowing what I'm talking about, but does this also fix the
> Turbine problem ?
No it doesn't. I tried to set up the original environment to reproduce
the failure but everything works for me. Scott promised to provide me
with more information from his setup RSN. However I don't think the two
problems are directly related.
Bye, Thomas.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
Re: [jira] Resolved: (TORQUE-68) DatabaseMap remains empty if Torque
is stopped and restarted, causes NPEs
Posted by Thomas Fischer <tf...@apache.org>.
Sorry for not knowing what I'm talking about, but does this also fix the
Turbine problem ?
Thomas
On Sat, 14 Apr 2007, Thomas Vandahl (JIRA) wrote:
>
> [ https://issues.apache.org/jira/browse/TORQUE-68?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Thomas Vandahl resolved TORQUE-68.
> ----------------------------------
>
> Resolution: Fixed
> Fix Version/s: (was: 3.3)
> 3.3-RC3
>
> Hopefully last attempt to fix this. A test case has been created which fails before and passes after the fix. What more can you ask... :-)
>
>> DatabaseMap remains empty if Torque is stopped and restarted, causes NPEs
>> -------------------------------------------------------------------------
>>
>> Key: TORQUE-68
>> URL: https://issues.apache.org/jira/browse/TORQUE-68
>> Project: Torque
>> Issue Type: Bug
>> Components: Runtime
>> Affects Versions: 3.3-RC2
>> Environment: Avalon, JUnit-Tests
>> Reporter: Thomas Vandahl
>> Assigned To: Thomas Vandahl
>> Fix For: 3.3-RC3
>>
>>
>> When running tests with the Fulcrum-Testcontainer, the TorqueComponent is instantiated on every lookup (setUp()) and shutdown on every tearDown(). In this scenario the first test succeeds and all others fail because the DatabaseMap contains no tables. This is probably caused by invalid static references to the DatabaseMap of the previous instance. This situation causes NullPointerExceptions in several BasePeer methods(e.g. processTables()).
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-dev-help@db.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] Resolved: (TORQUE-68) DatabaseMap remains empty if Torque is
stopped and restarted, causes NPEs
Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TORQUE-68?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Vandahl resolved TORQUE-68.
----------------------------------
Resolution: Fixed
Fix Version/s: (was: 3.3)
3.3-RC3
Hopefully last attempt to fix this. A test case has been created which fails before and passes after the fix. What more can you ask... :-)
> DatabaseMap remains empty if Torque is stopped and restarted, causes NPEs
> -------------------------------------------------------------------------
>
> Key: TORQUE-68
> URL: https://issues.apache.org/jira/browse/TORQUE-68
> Project: Torque
> Issue Type: Bug
> Components: Runtime
> Affects Versions: 3.3-RC2
> Environment: Avalon, JUnit-Tests
> Reporter: Thomas Vandahl
> Assigned To: Thomas Vandahl
> Fix For: 3.3-RC3
>
>
> When running tests with the Fulcrum-Testcontainer, the TorqueComponent is instantiated on every lookup (setUp()) and shutdown on every tearDown(). In this scenario the first test succeeds and all others fail because the DatabaseMap contains no tables. This is probably caused by invalid static references to the DatabaseMap of the previous instance. This situation causes NullPointerExceptions in several BasePeer methods(e.g. processTables()).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] Updated: (TORQUE-68) DatabaseMap remains empty if Torque is
stopped and restarted, causes NPEs
Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TORQUE-68?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Vandahl updated TORQUE-68:
---------------------------------
Fix Version/s: (was: 3.3)
(was: 3.3-RC1)
3.3-RC2
Problem still not fixed.
> DatabaseMap remains empty if Torque is stopped and restarted, causes NPEs
> -------------------------------------------------------------------------
>
> Key: TORQUE-68
> URL: https://issues.apache.org/jira/browse/TORQUE-68
> Project: Torque
> Issue Type: Bug
> Components: Runtime
> Affects Versions: 3.3-RC2
> Environment: Avalon, JUnit-Tests
> Reporter: Thomas Vandahl
> Assigned To: Thomas Vandahl
> Fix For: 3.3
>
>
> When running tests with the Fulcrum-Testcontainer, the TorqueComponent is instantiated on every lookup (setUp()) and shutdown on every tearDown(). In this scenario the first test succeeds and all others fail because the DatabaseMap contains no tables. This is probably caused by invalid static references to the DatabaseMap of the previous instance. This situation causes NullPointerExceptions in several BasePeer methods(e.g. processTables()).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] Reopened: (TORQUE-68) DatabaseMap remains empty if Torque is
stopped and restarted, causes NPEs
Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TORQUE-68?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Vandahl reopened TORQUE-68:
----------------------------------
The solution to this issue broke the handling of de-serialized objects for example in the Tomcat environment. Must copy the registered MapBuilders unconditionally. Need a testcase for this urgently.
> DatabaseMap remains empty if Torque is stopped and restarted, causes NPEs
> -------------------------------------------------------------------------
>
> Key: TORQUE-68
> URL: https://issues.apache.org/jira/browse/TORQUE-68
> Project: Torque
> Issue Type: Bug
> Components: Generator, Runtime
> Affects Versions: 3.3
> Environment: Avalon, JUnit-Tests
> Reporter: Thomas Vandahl
> Assigned To: Thomas Vandahl
> Fix For: 3.3-RC1, 3.3
>
>
> When running tests with the Fulcrum-Testcontainer, the TorqueComponent is instantiated on every lookup (setUp()) and shutdown on every tearDown(). In this scenario the first test succeeds and all others fail because the DatabaseMap contains no tables. This is probably caused by invalid static references to the DatabaseMap of the previous instance. This situation causes NullPointerExceptions in several BasePeer methods(e.g. processTables()).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] Commented: (TORQUE-68) DatabaseMap remains empty if Torque
is stopped and restarted, causes NPEs
Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/TORQUE-68?page=comments#action_12459268 ]
Thomas Vandahl commented on TORQUE-68:
--------------------------------------
I strongly believe that the reinstantiation of the component should work without any copying. If I start a new instance of Torque, no matter if in Avalon mode or not, I would expect everything to be as clean as if I started the first instance. This, in turn, means that we need to remove all static references in static classes to runtime-dependent objects.
> DatabaseMap remains empty if Torque is stopped and restarted, causes NPEs
> -------------------------------------------------------------------------
>
> Key: TORQUE-68
> URL: http://issues.apache.org/jira/browse/TORQUE-68
> Project: Torque
> Issue Type: Bug
> Components: Runtime, Generator
> Affects Versions: 3.3
> Environment: Avalon, JUnit-Tests
> Reporter: Thomas Vandahl
>
> When running tests with the Fulcrum-Testcontainer, the TorqueComponent is instantiated on every lookup (setUp()) and shutdown on every tearDown(). In this scenario the first test succeeds and all others fail because the DatabaseMap contains no tables. This is probably caused by invalid static references to the DatabaseMap of the previous instance. This situation causes NullPointerExceptions in several BasePeer methods(e.g. processTables()).
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org