Wednesday, April 16, 2008

SoapUI and WebLogic Web Services

I am assisting one of our clients who is using WebLogic Web Services to test these web services using SoapUI. I have used SoapUI for almost 4 years and had never found this bug. So, here is what's happening:

The weblogic.webservice.GenericHandler is extended to do some security checks. Within this special Class, the handleRequest method is overridden as such:


public boolean handleRequest(MessageContext mc) {
SOAPMessageContext messageContext = (SOAPMessageContext) mc;
SOAPBody soapBody = messageContext.getMessage().getSOAPPart()
.getEnvelope().getBody();
Iterator itBody = soapBody.getChildElements();
while (itBody.hasNext()) {
Object obj = itBody.next();
SOAPElement bodyElement = (SOAPElement) obj;
String name = bodyElement.getElementName().getLocalName();
}
}


The following line:
SOAPElement bodyElement = (SOAPElement) obj;

throws a ClassCastException, the stack trace is shown below:
java.lang.ClassCastException: weblogic.webservice.core.soap.SOAPTextElement
at weblogic.webservice.core.HandlerChainImpl.handleRequest(HandlerChainImpl.java:143)
at weblogic.webservice.core.DefaultOperation.process(DefaultOperation.java:549)
at weblogic.webservice.server.Dispatcher.process(Dispatcher.java:204)
at weblogic.webservice.server.Dispatcher.doDispatch(Dispatcher.java:176)
at weblogic.webservice.server.Dispatcher.dispatch(Dispatcher.java:96)
at weblogic.webservice.server.WebServiceManager.dispatch(WebServiceManager.java:100)
at weblogic.webservice.server.servlet.WebServiceServlet.serverSideInvoke(WebServiceServlet.java:297)
at weblogic.webservice.server.servlet.ServletBase.doPost(ServletBase.java:498)
at weblogic.webservice.server.servlet.WebServiceServlet.doPost(WebServiceServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:7047)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3902)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2773)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)

I did read in just one post that any default spaces in the request is converted
to a SoapTextElement.

If I add a simple guardian to check for
weblogic.webservice.core.soap.SOAPTextElement
and skip the loop it works, but I know that's isn't the right solution.

If I create a simple Web Services Client using Axis(WSDL2Java),
I don't see the same exception.

Have you seen this, how did you fix this? Any ideas?
Here is the thread which I saw on bea web site.

1. bea site
And this one which I guess is related to Spring:

2. Spring site

Tuesday, March 25, 2008

Matrix-based security in Hudson doesn't work in IE

As I mentioned in my earlier posts, I have been using Hudson CI engine from the past 3 weeks. Pretty easy and cool as well. No complaints so far.

I started working on getting the standard security setup and am having problems doing the same. I am using the 1.195 version. In this version, once I select the Matrix-based security, I am unable to add users or group.

I did find a workaround wherein I can go and change the config.xml file and manually grant permissions to users. But, if I go back and make any other configuration changes and save, my security changes are lost.

Are you having these problems? How did you manage to secure Hudson? Any ideas?

P.S: After I posted this and searched a lot on the net and didn't find any reference, I was a bit surprised. Downloaded Hudson on my laptop, and was able to use the Matrix-based security. Once it worked on my laptop, I knew who the culprit was. It was IE, my laptop by default uses Firefox as the browser. Once I downloaded and installed Firefox as well on the desktop, I was able to add users and roles.

Monday, March 24, 2008

Joined Stelligent

Two weeks back, I joined Stelligent Incorporated as Senior Software Consultant. Having had many years of experience, it was time for a new challenge. I am really excited to work with Industry experts like Andrew Glover, Paul Julius, Paul Duvall and also learn a lot from them. :)

Saturday, March 22, 2008

Hudson's so Groovy

Having used Cruise Control for almost 4 years, when I started looking at Hudson last week, I was impressed seeing how easy it was to configure and get it up and running in just a few minutes. It also has several plugins available, and if you don't find one you can quickly write one as well.

Andrew Glover, in the TestEarly Blog, shows us how to use Groovy with Hudson. Hudson has a Groovy plug-in which can execute Groovy Scripts.


To quote from the blog "as a part of a CI project setup, another dependent
project’s directories were becoming read-only due to an SCM feature.
Consequently, a child project couldn’t write to the filesystem.

This problem was easily solved using Groovy (plus a little Ant)– a triggered build executes a small Groovy script that uses Ant’s chmod
task to make target directories read-write enabled. As you can see, the
fix requires 2 lines of code (which could, arguably, be reduced to one)"

def ant = new AntBuilder()
ant.chmod(dir:"./ci09_i/ui/rep2/reports/", perm:"ugo+rw",
includes:"**/*.*")

You can read the complete story at TestEarly.com

Isn't that cool? However, I am not sure if there is a way to specify Hudson to run the Groovy Script first before executing any build script or vice versa, any ideas?

Here are some useful links for additional reading:

1. TestEarly.com

2. thediscoblog.com

Friday, February 1, 2008

Any idea when JBoss 5 will be out?

I have been using JBoss for years now, and it was one of those servers which was so easy to setup, and get it running in a few minutes. Above all the deployment was so easy, copy and paste your ear/war in the deploy directory and you are done. Anything I wanted to learn, the first app server I used to choose was JBoss. I guess many developers agree with me on this, when you had to do something in J2EE world, the first thing anyone would try was JBoss.

I am not sure JBoss is dependable anymore. Especially with the current version JBoss 5. I know it's still in beta, but it has been there since 2006. Even the latest JBoss 5.0.0 Beta3 has many problems; especially with Java 6.

With all the problems with JBoss and having no clear cut idea when the final release is due, I had to look for other options. I am glad I did, and found Oracle and GlassFish working with just no problems at all.

When I did an interview with the authors of the book "JBoss in Action", they did mention that all the features in JBoss 5 were already available in later versions of JBoss 4.

You can read the entire interview here.

To quote from the interview:
Javid : The difficult thing about putting out a book is that it starts getting outdated even before it is published (it takes 3-4 months to go through editing / printing). By the time the book is released, JBoss AS 5 should be available. By the time an organization starts standardizing on it, they'll probably have a patch or two released. In all honesty, it *is* a bit of guesswork. But, the reason we feel confident making the recommendation is that many of the technologies that will be available in JBoss AS 5 are already running in the latest versions of JBoss 4 , or as independent applications. The problems that will likely arise with these technologies in JBoss AS 5 are likely to be integration issues, which will hopefully get resolved fairly quickly.

Peter : Many of the technologies that will appear in JBoss Application Server 5.0 are already available in other versions. EJB3, the JBoss Web Server which is based on the Tomcat and the Apache Portable Runtime, and JAX-WS based web services using JBoss Web Services are already available in 4.2. JBoss Messaging can be added to 4.2. So once 5.0 comes out, many of its components will have already been tested. And because 5.0 will be Java EE 5 certified, I expect that it will generate a lot of interest from the community.

When most of the features have been already tested on earlier versions, of course not on Java 6, what's the delay?

In spite of finding alternate solutions, I still would like to use JBoss 5. I guess old habits don't go away easily right?

What are your thoughts?
Any ideas if we are going to get the final version in 2008 soon?

Book Review: Windows Vista Annoyances

I posted the review for the book "Windows Vista Annoyances" yesterday on IT Book Zone. Having purchased a new Vista laptop for my daughter, this book was timely.

In the "How To Use This Book" section, the author says "Windows Vista Annoyances" is not documentation; you can get that anywhere. Rather, it's a unique and thorough collection of solutions, hacks and time-saving tips to help you get the most from your PC". That's exactly what you will get from reading this book.

Anyone having a Windows Vista PC will find this invaluable for its tips, solutions and hacks. You will also find plenty of information on setup, installation, upgrade from other Windows versions, security features, performance, troubleshooting, and many more.

David Karp, has given us a unique guide which not only discusses the annoyances of Vista and workarounds for the same, but this book also helps you improve your experience with Windows Vista.

To read the review, chapter wise you can take a look at the review on IT Book Zone.

  1. Windows Vista Annoyances on IT Book Zone

Tuesday, January 29, 2008

Issues with SOAP address location in EJB 3.0

I am deploying my EJB 3.0 application on 3 servers for right now; JBoss, GlassFish and Oracle Application Server.
I have a simple Stateless Session Bean with the appropriate WebService annotations.
When I deploy my application to these 3 servers, each one has a different WSDL URL.

The name and serviceName are as specified in the @WebService annotation.

@WebService(name="HelloManager", serviceName = "HelloManagerService", targetNamespace = "urn:HelloManagerService")

There is however some consistency between JBoss and Oracle. They use the following notation:

soap:address location="http://hostname:portname/earfilename/name"

For e.g:
soap:address location="http://localhost:8080/ejb3webservices/HelloManager"


GlassFish on the other hand, uses the following notation:

soap:address location="http://hostname:portname/servicename/name"

For e.g:
soap:address location="http://localhost:8484/HelloManagerService/HelloManager"


I am trying to use SOAP UI to test my web services once they are deployed using Ant.

I didn't see any reference in the EJB 3.0 spec regarding the WSDL location. Is this vendor specific? Is there any place where we can customize the WSDL?

Also, I don't see any configurable attribute in the documentation for the @WebService annotation.

Saturday, January 26, 2008

Several Exciting New Books For Web Developers

I was preparing my draft for interviewing some of the authors for Manning as well as Apress, and browsing their web sites for updates. There are several new books for web developers which have been published recently or coming soon.

The following 2 books are being published by Manning and the print edition will be available in a few days.

1. Laszlo in Action by Norman Klein and Max Carlson with Glenn MacEwen

2. jQuery in Action by Bear Bibeault and Yehuda Katz

The 3rd book from Apress is on Struts 2

3. Practical Apache Struts 2 Web 2.0 Projects by Ian Roughley

Have you read any of these books? Are you planning on buying these?

Friday, January 25, 2008

The SpringSource Certification Program Announced

For those of us who have been working on Spring for many years now, we have a wonderful opportunity to take this exam. So, who can write the Exam is a big question since they do have some requirements and they are as follows:
Quote from SpringSource:
Eligible individuals can register to take the Spring Framework Professional certification examination, via the web, at one of over 4500 world-wide testing facilities, and can begin taking the exam on 31 January 2008. A person is eligible for registration if he or she has recently taken the 4-day “CoreSpring” class from SpringSource (or a SpringSource certified training partner in Europe, Africa or the MiddleEast (EMEA)). A person may also be eligible for registration, without attending the 4-day course, if he or she can demonstrate having significantly contributed to the Spring community or can provide a reference to a Spring development effort in which he or she was actively involved. This person is referred to as a “grandfathered” candidate.


I did contact Daryl Heinz Director of Training for SpringSource, Inc. with just one question. Please explain how we can provide a reference to show that we are using Spring in our Development?

Daryl replied back immediately with all the details. We just need to provide the contact information of our Manager so that SpringSource will be able to validate that we indeed have experience using Spring.

You can find all the details about the Certification here:

1. SpringSource Certification Program

I am really excited to take this Exam, how about you?

Wednesday, January 23, 2008

New features in EJB 3.1 : Article on ServerSide.com

Reza Rahman, co-author of the book "EJB3 in Action", has an article in TheServerSide.com which gives a preview of the next version of Java EE spec EJB 3.1.

You can read the article here:
1. New features in 3.1


The ones I am interested are:

1. Support for stateful web services via Stateful Session Bean web service endpoints.
2. The standardization of JNDI mapping. I had to workaround a solution for testing on 3 different application servers, JBoss, Oracle and GlassFish. Each of them have completely different naming convention for the Remote Interfaces.

The GlassFish AS uses the fully qualified name of the remote business interface as default.
Object obj = initialContext.lookup("com.os.ent.CustomerManagerRemote");

JBoss on the other hand uses the Application Name, followed by the EJB name and followed by /remoteconstant.
Object obj = initialContext.lookup("ejb3sampleapp/CustomerManager/remote");

Oracle, uses the name specified in the @Stateless annotation.
Object obj = initialContext.lookup("CustomerManager");


What new features are you looking forward in the coming version?

Friday, January 18, 2008

Which one do you prefer; Liferay or JBoss Portal?

The book "JBoss in Action" has 2 chapters dedicated to JBoss Portal.The book covers JBoss Portal 2.6.1 running in JBoss Application Server 4.2.1. I haven't yet downloaded and tried this version.

But, I had tried Liferay 4.0 and JBoss 2.4 in early 2007 at work. We found Liferay more user friendly than JBoss; especially while using the Management Portlet. We finally scraped the idea of using Portals since there was indeed a huge learning curve.

Both of these complies with JSR 168.

With several releases from both these vendors, I am curious to know which one you would prefer.

Liferay or JBoss, which one are you using?

Thanks to all those who commenetd. The links you added(and the ones I added) were not displayed properly. So, I have added them here as well for your convenience.
1. InfoWorld - Comparision of Liferay and JBoss portal
2. JBoss Portal Presentation
3. Creating new Themes in Liferay

Friday, January 4, 2008

Error in OC4J Version 10.1.3.3.0 Ant Tasks

I have been trying to write Ant tasks to deploy, undeploy applications as well as create,delete and test data sources and connection pools using OC4J 10.1.3.3.0 for Oracle Application Server.

The deployment and undeployment went smoothly with no problems at all.

But, once I started working on Data Sources and connection factories, I started getting errors like the following:

Problem: failed to create task or type antlib:oracle:testDataSourceConnectionPool
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any / declarations have taken place.

This appears to be an antlib declaration.


You will not find any documentation at all since these tasks are not in the Documentation. I looked at many samples provided and all of them had the old tasks. I finally looked at the Ant jar file and was able to find the correct task names.

The task addDataSourceConnectionPool was replaced with createJDBCConnectionPool, addManagedDataSource with createManagedDataSource, and testDataSourceConnectionPool with testConnectionPool.

I am not sure about other tasks, but these are the ones which I changed to get my build files working and happy.

You can find detailed documentation for OC4J Ant Tasks here.

Monday, December 31, 2007

Happy New Year 2008

Wish You All Peace, Love, Health, Happiness and Success in 2008.
May in this new year, all your dreams turn into reality and all your efforts into great achievements.

Saturday, December 29, 2007

Top 5 Books for Enterprise Java Development in 2007

With just a day left in 2007, lets recap some of our favorite books this year. Having been the Editor for the Javalobby Book Review Team for the past 14 months, I have read and reviewed several technical books. People whom I meet often ask me what books are coming up and to name a few good books.

It was very hard for me to pick the top 5 from the vast majority of excellent books sitting in my shelf, and the ebooks on my laptop which I read.

I had to limit myself to 5. So, listed below are the top 5 books for Enterprise Java Development. Some of these books might not have received 5 stars on the rating scale, but they did make me more proficient in some aspects of software development.

1. Test Driven: Practical TDD and Acceptance TDD for Java Developers
2. Continuous Integration: Improving Software Quality and Reducing Risk
3. Ant in Action, Second Edition of Java Development with Ant
4. Java Persistence With Hibernate
5. Use Case Driven Object Modeling with UML: Theory and Practice

What books did you read in 2007?
Do you have a list to share?

Friday, December 28, 2007

What version of Java do you expect to use in 2008?

We upgraded to Java 6 almost 9 months back at my workplace. We faced no major problems working with projects which were using Spring. But, as soon as I started working on an EJB 3 project, I realized most application servers aren't even ready for Java 6 yet.

I do have multiple copies of Java installed, but testing with all these versions 1.4, 5 and 6 is a nightmare.

Now, its too late for us to switch back to Java 5. And, with Java 7 coming soon, it's surprising that some application server vendors don't yet support Java 6.

What version of Java are you using at work?
Are you facing any problems at all?

Saturday, December 22, 2007

Coming Soon : Wicket in Action By Manning

I came to know about this web framework from one of the comments to my post about J2EE vs .NET by Frank Silbermann. I had never heard about it before. I wasn't very much interested in looking at it either until today. I didn't want to spend anytime on yet another web framework. Do we have any less now, that we needed another one?

As always, I goggled it and found tons of information on Apache's web site. I did like their introduction page where they do list 58 ( believe me I actually counted) web frameworks.

The next thing I did was to find out if Manning or Apress has any upcoming books on this web framework. And, we have "Wicket in Action" coming soon. Hurray.

You can start Reading Wicket in Action today through the Manning Early Access Program(MEAP). Most in Action books of Manning we have done for Javalobby have 5 star ratings in all the categories. So, it will be an interesting book to wait for in 2008.

You can also take a look at Manning's web site to get additional details about this book.
Apress on the other hand, already had a book published in September 2006, called "Pro Wicket". You can get detailed information about this book at Apress web site.
Have you used Wicket?
If yes, would you like to share any tips or tricks?
Have you read Pro Wicket book?

Friday, December 21, 2007

EJB 3.0 and 4 different Application Servers - Good, bad or ugly.

I have been writing EJB 3.0 application from the past 3 months. I am not yet sure what application server we are going to use. I was initially testing with JBoss, but as you might have seen in my previous posts on this blog, I can't get JBoss to work with Java 6 as well as web services.

Just to remind you I had no deployment descriptor for any of these servers. That's one of the big things for EJB 3.0, right? EJB 3.0 specification states that the deployment descriptor is not necessary.

You just have to add annotations, and that's what I did. If you can't deploy one simple application to various servers, does it make any sense to say EJB 3.0 applications are portable. They should be as per the EJB 3.0 spec.

The next course I took was to write a simple, really simple Stateless Session Bean. Just one method in it, publish it as a web service and try to deploy the same on the following Application Servers. I have used and administered JBoss, WebLogic,and WebSphere. But, in this case I used some different ones. It's up to you to decide which ones are good, bad, and ugly.

1. JBoss
2. GlassFish V2
3. Oracle Application Server
4. WebLogic 10.

Here is my remote interface for the stateless session bean:

package ejb3.ws.biz;
import javax.ejb.Remote;

@Remote
public interface HelloManager
{
public String sayHello(String serverName);

}


And here is my simple session bean class:

package ejb3.ws.biz;

import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;


@WebService(name="HelloManager", targetNamespace = "urn:HelloManagerService")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@Stateless(name="HelloManager")
public class HelloManagerBean implements HelloManager
{

@WebMethod
public String sayHello(String serverName)
{
return "I am saying hello from " + serverName;
}
}

Compiled the classes, jarred them up, and tried deploying to each one of the above mentioned application servers.

1. GlassFish V2: This was the first time I was using GlassFish. I used the Admin Console, deployed the file, used the page to test the web services. Surprise surprise, it works. Hurray.

2. Oracle Application Server: Again, this was the first time I was using Oracle AS. I used the Admin Console, deployed the file. And this time, I tested with SoapUI, and web services worked like a charm.

3. JBoss 4.2.1: The same application which deployed and worked on the above 2 app servers, did deploy fine in this case. No exceptions at all. But when I used SoapUI to test my one and only one web service, it failed miserably. Here comes the stack trace:

2007-12-20 12:44:04,779 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/HelloManagerBeanService].[HelloManager]] Servlet.service() for servlet HelloManager threw exception java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage at javax.xml.soap.SOAPMessage.setProperty(SOAPMessage.java:424) at org.jboss.ws.core.soap.SOAPMessageImpl.(SOAPMessageImpl.java:67) at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:155) at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.toSOAPMessage(SOAPFaultHelperJAXWS.java:235) at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.exceptionToFaultMessage(SOAPFaultHelperJAXWS.java:164) at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.createFaultMessageFromException(SOAP11BindingJAXWS.java:104) at org.jboss.ws.core.CommonSOAPBinding.bindFaultMessage(CommonSOAPBinding.java:623) at org.jboss.ws.core.server.ServiceEndpoint.processRequest(ServiceEndpoint.java:229) at org.jboss.ws.core.server.ServiceEndpointManager.processRequest(ServiceEndpointManager.java:448) at org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.SandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)


4. WebLogic 10. I have been using WebLogic server from version 8 onwards. So, I was very confident it would work. Here again, I used the Admin Console to deploy the application, but nope. It didn't want to deploy at any cost. I didn't even bother to goggle and find out why it was throwing an exception. It says error occurred while reading the deployment descriptor, why? I don't have one, I have just annotations.

Is it mandatory to have a
deployment descriptor in WebLogic for EJB 3.0 applications? The EJB 3.0 specification states that the deployment descriptor is not necessary. I don't know, and I won't even bother to find out.

Here comes the stack trace:

[EJB:011023]An error occurred while reading the deployment descriptor. The error was: : java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'ejb3.ws.biz.HelloManagerBean'.' weblogic.application.ModuleException: Exception preparing module: EJBModule(ejb3businesstier.jar) [EJB:011023]An error occurred while reading the deployment descriptor. The error was: : java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'ejb3.ws.biz.HelloManagerBean'. at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:399) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:189) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:87) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:719) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1186) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200) at weblogic.work.ExecuteThread.run(ExecuteThread.java:172) java.io.IOException: : java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'ejb3.ws.biz.HelloManagerBean' at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandardAnnotations(EjbDescriptorReaderImpl.java:324) at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:186) at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:93) at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:965) at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:335) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:189) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:87) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:719) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1186) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200) at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)

Wednesday, December 19, 2007

What's your New Year's Resolution : Work Related?

We all make resolutions as soon as the new year is approaching. Most common are losing weight, hit the gym, spend more time with family and so on and so forth.

This year I decided to make 3 resolutions for the coming year 2008 which are work related.
1. Not to use any software after the evaluation period is over
2. Learn something new
3. Give something back to the this wonderful community

I am guilty of just one software which I have been using. The intermittent dialog is the only way I know I haven't purchased the license. I know I am wrong. If developers keep using software without purchasing them, than we will all be out of job in days, right?

Anyway, I will buy the license or install some other open source tool which can replace this one. I did that with one program, the dialog was so annoying, and one of my colleagues suggested IZarc, and it is awesome.

So, what's your resolution for 2008?
Have you made one at all?

Monday, December 17, 2007

Are you still using EJB 2.1? Why?

Well, we all know and have read in many articles and several books that EJB 3.0 specification simplifies EJB development. It is much easier to learn, use and most importantly to test EJB 3.0 applications. There is no doubt at all about any of these claims.

I have been working on EJB 3.0 project from the past 3 months, and have indeed noticed major benefits of using this new version.

Having said that, I still see many companies using or planning to use the older version of EJB's. Some of the reasons they give are as follows:

1. We are still using JDK 1.4.2
2. We use an old version of the Application Server which doesn't support EJB 3.0 yet.
3. We don't have any statistics on the performance of EJB 3.0 projects.
4. We don't have resources or the budget to convert to a new version of JDK or EJB spec.

I am at loss to convince some of these developers(friends of mine) that this is the time to switch to Java 5 or even the latest Java 6 and EJB 3.0. But have failed to do so.

Raghu Kodali the author of the book "Beginning EJB™ 3 Application Development: From Novice to Professional" has written a blog entry called Does EJB 3.0 really make application development easy? In this article he shows the migration of the RosterApp application from EJB 2.1 to EJB 3.0. His book also has an entire chapter dedicated to migration "CHAPTER 10: Migrating EJB 2.x Applications to EJB 3".

How will you convince your manager if you are asked to implement a new project today using EJB 2.1 spec?
Have you faced such a situation at all?
Do you know any company which is using EJB 3.0?(include mine)
Are you using EJB 3.0 in your company?

Sunday, December 16, 2007

J2EE Vs .NET : Are major development shops moving to .NET?

OK, I am not starting yet another war between .NET vs J2EE. I need your input.

I was introduced to CTO of a major company last week. He was inquiring about what I do. I told him I am a Software Engineer, and do a lot of development on Java/J2EE. Next thing I hear from him is "Meera, all the major development shops I know, and also my company are moving to .NET. You should also do so soon.".

I told him I wasn't aware of any such drastic changes in my company, nor had seen any such changes in the communities I visit. He kept arguing the same. As far as I am concerned I can never argue.

The reason he gave were as follows:

1. Java/J2EE developers are very expensive.
2. Hard to find the right person.
3. Development using Java/J2EE isn't trivial.
4. .NET on the other hand is very simple.

I did a lot of research on Sunday. Wasted almost an entire day trying to see if I can find anything at all to convince him. Nope, all the data and statistics I found were way old( almost from 2002).

I strongly believe that if your development shop is already committed to Java & J2EE, continue using that. On the other hand, if you are already using Microsoft technologies, than continue using that.

The next thing I had in my mind was to blog this and see what you all had to say.

Is your development shop switching to .NET? Have you heard from your friends that they are switching to .NET? I need your input. Please leave your comments and any references you have.