Some time ago I already explained how you could use Maven and the jboss-plugin to deploy your war or ear to your JBoss server. Now this works fine as long as your JBoss is a local installation running on the same machine as the one that is running Maven.
Of course there is a big chance that this is not the case in your development environment.
Continue reading…
As I promised here this is the last part about using Maven2 to build, test and deploy an EJB3 application to JBoss5. In part 2 I showed how you can build and deploy your EJB3 application in JBoss. In this step I want to show you how you can (unit)test your EJB3 module before you deploy it to JBoss. In part 2 we had to deploy the bean first, before we could test it, but that is not the most optimal way. It would be nicer if the code is tested before it is deployed to the JBoss server. To do this, I make use of OpenEJB. This is a lightweight container that is very easy to use with Maven. Another advantage of this approach is that the EJB component is tested/used in two different EJB containers and reduces the possiblity that container-specific code is used in the application.
Continue reading…
As I stated here I see three levels of using Maven2 to build and deploy your EJB3 application with JBoss5 as application server. The minimal use of Maven I have described here, in this post I will extend the role of Maven so you can use it for the deployment of the JEE application too. I will also show how to create a client class in Netbeans to test your deployment. To show this I will extend the example I used in the previous post.
Continue reading…
Although I am pretty familair with EJB3 I decided to get prepared for my next certificate SCBCD by going through the book ‘Enterprise JavaBeans 3.0‘ by Burke and Monson-Haefel. A good thing about the book is that they added a ‘workbook’ in which exercises and coding examples are described. However, there is also a ‘disadvantage’ and that is that they use Ant to do the building, deploying and running of the code. And they use JBoss4.0 as an application server, which was the logical choice when the book came out, I guess, but is outdated nowadays. So I decided to rewrite the example a little as an exercise by making use of Maven2 for the building and deploying and do this on JBoss5.0.1 that has been released a few weeks ago.
Continue reading…
In my former post (here) I described how to combine Spring WS with StAX parsing the SOAP messages. I ended with generating the WSDL as a test and said you could use Soap UI for testing the web service.
Well, I did. And I was running into the following error when I had deployed my web service at JBoss4.0.5.GA:
XML:
-
<env:envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
-
<env:header />
-
<env:body>
-
<env:fault>
-
<faultcode>env:Server</faultcode>
-
<faultstring>Operation only supported for javax.xml.soap.Node, this is a [#comment: Test comment]</faultstring>
-
</env:fault>
-
</env:body>
-
</env:envelope>
Continue reading...
As I have posted before we are using XFire to implement our web service. Unfortunately, we are running into some serious issues with the framework, so we decided to look after another implementation. Since XFire is no longer supported by the community (or at least at a very low profile) and 'replaced' by CXF, we decided to have a look at Spring WS. We also have used the Spring Framework throughout our application elsewhere, so this would be a logical choice. After a quick look at the framework it convinced us that this would be the framework to use for our web services. It was easy to set up and well documented.
Continue reading...
In this blog I'll show you how you can create a WebService of your EJB3 objects by using anotations. I will also show you how to build and deploy the package with Maven2. Let's start with the initial situation.
I have installed JBoss 4.2.1 and Maven2. In my settings.xml of Maven2 I have set a property pointing to my JBoss installation and I have defined a JBoss/Maven2 repository.
Continue reading...
Today I was asked to help solving an issue with an application that was deployed on JBoss 4.0.5.GA. It had been running for some months without a problem, until a new application had to be deployed. This new application demanded that the isolation level in the 'ear-deployer.xml' config file had to be set to its default value 'false'. However, the setting was set to 'true' for some reason.
Continue reading...
Do you recognize this: Although you are using a tool to develop your applications for some time, you are suddenly surprised by a certain error message you haven't seen before? And you didn't do anything different compared to the last time you used it.
Well, my experience is that in 100 times out of a 100, you did do something different. My last time in this situation was when I wanted to use a Java 1.5 enum type as a field in my EJB3 entity bean. I had done this before and at first sight everything looked well. Here was what I did:
Continue reading...
As you might have noticed in my earlier posts I am currently using Maven2 for building and deploying our applications. And although I am a big fan of it and I see a lot of advantages in using it, I sometimes would like to throw my PC out of the window because it is driving me crazy. Of course, at the end, it appears to be my own fault that causes the problem but anyway :-)
Last issue that drove me mad was when I packaged my application in an ear file, consisting of one ejb3 module and one web module. I had done it several times before and this was just another one, so I thought. But after deploying my ear file in JBoss it started to complain that the EJB module couldn't find some classes in the supplied jars.
Continue reading...