Tag: jboss

What I dont like about Java Application Servers

I have a lot of experience with Java Application Servers, from Weblogic to jBoss 5,6,7 and Glassfish. I’m a Java and J2EE Trainer too. So, I’m not here to make an argument against the use of Java Application Servers, I use them every day, however I must say some things that I really dont understand (from a user/developer perspective) about Java Application Servers:

Why Java Application Servers don’t isolate a deployed application? How many times are you deploying an application and you have to configure, customize, remove jars, add another’s jars, create additional files just because the application server already has some of the jars you use in your application? For instance, in my team, we are migrating sites and web services from weblogic and its a nightmare, jboss already have some of the jars, and at deployment time throws exceptions that are not so easy to understand at first sight. (like logging jars – in our case slf4g with logback) If an application could be isolated like a file system application its isolated in an operating system like linux or MAC OS these problems dont even existed! I just wanted to deploy my application with the jars I need, and don’t think about what jars the application already have.

I have experienced deploying applications in Microsoft IIS and in Java application servers. Using Microsoft Servers its much more easy than using similar java products. Usually, when starting and developing Microsoft products I spend 80% of the time focused in developing and  testing the product, and the other 20% finishing configuring and deployment. With Java Application Servers, first you must study the application server, know about several XML files with specific names, to configure datasources, jms queues, etc. Then you hope that exists some eclipse plugin or netbeans plugin that really works. I have experienced plugins for weblogic and jboss but sometimes when you deploy an application its just a view for your eyes, the application doesnt get really deployed to the application server, so I have to go to the localhost website, and deploy it. The inverse its also true. So, 80% configuring and preparing, learning and training and the rest 20% of time developing.

Don’t get me wrong, my experience its divided between these two worlds (Microsoft and Java), I like Java, after all the configuration its done everything will work as expected, but its a really tough job to put everything to work at first in Java Application Servers World!

jBoss 7 – Web service client – popular exception “definitions”

In the process of migrating some J2EE Applications from Weblogic to jBoss 7 I’ve been found several issues that puts the popular java statement “Write once run everywhere” in cause. I will not start here any discussion about this, if the cause its j2ee, jboss, weblogic, axis, although you are free to do it so, and I will have arguments pro and con, but it was not so smooth as I was expecting it to be.

One of the last errors that toke me some time to figure it out, and I found the solution by intuition trial and error was when I had to generate a web service client for a jBoss j2ee appilcation that works great in weblogic but in jboss throws the following error when calling a web service:

… several stack trace lines but the main one:

… at some point in the stack trace

Caused by: javax.wsdl.WSDLException: WSDLException (at /html): faultCode=INVALID_WSDL: Expected element ‘{http://schemas.xmlsoap.org/wsdl/}definitions’.

So, I’ve tried every possible solution, from generating different kinds of web service clients, using Axis, jboss, CFX, to changing Jaxb versions on eclipse facets to 2.0, 2.1, 2.2.

About the solution:

In the construction of the web service call

MyWebService_Service service1 = MyWebService_Service(new URL(wsdl));
MyWebService port1 = service1.getMyWebServicePort();

In Weblogic a possible URL could be passed on the web service class constructor as :

– “

But In jBoss, the URL must use the “?wsdl” at the end of the url! like this:

– “

I dont know why, maybe when I have time I can discover the reason, but for know it was the solution I’ve found for this kind of exception that apparently its a popular problem around forums.

Hope my solution can help you anyway, or if you find another reason for this exception, be my guest to put it on the comments area!

Error starting jBoss inside eclipse

You install jBoss 7. Unzip it to a folder like d:\jboss.

Now install jboss tools 3.3 for eclipse indigo.

When you start the jboss from eclipse (servers tab) you get an error. The console in eclipse doesn’t show any log activity and jboss doesn’t start.

After some research you discover that eclipse cant “talk” with jboss. You can confirm this by reading jboss logs.

You start jboss with standalone.bat and it works.

I got this problem in our dev team, and after some research around I found this solution. It was so simple and at the same time one of that problems that make us thinking about changing to other version or product that I thought it was a good idea to share it.

Possible solution:

1) Go to runtime environment in eclipse options and add jdk runtime environment. Not jre.

2) Make sure that you remove the JRE probably already installed and configured from eclipse. (really! Remove it from eclipse and just let the jdk as an environment).

3) Now, start jboss from the tab servers. It must work by now.

Technorati Tags: ,,,,,
Windows Live Tags: troubleshooting,java,eclipse,j2ee,Error,jboss
WordPress Tags: troubleshooting,java,eclipse,j2ee,Error,jboss

Bad Behavior has blocked 82 access attempts in the last 7 days.

Hyper Smash