Wednesday, December 22, 2004

Using c:param doesn't work in portlets

For some reason I cannot get a
<jsp:include page="include/mypage.jsp">
  <jsp:param name="jeffstest" value="26"/>
</jsp:include>

or
<c:import url="include/mypage.jsp">
  <c:param name="jeffstest" value="26"/>
</c:import>

to work inside of a portlet. The page includes okay, but the param is not passed to the request parameters successfully. The odd thing is that the param does get into the querystring!

So for now, my workaround is to do:
<c:set var="jeffstest" value="26" scope="request"/>
<c:import url="include/mypage.jsp"/>


I'd rather use the c:param tag, but for whatever reason it has problems inside a portlet. I'm using Jetspeed 1.6 Fusion (JSR-168 enabled), in case anyone is wondering.

Wednesday, December 15, 2004

Windows Console F7 Menu, Very Cool!

Did you know that from a windows console you can press F7 to open a small menu of your previous commands? Very cool for running ant scripts and the like! I can't believe that I didn't know this!

Here's a list of other Windows 2K/XP Command Console Shortcuts

Friday, December 10, 2004

Google Search with Word Complete

Simply genious! Google Search with Web Complete - Beta

I hope they turn this on in the main site soon! I'll be linking to this until they do...

Wednesday, December 08, 2004

CruiseControl Wiki Down Again!

Is it just me, or is the CruiseControl Wiki down an awful lot? Many times it has seemed very slow or out of commission over the past month that I have really been using it. It's rather frustrating that the main source of documentation is often inaccessible! I still love the product, but just wish the wiki would be more stable and reliable.

Sunday, December 05, 2004

Thursday, December 02, 2004

Firefox FoxyTunes Plugin

I have my second must-have firefox plugin, now that I've been shown the FoxyTunes Plugin. It allows you to control most any music program from the firefox status bar. Very cool! Of course, it still ranks second to the web-developer plugin!

Friday, November 19, 2004

I agree, Eclipse website SUX

I have to completely agree with Anthony, that the Eclipse website SUX! Make 90% of your use cases simple, and this means put the Eclipse IDE download and help screens on your front page! Realize what your breadwinner is and sell it, don't bury it to make it appear on the same level as your other not-so-popular projects! As a first time visitor, weeding through the the projects is mind-boggling and confusing to say the least.

I have spent a lot of time looking for things on their site myself, and more time helping others that I am teaching Eclipse to. The website makes it hard for me to say "Just go to eclipse.org and download it". Especially when you hit the page and all you see is bureaucratic nonsense about the organization. There is a place for this, but not on the front page!

I am not claiming to be a good web designer, but I do claim to recognize good designs, and my site doesn't host one of the most popular Java projects in existence!

Wednesday, November 17, 2004

Jetspeed Fusion, Struts, and Weblogic

I've finally fixed Jetspeed 1.6 Fusion (JSR-168 enabled Jetspeed) to work with struts on Weblogic. This required a code change in Jetspeed to get around a Weblogic bug, but it works! The details are in this thread on the apache jetspeed mailing list.

Thursday, November 11, 2004

Jetspeed 2 on Weblogic - update again

Now I'm attempting to run jetspeed.war alongside my other wars and ears, while not running it in the same ear as everything else. This saves me from having to explode my ear, if I can get it to work.

So far I've seen that the sample apps can be deployed along side the war, with the small addition that all of these wars MUST have this in the web.xml file:

<servlet>
<servlet-name>JetspeedContainer</servlet-name>
<display-name>Jetspeed Container</display-name>
<description>MVC Servlet for Jetspeed Portlet Applications</description>
<servlet-class>org.apache.jetspeed.container.JetspeedContainerServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>
JetspeedContainer
</servlet-name>
<url-pattern>
/container/*
</url-pattern>
</servlet-mapping>


Some of the sample apps were missing this, and it caused problems. But now I'm a bit farther. Next I need to see if wars inside an ear can be brought up by this external jetspeed.war. Very cool stuff so far! I love it!

Wednesday, November 10, 2004

Jetspeed 2 on Weblogic - Finally

Wow, it works!

To get past the issue in my last post, I had to add each of the demo wars into my application.xml. This is a side effect of creating the ear to put my wars into.

Also, I found this page that answered my next error, by telling me to put the 5 jetspeed jars into a shared lib, and add this shared lib to my CLASSPATH in the startWebLogic script. I now have most of the portlets working, but I might move my portal outside the ear and give it a try. It seems like the portal should run alongside my ear, but I'm not sure if that will work...

Jetspeed 2 on Weblogic - part 2

Well I have gotten a little farther since my last post. First I found this thread explaining how to get past the "cannot find OJB.properties" issue.

Then I started getting this:
java.lang.RuntimeException: Failed to initialize prefs api. java.lang.InternalError: Can't instantiate Preferences factory java.lang.ClassNotFoundException: org.apache.jetspeed.prefs.impl.PreferencesFactoryImpl
and found this related post which links to a bug report on the sun website detailing the issue. This told me to stop using the jdk that is bundled with weblogic and use the j2sdk1.4.2_03 that is already on my machine.

Well after I pointed to this jdk, I started getting this issue:
Cannot load Implicit TLDs java.lang.ClassNotFoundException: weblogic/apache/xerces/parsers/SAXParser
which I have seen before. But this time I figured out a fix. In the endorsed directory of j2sdk1.4.2_03 I found some sax, xalan, and xerces jars. I deleted those and the sax parser problem went away.

Now I have to figure out why my portlets show this:
javax.portlet.PortletException: Failed to find Servlet context for Portlet Application: /localeselector at org.apache.jetspeed.container.invoker.ServletPortletInvoker.invoke(ServletPortletInvoker.java:184) at org.apache.jetspeed.container.invoker.ServletPortletInvoker.render(ServletPortletInvoker.java:124) at org.apache.pluto.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:103) at org.apache.jetspeed.container.JetspeedPortletContainerWrapper.renderPortlet(JetspeedPortletContainerWrapper.java:88) at org.apache.jetspeed.aggregator.impl.RenderingJob.run(RenderingJob.java:109) at org.apache.jetspeed.aggregator.impl.Worker.run(Worker.java:142)

Problem Deploying Jetspeed 2 on Weblogic

Here's a quick fix for deploying Jetspeed 2 on Weblogic. First I had to fix a java.net.MalformedURLException. Here's the post on the BEA dev2dev Forums. I just needed to add this to the JAVA_OPTIONS of my startWebLogic script:
-Djava.naming.provider.url=t3://localhost:nnnn
where nnnn is the port configured for this particular WL server.


Next I made a jetspeed.ear folder under applications and exploded jetspeed.war into this. I also added a small application.xml file under jetspeed.ear/META-INF to setup the war module.

Then I copied in these 5 jar files from jetspeed into the root of my ear:
jetspeed-api-2.0-a1-dev.jar
jetspeed-commons-2.0-a1-dev.jar
portals-bridges-common-0.1.jar
portlet-api-1.0.jar
pluto-1.0.1-rc1.jar


Then I added this line to the MANIFEST.MF file under jetspeed.ear/jetspeed.war/META-INF:
Class-Path: jetspeed-api-2.0-a1-dev.jar jetspeed-commons-2.0-a1-dev.jar portals-bridges-common-0.1.jar portlet-api-1.0.jar pluto-1.0.1-rc1.jar

Now I'm stuck on a "cannot find OJB.properties". Hope to find it soon!

Edited: Mar 3, 2005 to add the following:
Hey, I've been linked from the Jetspeed Wiki, cool!

Please see my follow-up posts to this issue:
Jetspeed 2 on Weblogic - part 2
Jetspeed 2 on Weblogic - Finally
Jetspeed 2 on Weblogic - update again
Jetspeed Fusion, Struts, and Weblogic

Also, it appears the commenting system on blogspot has been having some issues, so I cleaned out a few duplicate comments...

Friday, November 05, 2004

Issue: Precompiling with Struts-EL for Weblogic

Edit 10/13/2005: Apparently BEA has a workaround, and it is fixed in Service Pack 4!


For some reason the wlappc task of weblogic blows up when trying to precompile an war that uses the Struts-EL jar. This works fine with only the struts.jar so something is up with the struts-el.jar. Has anyone else seen this problem?

I've found a post about this in the BEA dev2dev Forums. As well as a post on the struts mailing list. So it would appear that this is a global issue between the struts-el.jar and the wlappc weblogic precompiling ant task.

Here is the exception that is received, that seems to point to a MessageResources issue:
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.class$(ELBaseTagBea
nInfo.java:81)
at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.getPropertyDescript
ors(ELBaseTagBeanInfo.java:81)
at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:459)
at java.beans.Introspector.getBeanInfo(Introspector.java:372)
at java.beans.Introspector.getBeanInfo(Introspector.java:207)
at java.beans.Introspector.getBeanInfo(Introspector.java:193)
at weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:13
23)
at weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:1261)

at weblogic.servlet.jsp.StandardTagLib.(StandardTagLib.java:292)
at weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:314)
at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145)
at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:50
15)
at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4853)
at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4699)
at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2094)
at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1880)
at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1753)
at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:963)
at weblogic.servlet.jsp.JspParser.doit(JspParser.java:106)
at weblogic.servlet.jsp.JspParser.parse(JspParser.java:230)
at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:125)
at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258
)
at weblogic.jspc.runJspc(jspc.java:550)
at weblogic.jspc.runJspc(jspc.java:437)
at weblogic.servlet.jsp.JspcInvoker.compile(JspcInvoker.java:163)
at weblogic.appc.compileWAR(appc.java:859)
at weblogic.appc.compileModules(appc.java:650)
at weblogic.appc.compileEAR(appc.java:733)
at weblogic.appc.compileInput(appc.java:458)
at weblogic.appc.runBody(appc.java:184)
at weblogic.utils.compiler.Tool.run(Tool.java:146)
at weblogic.utils.compiler.Tool.run(Tool.java:103)
at weblogic.appc.main(appc.java:1028)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at weblogic.ant.taskdefs.j2ee.CompilerTask.invokeMain(CompilerTask.java:
278)
at weblogic.ant.taskdefs.j2ee.Appc.execute(Appc.java:179)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
at org.apache.tools.ant.Main.runBuild(Main.java:609)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
Caused by: java.lang.NullPointerException
at org.apache.struts.util.MessageResources.getMessageResources(MessageRe
sources.java:577)
at org.apache.struts.taglib.html.BaseTag.(BaseTag.java:94)
... 50 more
- with nested exception:
[java.lang.ExceptionInInitializerError]

Thursday, November 04, 2004

Refactoring with Appfuse

Appfuse is starting a small revolution on the projects that I work with. Through Appfuse [article] I have been able to easily brief co-developers and architect types on the latest open source ideas in J2EE. You see, the projects I have worked on are "big enterprise" J2EE - Weblogic types, and it is hard to sell these people on new ideas. So, slowly we can implement Agile ideas and methods into the archaic processes and development that exists. Xdoclet was one of the first to make it in.

Lately it has been simple things like showing CVS can replace much more expensive CM repositories. Then throwing in ideas like CVSSpam. I'm also trying a JSPWiki and Roller Weblogger, but that seems to be catching on much slower than I had hoped (although using Matt's professional looking redman theme has helped!).

My next step is Cruise Control. After a brief comparison with Anthill, it looks like CC will be our Continuous Integration approach. (Of course both with help from appfuse - CC - anthill).

All of this because of Appfuse! A big thanks to Matt Raible for being open with his experiences and sharing the code behind his project. This has made new concepts easier to integrate with our old project, through the clean organization of his ideas.

After Continuous Integration comes an even harder sell, which may seem easy to many of you agile veterans. The sell of test-driven coding and writing unit tests for all of our code (as I have mentioned before). JUnit, DBUnit, Cactus, StrutsTestCase, JwebUnit, Canoo Webtest, here we come!

(This leaves Hibernate and iBatis to conquer CMP on another day...)

Java Coding Standards

... on one page? I like it!

Sunday, October 03, 2004

Get gmail-lite for gmail PDA access!

I was frustrated with gmail for lacking a pure html version that can be used by PDA browsers. It was one of my complaints with gmail (along with not allowing html tags when composing). After some searching, I found gmail-lite! This is a php module that acts as a pure html proxy to gmail, meaning I can run it on my internal web server and check gmail from our pda at home! I still wish google supported this natively, but gmail-lite seems to do the job well enough for me...

Friday, October 01, 2004

Solution to Slashdot Effect? Mirrordot!

This article on Wired describes a new website called Mirrordot that will automatically mirror any site posted on slashdot. A very cool idea indeed!

As it states in the article, though, I wonder how this will affect the ad revenue of some of the slashdotted sites. On one hand, they won't receive revenue from mirrordot, on the other hand mirrordot will keep their site alive!

Thursday, September 30, 2004

Want to be a Googler? Take the Google Aptitude Test!

Google has released the Google Aptitude Test

Take the GLAT for fun, or even apply for a job at google!

Monday, September 20, 2004

Cygwin and Windows Clipboard Usage

An option that I always forget about when installing cygwin is how to enable usage of the windows clipboard. For some reason it seems hard to google for (probably my laziness), so I'm documenting it here.

To enable usage of the windows clipboard from within cygwin, use the -clipboard option from the xwin.exe command. Previously you needed to use xwinclip (or similar), but it is now integrated within Cygwin/X...

Thursday, September 09, 2004

Eclipse Saves The Day (Again!)

I found a new "must use" feature in Eclipse, which comes standard but is turned off by default. Of course, I found it because I was trying to fix a bug in our code. The bug ended up being similar to this:

if (something != null);
{
i++;
}

Notice that extra semi-colon at the end of the if statement? That burned us. (Don't mention the odd "brace on the next line" coding standard that is used the the project I just joined. I don't like it either.)

After fixing it, we wondered if Eclipse could show it as a warning. Of course, Eclipse comes to the rescue again. Under Preferences, select Java | Compiler. Then on the Style tab set "Empty Statement" from Ignore to Warning. This coding mistake could cause such large errors, that I really wish this was a default selection. In fact, after turning on this warning, we immediately found another bug of the exact same kind!

Definitely a bit to remember!

Tuesday, September 07, 2004

gmail invites?

Must have been a slow weekend, or everyone already has an account, because I didn't receive one comment from someone needing a gmail account? Does anyone else need one, because I have 6 more!

Friday, September 03, 2004

g-g-g-g-g-g-gmail

Invites for everyone! Just let me know if you need one, because the first 6 people to leave their addresses will receive an invite!

Thursday, September 02, 2004

Driven by Tests... hopefully

A little late to the test driven side, I am, but I have played with JUnit for a while now. What I'm looking for is best practices to continue this implementation a little further. After some brief research, I have settled on the following setup for our tests:

Unit Testing
JUnit - obviously for unit testing POJO's
-> Cactus - for server side unit testing of ejb's
-> Strutstestcase - for unit testing Action classes. This I'm unsure of, but will look at Raible's project for direction.

Functional/Acceptance Testing
HttpUnit - Http/Html driven tests
-> JWebUnit - Extension driven by code
-> Canoo Webtest - Extension driven by XML

Anyway, if you have any direction for me, please advise!

Tuesday, August 31, 2004

gmail For Everyone!

Who wants a gmail invite? Put your address in my comments, and one will be sent your way. Since I received mine this way a few days ago, I feel obliged to release 6 invites in the wild on my own!

Sunday, August 29, 2004

Gmail Thoughts (4 Pros, 1 Con)

I just have to give a big thanks to Ryan Daigle for hooking me up with a gmail account. Now for my main thoughts...

So far gmail seems to be a great improvement over my old Yahoo! Mail. I really like the "discussion" style of tracking replies. This is very suitable for reading email. I also like the labels that can be applied to messages so they are stored in multiple "folders". The type-ahead on email addresses is also a plus over Yahoo! Mail. Lastly on the pro side, I like being able to send messages without an ad being placed in my outgoing mail.

However, my old complaint about Yahoo! Mail is still a complaint with Gmail. Why can't I compose an HTML email? The FAQ makes me think this will be added in the future, but if they can make gmail this cool so far, why not add HTML composing capability? I'd really like to make it easier on my mom and grandma to see pictures!!

Wednesday, August 11, 2004

Weblogic EJB Compiler Options

We fixed a problem today by setting options for the Weblogic EJB compiler that is used to compile EJBs on the server at deploy time. Of course we should be using WL appc, but even then we'll probably need to use the same options.

Now I need a nice wiki to document these myself, but without one I'll simply post it here.

The Problem


When deploying many large EJBs to Weblogic, without pre-compiling with WL appc, you may find the deploy failing when the server attempts to compile the EJBs. A search through the logs will reveal some Out of Memory errors.

The Fix


* Open the Weblogic server console (usually http://localhost:7001/console/)
* Expand Servers and click on your server name (defaults to myserver)
* Under Configuration|General expand Advanced Options
* Set the following to increase JVM heap size for the compiler:
Extra EJB Compiler Options: -J-ms128m -J-mx256m
of course modify for your own needs

Wednesday, July 28, 2004

Roller Now Simpler to Setup

Where was I when this Roller announcement was made? Roller Now Simpler to Setup

After finding out today that there is a version of Roller with an embedded HSQLDB database, I went and set it up right away. I did a couple of tricks with it, because I already have a Tomcat server running on port 8080. But after a couple of small script changes, I was up and running in less than 20 minutes total!

I had decided against Roller previously because I didn't want to mess with a separate database just to try it out. This makes things much easier for people to go and give it a whirl.

Friday, July 23, 2004

java.net: Using RSS in JSP pages

This is what I've been looking for. A nice example of using a Java API for RSS. Although I wonder if informa is the latest and greatest library to use?
java.net: Using RSS in JSP pages

Thursday, July 22, 2004

WebLogic Server Administration Best Practices

Great tips and tricks straight from the mouth of BEA (thanks for pointing it out Vinny!):
WebLogic Server Administration Best Practices

Thursday, July 15, 2004

Yahoo! Mail is making me want GMail more

I used to be happy with Yahoo! Mail, but they have taken away my favorite feature. A few weeks ago when they "upgraded" the interface to compete with GMail, they dropped the "include HTML tags" option when sending an email. It used to be nice that I could write HTML into my email so that my family could see nice pictures without ever needing to attach huge files. I just used a simple img tag that pointed to my website.

So today I'm just frustrated. I've tried multiple different ways, even coding my entire email as HTML, but Yahoo! will not send it as HTML. Does anyone know if GMail will fix my problem? Can I send HTML emails using GMail? I would love to try it out when its available, and I really hope it fixes my problem. Until then, jasheets1 at good ole yahoo dot com will have to suffice as an email address.

Wednesday, July 14, 2004

I agree. IoC appears to replace factories.

Groboclown hits the nail on the head with his discussion about IoC.
Groboclown's Weblog

This is precisely how I view IoC also! I'm just surprised to see someone else explain it in this way. I only wish I was allowed to use IoC in my environment, because each time I do a MyInterface object = new MyInterfaceImpl() I think that using IoC would be so much cleaner.

Thursday, July 08, 2004

Is Jess The Best Rules Engine Fit For J2EE?

I'm a little disappointed that no real straight answers came from my last entry: Uncommented Bytes: Jess Architecture in a J2EE Environment

So now I'm lead to believe that Jess may truly be difficult to integrate into our highly scalable, distributed, enterprise architecture. Wrapping Jess in a custom RMI server doesn't seem very elegant to me, but as of now it looks like the only solution. As I mentioned in the comments of my other post, if Jess is the reference implementation for JSR 94, wouldn't they come up with a better way to integrate into a J2EE environment?

Wednesday, July 07, 2004

Jess Architecture in a J2EE Environment

We need to implement the Jess rules engine into a clusterable distributed environment. The question lies in how Jess is deployed.

It would appear that it cannot be deployed inside of an App Server because Jess does it's own threading. After some research into JSR 94 (Rules engine API/SPI) it is still unclear how Jess would actually run in our environment. I seem to remember that Clipse ran as a single server instance and that our EJB's across the cluster would access this single instance. I also believe that Jess would have to run in this way, as a single server, however Jess itself is not a server.

So how does an EJB in a cluster access the single instance of Jess? Do we write an RMI server to wrap the Jess instance (as suggested in "Jess in Action"), or do we some how use JCA to connect each App Server to Jess?

So far we've written the RMI wrapper, but it seems like this could be easier.

Eclipse Rises

As I mentioned previously, I was having trouble with the 3.0 release of Eclipse. I thought it was time for an update, as my opinion has improved dramatically.

As a quick background, I have been using Eclipse since early 2003 when I fell in love with it. Eclipse made my life so much easier. I had been longing for an IDE that could refactor, even though I didn't know what to call it. I couldn't understand why imports couldn't be automatic, and compiling couldn't be simpler. Code completion was nice, but I wanted more, and Eclipse delivered.

3.0 was causing me grief in the speed department. However after using it for about a week of actual work I'm not seeing the speed hit anymore on my Windows 2K machine***. I'm loving the Ant integration that finally works for me. Until now I always used Ant externally as the embedded version failed. I did have to point to a 1.5.4 version of Ant since 1.6.x seems to cause problems with a few Weblogic specific tasks (that are poorly written, I might add). I'm getting used to code folding, a feature I didn't think I would use. The "add/remove block comment" option is nice. And JUnit testing seems smoother for some reason. Add with the CVS enhancements and color scheme improvements, and I'm a happy camper!

*** - I do see occasionally a long pause after not using Eclipse for many minutes. Maybe someone has seen a bug report on this?

Tuesday, July 06, 2004

Open Source Portals and Apache Jetspeed Update

A couple of updates from my Commentary on Jetspeed.

First, I was thrilled to see Benjamin of the eXo team respond to my remarks, and also receive great feedback from Stéphane regarding Jahia. Second, my eyes bugged out reviewing my hit counts at bstats (for Blogger users) and seeing that I had been on the front page of TheServerSide.com (sincere thanks to Dion)!

Benjamin mentioned in my comments here, on Punit's blog, and at TheServerSide, that Punit valued JSR 168 highly in his list. My list was merely my opinion, and in no way a challenge to Punit. I was simply trying to add another person's input into the community. I hope that it didn't seem that I was attacking his list, because I was trying to just share my thoughts. This is why at the end of my post I pointed out:
I should do another entry on JSR 168 and why that is not important to us, yet. Jetspeed essentially shelters us from the current hype.
And I still intend to do this. In a nutshell, Jetspeed allows us to write actions and jsp's using their built-in MVC Portlet and thus not have to write portlets of our own (thus making JSR 168 negligible). Using Jetspeed as an "Application Portal" and not as an "Enterprise Portal" allows leverage for us that others are unable to achieve.

And Stéphane, I believe from my testing that Jahia is a great product, however Jetspeed 1 is all that we needed. I too look forward to using Jetspeed 2 when it is released!

So my list stands with Jetspeed in the lead. It will take a great portal to knock it from my list, and as such I hope to evaluate eXo, Jahia, and the others, again in the future. However at this time it is still true that Jetspeed 1.x is the only open source portal that I will trust in our production environment.

Thursday, July 01, 2004

Proxy Breaks Weblogic Web Service Testing

A peculiar error came up while trying to test my weblogic web service. BEA provides a test page for web services that you can use in development. So I went to the page to test my ProofOfConceptService (brilliant name, huh?). I received this error:
weblogic.webservice.tools.wsdlp.WSDLParseException: Failed to retrieve WSDL from http://localhost:80/jetspeed/ProofOfConceptService?WSDL. Please check the URL and make sure that it is a valid XML file [java.io.FileNotFoundException: Response: '403: Forbidden' for url: 'http://localhost:80/jetspeed/ProofOfConceptService?WSDL'] at weblogic.webservice.tools.wsdlp.DefinitionFactory.createDefinition(DefinitionFactory.java:126) at weblogic.webservice.tools.wsdlp.WSDLParser.(WSDLParser.java:76) at weblogic.webservice.WebServiceFactory.createFromWSDL(WebServiceFactory.java:108) at weblogic.webservice.WebServiceFactory.createFromWSDL(WebServiceFactory.java:84) at weblogic.webservice.server.servlet.ServletBase.invokeOperation(ServletBase.java:295) at weblogic.webservice.server.servlet.WebServiceServlet.invokeOperation(WebServiceServlet.java:344) at weblogic.webservice.server.servlet.ServletBase.handleGet(ServletBase.java:266) at weblogic.webservice.server.servlet.ServletBase.doGet(ServletBase.java:158) at weblogic.webservice.server.servlet.WebServiceServlet.doGet(WebServiceServlet.java:255) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

Immediately I keyed in on the "403: Forbidden". So how can I be forbidden to access my localhost? After cruising google and bea newsgroups I only found 1 mention of this and 0 fixes. Then I thought of the line I added to my startup script that adds our proxy configuration to the JVM:
-DproxySet=true -DproxyHost=ourproxy.server.com -DproxyPort=80

This allows our Jetspeed portal to pull in web feeds through our firewall. Turns out that when I removed this the test went fine. It appears the JVM attempts to use the proxy even when I'm accessing the localhost. I guess there's no way around this than to remove the proxy setup line everytime I want to test a local web service. Unless someone knows of a way to tell a JVM to ignore a proxy for certain hosts?

Which Portal? Apache Jetspeed, of course!

Punit asked Which Open Source Portal Server?, and here is my answer:

He lists the top contenders in the open source portal market as:
eXo
Gridsphere
uPortal
Apache Jakarta Jetspeed 2
Liferay

I would mod it to change Jetspeed to version 1 and add Jahia.

About 5 months ago I did a fairly extensive evaluation of the portal market. I chose Apache Jetspeed 1. We are running 1.4 now, but are migrating to 1.5 soon and 2.0 when it is finally released. We are so happy with Jetspeed! At the time of my evaluation it was miles ahead of Liferay, eXo, and uPortal for our purposes.

eXo looks promising, but is/was still in its infancy. uPortal is great for universities, but we need an application portal not an enterprise/university portal. We don't need email/calendar/todo lists. What we need is a framework so our applications can utilize portlets for extensibility and customization. Liferay looked like it needed a new architecture regarding JSR 168.

For us it came down to Jahia and Jetspeed. Jahia is a very nicely done portal that runs on the Jetspeed platform. However I had problems running it in Weblogic. Also Jetspeed was more customizable for our purposes. It handles customization of data and user views. It is very easy to get running and very easy to program for. We use a blend of Jetspeed MVC and Struts for our architecture components. We have been able to extend sections of the Jetspeed code for our purposes too! The Apache Jakarta name is a huge seller in our government environment, and this went a long way in helping me sell the portal above Weblogic's Portal, TIBCO, Plumtree, and Vignette.

Jetspeed 2 looks to be great when it is stable and released. Until then, Jetspeed 1 is all we need. I should do another entry on JSR 168 and why that is not important to us, yet. Jetspeed essentially shelters us from the current hype.

[Update: 12/21/2004] I would now upgrade this to say, pick Jetspeed 1.6 Fusion if you want JSR-168 portlets when migrating from the original Jetspeed. In this way, we can still support our original Jetspeed portlets until they are fully migrated to JSR-168 versions. I would also choose Jetspeed 1.6 Fusion for a new project, but only develop JSR-168 Portlets for it. This way you can easily migrate to Jetspeed 2 when it is final and stable. Take a look at the struts portal bridge, that can be deployed on any portal to use struts in developing your portal apps.

[Update: 2/20/2006] Wow, I'm impressed that people are still hitting this page quite regularly! Some of you may also be interested in my thread related directly to deploying Jetspeed on Weblogic: Jetspeed on Weblogic FAQ

Wednesday, June 30, 2004

Giving Eclipse a Chance

Well I'm still not giving up on Eclipse. I'm going to try a tip that someone left me in the comments of my last entry. That is to basically delete the eclipse settings from my project (imported from 2.1) and create a new project in 3.0. It's worth a shot, especially considering all of the good comments that were left in favor of Eclipse. I really want everything to run smoothly since I have been the biggest promoter of Eclipse here at work. It has just been the greatest tool for me in the past. Wish me luck!

Tuesday, June 29, 2004

What happened to Eclipse?

I've been using the latest 3.0 release of Eclipse for a full day now, and I have to cry out "What happened?". I've been using 2.1.x for many many months now, without so much as a hiccup. However 3.0 has been causing me problems all day. I love the new look, and I love many of the new features (Ant finally works for me!). But it's so slow, even on my beefed up dev box, and it has locked up repeatedly. I'm about a half day away from switching back to my *thankfully* backed up 2.1.3. Well, back to the trusty task manager to kill and restart my instance again... I should have just waited until the first or second maintenance release...

Ant Junit Task mishandles Suites

Maybe I'm missing something, but the Ant Junit task doesn't seem to handle Suites well. What I mean is that the formatters supplied with the base Junit task, when outputting information about a suite, don't spit out details about the class that a test was in. So can't even display this information in the html.

For instance if I had two tests, one in TestClass1 and another in TestClass2 named testMyMethod() and run from the suite AllTests, the output from not distinguish between the two tests.

The "work around" is to use the nested element and specify a:
<fileset includes="**/*.class" excludes="**/AllTests.class" />
However, this runs slower than using test suites.

I did see that in 1.6.2 there will be a new option to fork a single JVM instead of one for each class, but even then this could run faster through test suites.

So for now I have added a vote to bug #24106. I encourage anyone else that is annoyed by this to do the same!

Monday, June 28, 2004

J2SE Tig5r

As reported by David Flanagan and all over the blogosphere, the latest J2SE has been renamed from 1.5 "Tiger" to just 5.0. Maybe next year I can get my company to send me to JavaONE? Yeah right...

Eclipse 3.0 Download

Okay, now that I'm all excited about Eclipse 3.0, and I just can't wait to check it out, I can't get a download speed over 12 KB/s. That's after trying most of the mirrors from our office in Omaha, which normally has blazing connection speeds. I'm not complaining, I'm just anxious to try it out. Especially since I'm giving a brownbag presentation over Eclipse to my fellow workers in less than 2 weeks.

Oh, and the corporate powers have blocked all ports except 80 and mail, leaving bittorrent out of the question... I'll just keep patiently waiting...

Tuesday, May 25, 2004

Firefox slays Eclipse?

It's come to the point that I love Firefox for my browser of choice. If it wasn't for two very major problems. (I understand its only in a 0.8 stage of release so I'm more venting than complaining at this point.)

1) Firefox periodically kills Eclipse. I'm not sure what I click on or do, but its possibly when popping open a new window through javascript. When I switch back to my code, Eclipse crashes saying an SWT error has occurred. I can either reopen Firefox to save Eclipse (faster) or reopen Eclipse (slower and doesn't always fix problem).

2) Copying and pasting in Firefox. I've seen the bug report somewhere, but I'm too lazy to look it up right now. Essentially the copy and paste to the windows clipboard breaks sometimes. Switching tabs seems to fix it. Almost like the copy and paste gets confused between tabs.

Other than that I'm happy. Especially with the Web Developer Extension plugin that someone put on javablogs the other day. It rocks!

Tuesday, May 18, 2004

Spam Advertisement Apology

I feel the need to apologize to the javablogs.com community. You see, I was a user of 2rss.com. They provided (yes, thats past tense) a free atom to rss converter. With Blogger not supporting rss, I have been using 2rss.com to supply javablogs.com with updates.

Today I noticed that someone/something was posting spam to javablogs in my name! Imagine my shock! The links went to some other site than my blog, but the entries definitely looked like they were from me. After some research, I see that 2rss.com has started adding a single spam ad at the bottom of their converter feed; without any notification to the users! Of course, you can pay to remove the ads, but why would I want to pay for this???

Instantly I had to find a new converter. Thanks to
forret.com for a recommendation on feedburner.com. They even have more options than 2rss does.

So, javablogs.com, please accept my apologies for the unruly actions of 2rss.com.

Weather XML, the new frontier?

Today my quest has been to find some standards for disseminating weather data over the web. My initial reaction is, of course, that RSS would be a perfect fit! Technically we'd need to extend RSS to handle the weather data in XML format, but the basis is there. We just need to receive the weather anytime a sensor changes and display it to the user.

The National Weather Service along with NOAA (National Oceanic and Atmospheric Administration) have put up an "Experimental" XML site. From here I can grab an RSS 2.0 feed or a CAP (Common Alerting Protocol) feed. Now CAP is interesting because it was very recently approved by OASIS as a standard.

To my point... CAP seems to be a great standard for Weather Alerts, but what about normal weather data? If I just want to know the wind speed / temp / humidity / etc, then where's the Weather XML standard? I found a couple posts about WeatherML but that was from 2000 and looked abandoned. I'd like our sensors to output a standard markup, but only if we can find one. We just might have to right our own schema for this. Any ideas?

Thursday, May 13, 2004

Atom to RSS converter

I noticed this morning that java.blogs was not picking up my entries. Naturally I assumed it was caused by my switch from jRoller to Blogger yesterday. I checked my configuration and it dawned on me that Blogger uses Atom while java.blogs is looking for RSS. If the differences are new to you, then do a quick google to find numerous information on the political differences.

Anyway, to fix my problem I needed an Atom to RSS converter. Google to my rescue again! I found this little gem, that takes your Atom.xml and spits out valid RSS. I'm not back on java.blogs. Try it for yourself:

atom

atom as rss


Thanks for 2rss.com for their services!

Wednesday, May 12, 2004

Moving in from jRoller

Finally fed up with jRoller, I have now migrated all of my blogs to Blogger. I just couldn't take the downtime any longer. And how could I pass up the new templates and comments on Blogger?!?!

My old blog is here if you're interested in seeing it. No looking back now.