Igor's Blog

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.
Waiting on multiple Future workers on a ThreadPoolExecutor
I've been using the Java Future interface extensively. It's simple to implement and all you need is a ThreadPoolExecutor to run your code in a Thread. There is no messy thread handling, it's all taken care of for you. So what happens if you are running multiple Future tasks and have to wait for all of them to complete before you continue processing their results? Read on to see my approach.
Latest JodaTime and WebLogic incompatibility, missing methods
Joda-Time is a great library if you can't use Java 8 in your project. If you happen to be using version above with your web service and deploying to WebLogic 12c (12.1) you will likely get java.lang.NoSuchMethodError exceptions. This is how to fix it.
Conserving the Log4J MDC context when using a thread pool
I've been updating logging in the web services I look after so that the WS-A MessageID can be logged for each request and for all of the messages written to the log during that request. On the most part putting this value it into the MDC and configuring the appender to write it out to the log is all that's required. However, when you start using thread pools e.g. with ThreadPoolExecutor the MDC goes haywire and that's because and I quote..."The MDC is managed on a per thread basis."
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.
How to create an MTOM enabled request in SoapUI
This is a quick guide on how to create an MTOM enabled request in SoapUI. The process is actually very simple with only a small catch.
Maven WebLogic Plugin and the Java 5 source code bug plus how to fix it
I've noted previously that the JWSC Ant Task fails to build Java sources above 1.5 source version due to a hardcoded "1.5" value in one of the Jar files. That was happening for the 12.1.2 version of the Ant task, it also appears to be a problem in the 12.1.2 Maven plugin as well as the 12.1.3 Maven plugin.
Packaging a shared library using Maven for deployment to WebLogic
I've written previously about how to use Ant to package a shared library for WebLogic, now that I've started using Maven more it is time to see how to do the same thing by creating a pom.xml file and running mvn package.
Unresolved WebApp library references defined in weblogic.xml when deploying via Administration Console
I've had the development team on my current project come to me with a peculiar issue. They were trying to deploy one of the web services and kept on getting an unresolved library reference error every time. This struck me as odd because we deploy these services all the time without any issues. I looked into this further and discovered that the team was using the Administration Console to deploy this service, instead of using the wldeploy ant task. This is where things got interesting.
Fixing the 'This Web Service is not currently available' issue in WebLogic
While I was experimenting with different ways of packaging our web services and shared libraries, I've come across a problem where WebLogic was reporting a status of 'This Web Service is not currently available'. This was happening for a web service that was clearly put into service (Active state). I could make calls to this service without any errors, yet the WebLogic Console was throwing a hissy fit.
Packaging additional jar files into your war file with JWSC and Ant
In a previous post I've shown how to put together a simple build system using JWSC. That article is useful, but what if you need to package additional jar files into your web application? This article shows you how.
Addressing the weblogic.application.ModuleException: Context path '/my_shared_lib' is already in use error
I've experienced a strange error coming out of the Weblogic wldeploy tool recently. It was reporting that a context path used by my shared library is already in use when I was trying to deploy a new web service. This seemed confusing to me - I had two web services that were both referencing the same shared library, the first service would deploy without any issues while the second would fail deployment with the context root error. Shared libraries by their nature are meant to be shared so what was the issue?
How to get the WebLogic 12c JAX-WS runtime version number
I needed to know the version of the JAX-WS runtime that my installation of WebLogic (12.1.2) was using. This information was nowhere to be found in the documentation, so I decided to do some digging around to see what I can find.
Resolving the 'XmlException: error: src-resolve.a: Could not find type' error in SoapUI
About a month after I posted an article with a similar error when generating a SoapUI project, I've come across this issue once more. The root cause for this one took longer to analyse, wasting a number of days pursuing the wrong lead, but eventually I found out what was causing it and how to fix it.
HashMap keys and values passed as null with JAX-WS and WebLogic 12c
I've noticed something curious while testing some web services recently. The keys and values in the HashMap object that's passed as an IN parameter to the web service were all being turned into nulls. If I passed one key/value pair, I'd get one key/value pair of nulls, if I passed two key/value pairs, I'd get a pair of null/null, and so on. I did eventually track down the problem and fixed it, but it has been an interesting issue to come across.
JWSC not enforcing the srcdir attribute, reports processing failures during WebService compilation
Here's another peculiarity I found with the JWSC Ant Task - even though the documentation specifies that the srcdir attribute is mandatory, it is not enforced which leads to falsely reported failures during the 'Processing x JAX-WS web services...' stage.
JWSC does not play nice with Java 8, works fine with Java 7
The more I work with JWSC, the more issues I seem to find. This new one is related to JavaCompiler and has the same smell as the other JWSC problem I've found. I've not had time to investigate this one in detail, but did find a workaround still.
SoapUI failing to create projects for web services using JAXB generated objects as return values
I've been working on moving all of our services at work away from WSDL first and towards the JWS file approach. I think that is a much cleaner way of going about writing web services, it certainly is a lot quicker. I've even written a post previously that shows an example build system that uses the JWSC weblogic task to build JWS file base services.
How to fix the JWSC WsBuildException: Wrong number of class files
So I've continued moving my web services over from wsimport way of building them to JWSC and in my quest I keep hitting issues to do with JWSC compilation. This latest problem came in the form of 'Wrong number of class files' error message. This stumbled me for a while, it was an hour before my vacation was about to start, I just wanted to throw the laptop off the balcony at this point, but I managed to find a fix for this error.
JWSC from WebLogic 12.1.2 fails to build Java sources above 1.5
I've written a post previously showing an example build system that uses JWSC to build your JWS based web service and then the wldeploy task to deploy it to WebLogic. Recently I've been expanding on the use of JWSC at work and have come up against a serious obstacle. JWSC would not build any Java sources that were above the 1.5 language level.
Fixing the 'weblogic.transaction.nonxa.NonXAException: IO Error: Connection reset' error
One day my web services were working fine, the next I started getting the 'weblogic.transaction.nonxa.NonXAException: IO Error: Connection reset' error every time I tried to run some code that queried the database. This struck me as odd because the same code worked on a different environment.
How to enable Webservices request and response dumping in WebLogic
Recently we've had a need at work to see exactly what requests have been arriving at one of our WebLogic servers, this meant enabling HTTP Transport dumping to a log file. I've done this previously with success, but this time around I've hit a few issues. Some of our web services would cause a request/response dump to the log file, but some would not. After searching for a while, I found how to ensure that all requests/responses are dumped to the managed server log file, here's how.
Force HTTPS SSL URLs on web service requests in WebLogic
I've written earlier about adding basic HTTP authentication to a web service. That example forced the user of the web service to authenticate using basic authentication before a request would be served, however the username and password in this case are prone to sniffing and can be retrieved with relative ease. This is easily addressed by setting up your deployment so that WebLogic forces the use of HTTPS/SSL URLs web making requests.
An example build system using jwsc and wldeploy WebLogic tasks
Here is a very simple build system that compiles and packages a web service defined as a JWS file. The web service is packaged as an EAR file and is deployed to WebLogic (12c in my case).
Example MTOM/XOP enabled web service using DataHandler
This is an example showing how to create an MTOM/XOP enabled web service that can be deployed in WebLogic.
WebLogic 12.1.2 not respecting @PostConstruct annotated method exceptions
I've been working on moving our web services at work to WebLogic 12.1.2 and noticed a curious issue. When I first moved one of the web services across, I knew for a fact that the method that's annotated with @PostConstruct would fail (due to changed data source names). However, when I deployed the service it was successful. Looking at the managed server logs, the service did indeed fail during initialisation, so subsequent calls to this service were failing for me. This seemed like a problem so I went out to verify it with a simple example.
Adding basic HTTP authentication to a WebLogic web service
Here's how to add basic HTTP authentication to a Weblogic web service. I've had to do this recently at work and was a little confused at how the role-name, principal-name, etc were related so decided to add this as a note for the future and for anyone else who may be interested.
Ant build file to package and deploy shared libraries to WebLogic
Here's a handy ant build file for packaging a shared library for a WebLogic deployment and then deploying this shared library to the WebLogic server.

Previous Post

Next Post

Programming, DIY, Games, Hacks, Tech and more.
Follow me on...
Current and Past Projects
See my Resume


RSS Feed

My Other Web Sites

Igor and Elise's Travels
Riverside Expressway Cam
300 George St Blogumentary

My Online Tools

UUID to OID Converter
Guru JSON-RPC Tester
Extrudifier Object Designer
Travel ┬ÁBlog

Recent Blog Posts

Showing whitespace characters in vi

Using Jackson to automatically convert Java POJOs to JSON as output of a Jersey service

Enable quick access to the keyboard and emoji viewer in macOS

How to tell if your site is served via CloudFlare

Googe Cloud Platform doesn't support CloudFlare's free edge certificates

Fixing the invalid private key error in the Google Cloud Platform App Engine app Settings page

Cleaning the sticky PlayStation controller analogue thumb sticks

Invoking interactive shell scripts non-interactively

Using variables as column numbers with Bash and Awk when processing text files

Debugging Google DFP ad delivery via the publisher console

Recent Galleries

Space Food - Chocolate Ice Cream with Chocolate Chips

Legeod Star Wars AT-DP kit

DIY spare parts computer build with a RAIDMAX Anura case

Fake 'Lepin' brand Lego packaging

Hardwood garden bench with clear resin void filler

Fixing a 3D printer extruder that stopped heating up

Easily increase disk space in a Lenovo Ideapad 100S 14" laptop with an M.2 SSD

Making a multi-piece 3D printed solder spool holder stand

DIY indoor apartment grow light wiring

Good Friday Electronics fun Easter Bunny LED PCB Kit IBEABU-01.0

Top Categories

Blogs I follow

Matt Moores Blog
Georgi's FlatPress Guide
Perplexing Permutations
The Security Sleuth


RAWS Parts Online
Alpha Dimensions Hosting
Kristensen Photography
Ilia Rogatchevski
Travelling Fairy

Blog Activity

Blog Activity
Follow me on... 
...or subscribe for updates!

Don't show this again