You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Didier <mi...@hotmail.com> on 2010/02/10 17:01:07 UTC

ejb-jar.xml and JBoss

Hi, I am new to OpenEJB and I am trying to deploy a jar tested under OpenEJB to Jboss (with Maven 2) 
All works fine...but JBoss don't like the ejb-jar.xml file into src\main\resources\META-INF directory !
If I remove it, now openEJB failed! If i put the file inte src\test\resources, OpenEJB don't see it (why?)
I 've found a solution : exclude the file from the JAR's build with Maven (<exclude>**/ejb-jar.xml</exclude>)
Is it the right way to do?
Thanx in advance (and pardon my poor english ^^) 		 	   		  
_________________________________________________________________
Téléchargez Internet Explorer 8 et surfez sans laisser de trace !
http://clk.atdmt.com/FRM/go/182932252/direct/01/

OpenEJB and log4.xml

Posted by mid491 mid491 <mi...@hotmail.com>.
hi all,
it's seems that my log4j.xml is overwriting by openejb. When I set the system property "openejb.logger.external" to true, my log4j.xml is well taken and I can see my traces. But, no more openejb traces !
How to have both openEjb traces and my own traces with a log4.xml file ?
Here my debug's traces for log4j without the openejb.logger.external : I can see my log4xml settings at the beginning and OpenEjb after, but mines dont' work in my code after :
log4j: Threshold ="null".log4j: Level value for root is  [DEBUG].log4j: root level set to DEBUGlog4j: Class name: [org.apache.log4j.ConsoleAppender]log4j: Setting property [target] to [System.out].log4j: Setting property [threshold] to [DEBUG].log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"log4j: Setting property [conversionPattern] to [[%c{1}] %m%n].log4j: Adding appender named [CONSOLE] to category [root].log4j: Parsing for [root] with value=[fatal,C].log4j: Level token is [fatal].log4j: Category root set to FATALlog4j: Parsing appender named "C".log4j: Parsing layout options for "C".log4j: End of parsing for "C".log4j: Parsed "C" options.log4j: Parsing for [OpenEJB.server] with value=[info].log4j: Level token is [info].log4j: Category OpenEJB.server set to INFOlog4j: Handling log4j.additivity.OpenEJB.server=[null]log4j: Parsing for [org.apache.activemq] with value=[error].log4j: Level token is [error].log4j: Category org.apache.activemq set to ERRORlog4j: Handling log4j.additivity.org.apache.activemq=[null]log4j: Parsing for [openjpa] with value=[error].log4j: Level token is [error].log4j: Category openjpa set to ERRORlog4j: Handling log4j.additivity.openjpa=[null]log4j: Parsing for [Transaction] with value=[warn].log4j: Level token is [warn].log4j: Category Transaction set to WARNlog4j: Handling log4j.additivity.Transaction=[null]log4j: Parsing for [OpenEJB.options] with value=[info].log4j: Level token is [info].log4j: Category OpenEJB.options set to INFOlog4j: Handling log4j.additivity.OpenEJB.options=[null]log4j: Parsing for [OpenEJB] with value=[warn].log4j: Level token is [warn].log4j: Category OpenEJB set to WARNlog4j: Handling log4j.additivity.OpenEJB=[null]log4j: Parsing for [OpenEJB.startup] with value=[info].log4j: Level token is [info].log4j: Category OpenEJB.startup set to INFOlog4j: Handling log4j.additivity.OpenEJB.startup=[null]log4j: Parsing for [OpenEJB.hsql] with value=[info].log4j: Level token is [info].log4j: Category OpenEJB.hsql set to INFOlog4j: Handling log4j.additivity.OpenEJB.hsql=[null]log4j: Parsing for [OpenEJB.startup.config] with value=[info].log4j: Level token is [info].log4j: Category OpenEJB.startup.config set to INFOlog4j: Handling log4j.additivity.OpenEJB.startup.config=[null]log4j: Parsing for [CORBA-Adapter] with value=[info].log4j: Level token is [info].log4j: Category CORBA-Adapter set to INFOlog4j: Handling log4j.additivity.CORBA-Adapter=[null]log4j: Parsing for [org.apache.geronimo] with value=[error].log4j: Level token is [error].log4j: Category org.apache.geronimo set to ERRORlog4j: Handling log4j.additivity.org.apache.geronimo=[null]log4j: Parsing for [OpenEJB.startup.service] with value=[warn].log4j: Level token is [warn].log4j: Category OpenEJB.startup.service set to WARNlog4j: Handling log4j.additivity.OpenEJB.startup.service=[null]log4j: Finished configuring.log4j: Parsing for [root] with value=[fatal,C].log4j: Level token is [fatal].log4j: Category root set to FATALlog4j: Parsing appender named "C".log4j: Parsing layout options for "C".log4j: End of parsing for "C".log4j: Parsed "C" options.log4j: Parsing for [OpenEJB.server] with value=[info].log4j: Level token is [info].log4j: Category OpenEJB.server set to INFOlog4j: Handling log4j.additivity.OpenEJB.server=[null]log4j: Parsing for [org.apache.activemq] with value=[error].log4j: Level token is [error].log4j: Category org.apache.activemq set to ERRORlog4j: Handling log4j.additivity.org.apache.activemq=[null]log4j: Parsing for [openjpa] with value=[error].log4j: Level token is [error].log4j: Category openjpa set to ERRORlog4j: Handling log4j.additivity.openjpa=[null]log4j: Parsing for [Transaction] with value=[warn].log4j: Level token is [warn].log4j: Category Transaction set to WARNlog4j: Handling log4j.additivity.Transaction=[null]log4j: Parsing for [OpenEJB.options] with value=[info].log4j: Level token is [info].log4j: Category OpenEJB.options set to INFOlog4j: Handling log4j.additivity.OpenEJB.options=[null]log4j: Parsing for [OpenEJB] with value=[warn].log4j: Level token is [warn].log4j: Category OpenEJB set to WARNlog4j: Handling log4j.additivity.OpenEJB=[null]log4j: Parsing for [OpenEJB.startup] with value=[info].log4j: Level token is [info].log4j: Category OpenEJB.startup set to INFOlog4j: Handling log4j.additivity.OpenEJB.startup=[null]log4j: Parsing for [OpenEJB.hsql] with value=[info].log4j: Level token is [info].log4j: Category OpenEJB.hsql set to INFOlog4j: Handling log4j.additivity.OpenEJB.hsql=[null]log4j: Parsing for [OpenEJB.startup.config] with value=[info].log4j: Level token is [info].log4j: Category OpenEJB.startup.config set to INFOlog4j: Handling log4j.additivity.OpenEJB.startup.config=[null]log4j: Parsing for [CORBA-Adapter] with value=[info].log4j: Level token is [info].log4j: Category CORBA-Adapter set to INFOlog4j: Handling log4j.additivity.CORBA-Adapter=[null]log4j: Parsing for [org.apache.geronimo] with value=[error].log4j: Level token is [error].log4j: Category org.apache.geronimo set to ERRORlog4j: Handling log4j.additivity.org.apache.geronimo=[null]log4j: Parsing for [OpenEJB.startup.service] with value=[warn].log4j: Level token is [warn].log4j: Category OpenEJB.startup.service set to WARNlog4j: Handling log4j.additivity.OpenEJB.startup.service=[null]log4j: Finished configuring.
Here the config with the openejb.logger.external set to true :log4j: Threshold ="null".log4j: Level value for root is  [DEBUG].log4j: root level set to DEBUGlog4j: Class name: [org.apache.log4j.ConsoleAppender]log4j: Setting property [target] to [System.out].log4j: Setting property [threshold] to [DEBUG].log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"log4j: Setting property [conversionPattern] to [[%c{1}] %m%n].log4j: Adding appender named [CONSOLE] to category [root].[options] Using default 'openejb.nobanner=true'
Any ideas ?
thx )
 		 	   		  
_________________________________________________________________
Hotmail arrive sur votre téléphone ! Compatible Iphone, Windows Phone, Blackberry, …
http://www.messengersurvotremobile.com/?d=Hotmail

RE: ejb-jar.xml and JBoss

Posted by mid491 mid491 <mi...@hotmail.com>.


> From: my.reprive@gmail.com
> To: users@openejb.apache.org
> Subject: RE: ejb-jar.xml and JBoss
> Date: Wed, 10 Feb 2010 15:10:49 -0500
> 
> More likely than not, JBoss wants an EJB-JAR that looks like this:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <ejb-jar 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"
>          version="3.0">
> </ejb-jar>
> 
> 
> Try that w/ open ejb as well, both should work.
> 
> -----Original Message-----
> From: mid491 mid491 [mailto:mid491@hotmail.com] 
> Sent: Wednesday, February 10, 2010 3:02 PM
> To: users@openejb.apache.org
> Subject: RE: ejb-jar.xml and JBoss
> 
> 
> Maven package the ejb-jar.xml at the right place (as you said), but it is
> empty (with just <ejb-jar/>) and JBoss don't like it (because he don't need
> it, except if I describe all the EJB i guess but I don't want that :
> convention over configuration) 
> That' s why I exclude it from the jar Maven's goal.
> to me, it should be into /src/test path but openEJB don't see it.
> 
> > From: my.reprive@gmail.com
> > To: users@openejb.apache.org
> > Subject: RE: ejb-jar.xml and JBoss
> > Date: Wed, 10 Feb 2010 14:41:15 -0500
> > 
> > ejb-jar.xml should only be in yourjar.jar:!/META-INF/ nowhere else.  If
> > you're using maven2, are you setting the packaging to ejb?  If you do, it
> > should automatically pull the file from src/main/resources/META-INF into
> the
> > jar in the appropriate location.
> > 
> > -----Original Message-----
> > From: Didier [mailto:mid491@hotmail.com] 
> > Sent: Wednesday, February 10, 2010 11:01 AM
> > To: users@openejb.apache.org
> > Subject: ejb-jar.xml and JBoss
> > 
> > 
> > Hi, I am new to OpenEJB and I am trying to deploy a jar tested under
> OpenEJB
> > to Jboss (with Maven 2) 
> > All works fine...but JBoss don't like the ejb-jar.xml file into
> > src\main\resources\META-INF directory !
> > If I remove it, now openEJB failed! If i put the file inte
> > src\test\resources, OpenEJB don't see it (why?)
> > I 've found a solution : exclude the file from the JAR's build with Maven
> > (<exclude>**/ejb-jar.xml</exclude>)
> > Is it the right way to do?
> > Thanx in advance (and pardon my poor english ^^)
> > 
> > _________________________________________________________________
> > Téléchargez Internet Explorer 8 et surfez sans laisser de trace !
> > http://clk.atdmt.com/FRM/go/182932252/direct/01/
> > No virus found in this incoming message.
> > Checked by AVG - www.avg.com 
> > Version: 8.5.435 / Virus Database: 271.1.1/2679 - Release Date: 02/10/10
> > 07:40:00
> > 
>  		 	   		  
> _________________________________________________________________
> Téléchargez Internet Explorer 8 et surfez sans laisser de trace !
> http://clk.atdmt.com/FRM/go/182932252/direct/01/
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.435 / Virus Database: 271.1.1/2679 - Release Date: 02/10/10
> 07:40:00
> 
 		 	   		  
_________________________________________________________________
Discutez en direct avec vos amis sur Messenger !
http://www.windowslive.fr/messenger

RE: ejb-jar.xml and JBoss

Posted by "John D. Ament" <my...@gmail.com>.
More likely than not, JBoss wants an EJB-JAR that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar 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"
         version="3.0">
</ejb-jar>


Try that w/ open ejb as well, both should work.

-----Original Message-----
From: mid491 mid491 [mailto:mid491@hotmail.com] 
Sent: Wednesday, February 10, 2010 3:02 PM
To: users@openejb.apache.org
Subject: RE: ejb-jar.xml and JBoss


Maven package the ejb-jar.xml at the right place (as you said), but it is
empty (with just <ejb-jar/>) and JBoss don't like it (because he don't need
it, except if I describe all the EJB i guess but I don't want that :
convention over configuration) 
That' s why I exclude it from the jar Maven's goal.
to me, it should be into /src/test path but openEJB don't see it.

> From: my.reprive@gmail.com
> To: users@openejb.apache.org
> Subject: RE: ejb-jar.xml and JBoss
> Date: Wed, 10 Feb 2010 14:41:15 -0500
> 
> ejb-jar.xml should only be in yourjar.jar:!/META-INF/ nowhere else.  If
> you're using maven2, are you setting the packaging to ejb?  If you do, it
> should automatically pull the file from src/main/resources/META-INF into
the
> jar in the appropriate location.
> 
> -----Original Message-----
> From: Didier [mailto:mid491@hotmail.com] 
> Sent: Wednesday, February 10, 2010 11:01 AM
> To: users@openejb.apache.org
> Subject: ejb-jar.xml and JBoss
> 
> 
> Hi, I am new to OpenEJB and I am trying to deploy a jar tested under
OpenEJB
> to Jboss (with Maven 2) 
> All works fine...but JBoss don't like the ejb-jar.xml file into
> src\main\resources\META-INF directory !
> If I remove it, now openEJB failed! If i put the file inte
> src\test\resources, OpenEJB don't see it (why?)
> I 've found a solution : exclude the file from the JAR's build with Maven
> (<exclude>**/ejb-jar.xml</exclude>)
> Is it the right way to do?
> Thanx in advance (and pardon my poor english ^^)
> 
> _________________________________________________________________
> Téléchargez Internet Explorer 8 et surfez sans laisser de trace !
> http://clk.atdmt.com/FRM/go/182932252/direct/01/
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.435 / Virus Database: 271.1.1/2679 - Release Date: 02/10/10
> 07:40:00
> 
 		 	   		  
_________________________________________________________________
Téléchargez Internet Explorer 8 et surfez sans laisser de trace !
http://clk.atdmt.com/FRM/go/182932252/direct/01/
No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.435 / Virus Database: 271.1.1/2679 - Release Date: 02/10/10
07:40:00


RE: ejb-jar.xml and JBoss

Posted by mid491 mid491 <mi...@hotmail.com>.
Maven package the ejb-jar.xml at the right place (as you said), but it is empty (with just <ejb-jar/>) and JBoss don't like it (because he don't need it, except if I describe all the EJB i guess but I don't want that : convention over configuration) 
That' s why I exclude it from the jar Maven's goal.
to me, it should be into /src/test path but openEJB don't see it.

> From: my.reprive@gmail.com
> To: users@openejb.apache.org
> Subject: RE: ejb-jar.xml and JBoss
> Date: Wed, 10 Feb 2010 14:41:15 -0500
> 
> ejb-jar.xml should only be in yourjar.jar:!/META-INF/ nowhere else.  If
> you're using maven2, are you setting the packaging to ejb?  If you do, it
> should automatically pull the file from src/main/resources/META-INF into the
> jar in the appropriate location.
> 
> -----Original Message-----
> From: Didier [mailto:mid491@hotmail.com] 
> Sent: Wednesday, February 10, 2010 11:01 AM
> To: users@openejb.apache.org
> Subject: ejb-jar.xml and JBoss
> 
> 
> Hi, I am new to OpenEJB and I am trying to deploy a jar tested under OpenEJB
> to Jboss (with Maven 2) 
> All works fine...but JBoss don't like the ejb-jar.xml file into
> src\main\resources\META-INF directory !
> If I remove it, now openEJB failed! If i put the file inte
> src\test\resources, OpenEJB don't see it (why?)
> I 've found a solution : exclude the file from the JAR's build with Maven
> (<exclude>**/ejb-jar.xml</exclude>)
> Is it the right way to do?
> Thanx in advance (and pardon my poor english ^^)
> 
> _________________________________________________________________
> Téléchargez Internet Explorer 8 et surfez sans laisser de trace !
> http://clk.atdmt.com/FRM/go/182932252/direct/01/
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.435 / Virus Database: 271.1.1/2679 - Release Date: 02/10/10
> 07:40:00
> 
 		 	   		  
_________________________________________________________________
Téléchargez Internet Explorer 8 et surfez sans laisser de trace !
http://clk.atdmt.com/FRM/go/182932252/direct/01/

RE: ejb-jar.xml and JBoss

Posted by "John D. Ament" <my...@gmail.com>.
ejb-jar.xml should only be in yourjar.jar:!/META-INF/ nowhere else.  If
you're using maven2, are you setting the packaging to ejb?  If you do, it
should automatically pull the file from src/main/resources/META-INF into the
jar in the appropriate location.

-----Original Message-----
From: Didier [mailto:mid491@hotmail.com] 
Sent: Wednesday, February 10, 2010 11:01 AM
To: users@openejb.apache.org
Subject: ejb-jar.xml and JBoss


Hi, I am new to OpenEJB and I am trying to deploy a jar tested under OpenEJB
to Jboss (with Maven 2) 
All works fine...but JBoss don't like the ejb-jar.xml file into
src\main\resources\META-INF directory !
If I remove it, now openEJB failed! If i put the file inte
src\test\resources, OpenEJB don't see it (why?)
I 've found a solution : exclude the file from the JAR's build with Maven
(<exclude>**/ejb-jar.xml</exclude>)
Is it the right way to do?
Thanx in advance (and pardon my poor english ^^)

_________________________________________________________________
Téléchargez Internet Explorer 8 et surfez sans laisser de trace !
http://clk.atdmt.com/FRM/go/182932252/direct/01/
No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.435 / Virus Database: 271.1.1/2679 - Release Date: 02/10/10
07:40:00