Designer/Static VDB modification programmatically
mr.bee Aug 28, 2013 9:13 AMHI Everyone.
Goal: add/remove data sources and some other properties in static vdb programmatically.
Solution:
As currently teiid admin api doesn't support it. So in order to achieve the goal i have used Dom xml parser to modify the vdb.xml file and java.util.zip package to zip/unzip the vdb file.
Problem:
When i try to deploy the vdb again, i am getting the following errors:
14:42:46,436 ERROR [org.teiid.RUNTIME] (MSC service thread 1-4) TEIID50016 Invalid VDB file deployment failed ExtensionModelVDB_mod.vdb
14:42:46,436 ERROR [org.teiid.RUNTIME] (MSC service thread 1-4) TEIID50016 Invalid VDB file deployment failed ExtensionModelVDB_mod.vdb
14:42:46,464 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC00001: Failed to start service jboss.deployment.unit."ExtensionModelVDB_mod.vdb".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.unit."ExtensionModelVDB_mod.vdb".DEPENDENCIES: JBAS018733: Failed to process phase DEPENDENCIES of deployment "ExtensionModelVDB_mod.vdb"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_27]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_27]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_27]
Caused by: java.lang.NullPointerException
at org.teiid.jboss.VDBDependencyDeployer.deploy(VDBDependencyDeployer.java:67)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
... 5 more
14:42:46,468 ERROR [org.jboss.as.server] (management-handler-thread - 4) JBAS015870: Deploy of deployment "ExtensionModelVDB_mod.vdb" was rolled back with the following failure message:
{"JBAS014671: Failed services" => {"jboss.deployment.unit.\"ExtensionModelVDB_mod.vdb\".DEPENDENCIES" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"ExtensionModelVDB_mod.vdb\".DEPENDENCIES: JBAS018733: Failed to process phase DEPENDENCIES of deployment \"ExtensionModelVDB_mod.vdb\"
Caused by: java.lang.NullPointerException"}}
14:42:46,475 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment ExtensionModelVDB_mod.vdb (runtime-name: ExtensionModelVDB_mod.vdb) in 5ms
Please find the original and modified vdb files in attachments and help me in this regards.
Thanks,
Nabeel
-
ExtensionModelVDB_org.vdb.zip 24.0 KB
-
ExtensionModelVDB_mod.vdb.zip 24.0 KB