Bug 831593 - JBDS Imported project doesn't replace @jndiPattern@
JBDS Imported project doesn't replace @jndiPattern@
Status: CLOSED DEFERRED
Product: JBoss Enterprise WFK Platform 2
Classification: JBoss
Component: Examples, Seam (Show other bugs)
2.0.0.ER8
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Marek Novotny
Marek Schmidt
Seam2.3
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-13 07:45 EDT by Marek Schmidt
Modified: 2012-06-19 04:18 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-19 04:18:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marek Schmidt 2012-06-13 07:45:24 EDT
Description of problem:



Version-Release number of selected component (if applicable):

jboss-wfk-2.0.0.ER8/demo/jboss-seam-2.3.0.Beta2-redhat-1

How reproducible:


Steps to Reproduce:
1. in JBDS import booking seam demo
2. On the booking-ear project do Run as -> run on server (and configure to run on an EAP6 instance)
3. Notice the deployment error
  
Actual results:
Example fails to deploy with

13:42:59,236 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/booking-web]] (MSC service thread 1-1) Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener: java.lang.RuntimeException: error while reading /WEB-INF/components.xml
	at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:230) [jboss-seam.jar:2.3.0.Beta2-redhat-1]
	at org.jboss.seam.init.Initialization.create(Initialization.java:132) [jboss-seam.jar:2.3.0.Beta2-redhat-1]
	at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36) [jboss-seam.jar:2.3.0.Beta2-redhat-1]
	at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.16.Final-redhat-1.jar:]
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.16.Final-redhat-1.jar:]
	at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_24]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_24]
	at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]
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:531) [jboss-seam.jar:2.3.0.Beta2-redhat-1]
	at org.jboss.seam.init.Initialization.installComponentsFromXmlElements(Initialization.java:367) [jboss-seam.jar:2.3.0.Beta2-redhat-1]
	at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:226) [jboss-seam.jar:2.3.0.Beta2-redhat-1]
	... 10 more
Caused by: java.lang.IllegalArgumentException: null value
	at org.jboss.seam.util.Conversions$FlatPropertyValue.<init>(Conversions.java:291) [jboss-seam.jar:2.3.0.Beta2-redhat-1]
	at org.jboss.seam.init.Initialization.getPropertyValue(Initialization.java:614) [jboss-seam.jar:2.3.0.Beta2-redhat-1]
	at org.jboss.seam.init.Initialization.installComponentFromXmlElement(Initialization.java:526) [jboss-seam.jar:2.3.0.Beta2-redhat-1]
	... 12 more

Expected results:

Example deploys

Additional info:

The workaround is to change the pattern to ${foo} instead of @foo@ :

e.g.
<core:init jndi-pattern="@jndiPattern@" debug="true" distributable="@distributable@"/> 

to

<core:init jndi-pattern="${jndiPattern}" debug="true" distributable="${distributable}"/> 

in booking-web/src/main/webapp/WEB-INF/components.xml
Comment 1 Karel Piwko 2012-06-13 08:11:14 EDT
Isn't this an omission when example was migrated from Ant to Maven? Does it have something to do with JBDS?
Comment 2 Marek Schmidt 2012-06-13 08:14:42 EDT
It works in maven, both the ${*} and @ patterns are supposed to work by default:

http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#delimiters
Comment 3 Marek Novotny 2012-06-13 09:44:09 EDT
from my previous conversation with fbricon: for some reason @bla@ patterns are not filtered by m2e-wtp
since m2e-wtp does web resource filtering in a hackish way, I'm not too surprised it doesn't work with @@
Comment 4 Marek Novotny 2012-06-14 08:54:25 EDT
replaced @@ tokens with ${} distributable, jndiPattern and loadPersistentUnits

Note You need to log in before you can comment on or make changes to this bug.