tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: JPA Entities not being enhanced
Date Fri, 09 Oct 2009 05:03:51 GMT
This can happen when the test case itself references the entity class  
(causing it to be loaded) before OpenEJB has been loaded (more  
specifically before OpenJPA has loaded).

Try listing it explicitly via a <class> element inside the  
<persistence-unit> declaration of the persistence.xml.  That *should*  
allow the agent to see that the class needs to be enhanced even though  
OpenJPA hasn't technically loaded the persistence unit yet and found  
all the entities.

-David

On Oct 2, 2009, at 12:12 PM, thejav wrote:

>
> I am getting the following message:
>
> "This configuration disallows runtime optimization, but the  
> following listed
> types were not enhanced at build time or at class load time with a
> javaagent"
>
> However i am launching the JVM with a javaagent.... as follows:
>
> -javaagent:/home/javierg/workspace/tool_workspace/ToolsUserLibraries/ 
> openEJB/openejb-javaagent-3.1.1.jar
>
>
> Why are the entities not being enhanced. I am including the list of  
> info
> messages for more context.
>
> Apache OpenEJB 3.1.1    build: 20090530-06:18
> http://openejb.apache.org/
> INFO - openejb.home = /home/javierg/workspace/tool_workspace/ 
> CogentEJBTest
> INFO - openejb.base = /home/javierg/workspace/tool_workspace/ 
> CogentEJBTest
> INFO - Configuring Service(id=Default Security Service,
> type=SecurityService, provider-id=Default Security Service)
> INFO - Configuring Service(id=Default Transaction Manager,
> type=TransactionManager, provider-id=Default Transaction Manager)
> INFO - Using
> 'openejb.deployments.classpath.include=.*(CogentEJB/ejbModule| 
> CogentEJBTest/bin|RTV2JPA).*'
> INFO - Using 'openejb.deployments.classpath.exclude=.*'
> INFO - Using 'openejb.deployments.classpath.filter.descriptors=true'
> INFO - Found EjbModule in classpath:
> /home/javierg/workspace/tool_workspace/CogentEJB/ejbModule
> INFO - Found EjbModule in classpath:
> /home/javierg/workspace/tool_workspace/CogentEJBTest/bin
> INFO - Found PersistenceModule in classpath:
> /home/javierg/workspace/tool_workspace/RTV2JPA/src
> INFO - Beginning load:
> /home/javierg/workspace/tool_workspace/CogentEJB/ejbModule
> INFO - Beginning load:
> /home/javierg/workspace/tool_workspace/CogentEJBTest/bin
> INFO - Beginning load: /home/javierg/workspace/tool_workspace/ 
> RTV2JPA/src
> INFO - Configuring enterprise application: classpath.ear
> INFO - Configuring Service(id=Default Stateless Container,  
> type=Container,
> provider-id=Default Stateless Container)
> INFO - Auto-creating a container for bean CogentQueryManager:
> Container(type=STATELESS, id=Default Stateless Container)
> INFO - Configuring PersistenceUnit(name=persistence/cogent)
> INFO - Configuring Service(id=Default JDBC Database, type=Resource,
> provider-id=Default JDBC Database)
> INFO - Auto-creating a Resource with id 'Default JDBC Database' of  
> type
> 'DataSource for 'persistence/cogent'.
> INFO - Configuring Service(id=Default Unmanaged JDBC Database,
> type=Resource, provider-id=Default Unmanaged JDBC Database)
> INFO - Auto-creating a Resource with id 'Default Unmanaged JDBC  
> Database' of
> type 'DataSource for 'persistence/cogent'.
> INFO - Adjusting PersistenceUnit persistence/cogent <jta-data- 
> source> to
> Resource ID 'Default JDBC Database' from 'jdbc/Portal-cogent'
> INFO - Adjusting PersistenceUnit persistence/cogent <non-jta-data- 
> source> to
> Resource ID 'Default Unmanaged JDBC Database' from 'null'
> INFO - Enterprise application "classpath.ear" loaded.
> INFO - Assembling app: classpath.ear
> INFO - PersistenceUnit(name=persistence/cogent,
> provider=org.apache.openjpa.persistence.PersistenceProviderImpl)
> INFO - Jndi(name=CogentQueryManagerLocal) -->
> Ejb(deployment-id=CogentQueryManager)
> INFO - Jndi(name=CogentSessionBeanLocal) -->
> Ejb(deployment-id=CogentSessionBean)
> INFO - Created Ejb(deployment-id=CogentSessionBean,
> ejb-name=CogentSessionBean, container=Default Stateless Container)
> INFO - Created Ejb(deployment-id=CogentQueryManager,
> ejb-name=CogentQueryManager, container=Default Stateless Container)
> INFO - Deployed Application(path=classpath.ear)
> 11502  persistence/cogent  INFO   [main] openjpa.Runtime - Starting  
> OpenJPA
> 1.2.0
> 12111  persistence/cogent  INFO   [main] openjpa.jdbc.JDBC - Using
> dictionary class "org.apache.openjpa.jdbc.sql.HSQLDictionary" (HSQL  
> Database
> Engine 1.8.0 ,HSQL Database Engine Driver 1.8.0).
> 13229  persistence/cogent  TRACE  [main] openjpa.jdbc.SQL - <t  
> 1854434952,
> conn 31064538> executing prepstmnt 137627700 SELECT SEQUENCE_SCHEMA,
> SEQUENCE_NAME FROM INFORMATION_SCHEMA.SYSTEM_SEQUENCES
> 13234  persistence/cogent  TRACE  [main] openjpa.jdbc.SQL - <t  
> 1854434952,
> conn 31064538> [4 ms] spent
> 13255  persistence/cogent  TRACE  [main] openjpa.jdbc.SQL - <t  
> 1854434952,
> conn 31064538> executing stmnt 6422626 CREATE TABLE CHANGE_HISTORY
> (UPDATE_ID INTEGER NOT NULL IDENTITY, DRAFT_ID BIGINT NOT NULL,
> FIELD_UPDATED VARCHAR(255), FIELD_VALUE VARCHAR(255), TABLE_NAME
> VARCHAR(255), UPDATED_BY VARCHAR(255) NOT NULL, LAST_UPDATE_TS  
> TIMESTAMP NOT
> NULL)
> 13258  persistence/cogent  TRACE  [main] openjpa.jdbc.SQL - <t  
> 1854434952,
> conn 31064538> [1 ms] spent
> 13264  persistence/cogent  TRACE  [main] openjpa.jdbc.SQL - <t  
> 1854434952,
> conn 31064538> executing stmnt 697903513 CREATE TABLE  
> CUSTOMER_EXPOSURE
> (CUSTOMER_EXPOSURE_ID INTEGER NOT NULL IDENTITY,  
> CUSTOMER_EXPOSURE_TEXT
> VARCHAR(255) NOT NULL, VERSION INTEGER)
> 13275  persistence/cogent  TRACE  [main] openjpa.jdbc.SQL - <t  
> 1854434952,
> conn 31064538> [11 ms] spent
> 13278  persistence/cogent  TRACE  [main] openjpa.jdbc.SQL - <t  
> 1854434952,
> conn 31064538> executing stmnt 855061239 CREATE TABLE  
> FIX_DATE_OVERRIDE
> (DRAFT_ID BIGINT NOT NULL, APPROVED_BY VARCHAR(255), REASON  
> VARCHAR(255),
> WORKAROUND INTEGER, VERSION INTEGER, CUSTOMER_EXPOSURE_ID INTEGER  
> NOT NULL,
> PRIMARY KEY (DRAFT_ID))
> 13278  persistence/cogent  TRACE  [main] openjpa.jdbc.SQL - <t  
> 1854434952,
> conn 31064538> [0 ms] spent
> 13280  persistence/cogent  TRACE  [main] openjpa.jdbc.SQL - <t  
> 1854434952,
> conn 31064538> executing stmnt 1000356768 CREATE INDEX
> I_FX_DRRD_CUSTOMEREXPOSURE ON FIX_DATE_OVERRIDE (CUSTOMER_EXPOSURE_ID)
> 13290  persistence/cogent  TRACE  [main] openjpa.jdbc.SQL - <t  
> 1854434952,
> conn 31064538> [10 ms] spent
> 13442  persistence/cogent  WARN   [main] openjpa.Enhance - This
> configuration disallows runtime optimization, but the following  
> listed types
> were not enhanced at build time or at class load time with a  
> javaagent:
> "[class com.ibm.multitool.cogent.entity.CustomerExposure]".
>
> -- 
> View this message in context: http://www.nabble.com/JPA-Entities-not-being-enhanced-tp25721030p25721030.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
>


Mime
View raw message