Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

Can you test all of AppFuse?

I'll admit, it's time for me to get a G5. I can no longer test everything in AppFuse in one fell swoop. When I try to run this Ant build file(info) (which I'd like to use with CruiseControl) on my Mac and Linux machines, I get OutOfMemory errors. My PowerBook has ANT_OPTS set to "-Xmx768m" and my Fedora Core 3 box has it set to "-Xms1024M -Xmx1024M". Both machines have 1 GB of RAM. The build dies a lot sooner on Linux (15 minutes), and the PowerBook gets really close to finishing (42 minutes). I'm guessing all the tests would take about 50 minutes on the PowerBook. There are currently 21 AppFuse combinations tested by this script. Spring is used in all of these, so I've eliminated that as a listed option.

NOTE: If you're trying this on Windows, remove the "fixcrlf" call at the beginning of the "test" target.

  1. Struts + Hibernate
  2. Struts + Hibernate and iBATIS
  3. Struts + iBATIS
  4. Struts with AppGen - Generic
  5. Struts with AppGen - Detailed
  6. Spring MVC + Hibernate
  7. Spring MVC + iBATIS
  8. Spring MVC with AppGen - Generic
  9. Spring MVC with AppGen - Detailed
  10. WebWork + Hibernate
  11. WebWork + iBATIS
  12. WebWork with AppGen - Generic
  13. WebWork with AppGen - Detailed
  14. JSF + Hibernate
  15. JSF + iBATIS
  16. JSF with AppGen - Generic
  17. JSF with AppGen - Detailed
  18. Tapestry + Hibernate
  19. Tapestry + iBATIS
  20. Tapestry with AppGen - Generic
  21. Tapestry with AppGen - Detailed

So, the question is - can your machine run all the tests for AppFuse? If so, let me know your specs. I'd love to get this setup for CruiseControl, but if I can't even run it with Ant, I doubt CruiseControl will be any better. I realize I could split things up, but I prefer to have one build file.

Posted in Java at Dec 10 2004, 08:51:02 AM MST 8 Comments
Comments:

I've never tried this in cruisecontrol so don't take this for granted but... may be you could build each part of your 'global' ant using multiple 'project' tag in cruisecontrol config.xml. You could also check if using 'subant' task (instead of ant) has a different behavior...

Posted by Benjamin Francisoud on December 10, 2004 at 04:11 PM MST #

Matt, Do you run this script from CruiseControl? I do NOT have much experience with CC, but in my previous project, we had successfully set upCC (but with hell of a trouble :( ) . The CC specialist in our team faced the same problem of JVM dying. After breaking his head(literally :) ) he found that the ant and CC used the same JVM, he had to increase the JVM memory for CC (not for ant) and that solved the probelem. We really gad CC run without intervention for months together.It was really a great luxury as we were in iterative development mode with lot of people stepping over each other in code. Try your luck! regards, Sekar

Posted by Sekar on December 11, 2004 at 12:41 AM MST #

Matt, what Sekar said is true. You can try 2 things. First, use the antscript attribute of the ant CC tag. That will use a new JVM since it calls Ant itself. You can also add -Xm* options into the CC startup script that can help as well. good luck. jc

Posted by john cavacas on December 11, 2004 at 01:56 AM MST #

Matt, Fixing the software is cheaper - but the dual G5's are not all that expensive. Still if a less expensive Linux build box will do you should consider a simple box with dual or single AMD Opterons or Athlon64s. They absolutely kickass with Java and MySQL - anything that is memory/compute intensive. monarchcomputer.com builds some pretty nice compact (SFF) machines. You can have a nice box for under $1000 unless you want more than a gig of memory (you probably do).

Posted by Richard on December 11, 2004 at 06:27 AM MST #

Sekar and John - I'm not running this script from CruiseControl (yet). I want to get it working via Ant first, and then I'll try it with CC. Originally, I was trying it with CC and was getting OOM errors, so I switched to Ant standalone.

Richard - you do have a point. It's possible there's a memory leak in one of the libraries that AppFuse uses (or in the code itself). In reality, to test everything in a single AppFuse combination only takes a couple of minutes - but the combination of testing them all takes around 45 minutes. I should get a dual AMD to power my Linux box - I've been very impressed with AMD's boxes in the past.

Another option, which I tried before and it worked - was to split the tests into two projects - one for AppGen and one w/o.

Posted by Matt Raible on December 11, 2004 at 04:28 PM MST #

I tried to run YourKit on Appfuse but couldn't get the tests to run:

G:\appfuse\checkout\appfuse-struts\test\web\web-tests.xml:54: Test fail Test step verifytitle (G:\appfuse\checkout\appfuse-struts\test\web\web- tests.xml:63: ) named "we should see the login title again" failed with message "Wrong document title found! Expected "AppFuse ~ Login" but got "An error has o ccurred""

cargo.log contains this error message:

[appfuse-struts-struts-struts] ERROR [http-8180-Processor22] MailEngine.send(49) | Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect

Is there a way to change these settings for the tests (or disable mail) ?

Posted by Thomas Dudziak on December 13, 2004 at 01:06 PM MST #

When i tried to run "ant test-jsp -Dtestcase=PersonTests" the following error displayed: Test step verifytitle named "we should see the login title" failed with message "Wrong document title found! Expected "AppFuse ~ Login" but got "AppFuse ~ ??" " i think the problem is canoo loads the wrong resource properties. it should load ApplicationResources_zh_CN.properties instead of ApplicationResources_en.properteis. How can i corret it? thanks!

Posted by foreverman on January 25, 2005 at 02:40 AM MST #

Thomas - sorry for the late response, your e-mail must've got lost in my inbox. You need an SMTP server installed locally to run the tests, or one that doesn't require authentication.

foreverman - You should be able to change the properties file that's loaded at the top of the test/web/web-tests.xml file. In the future, you might want to subscribe to the AppFuse mailing list for these questions.

Posted by Matt Raible on January 25, 2005 at 03:09 AM MST #

Post a Comment:
  • HTML Syntax: Allowed