1 Reply Latest reply on Apr 19, 2012 9:17 AM by Brian.Dueck-Oracle

    OSM 7.03 SDK Sample: can not build DatabasePlugin

    930516
      I am trying to build the sample but got error. I followed the readme.txt carefully and tried ant 1.6.5, 1.7.1, none of them resovle the issue. Here is the result after "ant install". It stopped at validating automationMap.xml using schema databasePlugin.xsd, complaint about unexpected element "receive" and "implement". Help please!



      Buildfile: build.xml
      [echo] ASSEMBLE: action=assemble destdir=/home/oracle/OSM/SDK/Samples/DatabasePlugin plugindir=/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin sdkdir=/home/oracle/OSM/SDK/Automation application=dbplugin namespace=database_plugin_demo version=1.0 stagedir=/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/stage schema=/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/databasePlugin.xsd

      init:

      check-classpath:

      deploy-xmlmodel:

      main:

      security-warning:
      [echo] Warning: The storage of passwords in the configuration file is deprecated and not recommended. You will be prompted for passwords if omitted.

      init:

      input-database-password:

      input-weblogic-password:

      model-subproject-build:

      model-deploy:
      [java] ********************************************************************************
      [java] Order and Service Management XML Import/Export Tool - ver. 7.0.3.675
      [java] Copyright (C) 1998, 2007, Oracle.
      [java] All Rights Reserved.
      [java] www.oracle.com
      [java] ********************************************************************************


      [java] Importing from /home/oracle/OSM/SDK/Samples/DatabasePlugin/model/database_plugin_demo.xml into OMS schema v7.0.3.0.506 at database [jdbc:oracle:thin:@localhost:1521:OSMVM]
      [java] Parsing /home/oracle/OSM/SDK/Samples/DatabasePlugin/model/database_plugin_demo.xml...
      [java] Upgrading model from 6.0.0 to 7.0.0
      [java] migrateDocument ...
      [java] XSLT model upgrade needed.
      [java] Applying XSLT /home/oracle/OSM/SDK/XMLImportExport/stylesheets/modelUpgrade_6.0.0_6.2.0.xsl
      [java] Applying XSLT /home/oracle/OSM/SDK/XMLImportExport/stylesheets/modelUpgrade_6.2.0_7.0.0.xsl
      [java] XSLT model upgrade complete.
      [java] Validating /home/oracle/OSM/SDK/Samples/DatabasePlugin/model/database_plugin_demo.xml...
      [java] The validation report URI is not found in config file. The report path will be /home/oracle/OSM/SDK/XMLImportExport/validationReport.xml
      [java] Scanning for entities in /home/oracle/OSM/SDK/Samples/DatabasePlugin/model/database_plugin_demo.xml...
      [java] Disabling database jobs - RUNNING
      [java] Disabling database jobs - COMPLETE
      [java] Processing 73 entities...
      [java] Import 1% complete (1 entities processed: 0 changed, 1 unchanged)
      [java] Import 5% complete (4 entities processed: 0 changed, 4 unchanged)
      [java] Import 10% complete (7 entities processed: 0 changed, 7 unchanged)
      [java] Import 14% complete (10 entities processed: 0 changed, 10 unchanged)
      [java] Import 18% complete (13 entities processed: 0 changed, 13 unchanged)
      [java] Import 22% complete (16 entities processed: 0 changed, 16 unchanged)
      [java] Import 26% complete (19 entities processed: 0 changed, 19 unchanged)
      [java] Import 30% complete (22 entities processed: 0 changed, 22 unchanged)
      [java] Import 34% complete (25 entities processed: 0 changed, 25 unchanged)
      [java] Import 38% complete (28 entities processed: 0 changed, 28 unchanged)
      [java] Import 42% complete (31 entities processed: 0 changed, 31 unchanged)
      [java] Import 47% complete (34 entities processed: 0 changed, 34 unchanged)
      [java] Import 51% complete (37 entities processed: 0 changed, 37 unchanged)
      [java] Import 55% complete (40 entities processed: 0 changed, 40 unchanged)
      [java] Import 59% complete (43 entities processed: 0 changed, 43 unchanged)
      [java] Import 63% complete (46 entities processed: 0 changed, 46 unchanged)
      [java] Import 67% complete (49 entities processed: 0 changed, 49 unchanged)
      [java] Import 71% complete (52 entities processed: 0 changed, 52 unchanged)
      [java] Import 75% complete (55 entities processed: 0 changed, 55 unchanged)
      [java] Import 79% complete (58 entities processed: 0 changed, 58 unchanged)
      [java] Import 84% complete (61 entities processed: 0 changed, 61 unchanged)
      [java] Import 88% complete (64 entities processed: 0 changed, 64 unchanged)
      [java] Import 92% complete (67 entities processed: 0 changed, 67 unchanged)
      [java] Import 96% complete (70 entities processed: 0 changed, 70 unchanged)
      [java] Import 100% complete (73 entities processed: 0 changed, 73 unchanged)
      [java] Committing imported entities to database...
      [java] Commit complete.
      [java] Import complete.
      [refresh] Connecting to Provisioning Server: t3://localhost:5001
      [refresh] Sending message to refresh the Provisioning Server cache...
      [refresh] Request sent to the Provisioning Server.
      [refresh] Please check the Provisioning Server log files to check for any messages generated during the cache refresh.
      [echo] Sleeping for 2 minutes. Please wait...

      unjar:
      [unjar] Expanding: /home/oracle/OSM/SDK/Automation/automationdeploy_bin/automation_plugins.jar into /home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin

      copy-map:

      copy-config:

      assemble:
      [plugin-cmt] Apr 13, 2012 10:39:03 AM com.mslv.oms.deploytool.api.PluginDeploymentAPI parseMap
      [plugin-cmt] INFO: Validating automation map '/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/automationMap.xml' using schema '/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/databasePlugin.xsd'

      [plugin-cmt] file:/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/automationMap.xml<Line 8, Column 40>: XML-24534: (Error) Element 'receive' not expected.
      [plugin-cmt] file:/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/automationMap.xml<Line 11, Column 43>: XML-24534: (Error) Element 'implement' not expected.
      [plugin-cmt] file:/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/automationMap.xml<Line 17, Column 18>: XML-24521: (Error) Element not completed: 'taskAutomator'
      [plugin-cmt] file:/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/automationMap.xml<Line 24, Column 40>: XML-24534: (Error) Element 'receive' not expected.
      [plugin-cmt] file:/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/automationMap.xml<Line 27, Column 43>: XML-24534: (Error) Element 'implement' not expected.
      [plugin-cmt] file:/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/automationMap.xml<Line 33, Column 18>: XML-24521: (Error) Element not completed: 'taskAutomator'
      [plugin-cmt] file:/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/automationMap.xml<Line 40, Column 40>: XML-24534: (Error) Element 'receive' not expected.
      [plugin-cmt] file:/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/automationMap.xml<Line 43, Column 43>: XML-24534: (Error) Element 'implement' not expected.
      [plugin-cmt] file:/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/automationMap.xml<Line 49, Column 18>: XML-24521: (Error) Element not completed: 'taskAutomator'
      [plugin-cmt] file:/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/automationMap.xml<Line 56, Column 40>: XML-24534: (Error) Element 'receive' not expected.
      [plugin-cmt] file:/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/automationMap.xml<Line 59, Column 43>: XML-24534: (Error) Element 'implement' not expected.
      [plugin-cmt] file:/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/automationMap.xml<Line 65, Column 18>: XML-24521: (Error) Element not completed: 'taskAutomator'
      [plugin-cmt] java.lang.Exception: Parse/validation of automation map '/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/automationMap.xml' using schema '/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/databasePlugin.xsd' failed.
      [plugin-cmt] at com.mslv.oms.deploytool.api.PluginDeploymentAPI.parseMap(Unknown Source)
      [plugin-cmt] at com.mslv.oms.deploytool.api.PluginDeploymentAPI.buildAutomators(Unknown Source)
      [plugin-cmt] at com.mslv.oms.deploytool.api.PluginDeploymentAPI.assemble(Unknown Source)
      [plugin-cmt] at com.mslv.oms.deploytool.anttasks.OMSDeployPlugin.processCommand(Unknown Source)
      [plugin-cmt] at com.mslv.oms.deploytool.anttasks.OMSDeployPlugin.execute(Unknown Source)
      [plugin-cmt] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      [plugin-cmt] at org.apache.tools.ant.Task.perform(Task.java:364)
      [plugin-cmt] at org.apache.tools.ant.Target.execute(Target.java:341)
      [plugin-cmt] at org.apache.tools.ant.Target.performTasks(Target.java:369)
      [plugin-cmt] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
      [plugin-cmt] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      [plugin-cmt] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
      [plugin-cmt] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
      [plugin-cmt] at org.apache.tools.ant.Main.runBuild(Main.java:668)
      [plugin-cmt] at org.apache.tools.ant.Main.startAnt(Main.java:187)
      [plugin-cmt] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
      [plugin-cmt] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
      [plugin-cmt] Caused by: oracle.xml.parser.v2.XMLParseException: Element 'receive' not expected.
      [plugin-cmt] at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)
      [plugin-cmt] at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:300)
      [plugin-cmt] at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:264)
      [plugin-cmt] ... 17 more

      BUILD FAILED
      /home/oracle/OSM/SDK/Samples/DatabasePlugin/build.xml:97: java.lang.Exception: Parse/validation of automation map '/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/automationMap.xml' using schema '/home/oracle/OSM/SDK/Samples/DatabasePlugin/build/bin/META-INF/databasePlugin.xsd' failed.
        • 1. Re: OSM 7.03 SDK Sample: can not build DatabasePlugin
          Brian.Dueck-Oracle
          I believe the problem is that the automationMap.xml that came with the 7.0.3 sample was not updated to include a new required part of automationMap.xml files. In 7.0.3, the automationMap xsd was changed to require <cartridgeNamespace> and <cartridgeVersion> elements to be present with correct values. These elements must appear immediately before the <receive> element. So try adding these elements to the sample's automationMap.xml file and see how that works.

          Brian.