You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by tbush <to...@gmail.com> on 2009/12/05 19:53:49 UTC

EJB2 - Unit Testing -- MetatData loops

Hi,

I'm trying to use OpenEJB to write some unit tests around an older app which
is EJB2.  I have a the EJBs deploying when the test starts and a data source
pointing to a test database (Postgres).  I see the in the logs (everything
at default), the openjpa.jdbc.Schema is reading the database schema.  Then
it start looping starting with these lines:

[Dec 05, 2009 1:40:39 PM DEBUG] (openjpa.MetaData) Scanning resource
"META-INF/openejb-cmp-generated-orm.xml" for persistent types. 
[Dec 05, 2009 1:40:39 PM DEBUG] (openjpa.MetaData) Scan of
"META-INF/openejb-cmp-generated-orm.xml" found persistent types
[Ljava.lang.String;@18510b3. 

then outputs this for all cmps (I changed the bean names):

[Dec 05, 2009 1:40:49 PM DEBUG] (openjpa.MetaData) Generating default
metadata for type "openejb.net.beanName". 
[Dec 05, 2009 1:40:49 PM DEBUG] (openjpa.MetaData) Using reflection for
metadata generation. 
[Dec 05, 2009 1:40:49 PM DEBUG] (openjpa.MetaData) Parsing class
"openejb.net.bean". 
[Dec 05, 2009 1:40:49 PM DEBUG] (openjpa.MetaData) Parsing class
"openejb.net.bean". 

then it starts again with the "Scanning resource" log.  It does this until
it runs out of memory.  

Has anyone experienced this?  Or could help me get this unit testing
working?

Thanks!
-- 
View this message in context: http://old.nabble.com/EJB2---Unit-Testing----MetatData-loops-tp26658235p26658235.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: EJB2 - Unit Testing -- MetatData loops

Posted by tbush <to...@gmail.com>.
I figured this out, I needed to add the javaagent to the unit test.



tbush wrote:
> 
> Hi,
> 
> I'm trying to use OpenEJB to write some unit tests around an older app
> which is EJB2.  I have a the EJBs deploying when the test starts and a
> data source pointing to a test database (Postgres).  I see the in the logs
> (everything at default), the openjpa.jdbc.Schema is reading the database
> schema.  Then it start looping starting with these lines:
> 
> [Dec 05, 2009 1:40:39 PM DEBUG] (openjpa.MetaData) Scanning resource
> "META-INF/openejb-cmp-generated-orm.xml" for persistent types. 
> [Dec 05, 2009 1:40:39 PM DEBUG] (openjpa.MetaData) Scan of
> "META-INF/openejb-cmp-generated-orm.xml" found persistent types
> [Ljava.lang.String;@18510b3. 
> 
> then outputs this for all cmps (I changed the bean names):
> 
> [Dec 05, 2009 1:40:49 PM DEBUG] (openjpa.MetaData) Generating default
> metadata for type "openejb.net.beanName". 
> [Dec 05, 2009 1:40:49 PM DEBUG] (openjpa.MetaData) Using reflection for
> metadata generation. 
> [Dec 05, 2009 1:40:49 PM DEBUG] (openjpa.MetaData) Parsing class
> "openejb.net.bean". 
> [Dec 05, 2009 1:40:49 PM DEBUG] (openjpa.MetaData) Parsing class
> "openejb.net.bean". 
> 
> then it starts again with the "Scanning resource" log.  It does this until
> it runs out of memory.  
> 
> Has anyone experienced this?  Or could help me get this unit testing
> working?
> 
> Thanks!
> 

-- 
View this message in context: http://old.nabble.com/EJB2---Unit-Testing----MetatData-loops-tp26658235p26735282.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: EJB2 - Unit Testing -- MetatData loops

Posted by tbush <to...@gmail.com>.
Sorry, one mistake in my assessment.  This looping:

[Dec 05, 2009 1:40:39 PM DEBUG] (openjpa.MetaData) Scanning resource
"META-INF/openejb-cmp-generated-orm.xml" for persistent types.
[Dec 05, 2009 1:40:39 PM DEBUG] (openjpa.MetaData) Scan of
"META-INF/openejb-cmp-generated-orm.xml" found persistent types
[Ljava.lang.String;@18510b3.

then outputs this for all cmps (I changed the bean names):

[Dec 05, 2009 1:40:49 PM DEBUG] (openjpa.MetaData) Generating default
metadata for type "openejb.net.beanName".
[Dec 05, 2009 1:40:49 PM DEBUG] (openjpa.MetaData) Using reflection for
metadata generation.
[Dec 05, 2009 1:40:49 PM DEBUG] (openjpa.MetaData) Parsing class
"openejb.net.bean".
[Dec 05, 2009 1:40:49 PM DEBUG] (openjpa.MetaData) Parsing class
"openejb.net.bean".


starts when I attempt to access the database for the first time via an
entity bean.

Thanks 




tbush wrote:
> 
> Hi,
> 
> I'm trying to use OpenEJB to write some unit tests around an older app
> which is EJB2.  I have a the EJBs deploying when the test starts and a
> data source pointing to a test database (Postgres).  I see the in the logs
> (everything at default), the openjpa.jdbc.Schema is reading the database
> schema.  Then it start looping starting with these lines:
> 
> [Dec 05, 2009 1:40:39 PM DEBUG] (openjpa.MetaData) Scanning resource
> "META-INF/openejb-cmp-generated-orm.xml" for persistent types. 
> [Dec 05, 2009 1:40:39 PM DEBUG] (openjpa.MetaData) Scan of
> "META-INF/openejb-cmp-generated-orm.xml" found persistent types
> [Ljava.lang.String;@18510b3. 
> 
> then outputs this for all cmps (I changed the bean names):
> 
> [Dec 05, 2009 1:40:49 PM DEBUG] (openjpa.MetaData) Generating default
> metadata for type "openejb.net.beanName". 
> [Dec 05, 2009 1:40:49 PM DEBUG] (openjpa.MetaData) Using reflection for
> metadata generation. 
> [Dec 05, 2009 1:40:49 PM DEBUG] (openjpa.MetaData) Parsing class
> "openejb.net.bean". 
> [Dec 05, 2009 1:40:49 PM DEBUG] (openjpa.MetaData) Parsing class
> "openejb.net.bean". 
> 
> then it starts again with the "Scanning resource" log.  It does this until
> it runs out of memory.  
> 
> Has anyone experienced this?  Or could help me get this unit testing
> working?
> 
> Thanks!
> 

-- 
View this message in context: http://old.nabble.com/EJB2---Unit-Testing----MetatData-loops-tp26658235p26658371.html
Sent from the OpenEJB User mailing list archive at Nabble.com.