[JBoss JIRA] (FORGE-1802) Console hangs when running an invalid script
by Ivan St. Ivanov (JIRA)
[ https://issues.jboss.org/browse/FORGE-1802?page=com.atlassian.jira.plugin... ]
Ivan St. Ivanov commented on FORGE-1802:
----------------------------------------
The thing is that after any exception is thrown here, we go to the Aesh shell. Would you propose a better place for firing those events?
> Console hangs when running an invalid script
> --------------------------------------------
>
> Key: FORGE-1802
> URL: https://issues.jboss.org/browse/FORGE-1802
> Project: Forge
> Issue Type: Sub-task
> Components: UI - Shell
> Affects Versions: 2.5.0.Final
> Reporter: Antonio Goncalves
> Assignee: Ivan St. Ivanov
> Priority: Critical
> Fix For: 2.x Future
>
>
> I am executing a script (with the {{run}} command) and the console hanged and stopped working completely (I had to kill the process). I realized that there is an error in the script (missing {{;}} at the end of line {{--named ISBN}}).
> Take the following script, and save it on a {{hangs.fsh}} file
> {code}
> # ##################### #
> # Creates a new project #
> # ##################### #
> project-new --named cdbookstore --topLevelPackage org.agoncal.training.javaee6adv --type war --finalName cdbookstore ;
> # Setup the persistence unit in persistence.xml
> # ############
> jpa-setup --persistenceUnitName cdbookstorePU ;
> # ######################## #
> # Creates the domain model #
> # ######################## #
> # ISBN constraint
> # ############
> constraint-new-annotation --named ISBN
> # Genre entity
> # ############
> jpa-new-entity --named Genre ;
> jpa-new-field --named name --length 100 ;
> {code}
> Now, execute the script, and see the error message :
> {code}
> [temp]$ run hangs.fsh
> project-new --named cdbookstore --topLevelPackage org.agoncal.training.javaee6adv --type war --finalName cdbookstore ;
> ***SUCCESS*** Project named 'cdbookstore' has been created.
> [cdbookstore]$ jpa-setup --persistenceUnitName cdbookstorePU ;
> ***SUCCESS*** Persistence (JPA) is installed.
> [cdbookstore]$ constraint-new-annotation --named ISBN
> ***SUCCESS*** Bean Validation Constraint Annotations org.agoncal.training.javaee6adv.constraints.ISBN was created
> [ISBN.java]$ jpa-new-entity --named Genre ;
> Exception when parsing/running: jpa-new-entity --named Genre , org.jboss.forge.roaster.model.impl.JavaAnnotationImpl cannot be cast to org.jboss.forge.roaster.model.MemberHolder
> [ISBN.java]$
> {code}
> At this point, I can't interact with the console and need to kill the process.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 6 months
[JBoss JIRA] (FORGE-1802) Console hangs when running an invalid script
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1802?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-1802:
----------------------------------------
I think we should catch this exception and throw as a CommandNotFoundException or something similar. I don´t think this is the appropriate place to fire listeners.
> Console hangs when running an invalid script
> --------------------------------------------
>
> Key: FORGE-1802
> URL: https://issues.jboss.org/browse/FORGE-1802
> Project: Forge
> Issue Type: Sub-task
> Components: UI - Shell
> Affects Versions: 2.5.0.Final
> Reporter: Antonio Goncalves
> Assignee: Ivan St. Ivanov
> Priority: Critical
> Fix For: 2.x Future
>
>
> I am executing a script (with the {{run}} command) and the console hanged and stopped working completely (I had to kill the process). I realized that there is an error in the script (missing {{;}} at the end of line {{--named ISBN}}).
> Take the following script, and save it on a {{hangs.fsh}} file
> {code}
> # ##################### #
> # Creates a new project #
> # ##################### #
> project-new --named cdbookstore --topLevelPackage org.agoncal.training.javaee6adv --type war --finalName cdbookstore ;
> # Setup the persistence unit in persistence.xml
> # ############
> jpa-setup --persistenceUnitName cdbookstorePU ;
> # ######################## #
> # Creates the domain model #
> # ######################## #
> # ISBN constraint
> # ############
> constraint-new-annotation --named ISBN
> # Genre entity
> # ############
> jpa-new-entity --named Genre ;
> jpa-new-field --named name --length 100 ;
> {code}
> Now, execute the script, and see the error message :
> {code}
> [temp]$ run hangs.fsh
> project-new --named cdbookstore --topLevelPackage org.agoncal.training.javaee6adv --type war --finalName cdbookstore ;
> ***SUCCESS*** Project named 'cdbookstore' has been created.
> [cdbookstore]$ jpa-setup --persistenceUnitName cdbookstorePU ;
> ***SUCCESS*** Persistence (JPA) is installed.
> [cdbookstore]$ constraint-new-annotation --named ISBN
> ***SUCCESS*** Bean Validation Constraint Annotations org.agoncal.training.javaee6adv.constraints.ISBN was created
> [ISBN.java]$ jpa-new-entity --named Genre ;
> Exception when parsing/running: jpa-new-entity --named Genre , org.jboss.forge.roaster.model.impl.JavaAnnotationImpl cannot be cast to org.jboss.forge.roaster.model.MemberHolder
> [ISBN.java]$
> {code}
> At this point, I can't interact with the console and need to kill the process.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 6 months
[JBoss JIRA] (FORGE-1802) Console hangs when running an invalid script
by Ivan St. Ivanov (JIRA)
[ https://issues.jboss.org/browse/FORGE-1802?page=com.atlassian.jira.plugin... ]
Ivan St. Ivanov commented on FORGE-1802:
----------------------------------------
OK, found the reason for the hanging shell
Basically, when you run scripts, the Run command will execute the commands one after the other. It will wait until the command returns a result (success or failure) or until a timeout of 500 seconds passes.
The issue doesn't come when the command *execution* throws an exception. Then the command execution listener's postCommandFailure method will be run and the run script command will not hang - it will report an error.
The real issue occurs when the command *initialization* fails for some reason. In that case one of he ForgeCommandRegistry methods would throw an exception. The problem with that exception is that it gets lost somewhere in AeshShell and there is nobody to notify the command execution listeners about the failure. So the execute method in the RunCommand class will run for the full 500 seconds waiting in vain for a result.
Now, I've hacked a quick solution to this problem, that works:
https://github.com/ivannov/core/commit/5ed84f5f3ce5fedae2bfa100f7e270cc64...
I just need an advise from someone more knowledgeable:
1) Having so many nulls on line 132 is fine for RunCommand.ScriptCommandListener, but probably this does not apply for all the possible listeners that may come to this point. Obviously there is no Command object so far, but can I get somehow UIExecutionContext? I only got a UIContext
2) I just fire the failure notification when parsing of the command doesn't succeed. I can also spot some other candidates in this class. But are these all the locations that we must fire the event?
Cheers,
Ivan
> Console hangs when running an invalid script
> --------------------------------------------
>
> Key: FORGE-1802
> URL: https://issues.jboss.org/browse/FORGE-1802
> Project: Forge
> Issue Type: Sub-task
> Components: UI - Shell
> Affects Versions: 2.5.0.Final
> Reporter: Antonio Goncalves
> Assignee: Ivan St. Ivanov
> Priority: Critical
> Fix For: 2.x Future
>
>
> I am executing a script (with the {{run}} command) and the console hanged and stopped working completely (I had to kill the process). I realized that there is an error in the script (missing {{;}} at the end of line {{--named ISBN}}).
> Take the following script, and save it on a {{hangs.fsh}} file
> {code}
> # ##################### #
> # Creates a new project #
> # ##################### #
> project-new --named cdbookstore --topLevelPackage org.agoncal.training.javaee6adv --type war --finalName cdbookstore ;
> # Setup the persistence unit in persistence.xml
> # ############
> jpa-setup --persistenceUnitName cdbookstorePU ;
> # ######################## #
> # Creates the domain model #
> # ######################## #
> # ISBN constraint
> # ############
> constraint-new-annotation --named ISBN
> # Genre entity
> # ############
> jpa-new-entity --named Genre ;
> jpa-new-field --named name --length 100 ;
> {code}
> Now, execute the script, and see the error message :
> {code}
> [temp]$ run hangs.fsh
> project-new --named cdbookstore --topLevelPackage org.agoncal.training.javaee6adv --type war --finalName cdbookstore ;
> ***SUCCESS*** Project named 'cdbookstore' has been created.
> [cdbookstore]$ jpa-setup --persistenceUnitName cdbookstorePU ;
> ***SUCCESS*** Persistence (JPA) is installed.
> [cdbookstore]$ constraint-new-annotation --named ISBN
> ***SUCCESS*** Bean Validation Constraint Annotations org.agoncal.training.javaee6adv.constraints.ISBN was created
> [ISBN.java]$ jpa-new-entity --named Genre ;
> Exception when parsing/running: jpa-new-entity --named Genre , org.jboss.forge.roaster.model.impl.JavaAnnotationImpl cannot be cast to org.jboss.forge.roaster.model.MemberHolder
> [ISBN.java]$
> {code}
> At this point, I can't interact with the console and need to kill the process.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 6 months
[JBoss JIRA] (FORGE-1645) JavaResource resolve to wrong path after CD
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-1645?page=com.atlassian.jira.plugin... ]
Antonio Goncalves commented on FORGE-1645:
------------------------------------------
Any progress on this issue ? I have the following problem with the Arquillian add-on :
https://github.com/forge/plugin-arquillian/issues/36#issuecomment-45723074
> JavaResource resolve to wrong path after CD
> -------------------------------------------
>
> Key: FORGE-1645
> URL: https://issues.jboss.org/browse/FORGE-1645
> Project: Forge
> Issue Type: Bug
> Components: Parsers / File Manipulation
> Affects Versions: 2.1.1.Final
> Environment: Linux Fedora 20, JDK 1.7
> Reporter: Aslak Knutsen
> Fix For: 2.x Future
>
>
> With the following code
> {code}
> @Inject
> @WithAttributes(shortName = 's', label = "source", required = true, type = InputType.JAVA_CLASS_PICKER)
> private UIInput<JavaResource> source;
> {code}
> Assume the following directory structure:
> x/y/src/main/java/x.java
> * Start forge in folder X.
> * cd to some sub folder Y
> * trigger the 'source' field
> ** command --source src/main/java/x.java
> The JavaResource fail to resolve the underlying file as it's pointing to:
> X/src/main/java/x.java
> It seems it's missing the updated 'current dir' and only resolve from 'original working dir'
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 6 months
[JBoss JIRA] (FORGE-1878) Incorrect command for list on docs
by Michael Rice (JIRA)
Michael Rice created FORGE-1878:
-----------------------------------
Summary: Incorrect command for list on docs
Key: FORGE-1878
URL: https://issues.jboss.org/browse/FORGE-1878
Project: Forge
Issue Type: Bug
Components: Documentation
Reporter: Michael Rice
Priority: Minor
Hey everyone--
I would fix this myself and submit a PR, but not sure how to do it on the github docs.
You have an incorrect instruction on this page: http://forge.jboss.org/docs/using/
You say that the list of commands is "list-commands" but it's actually "command-list". Seems like it's not a big deal, but it cost me 15-20 minutes to figure it out since there is not a ton of extra documentation out there on the web.
Thanks!
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 6 months
[JBoss JIRA] (FORGE-1802) Console hangs when running an invalid script
by Ivan St. Ivanov (JIRA)
[ https://issues.jboss.org/browse/FORGE-1802?page=com.atlassian.jira.plugin... ]
Ivan St. Ivanov edited comment on FORGE-1802 at 6/10/14 5:19 PM:
-----------------------------------------------------------------
I ran the above script and everything went fine:
{code}
[delme]$ run /tmp/crash.fsh
project-new --named cdbookstore --topLevelPackage org.agoncal.training.javaee6adv --type war --finalName cdbookstore ;
***SUCCESS*** Project named 'cdbookstore' has been created.
[cdbookstore]$ jpa-setup --persistenceUnitName cdbookstorePU ;
***SUCCESS*** Persistence (JPA) is installed.
[cdbookstore]$ constraint-new-annotation --named ISBN
***SUCCESS*** Bean Validation Constraint Annotations org.agoncal.training.javaee6adv.constraints.ISBN was created
[ISBN.java]$ jpa-new-entity --named Genre ;
***SUCCESS*** Entity org.agoncal.training.javaee6adv.model.Genre created
[Genre.java]$ jpa-new-field --named name --length 100 ;
***SUCCESS*** Field name created
[Genre.java]$ ***SUCCESS*** Field name created
[delme]$
{code}
Are there any issues here left to be fixed?
was (Author: ivan_stefanov):
I ran the above script and everything went fine:
[delme]$ run /tmp/crash.fsh
project-new --named cdbookstore --topLevelPackage org.agoncal.training.javaee6adv --type war --finalName cdbookstore ;
***SUCCESS*** Project named 'cdbookstore' has been created.
[cdbookstore]$ jpa-setup --persistenceUnitName cdbookstorePU ;
***SUCCESS*** Persistence (JPA) is installed.
[cdbookstore]$ constraint-new-annotation --named ISBN
***SUCCESS*** Bean Validation Constraint Annotations org.agoncal.training.javaee6adv.constraints.ISBN was created
[ISBN.java]$ jpa-new-entity --named Genre ;
***SUCCESS*** Entity org.agoncal.training.javaee6adv.model.Genre created
[Genre.java]$ jpa-new-field --named name --length 100 ;
***SUCCESS*** Field name created
[Genre.java]$ ***SUCCESS*** Field name created
[delme]$
Are there any issues here left to be fixed?
> Console hangs when running an invalid script
> --------------------------------------------
>
> Key: FORGE-1802
> URL: https://issues.jboss.org/browse/FORGE-1802
> Project: Forge
> Issue Type: Sub-task
> Components: UI - Shell
> Affects Versions: 2.5.0.Final
> Reporter: Antonio Goncalves
> Assignee: Ivan St. Ivanov
> Priority: Critical
> Fix For: 2.x Future
>
>
> I am executing a script (with the {{run}} command) and the console hanged and stopped working completely (I had to kill the process). I realized that there is an error in the script (missing {{;}} at the end of line {{--named ISBN}}).
> Take the following script, and save it on a {{hangs.fsh}} file
> {code}
> # ##################### #
> # Creates a new project #
> # ##################### #
> project-new --named cdbookstore --topLevelPackage org.agoncal.training.javaee6adv --type war --finalName cdbookstore ;
> # Setup the persistence unit in persistence.xml
> # ############
> jpa-setup --persistenceUnitName cdbookstorePU ;
> # ######################## #
> # Creates the domain model #
> # ######################## #
> # ISBN constraint
> # ############
> constraint-new-annotation --named ISBN
> # Genre entity
> # ############
> jpa-new-entity --named Genre ;
> jpa-new-field --named name --length 100 ;
> {code}
> Now, execute the script, and see the error message :
> {code}
> [temp]$ run hangs.fsh
> project-new --named cdbookstore --topLevelPackage org.agoncal.training.javaee6adv --type war --finalName cdbookstore ;
> ***SUCCESS*** Project named 'cdbookstore' has been created.
> [cdbookstore]$ jpa-setup --persistenceUnitName cdbookstorePU ;
> ***SUCCESS*** Persistence (JPA) is installed.
> [cdbookstore]$ constraint-new-annotation --named ISBN
> ***SUCCESS*** Bean Validation Constraint Annotations org.agoncal.training.javaee6adv.constraints.ISBN was created
> [ISBN.java]$ jpa-new-entity --named Genre ;
> Exception when parsing/running: jpa-new-entity --named Genre , org.jboss.forge.roaster.model.impl.JavaAnnotationImpl cannot be cast to org.jboss.forge.roaster.model.MemberHolder
> [ISBN.java]$
> {code}
> At this point, I can't interact with the console and need to kill the process.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 6 months
[JBoss JIRA] (FORGE-1802) Console hangs when running an invalid script
by Ivan St. Ivanov (JIRA)
[ https://issues.jboss.org/browse/FORGE-1802?page=com.atlassian.jira.plugin... ]
Ivan St. Ivanov commented on FORGE-1802:
----------------------------------------
Got it!
Actually, even changing Antonio's script by for example getting the command wrong:
{code}
jpa-new-fiel --named name --length 100 ;
{code}
does the job. The shell hangs. If you press Ctrl+C (on Fedora at least) makes it work again.
> Console hangs when running an invalid script
> --------------------------------------------
>
> Key: FORGE-1802
> URL: https://issues.jboss.org/browse/FORGE-1802
> Project: Forge
> Issue Type: Sub-task
> Components: UI - Shell
> Affects Versions: 2.5.0.Final
> Reporter: Antonio Goncalves
> Assignee: Ivan St. Ivanov
> Priority: Critical
> Fix For: 2.x Future
>
>
> I am executing a script (with the {{run}} command) and the console hanged and stopped working completely (I had to kill the process). I realized that there is an error in the script (missing {{;}} at the end of line {{--named ISBN}}).
> Take the following script, and save it on a {{hangs.fsh}} file
> {code}
> # ##################### #
> # Creates a new project #
> # ##################### #
> project-new --named cdbookstore --topLevelPackage org.agoncal.training.javaee6adv --type war --finalName cdbookstore ;
> # Setup the persistence unit in persistence.xml
> # ############
> jpa-setup --persistenceUnitName cdbookstorePU ;
> # ######################## #
> # Creates the domain model #
> # ######################## #
> # ISBN constraint
> # ############
> constraint-new-annotation --named ISBN
> # Genre entity
> # ############
> jpa-new-entity --named Genre ;
> jpa-new-field --named name --length 100 ;
> {code}
> Now, execute the script, and see the error message :
> {code}
> [temp]$ run hangs.fsh
> project-new --named cdbookstore --topLevelPackage org.agoncal.training.javaee6adv --type war --finalName cdbookstore ;
> ***SUCCESS*** Project named 'cdbookstore' has been created.
> [cdbookstore]$ jpa-setup --persistenceUnitName cdbookstorePU ;
> ***SUCCESS*** Persistence (JPA) is installed.
> [cdbookstore]$ constraint-new-annotation --named ISBN
> ***SUCCESS*** Bean Validation Constraint Annotations org.agoncal.training.javaee6adv.constraints.ISBN was created
> [ISBN.java]$ jpa-new-entity --named Genre ;
> Exception when parsing/running: jpa-new-entity --named Genre , org.jboss.forge.roaster.model.impl.JavaAnnotationImpl cannot be cast to org.jboss.forge.roaster.model.MemberHolder
> [ISBN.java]$
> {code}
> At this point, I can't interact with the console and need to kill the process.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 6 months
[JBoss JIRA] (FORGE-1877) Default implementation of .equals fails with Proxy objects
by Jess Sightler (JIRA)
Jess Sightler created FORGE-1877:
------------------------------------
Summary: Default implementation of .equals fails with Proxy objects
Key: FORGE-1877
URL: https://issues.jboss.org/browse/FORGE-1877
Project: Forge
Issue Type: Feature Request
Components: Furnace (Container)
Reporter: Jess Sightler
proxyObjectA.equals(proxyObjectA) returns false
This appears to be because the default .equals method ends up being called on the unwrapped (non-proxied) proxyObjectA, but it is passed the wrapped (proxied) object as the parameter.
One workaround is to always call Proxies.unwrap before calling .equals, but this is error-prone. Perhaps the argument to .equals should be unwrapped by default if it is wrapped?
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 6 months
[JBoss JIRA] (FORGE-1802) Console hangs when running an invalid script
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1802?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-1802:
----------------------------------------
I think the real problem is when a rogue command throws an exception. Try installing the ui-examples addon and run the exception-test command (or create a command that throws unexpected exceptions) in a script.
> Console hangs when running an invalid script
> --------------------------------------------
>
> Key: FORGE-1802
> URL: https://issues.jboss.org/browse/FORGE-1802
> Project: Forge
> Issue Type: Sub-task
> Components: UI - Shell
> Affects Versions: 2.5.0.Final
> Reporter: Antonio Goncalves
> Assignee: Ivan St. Ivanov
> Priority: Critical
> Fix For: 2.x Future
>
>
> I am executing a script (with the {{run}} command) and the console hanged and stopped working completely (I had to kill the process). I realized that there is an error in the script (missing {{;}} at the end of line {{--named ISBN}}).
> Take the following script, and save it on a {{hangs.fsh}} file
> {code}
> # ##################### #
> # Creates a new project #
> # ##################### #
> project-new --named cdbookstore --topLevelPackage org.agoncal.training.javaee6adv --type war --finalName cdbookstore ;
> # Setup the persistence unit in persistence.xml
> # ############
> jpa-setup --persistenceUnitName cdbookstorePU ;
> # ######################## #
> # Creates the domain model #
> # ######################## #
> # ISBN constraint
> # ############
> constraint-new-annotation --named ISBN
> # Genre entity
> # ############
> jpa-new-entity --named Genre ;
> jpa-new-field --named name --length 100 ;
> {code}
> Now, execute the script, and see the error message :
> {code}
> [temp]$ run hangs.fsh
> project-new --named cdbookstore --topLevelPackage org.agoncal.training.javaee6adv --type war --finalName cdbookstore ;
> ***SUCCESS*** Project named 'cdbookstore' has been created.
> [cdbookstore]$ jpa-setup --persistenceUnitName cdbookstorePU ;
> ***SUCCESS*** Persistence (JPA) is installed.
> [cdbookstore]$ constraint-new-annotation --named ISBN
> ***SUCCESS*** Bean Validation Constraint Annotations org.agoncal.training.javaee6adv.constraints.ISBN was created
> [ISBN.java]$ jpa-new-entity --named Genre ;
> Exception when parsing/running: jpa-new-entity --named Genre , org.jboss.forge.roaster.model.impl.JavaAnnotationImpl cannot be cast to org.jboss.forge.roaster.model.MemberHolder
> [ISBN.java]$
> {code}
> At this point, I can't interact with the console and need to kill the process.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 6 months
[JBoss JIRA] (FORGE-1802) Console hangs when running an invalid script
by Ivan St. Ivanov (JIRA)
[ https://issues.jboss.org/browse/FORGE-1802?page=com.atlassian.jira.plugin... ]
Ivan St. Ivanov commented on FORGE-1802:
----------------------------------------
I ran the above script and everything went fine:
[delme]$ run /tmp/crash.fsh
project-new --named cdbookstore --topLevelPackage org.agoncal.training.javaee6adv --type war --finalName cdbookstore ;
***SUCCESS*** Project named 'cdbookstore' has been created.
[cdbookstore]$ jpa-setup --persistenceUnitName cdbookstorePU ;
***SUCCESS*** Persistence (JPA) is installed.
[cdbookstore]$ constraint-new-annotation --named ISBN
***SUCCESS*** Bean Validation Constraint Annotations org.agoncal.training.javaee6adv.constraints.ISBN was created
[ISBN.java]$ jpa-new-entity --named Genre ;
***SUCCESS*** Entity org.agoncal.training.javaee6adv.model.Genre created
[Genre.java]$ jpa-new-field --named name --length 100 ;
***SUCCESS*** Field name created
[Genre.java]$ ***SUCCESS*** Field name created
[delme]$
Are there any issues here left to be fixed?
> Console hangs when running an invalid script
> --------------------------------------------
>
> Key: FORGE-1802
> URL: https://issues.jboss.org/browse/FORGE-1802
> Project: Forge
> Issue Type: Sub-task
> Components: UI - Shell
> Affects Versions: 2.5.0.Final
> Reporter: Antonio Goncalves
> Assignee: Ivan St. Ivanov
> Priority: Critical
> Fix For: 2.x Future
>
>
> I am executing a script (with the {{run}} command) and the console hanged and stopped working completely (I had to kill the process). I realized that there is an error in the script (missing {{;}} at the end of line {{--named ISBN}}).
> Take the following script, and save it on a {{hangs.fsh}} file
> {code}
> # ##################### #
> # Creates a new project #
> # ##################### #
> project-new --named cdbookstore --topLevelPackage org.agoncal.training.javaee6adv --type war --finalName cdbookstore ;
> # Setup the persistence unit in persistence.xml
> # ############
> jpa-setup --persistenceUnitName cdbookstorePU ;
> # ######################## #
> # Creates the domain model #
> # ######################## #
> # ISBN constraint
> # ############
> constraint-new-annotation --named ISBN
> # Genre entity
> # ############
> jpa-new-entity --named Genre ;
> jpa-new-field --named name --length 100 ;
> {code}
> Now, execute the script, and see the error message :
> {code}
> [temp]$ run hangs.fsh
> project-new --named cdbookstore --topLevelPackage org.agoncal.training.javaee6adv --type war --finalName cdbookstore ;
> ***SUCCESS*** Project named 'cdbookstore' has been created.
> [cdbookstore]$ jpa-setup --persistenceUnitName cdbookstorePU ;
> ***SUCCESS*** Persistence (JPA) is installed.
> [cdbookstore]$ constraint-new-annotation --named ISBN
> ***SUCCESS*** Bean Validation Constraint Annotations org.agoncal.training.javaee6adv.constraints.ISBN was created
> [ISBN.java]$ jpa-new-entity --named Genre ;
> Exception when parsing/running: jpa-new-entity --named Genre , org.jboss.forge.roaster.model.impl.JavaAnnotationImpl cannot be cast to org.jboss.forge.roaster.model.MemberHolder
> [ISBN.java]$
> {code}
> At this point, I can't interact with the console and need to kill the process.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 6 months