After creating a new project using JBoss Tools 2.0.0 GA, Seam 2.0.0 GA and tried deploying the application, I encountered this problem:

java.lang.RuntimeException: error while reading /WEB-INF/components.xml
at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:136)
at org.jboss.seam.init.Initialization.create(Initialization.java:86)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)

and somewhere below the stack trace...


Caused by: java.lang.IllegalArgumentException: Exception setting property org.jboss.seam.core.init.jndiPattern on component org.jboss.seam.core.init. Expression @jndiPattern@ evaluated to null.
at org.jboss.seam.init.Initialization.installComponentFromXmlElement(Initialization.java:407)
at org.jboss.seam.init.Initialization.installComponentsFromXmlElements(Initialization.java:257)
at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:132)
... 138 more


i think the problem here was when building the application. the value of @jndiPattern@ in components.properties should replace the same constant name defined in components.xml but for some reason, it did not.

my simple solution (although not very elegant) is to hardcode the value in components.xml. so instead of using @jndiPattern@ i copied its value from components.properties

4 comments:

Hi there, I had exactly the same problem. Then I realised I had temporarily switched off Project > Build Automatically. Stop the server, switch build automatically back on, do a Project > Clean > All, start the server. Everything is working now!

PS. I previously had to do a Window > Software Updates > Find and Install; and update all Eclipse components to work around a previous bug with seam-gen and JBoss Tools.

June 17, 2008 at 3:05 AM  

Thx a lot for your comment. I hat the same exception too. I did what u say and it work, its unbelievably.

September 17, 2008 at 3:52 AM  

thanx for your comment. also usefull for me :)

June 13, 2009 at 11:36 AM  

Thanks!!!

January 18, 2011 at 4:31 AM  

Newer Post Older Post Home

Blogger Template by Blogcrowds