Showing posts with label seam gen. Show all posts
Showing posts with label seam gen. Show all posts

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

Older Posts Home

Blogger Template by Blogcrowds