When I try to deploy the Java EE project to weblogic 12c, I get the following error
No EJBs found in the ejb-jar file
However, this only happens when I deploy the EAR source folder and let weblogic compile it (split development directory). If I build the EAR first with ant and deploy it, it deploys fine.
I think the problem has something to do with the fact, that EJB module has both annotations and ejb-jar.xml descriptor present. Everything else is handled with annotations, and ejb-jar.xml just introduces the ejb-client-jar as such.
<?xml version="1.0" encoding="UTF-8"?> <ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" version="3.0"> <display-name>EJB</display-name> <ejb-client-jar>EJBClient.jar</ejb-client-jar> </ejb-jar>
Also, weblogic-ejb-jar.xml is used for additional configuration.
But what makes pre-built EAR and source deployment behave differently in this case and how to solve the problem? Application is using Java EE 5 and EJB 3.0.