openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Prud'hommeaux (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (OPENJPA-401) UnsatisfiedLinkError in MappingToolTask when using DB2 JDBC driver
Date Wed, 28 Nov 2007 22:53:43 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Marc Prud'hommeaux reopened OPENJPA-401:
----------------------------------------


I'm reopening this because the fix was causing intermittent failures in loading metadata.
E.g.:

[mappingtool] <openjpa-1.1.0-SNAPSHOT-r420667:598829 fatal user error> org.apache.openjpa.util.MetaDataException:
Type "class kodo.performance.PerfMultiA" does not have persistence metadata.
[mappingtool] 	at org.apache.openjpa.jdbc.meta.MappingTool.getMapping(MappingTool.java:679)
[mappingtool] 	at org.apache.openjpa.jdbc.meta.MappingTool.refresh(MappingTool.java:716)
[mappingtool] 	at org.apache.openjpa.jdbc.meta.MappingTool.run(MappingTool.java:641)
[mappingtool] 	at org.apache.openjpa.jdbc.meta.MappingTool.run(MappingTool.java:1072)
[mappingtool] 	at org.apache.openjpa.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:197)
[mappingtool] 	at org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:172)

I've committed revision #599178 which swaps the order in which the child loaders are added
to the MultiLoaderClassResolver, which seems to fix the problem, but I don't know if it will
re-introduce the original symptoms reported in the bug. Michael, can you check with this new
revision to see if it still works with your DB2 native driver?

> UnsatisfiedLinkError in MappingToolTask when using DB2 JDBC driver 
> -------------------------------------------------------------------
>
>                 Key: OPENJPA-401
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-401
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.0.0
>            Reporter: Michael Dick
>            Assignee: Michael Dick
>            Priority: Minor
>             Fix For: 1.0.1, 1.1.0
>
>
> The MappingToolTask's class resolver loads classes from a temporary classloader before
loading them in the "normal" classloader. This can cause problems if the JDBC driver requires
access to native libraries (which can only be loaded once). 
> I've seen errors like this when using the DB2 JCC driver and the IBM JDK : 
>   [mapping] 608  persistence-tests  INFO   [main] openjpa.Tool - Recording mapping and
schema changes.
>   [mapping] java.lang.UnsatisfiedLinkError: com/ibm/jvm/Trace.initTrace([Ljava/lang/String;[Ljava/lang/String;)V
>   [mapping]     at com.ibm.jvm.Trace.initializeTrace(Trace.java:96)
>   [mapping]     at com.ibm.jvm.Trace.<clinit>(Trace.java:61)
>   [mapping]     at java.lang.J9VMInternals.initializeImpl(Native Method)
>   [mapping]     at java.lang.J9VMInternals.initialize(J9VMInternals.java:192)
>   [mapping]     at java.lang.Class.forNameImpl(Native Method)
>   [mapping]     at java.lang.Class.forName(Class.java:130)
>   [mapping]     at com.ibm.db2.jcc.c.o.q(o.java:550)
>   [mapping]     at com.ibm.db2.jcc.c.o.<clinit>(o.java:319)
>   [mapping]     at java.lang.J9VMInternals.initializeImpl(Native Method)
>   [mapping]     at java.lang.J9VMInternals.initialize(J9VMInternals.java:192)
>   [mapping]     at java.lang.Class.forNameImpl(Native Method)
>   [mapping]     at java.lang.Class.forName(Class.java:130)
>   [mapping]     at com.ibm.db2.jcc.DB2Driver.class$(DB2Driver.java:48)
>   [mapping]     at com.ibm.db2.jcc.DB2Driver.<clinit>(DB2Driver.java:51)
>   [mapping]     at java.lang.J9VMInternals.initializeImpl(Native Method)
>   [mapping]     at java.lang.J9VMInternals.initialize(J9VMInternals.java:192)
>   [mapping]     at java.lang.Class.forNameImpl(Native Method)
>   [mapping]     at java.lang.Class.forName(Class.java:163)
>   [mapping]     at org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:82)
>  <snip>
> Note that this does not occur with the Sun JDK (or at least I haven't hit the problem.
> A potential solution is to change the order of the classloaders used in MappingToolTask.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message