File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes JBoss Seam Failing With Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "JBoss Seam Failing With "Could not instantiate Seam component: entityManagerFactory"" Watch "JBoss Seam Failing With "Could not instantiate Seam component: entityManagerFactory"" New topic
Author

JBoss Seam Failing With "Could not instantiate Seam component: entityManagerFactory"

William Richards
Ranch Hand

Joined: Mar 27, 2009
Posts: 37
I am using

eclipse-jee-ganymede-sr2-win32.zip

jbosstools-all-win32-3.0.2.v200909151014r-h192-ga.zip

jboss-seam-2.1.2

I have created a seam project using postgressql. The project builds as a war but will not deploy on jboss.4.2as.

It fails with

"Could not instantiate Seam component: entityManagerFactory".

Happy Holidays To All Moderators
Happy Holidays To All

Please get back to me if you can. I am hopeful that by compiling a list of all things which will not work that by
process of elimination we ultimately reveal the only thing left which will work.

Will

William Richards
Ranch Hand

Joined: Mar 27, 2009
Posts: 37
Note that with the same tools above, same environment, I can create and run a jsf project.

My database successfully pings.

So it is something about actually running the built seam project.
William Richards
Ranch Hand

Joined: Mar 27, 2009
Posts: 37
I have successfully run the seam numberguess example by starting jboss from the command line and using ant to build the numberguess sample and manually copying the ear over to the deployment directory.

So seam will work with jboss.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

So you are saying that everything works fine if you do things manually, but fail when using Eclipse and JBoss Tools? If that is the case, I will move your port to the IDE forum. Please let me know if my assumption is correct.

Personally, I never rely on Eclipse for such things - I always build by hand (ant or maven from the command line) and deploy by hand (usually via ant). Doing so saves my sanity, and ensures that my build/deployments will work under any circumstances.


JBoss In Action
William Richards
Ranch Hand

Joined: Mar 27, 2009
Posts: 37
I don't mean to be difficult there, Pete. They told me I could do it....and I believed'em...course there is the slight detail that with the ide....I'm not really doing it....they are(n't), lol.

The catch is also that it is different project that works. The seam example works by hand. The ide generated does not work by hand....neverthless I think you have it correct.

Let me know if you decide to move my post to another site, oh, and if you do, please tell me which site and whereabouts on the site of course.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Oh, no problem at all. I just want to make sure your post is in a location where it has the best chance of getting helpful answers. I'll move this to the IE forum. (Actually, your post will be visible both here and in the IDE forum, so your chances of getting a reply are even better.)
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Would you please post the log file?
Does you JBoss AS has PostgreSQL JDBC driver installed?
Also, make sure entity managers names are the same in config files (components.xml, JBoss data source file, persistence.xml)
BTW, I was a huge fan of Seam framework but their weak support forum and the complexity for Seam's config files were a stopper for me.
I don't like component-based frameworks any more (Seam, Wicket), I'm a huge Grails/Django fan now
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

John's post brought up another thought - have you also deployed the *-ds.xml file to the JBoss AS config you are using within Eclipse? (It's hard to access a data source if neither the JDBC JAR file or *-ds.xml file are deployed. )
William Richards
Ranch Hand

Joined: Mar 27, 2009
Posts: 37
Well, I have spent enough time on this issue. I am going to have to stop spending time on it. Thank you all for your attempts. Especially, Peter Johnson, thank you. My sense of humor falls right in step with the proximity and atmosphere of when I joined, about April 1, so I hope noone is offended.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JBoss Seam Failing With "Could not instantiate Seam component: entityManagerFactory"