openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Dellisanti <nicola.dellisa...@gmail.com>
Subject Re: Jar not loaded: Unknown module type
Date Wed, 09 Feb 2011 13:17:06 GMT
in my META-INF there is 3 files:

- ejb-jar.xml
- manifest.mf
- persistence.xml

in my jar there is 2 project: the ejb project end a jpa (eclipselink)
project (as I have the persistence.xml).

the ejb-jar.xml is

<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
   <enterprise-beans>
      <!-- A minimal session EJB deployment -->
      <session id="RichTestEJBBean">
         <ejb-name>RichTestEJBBean</ejb-name>
   <display-name>RichTestEJBBean</display-name>
         <ejb-name>RichTestEJBBean</ejb-name>
         <business-local>it.het.richtest.ejb.RichTestEJB</business-local>
         <ejb-class>it.het.richtest.ejb.RichTestEJBBean</ejb-class>
         <!-- or Stateful -->
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>
   <resource-ref>
     <res-ref-name>jdbc/MySqlDataSource</res-ref-name>
     <res-type>javax.sql.DataSource</res-type>
     <mapped-name>MySqlDataSource</mapped-name>
   </resource-ref>
      </session>

 </enterprise-beans>


</ejb-jar>

the manifest is

Manifest-Version: 1.0


the persistence.xml is

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
 <persistence-unit name="RichTestJPA" transaction-type="JTA">
  <description>Unita di persistenza JTA</description>
  <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
  <jta-data-source>MySqlDataSource</jta-data-source>
  <class>it.het.jpa.test.Descrizioni</class>
  <class>it.het.jpa.test.DescrizioniPk</class>
  <properties>
   <property name="eclipselink.target-database" value="MySQL"/>
   <property name="eclipselink.logging.level" value="FINE"/>
  </properties>
 </persistence-unit>

 <persistence-unit name="RichTestLocal" transaction-type="RESOURCE_LOCAL">
  <description>Unita di persistenza Resource Local</description>
  <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
  <class>it.het.jpa.test.Descrizioni</class>
  <class>it.het.jpa.test.DescrizioniPk</class>
  <properties>
   <property name="eclipselink.jdbc.password" value="testuser"/>
   <property name="eclipselink.jdbc.user" value="testuser"/>
   <property name="eclipselink.jdbc.driver" value="com.mysql.jdbc.Driver"/>
   <property name="eclipselink.jdbc.url"
value="jdbc:mysql://localhost:3306/test"/>
   <property name="eclipselink.ddl-generation"
value="drop-and-create-tables"/>
   <property name="eclipselink.logging.level" value="INFO"/>
  </properties>
 </persistence-unit>

</persistence>

in my ejb project I use the persistence unit RichTestJPA.
2011/2/9 Jean-Louis MONTEIRO <jeanouii@gmail.com>

>
> The file path seems a bit strange to me
> url=file:/C:/Programmi/apache-tomcat-6.0.32/richtestejb.jar
>
> It should be located in ${catalina.base}/webapps/<your webapp>/WEB-INF/lib
> directory
>
> During deployment, OpenEJB needs to identify the module type. Basically,
> you
> have an appModule (ear level), webappModule (war), ejbModule (jar),
> clientModule (jar) ...
>
> To do that, it first looks to descriptors and then annotations.
>
> Could you please check the META-INF/ of you jar?
>
> Jean-Louis
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Jar-not-loaded-Unknown-module-type-tp3297019p3297189.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message