Skip to content

Instantly share code, notes, and snippets.

View VineetReynolds's full-sized avatar
🚀

Vineet Reynolds VineetReynolds

🚀
View GitHub Profile

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

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)
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
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
@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.*;
!ENTRY org.eclipse.jface 4 0 2014-09-12 20:46:18.859
!MESSAGE Unhandled event loop exception during blocked modal context.
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.IndexOutOfBoundsException: Index: 3, Size: 3)
at org.eclipse.swt.SWT.error(SWT.java:4441)
at org.eclipse.swt.SWT.error(SWT.java:4356)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:139)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:175)
@VineetReynolds
VineetReynolds / Scaffolding drawbacks.md
Last active August 29, 2015 14:06
Reasons to not scaffold from a database
  • Lack of awareness of transactional context. Say you have entities A, B and C where only A and B are related to each other in the database schema. If your use case requires updates to all three entities, scaffolding will not generate code to update them. At best, the generated code will update A and B. Knowledge about C is simply not there in the database; it exists in the use-case.
  • Scaffolding for entities with composite keys can get complicated. In an ideal world, REST resources mapped to a database entity, are mapped using the primary key. Composite keys ensure complicated URLs. Matrix parameters are a solution, but some JS client frameworks do not even support this (remember, matrix parameters are just a design note, and not part of the HTTP 1.0 and 1.1 RFCs).
vreynolds@RH0003210 www.jboss.org$ rake clean preview
Using profile: development
Generating site: http://localhost:4242
While processing file
An error occurred: uninitialized constant ActiveSupport::Autoload
/home/vreynolds/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.6/lib/active_support/number_helper.rb:3:in `<module:NumberHelper>'
/home/vreynolds/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.6/lib/active_support/number_helper.rb:2:in `<module:ActiveSupport>'
/home/vreynolds/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.6/lib/active_support/number_helper.rb:1:in `<top (required)>'
/home/vreynolds/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.6/lib/active_support/core_ext/numeric/conversions.rb:2:in `require'
/home/vreynolds/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.6/lib/active_support/core_ext/numeric/conversions.rb:2:in `<top (required)>'
# Based on http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/
# with some amendments
# create a new branch in WFK quickstarts
git checkout -b kitchensink-html5-mobile
# For kitchensink-html5-mobile, in wfk-quickstarts
# the following command filters out only the kitchensink-html5-mobile dir, and retains it's contents in the root dir
git filter-branch -f --subdirectory-filter kitchensink-html5-mobile -- --all
@VineetReynolds
VineetReynolds / Arquillian-Glassfish-Notes.txt
Created September 29, 2011 19:10
Arquillian dev notes
1. Configuration XMLs are to be specified using URIs (file:...). Glassfish verifies whether the URI is absolute (containing a scheme) or a not.
2. Glassfish copies the configuration XML to the config directory of the instance root.
3. The specified instanceRoot must have a config directory, and may have a domain.xml file (that is optional).
4. If a configurationXml file is specified in arquillian.xml, then this file is copied into the instance root (but not overwritten). If no configurationXml file is specified in arquillian.xml, then the domain.xml file is extracted from embedded glassfish and copied to the instance root (again not overwritten).
5. The instanceRoot must also have a docRoot directory (not specified in domain.xml), and other files like cacerts.jks and keystore.jks. The latter files are required because they are usually specified in domain.xml, for configuring the https-listener.
6. The installRoot must have subdirectories named 'domains' and 'lib'. Although this is not required in most cases o