[jboss-user] [JBoss Seam] - Re: Simple application component

quilleashm do-not-reply at jboss.com
Fri Feb 2 03:44:45 EST 2007


Thanks for looking into this.

Adding @Startup makes the initial


  | java.lang.IllegalStateException: SessionFactory not found
  | 

Error stop happening.  Instead I immediatly get the


  | java.lang.ClassCastException: com.azure.spark.web.seam.component.ReferenceSessionFactory
  | 

on the first request of the page.  Should I have the @Startup on a component like this?


Differences between the hibernate 2 examples and mine I can see:

I use hibernate3 rather than hibernate2 (probably doesn't matter)

That components.xml uses a core:hibernate-session-factory which uses a  method for creation whereas mine is just a component.

I have auto-create="true" on the referenceSessionFactory component whereas the h2 example does not.

I don't have auto-create="true" on the managed-hibernate-session, I use create="true" in the @In where it is used.


I have to duck out for a couple of hours now but I'll do some more investigation when I get back.  I'll try moving my configuration closer to the hibernate2 example and see if it starts working when I change something.

Cheers.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009902#4009902

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009902



More information about the jboss-user mailing list