Nov
29
36 Minutes to Get Back On Track
Filed Under Programming | Leave a Comment
I had a 36 minute-long revelation this past Monday while watching this screencast by Sean Kelly.
Sean spends 36 minutes developing two toy applications in each of 5 different frameworks (1 Java, 1 Ruby and 3 Python). The basic gist of the screencast is “why Java/J2EE sucks for web-app development”. I felt he made a tremendously compelling case.
Everything he covered felt very familiar to me. He presents the subject much better than I’ve yet been able to.
I’ve recommended this video to everyone I know doing development. I can’t recommend it strongly enough. It’s 36 minutes that might just help you get your development projects back on track.
Nov
25
The Ongoing Toplink Saga
Filed Under Programming | 1 Comment
Another thing I hate about Toplink. The mapping editor support within JDeveloper is not compatible with the standalone Mapping Workbench. They are built using different offline DB and Java class definitions.
Two tools built by Oracle. Both do the same thing as far as Toplink is concerned. They configure a datasource for Toplink interaction. Yet they use different foundation classes and output configuration files that are incompatible with one another? WTF? Not only that, but they aren’t even smart enough to recognize when this occurs. So when you open a file in one that you created in the other you just get this:
oracle.toplink.workbench.framework.OpenException: java.lang.NullPointerException at oracle.toplink.workbench.scplugin.SCPlugin.open(SCPlugin.java:113) at oracle.toplink.workbench.framework.internal.FrameworkApplication.open(FrameworkApplication.java:689) at oracle.toplink.workbench.framework.internal.FrameworkNodeManager.openCallback(FrameworkNodeManager.java:341) at oracle.toplink.workbench.framework.internal.RunnableProjectLoader.run2(RunnableProjectLoader.java:76) at oracle.toplink.workbench.framework.internal.RunnableProjectLoader.run(RunnableProjectLoader.java:63) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.NullPointerException at oracle.toplink.tools.sessionconfiguration.DTD2SessionConfigLoader.load(DTD2SessionConfigLoader.java:70) at oracle.toplink.tools.sessionconfiguration.XMLSessionConfigLoader.loadConfigsForMappingWorkbench(XMLSessionConfigLoader.java:146) at oracle.toplink.tools.sessionmanagement.SessionManager.getInternalMWConfigObjects(SessionManager.java:149) at oracle.toplink.workbench.scplugin.model.adapter.RootSCAdapter.load(RootSCAdapter.java:110) at oracle.toplink.workbench.scplugin.model.adapter.RootSCAdapter.(RootSCAdapter.java:69) at oracle.toplink.workbench.scplugin.model.adapter.TopLinkSessionsAdapter. (TopLinkSessionsAdapter.java:56) at oracle.toplink.workbench.scplugin.SCPlugin.open(SCPlugin.java:110) ... 5 more
Way to go Oracle. Thanks for making your tools developer friendly.
So I’m off to download and install the 441MB JDeveloper package instead of the 28MB Toplink Workbench. Later.
Nov
18
Disappointed with Toplink+Tomcat Combo
Filed Under Programming | Leave a Comment
I’m working on migrating an application from Weblogic 8 to Tomcat 6. The strict J2EE portions of the migration were cake. Weblogic has some conventions for storing classes and other resources shared among applications deployed to a server. Reverting these conventions to use something simpler and compatible with Tomcat (i.e. common/lib) was easy. Just about everything else was just a matter of getting my projects set up in Eclipse WebTools. I use MyEclipse for Kuali. So it took me a little bit of digging to figure out how to do everything in WebTools. But, all in all an easy process.
Then it came time to configure Toplink. What a nightmare. The docs are years old. And the docs don’t even cover Tomcat. They only cover OC4J, WebLogic, WebSphere. Not surprised by that, just disappointed given the popularity of Tomcat. The configuration files used by Toplink (sessions.xml and project.xml files) need reconfiguring. And the only (documented) way to reconfigure them is to use Toplink Workbench, which I don’t really feel like installing and using (the last thing I need right now is to add something else to the mix).
I searched the OTN forums for help on this. But the only things really mentioned there refer to JPA implementations, one of which this project doesn’t happen to be.
And my least favorite part about this is the exception messages I get from Toplink. They’re completely unhelpful. Here’s an example:
This exception indicates that there’s an error in the username/password combination:
Exception [TOPLINK-4002] (OracleAS TopLink - 10g (9.0.4) (Build 031126)): oracle.toplink.exceptions.DatabaseException Exception Description: java.sql.SQLException: invalid arguments in call Internal Exception: java.sql.SQLException: invalid arguments in call Error Code: 17433
How intuitive is that!? And the best part is that the username/password combination is in both the project.xml and the sessions.xml. So I have to test 4+ combinations to figure out which one is wrong. *sigh*
So, overall I’m not very pleased with Toplink. I’ve used it in the past and thought it was OK. But compared to the relative simplicity of tweaking this sort of thing in Kuali, this is a real pain in the butt.
I’m considering recommending migrating from Toplink to JPA/Hibernate. Kuali’s headed that way. That might be overkill. I’m probably missing something simple. Without a good user community and any kind of helpful documentation it’s going to be a task getting on track.
So how about it Oracle? How about a screencast showing a Tomcat 6+Toplink configuration eh? If/when I figure this out I’ll have to put one together.