Bug 921586

Summary: Ticket Monster: administration can't be generated due to forge 1.1.x problems with recognizing maven project in demo/ directory
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Tomas Repel <trepel>
Component: TicketMonsterAssignee: Petr Penicka <ppenicka>
Status: CLOSED WORKSFORME QA Contact: Tomas Repel <trepel>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.2.0CC: bsutter, kpiwko, myarboro, ppenicka
Target Milestone: ---   
Target Release: 2.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ticket-monster
Fixed In Version: Doc Type: Known Issue
Doc Text:
Due to incorrect handling of non-exising Maven projects by JBoss Forge 1.1.2.Final, the Administration section of the Ticket Monster example can not be generated correctly. To work around the issue, remove any non-existing profiles from the activeProfiles element of your project's settings.xml file. With these changes, JBoss Forge will correctly recognize the Ticket Monster example as a Maven project and the Administration section will be generated correctly.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-11 12:23:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomas Repel 2013-03-14 13:25:17 UTC
Description of problem:

If you run forge 1.1.x in jboss-wfk-2.2.0.ER2/demo/ticket-monster/demo directory, an exception occurs. Only the 1.1.x versions are supported according to admin_layer.fsh script.

Maybe it would be better not to support 1.1.x version of Forge and use the 1.2.x versions instead. I'll create another issue on administration generation using Forge 1.2.2.Final.

Version-Release number of selected component (if applicable):

WFK 2.2.0.ER2
Forge 1.1.1.Final and/or Forge 1.1.3.Final

How reproducible:

Always.

Steps to Reproduce:
1. navigate to ticket-monster/demo directory
2. set up your maven to use required repositories
3. run forge
  
Actual results:

[trepel@dhcp129-66 demo]$ forge
Using Forge at /home/trepel/work/apps/forge-distribution-1.1.1.Final
    _____                    
   |  ___|__  _ __ __ _  ___ 
   | |_ / _ \| `__/ _` |/ _ \  \\
   |  _| (_) | | | (_| |  __/  //
   |_|  \___/|_|  \__, |\___| 
                   |___/      
 
Error during Startup event
org.jboss.forge.project.ProjectModelException: Could not create Maven project building request
	at org.jboss.forge.maven.facets.MavenContainer.getBuildingRequest(MavenContainer.java:132)
	at org.jboss.forge.maven.facets.MavenContainer.getRequest(MavenContainer.java:65)
	at org.jboss.forge.maven.facets.MavenContainer$Proxy$_$$_WeldClientProxy.getRequest(MavenContainer$Proxy$_$$_WeldClientProxy.java)
	at org.jboss.forge.maven.facets.MavenCoreFacetImpl.getPartialProjectBuildingResult(MavenCoreFacetImpl.java:85)
	at org.jboss.forge.maven.facets.MavenCoreFacetImpl.resolveProperties(MavenCoreFacetImpl.java:304)
	at org.jboss.forge.maven.facets.MavenDependencyFacet.resolveProperties(MavenDependencyFacet.java:393)
	at org.jboss.forge.maven.facets.MavenDependencyFacet.hasEffectiveDependency(MavenDependencyFacet.java:171)
	at org.jboss.forge.spec.javaee.BaseJavaEEFacet.isInstalled(BaseJavaEEFacet.java:64)
	at org.jboss.forge.project.BaseProject.registerFacet(BaseProject.java:153)
	at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:208)
	at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:186)
	at org.jboss.forge.project.services.ProjectFactory.registerFacets(ProjectFactory.java:178)
	at org.jboss.forge.project.services.ProjectFactory.findProjectRecursively(ProjectFactory.java:117)
	at org.jboss.forge.shell.project.ProjectInitializer.doInit(ProjectInitializer.java:91)
	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:616)
	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
	at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)
	at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)
	at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)
	at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)
	at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:628)
	at org.jboss.weld.event.EventImpl.fire(EventImpl.java:75)
	at org.jboss.forge.shell.project.CurrentProject.setCurrentResource(CurrentProject.java:80)
	at org.jboss.forge.shell.ShellImpl.init(ShellImpl.java:366)
	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:616)
	at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)
	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)
	at org.jboss.forge.shell.ShellImpl$Proxy$_$$_WeldClientProxy.init(ShellImpl$Proxy$_$$_WeldClientProxy.java)
	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:616)
	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
	at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)
	at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)
	at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)
	at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)
	at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622)
	at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616)
	at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:153)
	at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.NullPointerException
	at org.jboss.forge.maven.facets.MavenContainer.getBuildingRequest(MavenContainer.java:103)
	... 58 more
Error during PostStartup event
org.jboss.forge.project.ProjectModelException: Could not create Maven project building request
	at org.jboss.forge.maven.facets.MavenContainer.getBuildingRequest(MavenContainer.java:132)
	at org.jboss.forge.maven.facets.MavenContainer.getRequest(MavenContainer.java:65)
	at org.jboss.forge.maven.facets.MavenContainer$Proxy$_$$_WeldClientProxy.getRequest(MavenContainer$Proxy$_$$_WeldClientProxy.java)
	at org.jboss.forge.maven.facets.MavenCoreFacetImpl.getPartialProjectBuildingResult(MavenCoreFacetImpl.java:85)
	at org.jboss.forge.maven.facets.MavenCoreFacetImpl.resolveProperties(MavenCoreFacetImpl.java:304)
	at org.jboss.forge.maven.facets.MavenDependencyFacet.resolveProperties(MavenDependencyFacet.java:393)
	at org.jboss.forge.maven.facets.MavenDependencyFacet.hasEffectiveDependency(MavenDependencyFacet.java:171)
	at org.jboss.forge.spec.javaee.BaseJavaEEFacet.isInstalled(BaseJavaEEFacet.java:64)
	at org.jboss.forge.project.BaseProject.registerFacet(BaseProject.java:153)
	at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:208)
	at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:186)
	at org.jboss.forge.project.services.ProjectFactory.registerFacets(ProjectFactory.java:178)
	at org.jboss.forge.project.services.ProjectFactory.findProjectRecursively(ProjectFactory.java:117)
	at org.jboss.forge.shell.project.ProjectInitializer.doInit(ProjectInitializer.java:91)
	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:616)
	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
	at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)
	at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)
	at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)
	at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)
	at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:628)
	at org.jboss.weld.event.EventImpl.fire(EventImpl.java:75)
	at org.jboss.forge.shell.project.ProjectInitializer.postStartupTrigger(ProjectInitializer.java:45)
	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:616)
	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
	at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)
	at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)
	at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)
	at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)
	at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622)
	at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616)
	at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:163)
	at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.NullPointerException
	at org.jboss.forge.maven.facets.MavenContainer.getBuildingRequest(MavenContainer.java:103)
	... 50 more

Expected results:

It passes.

Additional info:

This prevents the administration section to be generated. If I try to execute `run admin_layer.fsh` anyway the line `@v = SHELL.getEnvironment().getRuntimeVersion();` causes `java.lang.StringIndexOutOfBoundsException: String index out of range: -1` and if I remove the line and set the forge version by hard, another error occurs:
`***ERROR*** [scaffold] Plugin is not usable in current scope or project.`

Comment 1 Tomas Repel 2013-03-18 15:26:51 UTC
The same holds when using Forge 1.1.2.Final (the version that is distributed with JBDS 6.0.0.GA).

Comment 7 Karel Piwko 2013-03-22 08:43:21 UTC
This will be fixed in future Forge version. There, we should release not this behavior for customers using settings.xml. The upstream bug is not really clear on that.

Comment 10 Petr Penicka 2013-04-03 17:06:00 UTC
Oops, sorry, I switched them in a bulk along with issues filed against docs components.

Comment 11 Tomas Repel 2013-04-11 12:21:57 UTC
With JBDS 6.0.1.GA release we stop supporting Forge 1.1.x, the supported version of Forge is 1.2.x where this issue is fixed. Thus no RN is required.

Comment 12 Petr Penicka 2013-04-12 15:23:22 UTC
Release note removed from the book:

Docs stage URL: https://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Web_Framework_Kit/2.2/html-single/2.2.0_Release_Notes/index.html

Build: JBoss_Web_Framework_Kit-2.2.0_Release_Notes-2.2-en-US-0-20

Comment 13 Tomas Repel 2013-04-15 07:17:59 UTC
Verified, thanks.