You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Robert Hailey <ro...@cmediacorp.com> on 2010/06/18 21:13:49 UTC
T5.1: No service implements the interface "HibernateSessionManager"
I'm running an experiment with classpaths & classloaders.
Although my conventional tapestry setup works well, I'm getting this
exception in my test and would like to understand it's cause.
java.lang.RuntimeException: No service implements the interface
org.apache.tapestry5.hibernate.HibernateSessionManager.
at
org
.apache
.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:560)
at
org
.apache
.tapestry5
.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:44)
at org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl
$1.invoke(MasterObjectProviderImpl.java:56)
at
org
.apache
.tapestry5
.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
... 92 more
From my own experience & reading up on this exception on the lists, I
gather that there is an issue with finding the tapestry-hibernate (or
hibernate) classes at runtime because they have not registered
themselves in the ioc registry. Is this correct?
If so, how does a service technically get into the registry? b/c the
initial startup appears to work (and lists application-specific
services!).
If not, what makes HibernateSessionManager different from tapestry's
built-in services or those of the web-app?
--
Robert Hailey
Re: T5.1: No service implements the interface
"HibernateSessionManager"
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, 18 Jun 2010 17:31:19 -0300, Robert Hailey <ro...@cmediacorp.com>
wrote:
> Is a way for one tapestry module to pragmatically require another (at
> registry-build-time) such as providing a class name/instance?
The @SubModule annotation tells T-IoC to include one or more other modules
in the registry.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5.1: No service implements the interface "HibernateSessionManager"
Posted by Robert Hailey <ro...@cmediacorp.com>.
On Jun 18, 2010, at 3:06 PM, Thiago H. de Paula Figueiredo wrote:
> On Fri, 18 Jun 2010 16:49:46 -0300, Robert Hailey <robert@cmediacorp.com
> > wrote:
>
>> So is it the case that tapestry-hibernate-*.jar presence in the web-
>> app folder is what ultimately prompts it's registration?
>
> Yes. The same happens to any JAR in the classpath, as long as it has
> the correct entries in their manifest files.
>
I see, and once a registry is built it is not possible to add to it.
Is a way for one tapestry module to pragmatically require another (at
registry-build-time) such as providing a class name/instance?
--
Robert Hailey
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5.1: No service implements the interface
"HibernateSessionManager"
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, 18 Jun 2010 16:49:46 -0300, Robert Hailey <ro...@cmediacorp.com>
wrote:
> Really? Surely there is a difference somewhere!
> Here is my (basic) understanding so far:
>
> tapestry-filter:
> creates a ioc-registry
> (it already contains the base-ioc services)
> it adds the tapestry services
> it adds (or knows-the-path-to) the services from "app.services.*"
The above line isn't correct. Tapestry services are defined in
TapestryModule and TapestryInternalModule, Tapestry-IoC modules classes as
any other.
The base IoC services are a module class as any other, except that they
are automatically loaded. No special handling.
> So is it the case that tapestry-hibernate-*.jar presence in the web-app
> folder is what ultimately prompts it's registration?
Yes. The same happens to any JAR in the classpath, as long as it has the
correct entries in their manifest files.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5.1: No service implements the interface "HibernateSessionManager"
Posted by Robert Hailey <ro...@cmediacorp.com>.
I've been reading up a bit on tapestry-ioc...
http://tapestry.apache.org/tapestry5/tapestry-ioc/run.html
On Jun 18, 2010, at 2:29 PM, Thiago H. de Paula Figueiredo wrote:
> On Fri, 18 Jun 2010 16:13:49 -0300, Robert Hailey <robert@cmediacorp.com
> > wrote:
>
>> From my own experience & reading up on this exception on the lists,
>> I gather that there is an issue with finding the tapestry-hibernate
>> (or hibernate) classes at runtime because they have not registered
>> themselves in the ioc registry. Is this correct?
>
> I wouldn't put it that way. I'd say that, for some reason, the
> HibernateSessionManager service wasn't defined.
Sounds right.
>
>> If so, how does a service technically get into the registry? b/c
>> the initial startup appears to work (and lists application-specific
>> services!).
>>
>> If not, what makes HibernateSessionManager different from
>> tapestry's built-in services or those of the web-app?
>
> It comes from a different source (another JAR), nothing beyond that.
Really? Surely there is a difference somewhere!
Here is my (basic) understanding so far:
tapestry-filter:
creates a ioc-registry
(it already contains the base-ioc services)
it adds the tapestry services
it adds (or knows-the-path-to) the services from "app.services.*"
it adds my AppModule ()
I suspect it is a jar-finding issue, quoting from ioc documentation...
> Building the Default Registry
>
> The default registry is available by invoking the static method
> IOCUtilities.buildDefaultRegistry(). This method builds a Registry
> using autoloading logic, where modules to load are identified via a
> JAR Manifest entry.
>
> In addition, the JVM system property tapestry.modules (if specified)
> is a list of additional module classes to load. This is often used
> in development, where tests may be executed against the local
> classes, not JARs, and so there no manifest to read.
>
So is it the case that tapestry-hibernate-*.jar presence in the web-
app folder is what ultimately prompts it's registration?
--
Robert Hailey
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant,
> developer, and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
Re: T5.1: No service implements the interface
"HibernateSessionManager"
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, 18 Jun 2010 16:13:49 -0300, Robert Hailey <ro...@cmediacorp.com>
wrote:
> From my own experience & reading up on this exception on the lists, I
> gather that there is an issue with finding the tapestry-hibernate (or
> hibernate) classes at runtime because they have not registered
> themselves in the ioc registry. Is this correct?
I wouldn't put it that way. I'd say that, for some reason, the
HibernateSessionManager service wasn't defined.
> If so, how does a service technically get into the registry? b/c the
> initial startup appears to work (and lists application-specific
> services!).
>
> If not, what makes HibernateSessionManager different from tapestry's
> built-in services or those of the web-app?
It comes from a different source (another JAR), nothing beyond that.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org