WebLogic package-name element classpath generator script I wrote a post a few days ago about using Jersey 2.x as a shared library with WebLogic 12.1.2. In that post I suggested the following: In weblogic.xml the prefer-application-packages element needs to have entries added for ALL OF THE PACKAGES in the Jersey 2.x shared library JAR files. That means you need to go through every jar file in WEB-INF/lib for the shared library that was created with Maven and make sure the packages it defines are included in this element.
Using Jersey 2.x as a shared library on WebLogic 12.1.2 WebLogic 12.1.2 may not be listed on Oracle Technology Network Downloads page but it is still being used. When it comes to RESTful services on WebLogic, 12.1.2 supports Jersey 1.13 so if you're looking to make use of Jersey 2.x features, there's some extra work to be done. With 12.1.3 you can go straight for Jersey 2.x but that's outside the scope of this article.
Automatically insert a UUID value into a table with Oracle There are different approaches to inserting a UUID into an Oracle Database table, ranging from Java to various ways of doing it in PL/SQL (as described here). Not many of these seemed appealing to me so I came up with my own approach using a trigger.
Using Maven to create a super SQL file with the merge-maven-plugin If you've ever worked on a PL/SQL project or any project with a good amount of database related work you probably have had to deal with multiple SQL files and their deployment across systems. This is exactly what I've come across recently. Even in the early stages of my PL/SQL project I had 11 separate SQL files that would need to be deployed to system and performance test environments, then propagated to production, production support, etc. To help with managing all this I decided that building a single 'super SQL' file would work best and I ended up using Maven to do it.
MySQL always returning 0.999 for DECIMAL type fields I've started to use the DECIMAL type in MySQL to store longitude/latitude coordinates recently and for some reason no matter what value I stored, when queried back I'd always get '0.999'. A little bit of investigation and I found the answer so lets see what was going wrong.
Getting the total number of rows with MySQL LIMIT clause The MySQL SELECT statement syntax includes a LIMIT clause that can be used to restrict how much data is returned from the database. This is fantastic for pagination but in most cases you also want to know how many rows there are in total, which typically requires a second query. With MySQL there is a special option that can be passed to SELECT to do this calculation for you automatically.
How to get orapki without installing the full Fusion Middleware I was asked recently if there was a way to get the orapki utility without having to install the entire Fusion Middleware. The answer is yes, sort of. So if you need access to this utility but for some reason are not able to use the one that comes with your application server, read on.
Java Mission Control requires GTK but which version? I've recently had one of the DBAs on a project ask me what GTK version is required to run Java Mission Control with JDK 7. I thought easy, the documentation should tell me this, but after searching for several hours I've come up with nothing, apart from 'GTK Libraries Required' as stated in the Oracle Java Mission Control 5.3 Certified System Configurations.
Example JAX-WS WebService built with Oracle WebLogic Maven plugin (wsgen) In the past I've shown how to use Ant and the JWSC task to build a JAX-WS web service, well I've moved onto Maven now and started to use the Oracle WebLogic Maven plugin to build services. This is an example on how to build a JAX-WS web service using that plugin, specifically the wsgen goal.
Returning compressed MTOM data with JAX-WS DataHandler A while back I've shown an example MTOM/XOP enabled web service using DataHandler. Although MTOM is great for optimising the output of a web service, sometimes it's just better to compress these results before sending them.