Resurrecting the WLP Data Sync Web Application in 10.3.2

In WLP 10.3.2, the datasync web application has been deprecated. This makes sense if you consider the recommended approach is to test all of your Datasync Project work in DEV mode and then propagate up once you have everything the way you want. However, if you are upgrading or have a development process where this is not the easiest policy to implement, you may wish to bring back the datasync.war. If that is you, fear not! Blogging to the rescue!

While in previous versions of WLP it was automatically added to a portal EAR project, in 10.3.2 you must manually add the dataync.war.

The documented  approach (How To Import and Add the Deprecated ‘Datasync.war’ to the WebLogic Portal Application (Doc ID 1268447.1)) to add it is to use OEPE, right-click on the EAR project, select Import War, and import [WLP_HOME]p13ndeprecatedlibdatasync.war. Doing so creates a datasync project in your workspace.

The documentation goes on to describe an edit to the MANIFEST.MF to include the classes from ImportedClasses on the classpath. When I tried it, I could get to the data sync application index page, but would get a 500 error past that.

Digging through the logs, I found class not found exceptions. I eventually fixed this by moving the jsp folder under/datasync/ImportedClasses/WEB-INF/classes/com/bea/p13n/management/data to /datasync/ImportedClasses/com/bea/p13n/management/data, re-building and re-deploying.

If you found this interesting, please share.

© Scott S. Nelson

Running Two WLS Domains with Pointbase

I hope this guy’s blog lasts forever so I don’t have to manually write the steps to run two WLS domains using Pointbase on the same machine: http://www.jroller.com/gmazza/entry/reconfiguring_pointbase_databases_on_weblogic.

You would think that you could plan ahead and simply change the values for DBMS and Port on the Configure JDBC Data Sources screen, but the “wizard” still spits out config files using the default 9093 port for Pointbase.

My alternative approach is to search for .cmd, .properties, and .xml files containing “9093” and change it to “9094” for the second domain. Not as step-by-stepish, but easy to remember 🙂

If you found this interesting, please share.

© Scott S. Nelson

Creating SAML Token Tip for Non-WLS Admins

The documentation for setting up SAML for WLP WSRP is very straight-forward except for one small item that us non-admins may not think of: Once you have your command window open, you need to run the setDomainEnv script in that window before calling the keytool. Otherwise, you get a nice response from the commands, but the domain is not configured to use the results!

If you found this interesting, please share.

© Scott S. Nelson

Useful Eclipse Update Sites for WLP Developers

Two handy plug-ins with the update URLs that work with OEPE:

SQL Explorer –  http://eclipsesql.sourceforge.net/

Subversion for Eclipse –  http://www.polarion.org/projects/subversive/download/1.1/update-site/  http://www.eclipse.org/subversive/downloads.php

If you found this interesting, please share.

© Scott S. Nelson

Remember: Examples are Just Examples

For example, the documentation at Using the WebLogic Server JMX Timer Service gives a very straight-forward and standards-compliant example of how to run a task at intervals.  I used this example almost in its entirety to create a module to poll a database for a specific change every 2o minutes. I then noticed that the timer would stop for no apparent reason at no obvious interval.

After many hours of digging through logs looking for some cause, I was ready to give in and post a plea for help on a mailing list. It just so happened used a text editor to grab the code to post, and noticed in the text editor that there was one place where unregister would be called on the bean: under contextDestroyed in the servlet to at registered the timer.  In the clarity of hind-sight I realized that the timer was stopping more often in environments that were accessed less often because the efficient WebLogic Server was garbage collecting the unused servlet handle, resulting in contextDestroyed being invoked, thus killing my timer. As it normally should, except in the case where the timer should continue running as long as the server was running.

Lesson learned: Think it all the way through between copy and paste.

For those who like links and confessions:  There is an example of using a timer in my JavaBoutique article that contains precisely the same flaw in logic.

If you found this interesting, please share.

© Scott S. Nelson