Metawidget Unable to locate error
by Rubens Saraiva Nogueira
Hello everyone!
I am developing the vraptor scaffold but I have the following problem:
[test2] Person.java $ scaffold from-entity
***INFO*** Using currently installed scaffold [vraptor]
***ERROR*** Exception encountered: Unable to locate
scaffold/vraptor/metawidget-qbe.xml on CLASSPATH (type "set VERBOSE true"
to enable stack traces)
Both path and filename are correct in uncompressed jar and maven target
folder.
When I run by junit test, this error don't occurs.
Any idea?
The project code is in https://github.com/rsaraiva/forge-vraptor-plugin/.
The complete log is bellow.
Thanks
Rubens Saraiva
rubens@rubens-debian:~/projetos/forge/workspace$ export
FORGE_HOME=/home/rubens/projetos/forge/forge-distribution-1.2.2.Final
rubens@rubens-debian:~/projetos/forge/workspace$ export
JAVA_HOME=/home/rubens/program-files/jdk1.7.0_15
rubens@rubens-debian:~/projetos/forge/workspace$ export
PATH=$PATH:$FORGE_HOME/bin
rubens@rubens-debian:~/projetos/forge/workspace$ export
PATH=$PATH:$JAVA_HOME/bin
rubens@rubens-debian:~/projetos/forge/workspace$ forge
_____
| ___|__ _ __ __ _ ___
| |_ / _ \| `__/ _` |/ _ \ \\
| _| (_) | | | (_| | __/ //
|_| \___/|_| \__, |\___|
|___/
JBoss Forge, version [ 1.2.2.Final ] - JBoss, by Red Hat, Inc. [
http://forge.jboss.org ]
[no project] workspace $ forge source-plugin forge-vraptor-plugin
***INFO*** Invoking build with underlying build system.
[INFO] Scanning for projects...
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building plugin-vraptor 1.2.2-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @
forge-scaffold-vraptor ---
[INFO] Deleting
/home/rubens/projetos/forge/workspace/forge-vraptor-plugin/target
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
forge-scaffold-vraptor ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 22 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
forge-scaffold-vraptor ---
[WARNING] File encoding has not been set, using platform encoding UTF-8,
i.e. build is platform dependent!
[INFO] Compiling 14 source files to
/home/rubens/projetos/forge/workspace/forge-vraptor-plugin/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources
(default-testResources) @ forge-scaffold-vraptor ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
/home/rubens/projetos/forge/workspace/forge-vraptor-plugin/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @
forge-scaffold-vraptor ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @
forge-scaffold-vraptor ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @
forge-scaffold-vraptor ---
[INFO] Building jar:
/home/rubens/projetos/forge/workspace/forge-vraptor-plugin/target/plugin-vraptor.jar
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 3.928s
[INFO] Finished at: Sun Mar 24 16:44:55 BRT 2013
[INFO] Final Memory: 44M/363M
[INFO]
------------------------------------------------------------------------
***INFO*** Installing plugin artifact.
***SUCCESS*** Installed from [forge-vraptor-plugin] successfully.
Wrote
/home/rubens/.forge/plugins/org/jboss/forge/forge-scaffold-vraptor/1.2.2-SNAPSHOT-77d53350-3bdc-4e3f-ae36-9afc4febb97a
Wrote
/home/rubens/.forge/plugins/org/jboss/forge/forge-scaffold-vraptor/1.2.2-SNAPSHOT-77d53350-3bdc-4e3f-ae36-9afc4febb97a/forge-scaffold-vraptor.jar
Wrote
/home/rubens/.forge/plugins/org/jboss/forge/forge-scaffold-vraptor/1.2.2-SNAPSHOT-77d53350-3bdc-4e3f-ae36-9afc4febb97a/module.xml
Wrote
/home/rubens/.forge/plugins/org/jboss/forge/forge-scaffold-vraptor/dependencies/1.2.2-SNAPSHOT-77d53350-3bdc-4e3f-ae36-9afc4febb97a
Wrote
/home/rubens/.forge/plugins/org/jboss/forge/forge-scaffold-vraptor/dependencies/1.2.2-SNAPSHOT-77d53350-3bdc-4e3f-ae36-9afc4febb97a/metawidget-all-2.4.jar
Wrote
/home/rubens/.forge/plugins/org/jboss/forge/forge-scaffold-vraptor/dependencies/1.2.2-SNAPSHOT-77d53350-3bdc-4e3f-ae36-9afc4febb97a/module.xml
_____
| ___|__ _ __ __ _ ___
| |_ / _ \| `__/ _` |/ _ \ \\
| _| (_) | | | (_| | __/ //
|_| \___/|_| \__, |\___|
|___/
JBoss Forge, version [ 1.2.2.Final ] - JBoss, by Red Hat, Inc. [
http://forge.jboss.org ]
[no project] workspace $ new-project --named test2 --topLevelPackage
com.test2
? Use [/home/rubens/projetos/forge/workspace/test2] as project directory?
[Y/n]
***SUCCESS*** Created project [test2] in new working directory
[/home/rubens/projetos/forge/workspace/test2]
Wrote /home/rubens/projetos/forge/workspace/test2
Wrote /home/rubens/projetos/forge/workspace/test2/pom.xml
Wrote /home/rubens/projetos/forge/workspace/test2/src/main/java
Wrote /home/rubens/projetos/forge/workspace/test2/src/test/java
Wrote /home/rubens/projetos/forge/workspace/test2/src/main/resources
Wrote /home/rubens/projetos/forge/workspace/test2/src/test/resources
Wrote /home/rubens/projetos/forge/workspace/test2/src/main/java/com/test2
[test2] test2 $ persistence setup --named default --provider HIBERNATE
--container CUSTOM_NON_JTA --jndiDataSource java:jboss/datasources/ExampleDS
Use which version of 'jboss-javaee-6.0' ?
1 - [org.jboss.spec:jboss-javaee-6.0:pom::1.0.0.Beta4]
2 - [org.jboss.spec:jboss-javaee-6.0:pom::1.0.0.Beta5]
3 - [org.jboss.spec:jboss-javaee-6.0:pom::1.0.0.Beta6]
4 - [org.jboss.spec:jboss-javaee-6.0:pom::1.0.0.Beta7]
5 - [org.jboss.spec:jboss-javaee-6.0:pom::1.0.0.CR1]
6 - [org.jboss.spec:jboss-javaee-6.0:pom::1.0.0.Final]
7 - [org.jboss.spec:jboss-javaee-6.0:pom::2.0.0.Beta1]
8 - [org.jboss.spec:jboss-javaee-6.0:pom::2.0.0.CR1]
9 - [org.jboss.spec:jboss-javaee-6.0:pom::2.0.0.Final]
10 - [org.jboss.spec:jboss-javaee-6.0:pom::2.1.0.Beta1]
11 - [org.jboss.spec:jboss-javaee-6.0:pom::3.0.0.Beta1]
12 - [org.jboss.spec:jboss-javaee-6.0:pom::3.0.0.Final]
13 - [org.jboss.spec:jboss-javaee-6.0:pom::3.0.1.Final]
14 - [org.jboss.spec:jboss-javaee-6.0:pom::3.0.2.Final]*
? Choose an option by typing the number of the selection [*-default] [0]
***SUCCESS*** Installed [forge.spec.jpa] successfully.
? Do you want to install a JPA 2 metamodel generator? [y/N]
? The JPA provider [HIBERNATE], also supplies extended APIs. Install these
as well? [y/N]
***SUCCESS*** Persistence (JPA) is installed.
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/resources/META-INF/persistence.xml
Wrote /home/rubens/projetos/forge/workspace/test2/pom.xml
[test2] test2 $ scaffold setup --scaffoldType vraptor
? Scaffold provider [vraptor] is not installed. Install it? [Y/n]
? Facet [forge.maven.WebResourceFacet] requires packaging type(s) [war],
but is currently [jar]. Update packaging? (Note: this could deactivate
other plugins in your project.) [Y/n]
***SUCCESS*** Installed [forge.maven.WebResourceFacet] successfully.
***SUCCESS*** Installed [vraptor] successfully.
? Create scaffold in which sub-directory of web-root? (e.g.
http://localhost:8080/test2/DIR) [/]
Wrote /home/rubens/projetos/forge/workspace/test2/src/main/webapp
Wrote /home/rubens/projetos/forge/workspace/test2/pom.xml
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/webapp/favicon.ico
Wrote /home/rubens/projetos/forge/workspace/test2/src/main/webapp/header.jsp
Wrote /home/rubens/projetos/forge/workspace/test2/src/main/webapp/error.jsp
Wrote /home/rubens/projetos/forge/workspace/test2/src/main/webapp/footer.jsp
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/webapp/WEB-INF/jsp/index/index.jsp
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/webapp/resources/add.png
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/webapp/resources/bootstrap.css
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/webapp/resources/false.png
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/webapp/resources/favicon.ico
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/webapp/resources/forge-logo.png
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/webapp/resources/forge-style.css
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/webapp/resources/jboss-community.png
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/webapp/resources/remove.png
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/webapp/resources/search.png
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/webapp/resources/true.png
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/webapp/resources/vraptor-logo.png
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/webapp/WEB-INF/web.xml
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/java/com/test2/view/IndexController.java
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/webapp/../../../pom.xml
[test2] test2 $ entity --named Person
? In which package you'd like to create this @Entity, or enter for default
[com.test2.model]
Created @Entity [com.test2.model.Person]
Picked up type <JavaResource>: com.test2.model.Person
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/java/com/test2/model/Person.java
[test2] Person.java $ field string --named name
Added field to com.test2.model.Person: @Column private String name;
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/java/com/test2/model/Person.java
[test2] Person.java $ field int --named age
Added field to com.test2.model.Person: @Column private int age;
Wrote
/home/rubens/projetos/forge/workspace/test2/src/main/java/com/test2/model/Person.java
[test2] Person.java $ scaffold from-entity
***INFO*** Using currently installed scaffold [vraptor]
***ERROR*** Exception encountered: Unable to locate
scaffold/vraptor/metawidget-qbe.xml on CLASSPATH (type "set VERBOSE true"
to enable stack traces)
[test2] Person.java $