Archive

Archive for the ‘WAS’ Category

No EJBs found in the ejb-jar file ‘MyApplication.jar’. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation

30 November 2010 4 comments

Another migration error. In my application.xml I have defined an <ejb> module but my ejb project only contains EJB 3.0 @Entity annotated beans. WebLogic (10.3) doesn’t like this and expects a @Stateless, @Stateful or @MessageDriven annotated bean. It doesn’t find any and throws a

No EJBs found in the ejb-jar file ‘MyApplication.jar’. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation

exception. The exact same jar file works fine on JBoss and WebSphere though. Not sure which one is right but I had to add a dummy @Stateless EJB in the jar file order to make it work.

Advertisements
Categories: JBoss, Seam, WAS, WebLogic Tags: , , , ,

Invalid Implementation Key, com.ibm.ws.transaction.NonRecovWSTxManager

4 February 2010 Leave a comment

I was getting this com.ibm.websphere.naming.CannotInstantiateObjectException exception with this error a few days ago, with a long stack trace

WARNING: jndiNamingException
com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is java.lang.NoClassDefFoundError: Invalid Implementation Key, com.ibm.ws.transaction.NonRecovWSTxManager]
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt( Helpers.java:1000)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup( Helpers.java:705)
...
...
... 33 more

when I tried to get a reference to a JNDI datasource in Websphere Application Server.

If you do a search on the file system for a file called “implfactory.jar”, and you unjar it, you will see that it contains a configuration XML file with (among the rest) the following line

<!-- JTA Non Recoverable TransactionManager implementation class -->
<factory interface="com.ibm.ws.transaction.NonRecovWSTxManager" impl="com.ibm.ws.Transaction.client.NonRecoverableTranManagerSet" />

This is where the implementation key com.ibm.ws.transaction.NonRecovWSTxManager is defined, and its corresponding class (com.ibm.ws.Transaction.client.NonRecoverableTranManagerSet). This class can be found in the “com.ibm.ws.runtime_6.1.0.jar” file. You would think that by putting these jars in the classpath the problem would be solved, but alas, these files are (probably) already in the classpath, so it makes no difference.

The solution provided by IBM, does not work either, or, I should better say it didn’t work with me.

An actual and far simpler solution is to add the “com.ibm.ws.webservices.thinclient_6.1.0.jar” in the classpath. This solves the problem and it will probably work for all the “Invalid Implementation Key” errors.

Categories: WAS Tags: