sdeby / tapestry5-appfuse

Automatically exported from code.google.com/p/tapestry5-appfuse
0 stars 0 forks source link

Tapestry 5 AppFuse Demo #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Serge,

Version
Latest from trunk - 10/10/2008

OS
Linux Ubuntu 8.4 64bit

Java:-
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)

Note other versions of tapestry5-appfuse are OK e.g.AppFuse Basic Tapestry
Archetype with MySQL as backend.
Why would two diverge like this?

Steps to reproduce the problem.
1. Download from svn
2. cd tapestry5-appfuse-read-only
3. mvn jetty:run-war -Phsqldb

Expected output.
Correct display of login screen.

Seen in error:-
Tests run: 40, Failures: 23, Errors: 0, Skipped: 0, Time elapsed: 6.704 sec
<<< FAILURE!
Failed tests: 
  testGetUserInvalid(org.appfuse.dao.UserDaoTest)
  testGetUser(org.appfuse.dao.UserDaoTest)
...
First line of stack trace:-
nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'sessionFactory' defined in class path resource
[applicationContext-dao.xml]: Initialization of bean failed; nested
exception is java.lang.NoClassDefFoundError:
javax/transaction/TransactionManager                                      

        at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInn
erBean(BeanDefinitionValueResolver.java:230)

However -
mvn jetty:run -Phsqldb
&
mvn jetty:run
will run without startup error but result in missing key: login.heading etc.
This, according to previous post, is because
ApplicationResources.properties has not loaded.

Further issue - related?

In UserForm class
@Component(id = "password",                
                   parameters = { "value=user.password", "validate=required"})
        private HashedPasswordField passwordField;

I have modified parameters = to above where previously this was

@Component(id = "password",                
                   parameters = { "value=user.password", "validate=required",})
        private HashedPasswordField passwordField;
for all @Components that show two parameters.
This class would not otherwise compile. I am unsure what the correct
modification should be, or is this also a configuration error?

These are the instructions in README -
1. Get the source from SVN 
   svn checkout http://tapestry5-appfuse.googlecode.com/svn/trunk/
tapestry5-appfuse-read-only

2. Change to the newly created directory and run the following command
  mvn jetty:run-war -Phsqldb

Any help with thanks,
Adam Saltiel

Original issue reported on code.google.com by adam.sal...@gmail.com on 11 Oct 2008 at 1:29

GoogleCodeExporter commented 9 years ago
Hi Adam,

I switched to Java 1.6 and couldn't replicate this error.
I didn't get any compilation errors (UserForm included).
Based on the error message, it looks like you are missing JTA in your Maven 
repo. Try
adding it retry.

FYI, only the web layer was modified and I use HSQL because it doesn't require 
any
database configuration.

--
Serge

Original comment by serge....@gmail.com on 11 Oct 2008 at 9:05

GoogleCodeExporter commented 9 years ago
Hi Serge,
Thanks for reply.
Unfortunately no luck.
Actually - Caused by: java.lang.NoClassDefFoundError:
javax/transaction/TransactionManager
is problem 2 which doesn't appear when UserForm doesn't compile. So perhaps I 
should
try to fix problem 1 first.
Re problem 2 I do have JTA in my local repo and it I also added the dependency 
to it
in the POM. I don't think it makes any difference, but I could have this all 
wrong
somehow?
Regarding problem 1, I can't think what it may be. I have reinstated all the 
commas,
so I think this means there is something to do with annotations that is not 
correct
on my system.
How can I check that all the dependencies are present and being found? I know 
there
is a list of dependencies on the Tapestry web site, but if this is where the 
problem
is I need more than make sure they are in the local maven repo?
Not sure what that step is.

I wrote above last night and have had further thoughts.
1. It seems likely this is to do with how the space after the comma is 
interpreted.
In which case it is an encoding issue. Looking at output below might indicate 
that?
If this is prob do you know how to unwind, is it just save as UTF8 from my 
editor?
- It should be I guess -
Haven't had time to do this yet.
2. If the issue is that of dependencies I should mention I have changed to 
latest
Tapestry beta release, but don't think that makes difference. The action I 
should
pursue is to make sure all the Tapestry dependencies mentioned on Tap site are 
in POM
by correct version?
Haven't had time to do that yet, or is there a POM I can rely on to copy 
accross from?

Best,
Adam

[INFO] Building AppFuse Tapestry 5 Application                                  

[INFO]    task-segment: [jetty:run-war]                                         

[INFO] ------------------------------------------------------------------------ 

[INFO] Preparing jetty:run-war                                                  

[INFO] [aspectj:compile {execution: default}]                                   

[INFO] [native2ascii:native2ascii {execution: native2ascii-utf8}]               

[INFO] [native2ascii:native2ascii {execution: native2ascii-8859_1}]             

[INFO] [resources:resources]                                                    

[INFO] Using default encoding to copy filtered resources.                       

[INFO] [compiler:compile]                                                       

[INFO] Compiling 1 source file to
/home/adam/workspaces/workspace/tapestry5-appfuse/target/classes
[INFO] ------------------------------------------------------------------------ 

[ERROR] BUILD FAILURE                                                           

[INFO] ------------------------------------------------------------------------ 

[INFO] Compilation failure                                                      

/home/adam/workspaces/workspace/tapestry5-appfuse/src/main/java/org/appfuse/weba
pp/components/UserForm.java:[91,66]
illegal start of expression

Original comment by adam.sal...@gmail.com on 12 Oct 2008 at 1:55

GoogleCodeExporter commented 9 years ago
Hi Adam,

This is really strange! 
Which version of Maven are you using?
I am using version 2.0.9.

The space or commas shouldn't make a difference. See my output in attachment.

Can you try on a different machine (32 bits if possible)?

/Serge

Original comment by serge....@gmail.com on 14 Oct 2008 at 12:50

Attachments:

GoogleCodeExporter commented 9 years ago
This issue will be closed

Original comment by serge....@gmail.com on 6 Nov 2008 at 1:22