Skip to content

Instantly share code, notes, and snippets.

View VineetReynolds's full-sized avatar
🚀

Vineet Reynolds VineetReynolds

🚀
View GitHub Profile
@VineetReynolds
VineetReynolds / gist:c655dfad6a2c35d5f72d
Created June 9, 2014 15:05
Forge 2 commands for 'Zero to HTML5 app'
project-new --named rhsessions --topLevelPackage com.redhat.sessions;
servlet-setup; cdi-setup; jpa-setup --provider Hibernate --container JBOSS_EAP6; constraint-setup;
jpa-new-entity --named Attendee;
jpa-new-entity --named Session;
scaffold-generate --provider AngularJS --targets com.redhat.sessions.model.*;
03:59:22,798 SEVERE [org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl] (Aesh Process Loop 2135591757) Cannot fetch the next steps from org.jboss.forge.addon.scaffold.impl.ui.ScaffoldGenerateCommandImpl@34a18b8f: java.lang.NullPointerException
at org.jboss.forge.addon.scaffold.faces.FacesTemplateStrategy.getDefaultTemplate(FacesTemplateStrategy.java:65)
at org.jboss.forge.addon.scaffold.faces.FacesTemplateStrategy.getDefaultTemplate(FacesTemplateStrategy.java:24)
at org.jboss.forge.addon.scaffold.faces.FacesScaffoldProvider.isSetup(FacesScaffoldProvider.java:239)
at sun.reflect.GeneratedMethodAccessor279.invoke(Unknown Source) [:1.8.0_05]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_05]
at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_05]
at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:65) [furnace-proxy-2.5.1-SNAPSHOT.jar:2.5.1-SNAPSHOT]
at org.jboss.forge.furnace.u
cd /tmp/
project-new --named helloforge
jpa-setup --provider Hibernate --container WILDFLY
jpa-new-entity --named Customer
jpa-new-field --named firstName
scaffold-generate --targets org.helloforge.model.Customer
java.lang.ArrayIndexOutOfBoundsException: 0
at org.jboss.tools.forge.ui.part.ForgeConsoleView.createPartControl(ForgeConsoleView.java:25)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:142)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityView.createPartControl(CompatibilityView.java:174)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:323)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)

Install Hybrid Mobile Tools and CordovaSim

Hybrid Mobile Tools and CordovaSim are not installed as part of JBoss Developer Studio yet. They can be installed from JBoss Central as shown below:

  1. To install these plug-ins, drag the following link into JBoss Central: https://devstudio.jboss.com/central/install?connectors=org.jboss.tools.aerogear.hybrid. Alternatively, in JBoss Central select the Software/Update tab. In the Find field, type JBoss Hybrid Mobile Tools or scroll through the list to locate JBoss Hybrid Mobile Tools + CordovaSim. Select the corresponding check box and click Install.

  2. In the Install wizard, ensure the check boxes are selected for the software you want to install and click Next. It is recommended that you install all of the selected components.

  3. Review the details of the items listed for install and click Next. After reading and agreeing to the license(s), click I accept the terms of the license agreement(s) and click Finish. The Installing Software wind

Connect via jboss-cli.

Create the Postgres JBDC driver module:

[standalone@localhost:9999 /] module add --name=org.postgres --resources=/usr/share/java/postgresql-jdbc.jar --dependencies=javax.api,javax.transaction.api

Create the JBDC driver

html {
height: 100%;
}
body, table {
background-color: #FFFFFF;
color: #393939;
font: 13px/1.4em helvetica,arial,freesans,clean,sans-serif;
}
body {
float: left;
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.acme</groupId>
<artifactId>foo</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>war</packaging>
/*
* Copyright 2012 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Eclipse Public License version 1.0, available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.jboss.forge.addon.ui.impl;
import java.util.Arrays;
@VineetReynolds
VineetReynolds / failure.txt
Last active December 22, 2015 07:08
output of 'new-nazgul-project'
[no project] tmp $ new-nazgul-project --projectName nazgul-demo
? [topProjectPackage=Top java package under which all project packages will reside, not including projectName. Must be a valid Java package name [e.g: "com.acme"]. (of type java.lang.String)]: com.acme.demo
? Where would you like to create the project? [Press ENTER to use the current directory: tmp] [ .../tmp] /home/vineetr/tmp/nazgul-demo
? Where would you like to create the project? [Press ENTER to use the current directory: tmp] [ .../tmp] nazguldemo
Wrote /home/vineet/nazguldemo
Wrote /home/vineet/nazguldemo/demo
Wrote /home/vineet/nazguldemo/demo/pom.xml
***ERROR*** Exception encountered: (type "set VERBOSE false" to disable stack traces)