Bug 1093504
| Summary: | Failed to resolve expression: ${jndi.name}" ,when configuring Resource adapter for Google spreadsheet | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Data Virtualization 6 | Reporter: | Anu Saji <asaji> |
| Component: | Configuration | Assignee: | Van Halbert <vhalbert> |
| Status: | CLOSED NOTABUG | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.0.0 | CC: | atangrin, vhalbert |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-05-02 13:42:47 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
The problem is the property substitution isn't being performed. To enable this, you need to edit the jboss-cli.xml, in the bin directory, and change the following property to "true": <resolve-parameter-values>false</resolve-parameter-values> By default, this is false, and must be enabled when trying to use the --properties option for property substitution when running CLI scripts. |
Description of problem: *********************** Unable to create Resource adatper using the cli script => create-google-ds.cli and properties file create-google-ds.properties Version-Release number of selected component (if applicable): - DV6 How reproducible: On windows Taking the command execution exactly as the customer states ************* C:\jboss-eap-6.1\bin>jboss-cli.bat -c --file=%TEIID_HOME%\docs\teiid\datasources \google\create-google-ds.cli --properties=%TEIID_HOME%\docs\teiid\datasources\go ogle\create-google-ds.properties {"outcome" => "success"} { "outcome" => "failed", "failure-description" => "JBAS014802: Cannot resolve expression 'expression \"${jndi.name}\"' -- java.lang.IllegalStateException: Failed to resolve expressi on: ${jndi.name}", "rolled-back" => true Same issue in seen when executed on a RHEL box too. But executing the cli commands individually works like below /subsystem=resource-adapters/resource-adapter=google:add(module=org.jboss.teiid.resource-adapter.google) /subsystem=resource-adapters/resource-adapter=google/connection-definitions=googleDS:add(jndi-name="java:/spreadsheet", class-name=org.teiid.resource.adapter.google.SpreadsheetManagedConnectionFactory, enabled=true, use-java-context=true) /subsystem=resource-adapters/resource-adapter=google/connection-definitions=googleDS/config-properties=AuthMethod:add(value="ClientLogin" ) /subsystem=resource-adapters/resource-adapter=google/connection-definitions=googleDS/config-properties=SpreadsheetName:add(value="changeME" ) /subsystem=resource-adapters/resource-adapter=google/connection-definitions=googleDS/config-properties=Username:add(value="ChangeMe" ) /subsystem=resource-adapters/resource-adapter=google/connection-definitions=googleDS/config-properties=Password:add(value="ChangeMe" ) /subsystem=resource-adapters/resource-adapter=google/connection-definitions=googleDS/config-properties=BatchSize:add(value="4096" ) /subsystem=resource-adapters/resource-adapter=google:activate Steps to Reproduce: ******************* As indicated in the above section Actual results: *************** { "outcome" => "failed", "failure-description" => "JBAS014802: Cannot resolve expression 'expression \"${jndi.name}\"' -- java.lang.IllegalStateException: Failed to resolve expressi on: ${jndi.name}", "rolled-back" => true Expected results: ******************* <resource-adapter id="google"> <module slot="main" id="org.jboss.teiid.resource-adapter.google"/> <transaction-support>NoTransaction</transaction-support> <connection-definitions> <connection-definition class-name="org.teiid.resource.adapter.google.SpreadsheetManagedConnectionFactory" jndi-name="java:/google" enabled="true" use-java-context="true" pool-name="google"> <config-property name="AuthMethod"> ClientLogin </config-property> <config-property name="SpreadsheetName"> ChangeMe </config-property> <config-property name="Username"> ChangeMe </config-property> <config-property name="Password"> ChangeMe </config-property> <config-property name="BatchSize"> 4096 </config-property> </connection-definition> </connection-definitions> </resource-adapter> Additional info: