This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This came from a discussion about issue 83475. It can be helpful if NB detects using JPA in a J2EE 1.4 or earlier container and sets weaving to false. The way to do it is to add the following line into persistence.xml: <property name="toplink.weaving" value="false"/>
Can be implemented for example by changing the o.n.m.j2ee.persistence.provider.Provider#getDefaultVendorSpecificProperties() so that it takes the Java EE version as an argument. Should be doable for 6.0, setting the TM accordingly.
Issue 83475 desc20 says that setting toplink.weaving to false "did not help and I got the same exception:". Who does this issue help?
This is independent of the original issue - dynamic weaving is not possible if the container can't provide the appropriate setup. But it can very well be that TopLink now doesn't even try to weave if it's not possible.
I was reading the TopLink sources recently and I think I saw that it silently doesn't do any weaving if the agent is not on the classpath. But perhaps that was only for the Java SE environment -- I'm not sure. Anyway, I don't understand much what this issue is about, whom it helps and what problem it avoids. I plan to close it as INVALID soon unless more information is provided. Thanks.
The issue is about containers that do not provide tight JPA integration (i.e. whose version is prior to JEE 5). In such containers users can only rely on Java SE style to get a hold of EMF, but can't use dynamic weaving because they do not start the VM themselves. Originally TopLink tried to perform the weaving anyway and threw an exception. It might be very well the case that since then they've fixed the problem and skip the weaving if they can't do it. No agent in classpath won't help as it's packaged into the main jar.
OK, thanks for explaining. I checked with Tomcat and it seems that TopLink sets weaving to false by default, so I'm closing this issue.