Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Eclipselink is reverting my LAZY settings(Because weaving )
Eclipselink is reverting my LAZY settings [message #1004766] Wed, 23 January 2013 20:46 Go to next message
Eduardo Frazão is currently offline Eduardo FrazãoFriend
Messages: 123
Registered: January 2012
Senior Member
Hi.. When my application starts, Eclipselink loggs this warnings:

[2013-01-23 18:34:00.979] INFO  http-bio-8080-exec-10        System.out                                                        [EL Warning]: metadata: 2013-01-23 18:34:00.979--ServerSession(1512579774)--Reverting the lazy setting on the OneToOne or ManyToOne attribute [usina] for the entity class [class br.com.autmix.domain.traco.TracoFamilia] since weaving was not enabled or did not occur. 


For various entities

In my persistence.xml weaving is enabled:

<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
	
	<exclude-unlisted-classes>false</exclude-unlisted-classes>
	<properties>
			<!-- Fazer waving das classes -->
			<property name="eclipselink.weaving" value="true"/>
			
			<property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver" />
			<property name="javax.persistence.jdbc.url" value="jdbc:postgresql://localhost:5432/autmix_2" />
			<property name="javax.persistence.jdbc.user" value="postgres" />
			<property name="javax.persistence.jdbc.password" value="postgres" />
			
			<property name="eclipselink.target-database" value="org.eclipse.persistence.platform.database.PostgreSQLPlatform" />
			<property name="eclipselink.jdbc.connection_pool.default.initial" value="2" />
			<property name="eclipselink.jdbc.connection_pool.default.min" value="2" />
			<property name="eclipselink.jdbc.connection_pool.default.max" value="5" />

			<!-- Geracao de DDL -->
			<property name="eclipselink.ddl-generation" value="none" />
			
			<!-- Log Configs gerais -->
			<property name="eclipselink.logging.logger" value="ServerLogger"/>
			
			<!-- Log config (Warns) -->
			<property name="eclipselink.logging.level" value="WARNING"/>
			<property name="eclipselink.logging.parameters" value="true"/>


This is the normal behavior for this kind of config?
Re: Eclipselink is reverting my LAZY settings [message #1005081 is a reply to message #1004766] Thu, 24 January 2013 13:04 Go to previous messageGo to next message
Mindaugas Pocius is currently offline Mindaugas PociusFriend
Messages: 7
Registered: October 2012
Junior Member
Is your aplication JEE or SDK?
Re: Eclipselink is reverting my LAZY settings [message #1005103 is a reply to message #1005081] Thu, 24 January 2013 13:40 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
Weaving is required to allow lazy loading of OneToOne and ManyToOne relationships, otherwise the relationship must be eagerly fetched as the warning states. Weaving is described here:
http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Advanced_JPA_Development/Performance/Weaving

Dynamic weaving requires the use of a java agent in java SE, but is automatic with container managed persistence units. If you cannot use dynamic weaving, static weaving allows the classes to be modified prior to deployment.
Re: Eclipselink is reverting my LAZY settings [message #1005104 is a reply to message #1005103] Thu, 24 January 2013 13:42 Go to previous messageGo to next message
Mindaugas Pocius is currently offline Mindaugas PociusFriend
Messages: 7
Registered: October 2012
Junior Member
http://stackoverflow.com/questions/10431819/how-to-apply-static-weaving-ant-task-with-eclipse-link-jpa-in-netbeans

I used this to enable static weaving for my SDK application.
Re: Eclipselink is reverting my LAZY settings [message #1005107 is a reply to message #1005081] Thu, 24 January 2013 13:44 Go to previous messageGo to next message
Eduardo Frazão is currently offline Eduardo FrazãoFriend
Messages: 123
Registered: January 2012
Senior Member
It's SDK.

Im using OSGi, on Eclipse Virgo and Gemini JPA, but its not an EE Container.

[Updated on: Thu, 24 January 2013 13:45]

Report message to a moderator

Re: Eclipselink is reverting my LAZY settings [message #1005112 is a reply to message #1005107] Thu, 24 January 2013 13:51 Go to previous messageGo to next message
Eduardo Frazão is currently offline Eduardo FrazãoFriend
Messages: 123
Registered: January 2012
Senior Member
No problem in use static weaving, but, can I automate the weaving on eclipse, to deploy alread woven classes when developing?
Re: Eclipselink is reverting my LAZY settings [message #1005365 is a reply to message #1005112] Fri, 25 January 2013 06:23 Go to previous message
Mindaugas Pocius is currently offline Mindaugas PociusFriend
Messages: 7
Registered: October 2012
Junior Member
I have it auto-enabled on NetBeans, maybe this will help:
<target name="[b]-post-jar[/b]" description="perform weaving">
        <taskdef name="weave" classname="org.eclipse.persistence.tools.weaving.jpa.StaticWeaveAntTask"/>
        <weave 
            source="C:\Users\Minutis\Documents\NetBeansProjects\PUMinutis\dist\PUMinutisUnweaven.jar" <!-- default NetBeans jar -->
            target="C:\Users\Minutis\Documents\NetBeansProjects\PUMinutis\dist\PUMinutis.jar" <!-- my weaven jar -->
        />
    </target>


You can override '-post-jar' target and NetBeans will automaticly do this at compile time.
Previous Topic:Related sub entities not loaded - EAGER ignored?
Next Topic:SQLServerException: Some part of your SQL statement is nested too deeply.
Goto Forum:
  


Current Time: Tue Mar 19 05:20:41 GMT 2024

Powered by FUDForum. Page generated in 0.02154 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top