VMware {code} Community
admin
Immortal
Immortal

build for REST and SOAP sample plug-in failed

Hi,

I have downloaded vCO plug-in SDK from here.

No ant files exist for "rest" package of "Solar System  Plug-in REST Project" (and "soap" package of "Solar System Plug-in SOAP  Project").

"Rest" package contains only two files "com/vmware/vcl/plugin/sdk/sample/rest/solarsystem/client/Tester.java"

and "com/vmware/vcl/plugin/sdk/sample/rest/solarsystem/modelc/Planets.java"

Here is target named  "package" in global maven-build.xml of "Solar System Plug-in REST Project". It  does not contain "antfile" for package named  "rest" (same is case with "Solar System  Plug-in SOAP Project")

<target name="package"  description="Package the application">

<ant antfile="build.xml"  dir="o11nplugin-solarsystem-model"  target="package"/>

<ant antfile="build.xml"  dir="o11nplugin-solarsystem-core"  target="package"/>

<ant antfile="build.xml"  dir="o11nplugin-solarsystem-config"  target="package"/>

<ant antfile="build.xml"  dir="o11nplugin-solarsystem" target="package"/>

</target>


But  no <ant/> tag for  dir="rest"

Because of this I am getting following error.  Are we supposed to add antfiles for REST ourselfs OR how would files under "rest/soap"  package be compiled??

AM I MISSING SOMETHING OVER HERE?????????

compile:

[mkdir] Created dir:  C:\Users\Administrator\Workspace\rest\o11nplugin-solarsystem-model\target\classes

[javac] Compiling 8 source files to  C:\Users\Administrator\Workspace\rest\o11nplugin-solarsystem-model\target\classes

[javac]  C:\Users\Administrator\Workspace\rest\o11nplugin-solarsystem-model\src\main\java\com\vmware\solarsystem\RESTServiceAdaptor.java:37:  package com.vmware.vco.plugin.sdk.sample.rest.solarsystem.model.Planets does not  exist

[javac] import  com.vmware.vco.plugin.sdk.sample.rest.solarsystem.model.Planets.Planet;

[javac] ^

[javac]  C:\Users\Administrator\Workspace\rest\o11nplugin-solarsystem-model\src\main\java\com\vmware\solarsystem\RESTServiceAdaptor.java:61:  cannot find symbol

[javac] symbol : constructor  Planet()

[javac] location: class  com.vmware.solarsystem.Planet

[javac] Planet planet = new  Planet();

[javac] ^

[javac]  C:\Users\Administrator\Workspace\rest\o11nplugin-solarsystem-model\src\main\java\com\vmware\solarsystem\RESTServiceAdaptor.java:63:  setId(java.lang.String) in com.vmware.solarsystem.CelestialBody cannot be  applied to (java.lang.Short)

[javac] planet.setId(s);

[javac] ^

[javac]  C:\Users\Administrator\Workspace\rest\o11nplugin-solarsystem-model\src\main\java\com\vmware\solarsystem\RESTServiceAdaptor.java:64:  cannot find symbol

[javac] symbol : method  setSummary(java.lang.String)

[javac] location: class  com.vmware.solarsystem.Planet

[javac]  planet.setSummary("Blabla");

[javac] ^

[javac]  C:\Users\Administrator\Workspace\rest\o11nplugin-solarsystem-model\src\main\java\com\vmware\solarsystem\SolarSystemRepository.java:47:  package com.vmware.vco.plugin.sdk.sample.rest.solarsystem.model.Planets does not  exist

[javac]  List<com.vmware.vco.plugin.sdk.sample.rest.solarsystem.model.Planets.Planet>  restPlanets = rsa.getAllPlanets();

[javac] ^

[javac]  C:\Users\Administrator\Workspace\rest\o11nplugin-solarsystem-model\src\main\java\com\vmware\solarsystem\SolarSystemRepository.java:48:  package com.vmware.vco.plugin.sdk.sample.rest.solarsystem.model.Planets does not  exist

[javac] for (  com.vmware.vco.plugin.sdk.sample.rest.solarsystem.model.Planets.Planet planet :  restPlanets){

[javac] ^

[javac]  C:\Users\Administrator\Workspace\rest\o11nplugin-solarsystem-model\src\main\java\com\vmware\solarsystem\SolarSystemRepository.java:66:  package com.vmware.vco.plugin.sdk.sample.rest.solarsystem.model.Planets does not  exist

[javac] for (  com.vmware.vco.plugin.sdk.sample.rest.solarsystem.model.Planets.Planet planet :  restPlanets){

[javac] ^

[javac] 7 errors

BUILD FAILED

C:\Users\Administrator\Workspace\rest\maven-build.xml:86: The  following error occurred while executing this line:

C:\Users\Administrator\Workspace\rest\o11nplugin-solarsystem-model\maven-build.xml:72:  Compile failed; see the compiler error output for details.

Reply
0 Kudos
8 Replies
subkumar
VMware Employee
VMware Employee

The "rest" and "soap" packages should get compiled by the default auto build capability of eclipse which gets run at the time of installing the the REST and SOAP sample plug-in projects. These packages are not built by the custom build.xml build script. You should be able to look at the SOAP and REST projects from Windows Explorer and see the class files for these packages under the bin/ sub-directory.

Reply
0 Kudos
iiliev
VMware Employee
VMware Employee

I think we should strive for IDE independence. That is, everything should be compilable from the command line.

BTW, on my machine the auto build places the mentioned class files in <projectname>/bin directory, but the build scripts search for them in rest/bin directory.

Reply
0 Kudos
subkumar
VMware Employee
VMware Employee

Good catch. This is indeed a bug with the REST plug-in build script; although the SOAP plug-in build script looks OK. So the fix is to modify the following lines in o11plugin-solarsystem-model/maven-build.xml

<target name="package" depends="compile,test" description="Package the application">
      <copy file="../bin/com/vmware/vco/plugin/sdk/sample/rest/solarsystem/model/Planets.class" todir="${maven.build.outputDir}/com/vmware/vco/plugin/sdk/sample/rest/solarsystem/model"/>
      <copy file="../bin/com/vmware/vco/plugin/sdk/sample/rest/solarsystem/model/Planets$Planet.class" todir="${maven.build.outputDir}/com/vmware/vco/plugin/sdk/sample/rest/solarsystem/model"/>

Reply
0 Kudos
amrutasg
Contributor
Contributor

Hello ,

When i tried to run solar system REST project from samples and ran into same error. I found that my solare ssytem REST project's BIN folder is empty after creating that project. While installing project  i am getting "Unable to access file" error.

Work environment :

Windows 2008 64 machine

SpringSource Tool Suite
Version: 2.6.1.RELEASE
Build Id: 201105041000
Reply
0 Kudos
admin
Immortal
Immortal

I am using same enviornment and faced same problem.

Problem is when we install REST/SOAP Project, eclipse tries to build rest/soap folder. This requires JAR files under "o11n-lib" at path "C:\rest\o11n-lib". But while installing project, these files have not been downloaded. This causes problem.

I verified this by manually creating "C:\rest\o11n-lib" and copied whole folder "C:\Users\Administrator\Workspace\helloworld\o11n-lib" under "C:\rest\o11n-lib"(my rest project workspace path is diffferent that is "C:\Users\Administrator\Workspace\rest" ). That worked and I am able to build SolarSystem REST Project.

iiliev, subkumar, Is this not abug ? as there no automatic downloading of o11n-lib while installing project.

Reply
0 Kudos
admin
Immortal
Immortal

I think as o11n-lib folder is empty, we are getting error "Unable to access the file" while creating project

Reply
0 Kudos
subkumar
VMware Employee
VMware Employee

I am unable to reproduce this problem in my environment. When I create the sample REST and SOAP plug-in projects using the "New VMware Development Kit" wizard, I can see libraries correctly populated under <PROJECTHOME>/011n-lib. The "rest" and "soap" packages gets built automatically by eclipse without any errors and the corresponding class files are visble under <PROJECTHOME>/bin. I did not get the error "Unable to access the file".

Reply
0 Kudos
kumarankpl
Hot Shot
Hot Shot

when i open try open the file Vcenter Orchestrator plugin project from samples.

Its shows the error "NOT ABLE TO ACCESS THE FILE"

After clicking of if i check for the error i am getting like

Errors occurred during the build.
Errors running builder 'Integrated External Tool Builder' on project 'vcotesthello'.
The builder launch configuration could not be found.
The builder launch configuration could not be found.

Some help will be appriciated.

Regards

Kumaran K

Reply
0 Kudos