Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1098701

Summary: Upgrade forge-from-scratch quickstart to use Forge 2 for EAP 6.4
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: sgilda
Component: QuickstartsAssignee: sgilda
Status: CLOSED CURRENTRELEASE QA Contact: Nikoleta Hlavickova <nziakova>
Severity: high Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.3.0CC: bsutter, jkudrnac, lincolnbaxter, mbriskar, nziakova, pmuir, smumford
Target Milestone: ER3   
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-16 20:51:35 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:
Attachments:
Description Flags
Output from generate.fsh
none
Deployment log
none
Screen shot of running application
none
Screen shot showing how the broken application displays
none
Server log with errors and warnings logged during deploy none

Description sgilda 2014-05-17 12:17:12 UTC
Description of problem:
The forge-from-scratch quickstart required Forge 1. It should be upgraded to use the currently shipping Forge 2.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 sgilda 2014-05-19 15:38:39 UTC
Created a JIRA for Lincoln Baxter: https://issues.jboss.org/browse/JDF-706

Comment 2 sgilda 2014-06-10 11:58:16 UTC
This pull was issued and will be tested and merged for JBoss EAP 6.4:
https://github.com/jboss-developer/jboss-eap-quickstarts/pull/959

Comment 3 sgilda 2014-09-30 15:47:11 UTC
It looks like JDBS is at 7.1.1.GA, so this may not be ready yet.

Comment 4 sgilda 2014-11-04 12:32:12 UTC
JDBS 8 is out. Matej will try to complete this in the next few days.

Related bugs and JIRAs:

https://bugzilla.redhat.com/show_bug.cgi?id=1160163
https://issues.jboss.org/browse/JDF-706

Comment 6 Nikoleta Hlavickova 2014-11-13 14:36:58 UTC
There are a couple of issues:

(1) Author: Lincoln Baxter, Matej Briškár
-- probably should be changed to Matej Briskar, we do not use characters not included in English alphabet in other quickstarts - Ondrej Zizka, Peter Skopek, Lukas Fryc are other examples of names which are written diferently in Czech.

(2) Product Versions: EAP 6.3, EAP 6.4, JBDS 8
-- in EAP 6.3 release the quickstart did not use Forge 2 and was not certified with JBDS 8, so it should not be mentioned there

(3) The application this project produces is designed to be run on Red Hat JBoss Enterprise Application Platform 6.1 or later.
-- the same as above, it should be 6.4 or later. We cannot say it is designed to be run on EAP 6.1 without testing it.

(4) If you have not yet done so, you must Configure Maven - For Use with JBoss Developer Studiton before testing the quickstarts.
-- typo "Studiton"

(5) At this point, Forge creates the new project and builds it. 
-- after message "***SUCCESS*** Project named 'forge-example' has been created." there are some error messages in the log, too:
[forge-example]$ scaffold-setup --provider Faces;
***ERROR*** Error while executing 'Scaffold: Setup'
***ERROR*** No Facet of type [interface org.jboss.forge.addon.javaee.faces.FacesFacet] is installed.
***INFO*** (type "export VERBOSE=true" to enable stack traces)
***ERROR*** No Facet of type [interface org.jboss.forge.addon.javaee.faces.FacesFacet] is installed.
[persistence.xml]$ cdi-setup;

(6) After a number of `***SUCCESS***` messages, you Finally, you see a `[INFO] BUILD SUCCESS` message near the end of the console output.
-- this message should be reworded because of "you Finally, you see"

(7) Deploy the Generated Application
-- during deploy several ERROR and WARN messages are logged:
WARN  [org.hibernate.ejb.Ejb3Configuration] (ServerService Thread Pool -- 50) HHH000059: Defining hibernate.transaction.flush_before_completion=true ignored in HEM
WARN  [org.hibernate.dialect.H2Dialect] (ServerService Thread Pool -- 50) HHH000431: Unable to determine H2 database version, certain features may not work
ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 49) HHH000389: Unsuccessful: alter table Address drop constraint FK_f0dyx9tf7g7syfnjb8v8xq8eu
ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 50) HHH000389: Unsuccessful: alter table Address drop constraint FK_f0dyx9tf7g7syfnjb8v8xq8eu
ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 49) Table "ADDRESS" not found; SQL statement:
ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 49) HHH000389: Unsuccessful: alter table Customer drop constraint FK_e6df388iyqen7rmruplyneai5
ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 49) Table "CUSTOMER" not found; SQL statement:
ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 49) HHH000389: Unsuccessful: alter table Customer_Address drop constraint FK_oxgpbp3stwomi26pmct4ykcrb
ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 49) Table "CUSTOMER_ADDRESS" not found; SQL statement:
ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 49) HHH000389: Unsuccessful: alter table ProductOrder_Item drop constraint FK_a90qqsvmwtgia3w52h1nwp1sg
ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 49) Table "PRODUCTORDER_ITEM" not found; SQL statement:
ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 50) HHH000389: Unsuccessful: create table Address (id bigint not null, city varchar(255), street varchar(255), version integer, zip_id bigint, primary key (id))
ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 50) Table "ADDRESS" already exists; SQL statement:
WARN  [org.jboss.as.weld] (MSC service thread 1-13) JBAS016017: Using deployment classloader to load proxy classes for module org.jboss.resteasy.resteasy-cdi:main. Package-private access will not work. To fix this the module should declare dependencies on [org.jboss.weld.core, org.javassist]
WARNING [javax.enterprise.resource.webcontainer.jsf.context] (http-localhost/127.0.0.1:8080-2) JSF1091: No mime type could be found for file favicon.ico.  To resolve this, add a mime-type mapping to the applications web.xml.

(8) A list of entities is displayed on the left of the screen
-- I cannot see anything on the left of the screen, where should I look? Could you possibly provide a screenshot?

Comment 7 sgilda 2014-11-13 14:44:42 UTC
Adding Lincoln and Matej to the bug.

I can fix the typos, but I need their help with the errors.

(Lincoln does not seem to be on Bugzilla. I will ping him separately)

Comment 8 Lincoln Baxter III 2014-11-13 19:11:40 UTC
This is related to: https://issues.jboss.org/browse/FORGE-2026 which does not yet have a fix. It is a sporadic issue from what we can tell. Could you please add your environment details to that issue? Thank you.

Comment 10 Lincoln Baxter III 2014-11-13 20:36:04 UTC
Additionally, Forge generated applications work on every version of WildFly and EAP (that we know of). If a specific issue is found with an application, that's generated successfully, that causes it to fail to run on a version of EAP, then please definitely open a bug in the FORGE JIRA project (and probably also in EAP, since Forge generated JSF projects follow Java EE standards to the letter!)

Comment 16 sgilda 2014-11-18 13:23:14 UTC
This works great for me. Are you on this version of JBoss Developer Studio?

Version: 8.0.0.GA
Build id: GA-v20141020-1042-B317
Build date: 20141020-1042

Ill attach my logs and screenshot.

Comment 17 sgilda 2014-11-18 13:28:40 UTC
Created attachment 958589 [details]
Output from generate.fsh

Log from 'run generate.fsh' command.

Comment 18 sgilda 2014-11-18 13:29:32 UTC
Created attachment 958590 [details]
Deployment log

Comment 19 sgilda 2014-11-18 13:33:34 UTC
Created attachment 958594 [details]
Screen shot of running application

Comment 21 sgilda 2014-11-18 15:05:48 UTC
Nikoleta is going to upgrade her JDK from 1.7.0_67 to 1.7.0_71 or later and try this again.

Comment 22 Nikoleta Hlavickova 2014-11-21 10:07:09 UTC
I got the same result with JDK 1.7.0_71, too. 

I'm not sure, however, if the forge run with this version because I didn't see it in the console - but I assume it uses the same java as JBDS. What I did is: upgraded JDK version, during JBDS 8.0.0 installation chose the new JDK and then followed instructions in the quickstart's readme.

Comment 23 sgilda 2014-11-21 12:28:57 UTC
I'm at a loss then. I'm using the same versions of that you are using:

Fedora 20 3.16.6-200
JBDS 8.0.0.GA 
JDK 1.7.0_71

Looks like we need to get the Forge team involved.

Comment 25 sgilda 2014-11-21 17:27:31 UTC
Created attachment 959884 [details]
Screen shot showing how the broken application displays

Comment 31 Nikoleta Hlavickova 2014-12-15 08:37:10 UTC
Created attachment 968825 [details]
Server log with errors and warnings logged during deploy

Comment 32 Nikoleta Hlavickova 2014-12-15 08:37:59 UTC
I can still see errors and warnings logged during deploy, reported as (7) in comment 6.

Comment 34 sgilda 2014-12-17 15:51:13 UTC
Ignore the previous comment.

gastaldi fixed the duplicate error issue with this commit: https://github.com/jboss-developer/jboss-eap-quickstarts/commit/5304666718e6406ea47318a3fbaba69be0e03285

I removed the warrning about ths scaffold error and added a note about the Hibernate errors in this commit: https://github.com/jboss-developer/jboss-eap-quickstarts/commit/dc941f405098af1322cda7c9426235a417b0710b

See related bug 1175360.

Comment 36 Nikoleta Hlavickova 2015-01-16 14:41:43 UTC
After fixing the hibernate issues errors are no longer logged, only the warnings are present in EAP 6.4.0.ER1:

WARN  [org.hibernate.ejb.Ejb3Configuration] (ServerService Thread Pool -- 50) HHH000059: Defining hibernate.transaction.flush_before_completion=true ignored in HEM
WARN  [org.hibernate.dialect.H2Dialect] (ServerService Thread Pool -- 50) HHH000431: Unable to determine H2 database version, certain features may not work

This is the last issue I can see in the forge-from-scratch quickstart.

Comment 37 sgilda 2015-01-20 15:55:11 UTC
Nikoleta, I still see this warning as well:

JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.

It appears on the 14th line in the server console:

INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.6.Final-redhat-1
INFO  [org.jboss.msc] (main) JBoss MSC version 1.1.5.Final-redhat-1
INFO  [org.jboss.as] (MSC service thread 1-6) JBAS015899: JBoss EAP 6.4.0.Beta1 (AS 7.5.0.Final-redhat-17) starting
INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found forge-example.war in deployment directory. To trigger deployment create a file called forge-example.war.dodeploy
INFO  [org.xnio] (MSC service thread 1-5) XNIO Version 3.0.12.GA-redhat-1
INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
INFO  [org.xnio.nio] (MSC service thread 1-5) XNIO NIO Implementation Version 3.0.12.GA-redhat-1
INFO  [org.jboss.remoting] (MSC service thread 1-5) JBoss Remoting version 3.3.4.Final-redhat-1
INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 39) JBAS011800: Activating Naming Subsystem
INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013371: Activating Security Subsystem
INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 37) JBAS012615: Activated the following JSF Implementations: [main, 1.2]
INFO  [org.jboss.as.security] (MSC service thread 1-6) JBAS013370: Current PicketBox version=4.1.1.Final-redhat-1
WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 46) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.

Can you check again?

Comment 38 Nikoleta Hlavickova 2015-01-21 13:39:27 UTC
(In reply to sgilda from comment #37)
> Nikoleta, I still see this warning as well:
> 
> JBAS010153: Node identifier property is set to the default value. Please
> make sure it is unique.

This one is expected and is logged during clean EAP startup, for detailes see BZ 1072312

Comment 39 sgilda 2015-01-21 13:55:34 UTC
Nikoleta, yes. I just meant I plan to leave that warning in the README file and this is ready for verification after the next build. You had moved it back to 'assigned'.

Comment 40 Nikoleta Hlavickova 2015-02-11 15:30:46 UTC
At the bottom of the Readme there is another note about errors:
Note: You can ignore the following error messages as the hibernate-sequence sequence does not exist.
-- this is no longer valid, no errors are logged.

Regarding the JBAS010153 warning:
I don't mind it is in the readme, but it is present in all quickstarts. We should either include it in all quickstarts' readmes or in any of them. Because it is not a quickstarts related warning and it is logged on clean EAP startup, we should probably ignore it. What do you think?

Comment 41 sgilda 2015-02-11 20:12:59 UTC
I totally agree. :-)

Fixed in this commit: 
https://github.com/jboss-developer/jboss-eap-quickstarts/commit/7b801c76f6628e0103b2834520199da6d6701026

Comment 42 Nikoleta Hlavickova 2015-02-27 12:06:35 UTC
Verified with EAP 6.4.0.ER3.