You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ralph Goers <Ra...@dslextreme.com> on 2005/10/12 20:05:44 UTC
Portal won't start in trunk
I'm getting an error saying that the ojb ConnectionFactoryImpl is not
initialized. Is there some configuration missing?
Ralph
Re: Portal won't start in trunk
Posted by Ralph Goers <Ra...@dslextreme.com>.
Carsten Ziegeler wrote:
>Ralph Goers schrieb:
>
>
>>I'm getting an error saying that the ojb ConnectionFactoryImpl is not
>>initialized. Is there some configuration missing?
>>
>>
>>
>This is because of the lazy initialising. Actually I don't know whats
>wrong. Either the hsqldb is not started properly or OJB is not setup
>correctly. I didn't succeed in finding the problem!
>
>As a workaround you can turn off lazy loading using the property:
>-Dorg.apache.cocoon.core.LazyMode=false
>
>Carsten
>
>
>
Thanks. That sucks but it works.
Ralph
Re: Portal won't start in trunk
Posted by Carsten Ziegeler <cz...@apache.org>.
Ralph Goers schrieb:
> I'm getting an error saying that the ojb ConnectionFactoryImpl is not
> initialized. Is there some configuration missing?
>
This is because of the lazy initialising. Actually I don't know whats
wrong. Either the hsqldb is not started properly or OJB is not setup
correctly. I didn't succeed in finding the problem!
As a workaround you can turn off lazy loading using the property:
-Dorg.apache.cocoon.core.LazyMode=false
Carsten
--
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/
Re: Portal won't start in trunk
Posted by Carsten Ziegeler <cz...@apache.org>.
Sylvain Wallez wrote:
>
> Fixed. The problem was caused by the GroupBasedProfileManager which was
> not preloaded and thus wasn't listening for events. This led the portal
> temporary attribute (don't know what that is) named
> "org.apache.cocoon.portal.profile.impl.AbstractProfileManager/User" not
> being initialized, thus the NPE.
>
> The lazy loading brings some interesting performance improvements by
> avoiding not only the initialization of components, but also even the
> loading of classes. Problem is that it requires configuration writers to
> know what components have to be loaded at startup time.
>
> So maybe we should be a bit less lazy, and load the classes to check for
> a lifecycle interface (Startable?) to avoid having to specify
> preload="true" in the configuration. I'll check this and see the speed
> difference.
>
+1
Carsten
--
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/
Re: Portal won't start in trunk
Posted by Sylvain Wallez <sy...@apache.org>.
Carsten Ziegeler wrote:
>But unfortunately the portal is still not working; it seems to me that
>lazy loading really has some problems. The first time I invoke the
>portal I get an obscure NPE, if I reload the page everything works
>perfectly. So it seems that something is not initialized properly. If
>only I would knew what :(
>
>
Fixed. The problem was caused by the GroupBasedProfileManager which was
not preloaded and thus wasn't listening for events. This led the portal
temporary attribute (don't know what that is) named
"org.apache.cocoon.portal.profile.impl.AbstractProfileManager/User" not
being initialized, thus the NPE.
The lazy loading brings some interesting performance improvements by
avoiding not only the initialization of components, but also even the
loading of classes. Problem is that it requires configuration writers to
know what components have to be loaded at startup time.
So maybe we should be a bit less lazy, and load the classes to check for
a lifecycle interface (Startable?) to avoid having to specify
preload="true" in the configuration. I'll check this and see the speed
difference.
Sylvain
--
Sylvain Wallez Anyware Technologies
http://people.apache.org/~sylvain http://www.anyware-tech.com
Apache Software Foundation Member Research & Technology Director
Re: Portal won't start in trunk
Posted by Carsten Ziegeler <cz...@apache.org>.
Vadim Gritsenko wrote:
>
> Ah, preload="true"! Yes, please mark both:
>
> org.apache.cocoon.ojb.components.LoggerImpl
> org.apache.cocoon.ojb.components.ConnectionFactoryImpl
>
> These two initialize Cocoon+OJB integration.
>
Yepp, thanks that did the trick with OJB.
But unfortunately the portal is still not working; it seems to me that
lazy loading really has some problems. The first time I invoke the
portal I get an obscure NPE, if I reload the page everything works
perfectly. So it seems that something is not initialized properly. If
only I would knew what :(
Carsten
--
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/
Re: Portal won't start in trunk
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Carsten Ziegeler wrote:
> Vadim Gritsenko wrote:
>
>>Should ConnectionFactoryImpl get
>>marked as Runnable in order for it to still work in lazy mode?
>
> Either we have to mark the configuration with the attribute
> preload="true" or we have to look up the connection factory before we
> use OJB.
Ah, preload="true"! Yes, please mark both:
org.apache.cocoon.ojb.components.LoggerImpl
org.apache.cocoon.ojb.components.ConnectionFactoryImpl
These two initialize Cocoon+OJB integration.
Vadim
Re: Portal won't start in trunk
Posted by Carsten Ziegeler <cz...@apache.org>.
Vadim Gritsenko wrote:
> Ralph Goers wrote:
>
>>I'm getting an error saying that the ojb ConnectionFactoryImpl is not
>>initialized. Is there some configuration missing?
>
>
> To use OJB it has to be initialized first - for example by looking up
> ...ConnectionFactory role. If you use OJB directly before this component is
> initialized, you get exception.
>
> Is it consequence of (non-working?) lazy mode?
Yepp.
> Should ConnectionFactoryImpl get
> marked as Runnable in order for it to still work in lazy mode?
Either we have to mark the configuration with the attribute
preload="true" or we have to look up the connection factory before we
use OJB. DOn't know what'S the better approach?
Carsten
--
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/
Re: Portal won't start in trunk
Posted by Sylvain Wallez <sy...@apache.org>.
Vadim Gritsenko wrote:
> Ralph Goers wrote:
>
>> I'm getting an error saying that the ojb ConnectionFactoryImpl is not
>> initialized. Is there some configuration missing?
>
>
> To use OJB it has to be initialized first - for example by looking up
> ...ConnectionFactory role. If you use OJB directly before this
> component is initialized, you get exception.
>
> Is it consequence of (non-working?) lazy mode? Should
> ConnectionFactoryImpl get marked as Runnable in order for it to still
> work in lazy mode?
In lazy mode, components that should be loaded at startup should have
the preload="true" attribute. Currently these are the Quartz scheduler
and the hsqldb server.
Sylvain
--
Sylvain Wallez Anyware Technologies
http://people.apache.org/~sylvain http://www.anyware-tech.com
Apache Software Foundation Member Research & Technology Director
Re: Portal won't start in trunk
Posted by Ralph Goers <Ra...@dslextreme.com>.
Vadim Gritsenko wrote:
> Ralph Goers wrote:
>
>> I'm getting an error saying that the ojb ConnectionFactoryImpl is not
>> initialized. Is there some configuration missing?
>
>
> To use OJB it has to be initialized first - for example by looking up
> ...ConnectionFactory role. If you use OJB directly before this
> component is initialized, you get exception.
>
> Is it consequence of (non-working?) lazy mode? Should
> ConnectionFactoryImpl get marked as Runnable in order for it to still
> work in lazy mode?
>
> Vadim
I'm not using OJB - the portal samples are. I'm trying to debug
something else in the portal. This was working last week.
Does the portal sample site work for you?
Ralph
Re: Portal won't start in trunk
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Ralph Goers wrote:
> I'm getting an error saying that the ojb ConnectionFactoryImpl is not
> initialized. Is there some configuration missing?
To use OJB it has to be initialized first - for example by looking up
...ConnectionFactory role. If you use OJB directly before this component is
initialized, you get exception.
Is it consequence of (non-working?) lazy mode? Should ConnectionFactoryImpl get
marked as Runnable in order for it to still work in lazy mode?
Vadim