Matt RaibleMatt Raible is a writer with a passion for software. 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.
You searched this site for "roller". 153 entries found.

You can also try this same search on Google.

Upgrading to Tomcat 6

Erik did it, so I tried it as well. This site is now running Tomcat 6.0.10 and it has to be the least painful major Tomcat upgrade I've ever done. By major, I mean upgrading from one version number (5.5.17) to the next. Apparently, no XML files changed (like they did from 4.1.x -> 5.0.x -> 5.5.x) because I was able to copy over conf/server.xml and conf/Catalina/** without any issues. The only change I had to make was to copy commons-logging.jar from Roller's WEB-INF/lib to JSPWiki's.

I have seen a couple of the following errors in my log files since I upgraded, so if you see any strange behavior, please let me know.

2-Mar-2007 12:36:10 AM org.apache.tomcat.util.http.Parameters processParameters
WARNING: Parameters: Character decoding failed. Parameter skipped.
java.io.CharConversionException: EOF
        at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:83)
        at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:49)
        at org.apache.tomcat.util.http.Parameters.urlDecode(Parameters.java:410)
        at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:392)
        at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:508)
        at org.apache.tomcat.util.http.Parameters.handleQueryParameters(Parameters.java:266)
        at org.apache.catalina.connector.Request.parseParameters(Request.java:2404)
        at org.apache.catalina.connector.Request.getParameterValues(Request.java:1089)
        at org.apache.catalina.connector.RequestFacade.getParameterValues(RequestFacade.java:396)
        at javax.servlet.ServletRequestWrapper.getParameterValues(ServletRequestWrapper.java:189)
        at org.acegisecurity.wrapper.SavedRequestAwareWrapper.getParameter(SavedRequestAwareWrapper.java:325)
        at org.apache.roller.ui.rendering.velocity.deprecated.OldPageRequest.(OldPageRequest.java:164)
        at org.apache.roller.ui.rendering.velocity.deprecated.RedirectServlet.figurePageRedirect(RedirectServlet.java:285)
        at org.apache.roller.ui.rendering.velocity.deprecated.RedirectServlet.doGet(RedirectServlet.java:131)

I tested AppFuse 2.0 on Tomcat 6.0.10 earlier today and impressed that 1) Cargo worked perfectly and 2) most of the web frameworks worked. Which one didn't? You guessed it - good ol' JSF. That's OK though, the JSF version of AppFuse (MyFaces 1.1.5 with Facelets 1.1.11) doesn't work with Jetty 6.1.1 either. The good news is I found a workaround - removing the el-api dependency from my pom.xml makes it work on both.

    <dependency>
        <groupId>javax.el</groupId>
        <artifactId>el-api</artifactId>
        <version>1.2</version>
    </dependency>

If I remove this dependency, everything works fine on Tomcat 6.0.10 and Jetty 6.1.1. Unfortunately, it seems this dependency is needed for Tomcat 5.x. Hopefully some fancy stuff with Maven profiles can fix this incompatibility.

Posted in Java at Mar 02 2007, 12:44:46 AM MST 10 Comments

The Adventure is Over

After 1 year and 7 months, the big adventure is over. It was a great ride with lots of really cool people. As of Tuesday, operations at Virtuas have ceased to exist and everyone was let go. It's not a big surprise - most of us knew it was coming. I won't go into the details of why it was shutdown because I don't think it's that important. Suffice to say, it was a great job and I really enjoyed working with the folks I did.

So what does this mean for me? What's next?

I hope to go back to doing independent consulting like I was before Virtuas. When I was doing my own thing, I never had to travel, earned good rates and enjoyed 40-hour work weeks. That sounds pretty nice after the once-a-month traveling I was doing.

What does this mean for AppFuse 2.0? I hope the release schedule won't change, but it might. I was hoping to get a fair bit done this week, but it's been nuts with the shutting down festivities and the "moving out" drama. With any luck, I'll get a gig soon and I can concentrate on AppFuse development (and relaxing) until my start date.

If you're looking to hire an enthusiastic Web + Java Developer, please take a look at my resume or send me an e-mail.

Posted in Java at Jan 18 2007, 09:14:15 PM MST 20 Comments

Learn about Geronimo tonight and AppFuse on Thursday

If you happen to be in downtown Denver tonight, and you're interested in Geronimo, you may want to stop by the Rock Bottom Brewery for the Geronimo Special Interest Group. IBM is sponsoring the food and beverages and Bill Dudney will be providing the conversation. I highly recommend attending if you can as there will be a plethora of good beverages for all. I won't be missing it.

Also, for those interested in learning more about AppFuse, I'll be speaking at the Denver JBoss User Group on Thursday night. There's a lot of cool stuff happening in AppFuse's SVN right now. This is, in large part, caused by a number of new committers: Mike Horwitz, Bryan Noll and David Whitehurst.

Mike has done a lot of work to allow Maven to recognize a WAR's dependencies. Furthermore, he's in the process of trying to get this functionality added to the maven-war-plugin. Bryan Noll (a.k.a. "Country Bri") has recently converted the data module to have a Generics-based generic DAO implementation for Hibernate and iBATIS. Bryan has recently become an OpenJPA committer as well - so feel free to start harassing him about doing the JPA implementation for AppFuse. Finally, David has been working feverishly on the AppFuse Maven Plugin that replaces AppGen. Welcome aboard gents and thanks for all your contributions so far!

Posted in Java at Nov 14 2006, 02:43:08 PM MST 2 Comments

TSS runs on Tomcat?

Looks like TheServerSide.com runs on Tomcat - or at least that's what their 404 page says. I don't know which is better - TSS's 404, Javablog's 404 (blank page) or JavaLobby's. It's hard to believe that major sites like these don't have better 404 pages.

For those of you who want to add a 404 page to your Java-based webapp, it's as simple as adding the following to your web.xml:

    <error-page>
        <error-code>404</error-code>
        <location>/404.jsp</location>
    </error-page>

Props to InfoQ for implementing a 404 page, even if it is rather useless.

Posted in Java at Sep 21 2006, 12:28:22 PM MDT 10 Comments

AppFuse 2.0 Status

I managed to get most of AppFuse's code moved over to a Maven 2 structure this week. I have tests working in the hibernate/ibatis projects, as well as the service project, but not in the web tier projects yet. I do have everything compiling though. ;-)

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] AppFuse ............................................... SUCCESS [2.228s]
[INFO] AppFuse Common Data Module ............................ SUCCESS [1.681s]
[INFO] AppFuse Hibernate Module .............................. SUCCESS [0.809s]
[INFO] AppFuse iBATIS Module ................................. SUCCESS [0.630s]
[INFO] AppFuse Data Modules .................................. SUCCESS [0.008s]
[INFO] AppFuse Service Module ................................ SUCCESS [0.696s]
[INFO] AppFuse Common Web Module ............................. SUCCESS [2.817s]
[INFO] AppFuse JSF Module .................................... SUCCESS [4.410s]
[INFO] AppFuse Spring MVC Module ............................. SUCCESS [4.038s]
[INFO] AppFuse Struts 2 Module ............................... SUCCESS [4.954s]
[INFO] AppFuse Tapestry Module ............................... SUCCESS [4.042s]
[INFO] AppFuse Web Modules ................................... SUCCESS [0.007s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26 seconds
[INFO] Finished at: Fri Aug 18 15:06:54 MDT 2006
[INFO] Final Memory: 11M/26M
[INFO] ------------------------------------------------------------------------

If you'd like to review any of the work done thus far, I've uploaded my latest work to:

http://static.appfuse.org/downloads/appfuse2-20060817.zip

The major issue I've encountered to date can be reviewed on the Maven user mailing list. If you happen to try things out, the best thing to do is post feedback to the dev list. I'm considering another device-free weekend, so I may not respond until Monday.

Posted in Java at Aug 18 2006, 03:17:31 PM MDT 14 Comments

DJUG Tonight: Portals, MyFaces and Dojo

Tonight's Denver JUG meeting should be a good one. Scott Ryan is going to do a presentation on Portals, followed by Bill Dudney on integrating MyFaces and Dojo. Both presentations look interesting, but I really like what's in Scott's description:

The real questions is what really makes up a portal and what makes it different from just a normal AJAX enabled website. In this basic concepts presentation we will look at the components that make up a modern portal framework. We will look at the common architecture of this framework and what pieces and parts you should expect to find inside a portal framework. We will examine several commercial and Open Source portal frameworks including PHP and Java based portal framework. We will look at some of the tools that enable you to develop and configure a portal and if we have time we will look at installing and developing with a common open source portal framework.

With any luck, I'll be able to blog both talks.

In case you weren't aware, Scott has also done a fair amount of work migrating AppFuse to Maven 2, along with Brian Topping. Scott has put together an appfuse-maven-plugin and Brian has converted an existing AppFuse project to Maven 2. Read more about the move to Maven 2 in this mailing list thread.

Don't forget the best part of DJUG - networking at the Rock Bottom Brewery!

Posted in Java at Jun 14 2006, 09:34:02 AM MDT Add a Comment

The T2000 Arrives

I received my T2000 server from Sun yesterday, and now it sits in its original packaging in my basement. I may not even unwrap and install it. When I originally ordered the server, I heard you could blog about it and possibly win a free one. Since then I've heard different; there's a contest with many entering, and they're only giving away a couple of them. Because of this, I've somewhat lost my motivation to install the sucker. Partly because I know I'll have to send it back, and partly because it doesn't look that fast. Regardless, it's nice to have Jeff's setup instructions if I do decide to assemble/install it.

Right now, my schedule is packed full of client work - all the way until mid-June. So if I'm going to build this bad boy, it'll have to be as part of my "late night" schedule. Right now, that's booked with Spring Live, designs for the CSS Framework and AppFuse/Equinox development.

To further justify my lack of motivation, I don't think the T2000 will solve my OOM issues with CruiseControl and Ant. I've been talking with one of the Ant developers, and it appears to be caused by the <copy> task in Ant. With any luck, I'll find some time to setup CruiseControl and do some performance testing of web frameworks before the T2000 goes back in mid-June, but it doesn't look good right now.

Posted in Java at Apr 18 2006, 09:27:01 PM MDT 8 Comments

[TSSJS] Apache Geronimo Prime Time with Jeff Genender

I'm sitting in Jeff's talk now, getting ready to listen to him ramble on about Geronimo. The room is about half full, and it's one of the smaller rooms. However, people are still streaming in, and it's the furthest room from the main conference area.

Jeff started his presentation with a little "Open Source Arcade" fun. The cartoon depicted a pac-man game with JBoss and Geronimo and resulted in a loud applause from the audience. This talk is going to cover Geronimo's architecture, how to use it, how to configure it, what it doesn't have and address common concerns.

Geronimo is a conglomeration of best-of-breed open source projects. Rather than reinventing the wheel, Geronimo embraces and reuses other open source projects: Axis, MX4J, ServiceMix, Spring, ActiveMQ, Jetty, Tomcat, Derby, Tranql, Apache Directory Server and OpenEJB. There's many others, but these are the headliners.

Geronimo is a carpet roll. Just like a carpet, it allows you to roll-your-own application server. Rather than using all the pieces of J2EE, you can just pick the ones you need? Currently, Geronimo ships with a collection of pre-configured assemblies: j2ee-tomcat-server, j2ee-jetty-server, minimal-tomcat-server and web-jms-tomcat-server. The last two will be available in the 1.1 release. The nickname for minimal-tomcat-server is "Little G".

Why another J2EE application server? Because J2EE is now a commodity. You used to have to spend a lot of money for J2EE servers. Now open source projects have commodotize J2EE and flattened the landscape. Also, the other application servers are LGPL and Geronimo is Apache Licensed, which is much more friendly to businesses.

Geronimo isn't just an application server, but also a top-level apache project with a healthy and active community. There are many other components coming out of this project, including:

  • The Geronimo API/Kernel/Assemblies/App Server
  • GBuild - Open Source Testing
  • DevTools - Eclipse Plugin for Geronimo Application Development with the Web Tools Platform (WTP)
  • J2EE Specifications - open source versions, eliminating the jta.jar problem you get with Maven. In my experience, most of these work, but Geronimo's javamail implementation doesn't work last time I tested it.
  • Home for OpenEJB, ActiveMQ, ServiceMix, Yoko (Corba) and XBean - all stand-alone sub-projects.

The Kernel of Geronimo *is* what is known as Geronimo. It controls the component (GBean) Lifecycle. A GBean is the Glue, the Wrapper, a Plugin to the Kernel. It conforms to JSR-77, the J2EE Management Specification and controls lifecycle, running states and naming conventions. The GBean architecture allows for simple development - you just need to implement the GBeanLifecycle, declare the GBean in a Plan (IoC) and deploy it. Plugging in 3rd party components is easy - for example Apache Directory and Quartz. Jeff wrote an article showing how to do this.

Jeff is now walking through the directory structure, which is pretty standard:

bin
config-store
deploy
docs
lib
repository (similar to Maven 1's structure)
schema
var

If you're familiar with Tomcat, Geronimo's "bin" directory is very similar. There's startup.sh/.bat, geronimo.sh and you can also use java -jar ./server.jar to start the server. Apparently, many of the scripts were copied from the Tomcat project.

Interestingly enough, my MacBook Pro's battery has been *much* more efficient today. I've been running for about 2.5 hours and the battery says it still has over an hour left. I believe this is largely because I've had my airport turned off most of the day.

Geronimo's Web Console is one of the nicer looking consoles I've seen for application servers. The user accounts for this are set in $GERONIMO_HOME/var/security/users.properties. It was donated by Abock (sp?) and I believe it's built on Pluto. For deploying applications, you can use the web console, drop WARs/EARs into the deployer directory or use the deployer tool (deployer.sh). When using the deployer tool, you'll need to have a plan file.

A plan file is an XML document (external or internal depending on nature of plan file). It's a descriptor to extend your application (setup JNDI DataSources, etc.) and similar to jboss-web.xml and weblogic.xml. Embedded examples: geronimo-application.xml, geronimo-web.xml, geronimo-ra.xml. For external plan files, you can use any name for the file. This file describes the GBean's attributes and references, as well as its dependencies. There are many different types of plans to describe information: web, application, resource adapters, security, naming references, EJB, schemas (in $GERONIMO_HOME/schemas directory).

The $GERONIMO_HOME/var/config/config.xml is Geronimo's central configuration file and allows you to override default values, as well as configure (or disable) GBeans. However, you can use the web console to configure everything in this file - and often it's much easier.

Now Jeff is going to do a demo of deploying and configuring Roller on Geronimo. This should be good, especially since he expects Murphy's Law, "if something can go wrong, it will", to come into play. He's showing us the plan file and how he had to hide a few classes, to prevent Geronimo's classes from conflicting. Jeff tried to show us how Geronimo allows you to download JDBC Drivers from w/in the console. Doh! We're in a conference room without an internet connection. Jeff had a backup plan and was able to successfully create a connection pool. After creating a security realm, he deployed roller.war and it all worked.

What Geronimo doesn't have? It lacks full clustering with respect to EJB/JNDI/Distributed cache. It *does* have full clustering with session replication and fail-over for the Tomcat web component, which fits 90% of clustering use cases. Uses Tomcat Clustering GBeans. Also, it can't run with Java 5 (only with 1.4.2) b/c the Corba component doesn't work with Java 5.

Now Jeff is doing Q&A, so I decided to try out my connecting to the Net via Bluetooth. It's actually pretty fast, GMail is surprisingly fast. From Bandwidth Speed Test, here are my results:

Communications: 87.1 kilobits per second
Storage: 10.6 kilobytes per second
1MB file download: 1.6 minutes
Subjective rating: Slow

Posted in Java at Mar 24 2006, 01:39:01 PM MST

Sun's Guerilla Cannibal Team

James Governor:

... Sun would do well to build a new team tasked with putting pressure on its own software portfolio. This disruptive influence would ideally eschew technologies associated with the Java Enterprise System. Instead it would concentrate on other issues such as establishing a business model for the Roller blogging platform, or working out a non-virtual machine story for scripting languages. Doing cool things with Rome and Atom. Focusing on mashups, Web 2.0, Read/Write and programmableweb and new ways of getting things done. Oh yeah - AJAX.
...
So who is on the A-Team, in my view?

  • Hal Stern - Hal is a playful, but could play the role of Corporate Guy on the guerilla team. As a Sun Services representative he can bring some very useful resources to the table. Many of the new approaches in web 2.0 require hosting. That's a potential services play. Note that IBM Global Services doesn't like hosting easy software that doesn't require a lot of expensive customisation.
  • Simon Phipps - Simon is currently Sun's chief open source officer. Perhaps counterintuitively, as the rest of the industry begins to realise that Sun isn't "out out get" OSS, his role may become less, rather than more, important. A successful open source strategy requires less top down management of issues. So why not free up Simon to do what he does best. Contrarian Evangelism.
  • Tim Bray - developers respect Tim almost without reservation (although his championing of ATOM has left some people scratching their heads). He even thinks of himself as the honourable opposition. Needs to be on the team because he has a visceral dislike of space architecture and WS-I.
  • Dave Johnson - the developer behind Roller. He just gets the new new thing, and he builds stuff, rather than talking about it.
  • Matt Raible - doesn't work for Sun, but works well with Dave. And RedMonk just likes him...

It's not every day you get listed with a line-up like that! Like Simon Phipps commented - where should I send my resume? Looks like I owe the RedMonk guys a beer or 6. ;-)

Posted in Java at Mar 01 2006, 05:45:33 PM MST 4 Comments

DbUnit Tip: Turn off foreign key constraints when importing into MySQL

One of the issues I've had with using DbUnit is getting tables to load in the proper order from XML. The XML datasets I use to load table data are flat and don't really have any notion of foreign keys and such. Therefore, when you get into a situation where tables have a circular reference, using DbUnit can be a real bitch. I ran into this situation yesterday.

Luckily, I was able to figure out a solution thanks to the help of Mark Matthews. Just add "sessionVariables=FOREIGN_KEY_CHECKS=0" to your JDBC URL. Here's how the "db-load" target in AppFuse looks with this in place:

    <target name="db-load" depends="prepare"
        description="Loads the database with sample data">
        <property name="operation" value="CLEAN_INSERT"/>
        <property name="file" value="metadata/sql/sample-data.xml"/>
        <dbunit driver="${database.driver_class}"
            supportBatchStatement="false" 
            url="${database.url}&amp;sessionVariables=FOREIGN_KEY_CHECKS=0"
            userid="${database.username}" password="${database.password}">
            <operation type="${operation}" src="${file}" format="xml" transaction="true"/>
        </dbunit>

    </target>

Does your preferred database have a similar mechanism for turning off foreign key checks using the connection URL?

Posted in Java at Mar 01 2006, 04:16:48 PM MST 25 Comments