================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/ejb/cmp3/persistence/PersistenceUnitProcessor.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.25 Report generated at Thu Jun 29 11:21:43 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/ejb/cmp3/persistence/PersistenceUnitProcessor.java Thu Jun 29 11:21:43 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.25 Mon Jun 26 10:01:23 2006 *************** *** 24,30 **** import java.net.URL; import java.net.URI; import java.net.URISyntaxException; ! import java.util.jar.JarInputStream; import java.util.zip.ZipEntry; import java.util.Enumeration; import java.io.File; --- 24,30 ---- import java.net.URL; import java.net.URI; import java.net.URISyntaxException; ! import java.util.jar.JarFile; import java.util.zip.ZipEntry; import java.util.Enumeration; import java.io.File; *************** *** 61,71 **** */ public class PersistenceUnitProcessor { - public static final String JAR_OPENING_EXCEPTION = "attempted_to_open_url_as_jar"; - public static final String DIRECTORY_OPENING_EXCEPTION = "attempted_to_open_url_as_directory"; - public static final String JAR_ENTRY_OPENING_EXCEPTION = "attempted_to_open_entry_in_url_as_jar"; - public static final String DIRECTORY_ENTRY_OPENING_EXCEPTION = "attempted_to_open_file_url_as_directory"; - /** * Get a list of persitence units from the file or directory at the given url * PersistenceUnits are built based on the presence of persistence.xml in a META-INF directory --- 61,66 ---- *************** *** 139,207 **** * The file passed into this method should be a jar file. * @param file */ ! protected static List processJarFile(URL baseURL, ClassLoader loader){ ! JarInputStream jarFile = null; InputStream stream = null; try{ ! stream = baseURL.openStream(); ! jarFile = new JarInputStream(stream); ! ZipEntry entry = jarFile.getNextEntry(); ! while (entry != null && !entry.getName().equals("META-INF/persistence.xml") && !entry.getName().equals("meta-inf/persistence.xml")){ ! entry = jarFile.getNextEntry(); } ! if (entry != null && (entry.getName().equals("META-INF/persistence.xml") || entry.getName().equals("meta-inf/persistence.xml"))){ ! return processPersistenceXML(baseURL, jarFile, loader); } return null; } catch (IOException exc){ ! throw PersistenceUnitLoadingException.exceptionLoadingFromJar(baseURL, exc); } finally { try{ - if (jarFile != null){ - jarFile.close(); - } if (stream != null){ stream.close(); } } catch (IOException exc){}; } } /** ! * Go through the jar file for this PeristeneUnitProcessor and process any XML provided in it */ private static List processPersistenceArchive(URL url, ClassLoader loader){ File file = null; - List persistenceUnitList = null; - // Should be called from JavaSE, and so the url string should still contain - // the meta-inf/persistence.xml at the end that should be stripped off to be handled as a file - URL tempURL = truncateURL(url); - try{ - persistenceUnitList = processJarFile(tempURL, loader); - if (persistenceUnitList != null){ - return persistenceUnitList; - } - } catch (Exception exception){ - AbstractSessionLog.getLog().log(AbstractSessionLog.FINEST, JAR_OPENING_EXCEPTION, url, exception); - }; - try{ // Only URL.toURI() handles spaces and special characters correctly file = new File(convertURLToURI(tempURL)); ! if (file.isDirectory()){ ! persistenceUnitList = processDirectory(tempURL, file, loader); ! if (persistenceUnitList != null){ ! return persistenceUnitList; ! } } ! } catch (Exception exception){ ! AbstractSessionLog.getLog().log(AbstractSessionLog.FINEST, DIRECTORY_OPENING_EXCEPTION, url, exception); ! }; ! ! persistenceUnitList = processPersistenceArchveFromUnconvertableURL(url, loader); ! ! return persistenceUnitList; } /** --- 134,189 ---- * The file passed into this method should be a jar file. * @param file */ ! protected static List processJarFile(URL baseURL, File file, ClassLoader loader){ ! JarFile jarFile = null; InputStream stream = null; try{ ! jarFile = new JarFile(file); ! ZipEntry entry = jarFile.getEntry("META-INF/persistence.xml"); ! if (entry == null){ ! entry = jarFile.getEntry("meta-inf/persistence.xml"); } ! if (entry != null){ ! stream = jarFile.getInputStream(entry); ! return processPersistenceXML(baseURL, stream, loader); } return null; } catch (IOException exc){ ! throw PersistenceUnitLoadingException.exceptionLoadingFromJar(file, exc); } finally { try{ if (stream != null){ stream.close(); } + if (jarFile != null){ + jarFile.close(); + } } catch (IOException exc){}; } } /** ! * Go through the par file for this ParProcessor and process any XML provided in it */ private static List processPersistenceArchive(URL url, ClassLoader loader){ File file = null; try{ + // Should be called from JavaSE, and so the url string should still contain + // the meta-inf/persistence.xml at the end that should be stripped off to be handled as a file + URL tempURL = truncateURL(url); // Only URL.toURI() handles spaces and special characters correctly file = new File(convertURLToURI(tempURL)); ! if (file.isFile()){ ! return processJarFile(tempURL, file, loader); ! } else if (file.isDirectory()){ ! return processDirectory(tempURL, file, loader); } ! }catch(java.lang.IllegalArgumentException e){ ! return processPersistenceArchveFromUnconvertableURL(url, loader); ! } ! ! return null; } /** *************** *** 213,256 **** * special manner and if it fails, will guess which System resource to use. */ public static InputStream createInputStreamForFileInPersistenceUnit(String fileName, PersistenceUnitInfo persistenceUnitInfo, ClassLoader classLoader) throws IOException{ ! InputStream stream = null; try{ - stream = createInputStreamForJarFile(fileName, persistenceUnitInfo.getPersistenceUnitRootUrl()); - if (stream != null){ - return stream; - } - } catch (Exception e){ - AbstractSessionLog.getLog().log(AbstractSessionLog.FINEST, JAR_ENTRY_OPENING_EXCEPTION, persistenceUnitInfo.getPersistenceUnitRootUrl(), fileName, e); - }; - - try { // Only URL.toURI() handles spaces and special characters correctly ! File file = new File(convertURLToURI(persistenceUnitInfo.getPersistenceUnitRootUrl())); ! if (file.isDirectory()){ ! stream = createInputStreamForDirectory(fileName, file); ! if (stream != null){ ! return stream; ! } } ! } catch (Exception e){ ! AbstractSessionLog.getLog().log(AbstractSessionLog.FINEST, DIRECTORY_ENTRY_OPENING_EXCEPTION, persistenceUnitInfo.getPersistenceUnitRootUrl(), fileName, e); ! }; ! ! return createInputStreamForUnconvertableURL(fileName, persistenceUnitInfo.getPersistenceUnitRootUrl(), classLoader); ! } /** * Create an input stream for a file in a jar file */ ! public static InputStream createInputStreamForJarFile(String fileName, URL url) throws IOException{ ! JarInputStream jarInputStream = new JarInputStream(url.openStream()); ! ! ZipEntry entry = jarInputStream.getNextEntry(); ! while (entry != null && !entry.getName().equals(fileName)){ ! entry = jarInputStream.getNextEntry(); ! } ! if (entry != null && (entry.getName().equals(fileName))){ ! return jarInputStream; } return null; } --- 195,225 ---- * special manner and if it fails, will guess which System resource to use. */ public static InputStream createInputStreamForFileInPersistenceUnit(String fileName, PersistenceUnitInfo persistenceUnitInfo, ClassLoader classLoader) throws IOException{ ! File file = null; try{ // Only URL.toURI() handles spaces and special characters correctly ! file = new File(convertURLToURI(persistenceUnitInfo.getPersistenceUnitRootUrl())); ! if (file.isFile()){ ! return createInputStreamForJarFile(fileName, file); ! } else if (file.isDirectory()){ ! return createInputStreamForDirectory(fileName, file); } ! }catch(java.lang.IllegalArgumentException e){ ! return createInputStreamForUnconvertableURL(fileName, persistenceUnitInfo.getPersistenceUnitRootUrl(), classLoader); ! } ! return null; ! } /** * Create an input stream for a file in a jar file */ ! public static InputStream createInputStreamForJarFile(String fileName, File inputFile) throws IOException{ ! JarFile jarFile = null; ! InputStream stream = null; ! jarFile = new JarFile(inputFile); ! ZipEntry entry = jarFile.getEntry(fileName); ! if (entry != null){ ! return jarFile.getInputStream(entry); } return null; } *************** *** 498,528 **** * @param file * @return */ ! private static List getClassNamesFromJar(URL url){ ! JarInputStream jarFile = null; ! InputStream stream = null; List persistentClasses = new Vector(); try { ! stream = url.openStream(); ! jarFile = new JarInputStream(stream); ! ZipEntry entry = jarFile.getNextEntry(); ! if (entry == null){ ! return null; ! } ! while (entry != null){ String classNameForLoader = buildClassNameFromEntryString(entry.getName()); if (entry.getName().endsWith(".class")){ persistentClasses.add(classNameForLoader); } - entry = jarFile.getNextEntry(); } } catch (IOException exc){ ! throw PersistenceUnitLoadingException.exceptionSearchingForEntities(url, exc); } finally { try{ - if (stream != null){ - stream.close(); - } if (jarFile != null){ jarFile.close(); } --- 467,490 ---- * @param file * @return */ ! private static List getClassNamesFromJar(File file){ List persistentClasses = new Vector(); + JarFile jarFile = null; try { ! // Only URL.toURI() handles spaces and special characters correctly ! jarFile = new JarFile(file); ! Enumeration e = jarFile.entries(); ! while (e.hasMoreElements()){ ! ZipEntry entry = (ZipEntry)e.nextElement(); String classNameForLoader = buildClassNameFromEntryString(entry.getName()); if (entry.getName().endsWith(".class")){ persistentClasses.add(classNameForLoader); } } } catch (IOException exc){ ! throw PersistenceUnitLoadingException.exceptionSearchingForEntities(file, exc); } finally { try{ if (jarFile != null){ jarFile.close(); } *************** *** 537,562 **** * @param url * @return */ ! private static List getClassNamesFromURL(URL url){ ! List classNames = null; ! try { ! classNames = getClassNamesFromJar(url); ! if (classNames != null){ ! return classNames; ! } ! } catch (Exception exception){ ! AbstractSessionLog.getLog().log(AbstractSessionLog.FINEST, JAR_OPENING_EXCEPTION, url, exception); ! }; ! try{ ! // Only URL.toURI() handles spaces and special characters correctly ! File file = new File(convertURLToURI(url)); ! if (file.isDirectory()){ ! return getClassNamesFromDirectory(file); ! } ! } catch (Exception exception){ ! AbstractSessionLog.getLog().log(AbstractSessionLog.FINEST, DIRECTORY_OPENING_EXCEPTION, url, exception); ! } ! return null; } /** --- 499,512 ---- * @param url * @return */ ! private static List getClassNamesFromURL(URL url){ ! // Only URL.toURI() handles spaces and special characters correctly ! File file = new File(convertURLToURI(url)); ! if (file.isDirectory()){ ! return getClassNamesFromDirectory(file); ! } else { ! return getClassNamesFromJar(file); ! } } /** *************** *** 602,630 **** * @param url * @return */ ! public static List getPersistentClassNamesFromURL(URL url, ClassLoader loader){ ! List classNames = null; ! try { ! classNames = getPersistentClassNamesFromJar(url, loader); ! if (classNames != null){ ! return classNames; ! } ! } catch (Exception exception){ ! AbstractSessionLog.getLog().log(AbstractSessionLog.FINEST, JAR_OPENING_EXCEPTION, url, exception); ! }; ! try{ ! // Only URL.toURI() handles spaces and special characters correctly ! File file = new File(convertURLToURI(url)); ! if (file.isDirectory()){ ! classNames = getPersistentClassNamesFromDirectory(file, loader); ! if (classNames != null){ ! return classNames; ! } ! } ! } catch (Exception exception){ ! AbstractSessionLog.getLog().log(AbstractSessionLog.FINEST, DIRECTORY_OPENING_EXCEPTION, url, exception); ! }; ! throw PersistenceUnitLoadingException.couldNotGetClassNamesFromUrl(url); } /** --- 552,565 ---- * @param url * @return */ ! public static List getPersistentClassNamesFromURL(URL url, ClassLoader loader){ ! // Only URL.toURI() handles spaces and special characters correctly ! File file = new File(convertURLToURI(url)); ! if (file.isDirectory()){ ! return getPersistentClassNamesFromDirectory(file, loader); ! } else { ! return getPersistentClassNamesFromJar(file, loader); ! } } /** *************** *** 634,645 **** * @param loader the ClassLoader to use * @return */ ! public static List getPersistentClassNamesFromJar(URL url, ClassLoader loader){ ! List classList = getClassNamesFromJar(url); ! if (classList == null){ ! return null; ! } List persistentClasses = new Vector(); for (String className: classList){ if (isClassPersistent(className, loader)){ persistentClasses.add(className); --- 569,577 ---- * @param loader the ClassLoader to use * @return */ ! public static List getPersistentClassNamesFromJar(File file, ClassLoader loader){ List persistentClasses = new Vector(); + List classList = getClassNamesFromJar(file); for (String className: classList){ if (isClassPersistent(className, loader)){ persistentClasses.add(className); ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/exceptions/PersistenceUnitLoadingException.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.9 Report generated at Thu Jun 29 11:21:43 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/exceptions/PersistenceUnitLoadingException.java Thu Jun 29 11:21:43 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.9 Mon Jun 26 10:01:58 2006 *************** *** 38,44 **** public static final int FILE_PATH_MISSING_EXCEPTION = 30008; public static final int EXCEPTION_LOADING_FROM_URL = 30009; public static final int EXCEPTION_OPENING_ORM_XML = 30010; - public static final int COULD_NOT_GET_CLASS_NAMES_FROM_URL = 30011; /** * INTERNAL: --- 38,43 ---- *************** *** 81,87 **** return loadingException; } ! public static PersistenceUnitLoadingException exceptionLoadingFromJar(URL jarFile, Exception cause) { Object[] args = { jarFile }; PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, EXCEPTION_LOADING_FROM_JAR, args), cause); --- 80,86 ---- return loadingException; } ! public static PersistenceUnitLoadingException exceptionLoadingFromJar(File jarFile, Exception cause) { Object[] args = { jarFile }; PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, EXCEPTION_LOADING_FROM_JAR, args), cause); *************** *** 121,128 **** return loadingException; } ! public static PersistenceUnitLoadingException exceptionSearchingForEntities(URL url, Exception cause) { ! Object[] args = { url }; PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, EXCEPTION_SEARCHING_FOR_ENTITIES, args), cause); loadingException.setErrorCode(EXCEPTION_SEARCHING_FOR_ENTITIES); --- 120,127 ---- return loadingException; } ! public static PersistenceUnitLoadingException exceptionSearchingForEntities(File file, Exception cause) { ! Object[] args = { file }; PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, EXCEPTION_SEARCHING_FOR_ENTITIES, args), cause); loadingException.setErrorCode(EXCEPTION_SEARCHING_FOR_ENTITIES); *************** *** 145,156 **** return loadingException; } - public static PersistenceUnitLoadingException couldNotGetClassNamesFromUrl(URL url) { - Object[] args = { url }; - - PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, COULD_NOT_GET_CLASS_NAMES_FROM_URL, args)); - loadingException.setErrorCode(COULD_NOT_GET_CLASS_NAMES_FROM_URL); - return loadingException; - } - } --- 144,147 ---- ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/exceptions/i18n/PersistenceUnitLoadingExceptionResource.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.8 Report generated at Thu Jun 29 11:21:43 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/exceptions/i18n/PersistenceUnitLoadingExceptionResource.java Thu Jun 29 11:21:43 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.8 Mon Jun 26 10:01:59 2006 *************** *** 35,42 **** { "30007", "An exception was thrown while loading class: {0} to check whether it implements @Entity, @Embeddable, or @MappedSuperclass."}, { "30008", "File path returned was empty or null"}, { "30009", "An exception was thrown while trying to load persistence unit at url: {0}"}, ! { "30010", "An exception was thrown while loading ORM XML file: {0}"}, ! { "30011", "TopLink could not get classes from the URL: {0}. TopLink attempted to read this URL as a jarFile and as a Directory and was unable to process it."} }; /** --- 35,41 ---- { "30007", "An exception was thrown while loading class: {0} to check whether it implements @Entity, @Embeddable, or @MappedSuperclass."}, { "30008", "File path returned was empty or null"}, { "30009", "An exception was thrown while trying to load persistence unit at url: {0}"}, ! { "30010", "An exception was thrown while loading ORM XML file: {0}"} }; /** ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/base/EJBQueryImpl.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000004/AB0952363AC40CBFE034080020E8C54E.41 Report generated at Thu Jun 29 11:21:43 2006 -------------------------------------------------------------------------------- ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataLogger.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000005/AB0952363AC40CBFE034080020E8C54E.6 Report generated at Thu Jun 29 11:21:43 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataLogger.java Thu Jun 29 11:21:43 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000005/AB0952363AC40CBFE034080020E8C54E.6 Mon Jun 26 10:03:05 2006 *************** *** 41,48 **** public static final String IGNORE_BASIC_FETCH_LAZY = "annotation_warning_ignore_basic_fetch_lazy"; public static final String IGNORE_GET_METHOD = "annotation_warning_ignore_get_method"; public static final String IGNORE_SECONDARY_TABLE = "annotation_warning_ignore_secondary_table"; ! public static final String ERROR_LOADING_ORM_XML_FILE = "annotation_warning_exception_loading_orm_xml_file"; ! public static final String TABLE_NAME = "metadata_default_table_name"; public static final String TABLE_SCHEMA = "metadata_default_table_schema"; public static final String TABLE_CATALOG = "metadata_default_table_catalog"; --- 41,47 ---- public static final String IGNORE_BASIC_FETCH_LAZY = "annotation_warning_ignore_basic_fetch_lazy"; public static final String IGNORE_GET_METHOD = "annotation_warning_ignore_get_method"; public static final String IGNORE_SECONDARY_TABLE = "annotation_warning_ignore_secondary_table"; ! public static final String TABLE_NAME = "metadata_default_table_name"; public static final String TABLE_SCHEMA = "metadata_default_table_schema"; public static final String TABLE_CATALOG = "metadata_default_table_catalog"; ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataProcessor.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000006/AB0952363AC40CBFE034080020E8C54E.50 Report generated at Thu Jun 29 11:21:43 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataProcessor.java Thu Jun 29 11:21:43 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000006/AB0952363AC40CBFE034080020E8C54E.50 Wed Jun 28 15:28:26 2006 *************** *** 21,27 **** package oracle.toplink.essentials.internal.ejb.cmp3.metadata; import java.io.InputStream; - import java.io.IOException; import java.util.Collection; import java.util.HashMap; --- 21,26 ---- *************** *** 29,37 **** import java.util.Iterator; import java.util.Set; - import javax.persistence.spi.PersistenceUnitInfo; - - import oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor; import oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAccessor; import oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.objects.MetadataClass; --- 28,33 ---- *************** *** 246,266 **** * found will be added to a list in the order that they are read from the * instance document(s). */ ! public void processPersistenceUnitMetadata(AbstractSession session, PersistenceUnitInfo persistenceUnitInfo, Collection mappingFileNames, Collection entities) { ! if (! mappingFileNames.isEmpty()) { // For each orm xml instance document, process persistence unit // metadata/defaults and mapped superclasses. Iterator fileNames = mappingFileNames.iterator(); - - Iterator mappingFileNamesIt = mappingFileNames.iterator(); - while (mappingFileNamesIt.hasNext()){ - String fileName = mappingFileNamesIt.next(); - InputStream inputStream = null; - try { - inputStream = PersistenceUnitProcessor.createInputStreamForFileInPersistenceUnit(fileName, persistenceUnitInfo, m_loader); // Initialize a helper for navigating the instance document. ! XMLHelper helper = new XMLHelper(inputStream, fileNames.next(), m_loader); // Store all mapped-superclasses. NodeList nodes = helper.getNodes(XMLConstants.ENTITY_MAPPINGS, XMLConstants.MAPPED_SUPERCLASS); --- 242,257 ---- * found will be added to a list in the order that they are read from the * instance document(s). */ ! public void processPersistenceUnitMetadata(Collection mappingStreams, Collection mappingFileNames, Collection entities) { ! if (! mappingStreams.isEmpty()) { // For each orm xml instance document, process persistence unit // metadata/defaults and mapped superclasses. Iterator fileNames = mappingFileNames.iterator(); + for (InputStream mappingStream : mappingStreams) { + try { // Initialize a helper for navigating the instance document. ! XMLHelper helper = new XMLHelper(mappingStream, fileNames.next(), m_loader); // Store all mapped-superclasses. NodeList nodes = helper.getNodes(XMLConstants.ENTITY_MAPPINGS, XMLConstants.MAPPED_SUPERCLASS); *************** *** 321,338 **** m_project.setPersistenceUnit(persistenceUnit); } } - } catch (IOException exception){ - getLogger().logWarningMessage(MetadataLogger.ERROR_LOADING_ORM_XML_FILE, fileName, exception); } catch (RuntimeException re) { throw re; ! } finally { ! if (inputStream != null){ ! try{ ! inputStream.close(); ! } catch (IOException exc){}; ! } ! } ! } } --- 312,320 ---- m_project.setPersistenceUnit(persistenceUnit); } } } catch (RuntimeException re) { throw re; ! } } } ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/EntityManagerSetupImpl.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000007/AB0952363AC40CBFE034080020E8C54E.71 Report generated at Thu Jun 29 11:21:43 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/EntityManagerSetupImpl.java Thu Jun 29 11:21:43 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000007/AB0952363AC40CBFE034080020E8C54E.71 Mon Jun 26 10:03:29 2006 *************** *** 111,131 **** * @return */ public Set buildPersistentClassSetFromXMLDocuments(ClassLoader loader, PersistenceUnitInfo persistenceUnitInfo) { ! List mappingFileNames = getORMXMLFileNames(loader); HashSet classSet = new HashSet(); Iterator fileNames = mappingFileNames.iterator(); InputStream stream = null; ! String fileName = null; ! while (fileNames.hasNext()){ try{ ! fileName = fileNames.next(); ! stream = PersistenceUnitProcessor.createInputStreamForFileInPersistenceUnit(fileName, persistenceUnitInfo, loader); ! if (stream != null){ ! classSet.addAll(MetadataProcessor.buildClassSet(stream, fileName, loader)); ! } ! } catch (IOException exception){ ! handleORMException(PersistenceUnitLoadingException.exceptionLoadingORMXML(fileName, exception), session, fileName); } finally { try{ if (stream != null){ --- 111,129 ---- * @return */ public Set buildPersistentClassSetFromXMLDocuments(ClassLoader loader, PersistenceUnitInfo persistenceUnitInfo) { ! List mappingFileStreams = new Vector(); ! List mappingFileNames = new Vector(); ! populateORMXMLStreamList(mappingFileStreams, mappingFileNames, loader); ! HashSet classSet = new HashSet(); + Iterator streams = mappingFileStreams.iterator(); Iterator fileNames = mappingFileNames.iterator(); InputStream stream = null; ! while (streams.hasNext()){ try{ ! stream = streams.next(); ! classSet.addAll(MetadataProcessor.buildClassSet(stream, fileNames.next(), loader)); } finally { try{ if (stream != null){ *************** *** 617,652 **** } } ! private List getORMXMLFileNames(ClassLoader loader){ ! ArrayList list = new ArrayList(); ! String ormXMLFile = "META-INF/orm.xml"; ! InputStream stream = null; ! try { ! stream = PersistenceUnitProcessor.createInputStreamForFileInPersistenceUnit(ormXMLFile, persistenceUnitInfo, loader); if (stream != null){ ! list.add(ormXMLFile); } ! } catch (IOException e){ ! } finally { ! try{ ! if (stream != null){ ! stream.close(); ! } ! } catch (IOException e) {} ! } ! if (persistenceUnitInfo != null) { ! if (persistenceUnitInfo.getMappingFileNames() != null) { ! Iterator mappingFiles = persistenceUnitInfo.getMappingFileNames().iterator();{ ! while (mappingFiles.hasNext()){ ! list.add((String)mappingFiles.next()); } } } ! } ! return list; } - /** * Override the default login creation method. --- 615,662 ---- } } ! /** ! * Populates a list of streams with open InputStreams for all the ORM XML files relevant to this ! * EntityManagerSetupImpl. That will include META-INF/orm.xml and any ORM xml files listed in the ! * PersistenceUnitInfo ! * This method will also populate a parallel list of the file names associated with those streams ! * @param streams ! * @param streamFileNames ! * @param privateClassLoader ! */ ! private void populateORMXMLStreamList(List streams, List streamFileNames, ClassLoader privateClassLoader){ ! String ormStr = "META-INF/orm.xml"; ! try{ ! InputStream stream = PersistenceUnitProcessor.createInputStreamForFileInPersistenceUnit(ormStr, persistenceUnitInfo, privateClassLoader); if (stream != null){ ! streams.add(stream); ! streamFileNames.add(ormStr); } ! } catch (IOException e){/* ignore */} ! if (persistenceUnitInfo != null) { ! if (!persistenceUnitInfo.getMappingFileNames().isEmpty()) { ! Iterator mappingFiles = persistenceUnitInfo.getMappingFileNames().iterator(); ! String mappingFileResourceName = null; ! while (mappingFiles.hasNext()) { ! try{ ! mappingFileResourceName = (String)mappingFiles.next(); ! InputStream stream = PersistenceUnitProcessor.createInputStreamForFileInPersistenceUnit(mappingFileResourceName, persistenceUnitInfo, privateClassLoader); ! // If we find the same META-INF/orm.xml resource again ! // in the entity-mappings list, ignore it. ! if (! mappingFileResourceName.equals(ormStr) && stream != null) { ! streamFileNames.add(mappingFileResourceName); ! streams.add(stream); ! } ! } catch (IOException e){ ! handleORMException(PersistenceUnitLoadingException.exceptionLoadingORMXML(mappingFileResourceName, e), session, mappingFileResourceName); ! } catch (RuntimeException e){ ! handleORMException(e, session, mappingFileResourceName); } } } ! } } /** * Override the default login creation method. *************** *** 973,995 **** private void processORMetadata(ClassLoader privateClassLoader, AbstractSession session, Collection entities, boolean enableLazyForOneToOne){ processor = new MetadataProcessor(session, privateClassLoader, enableLazyForOneToOne); ! List mappingFileNames = getORMXMLFileNames(privateClassLoader); ! ! // process persistence unit metadata/defaults defined in ORM XML instance documents in the persistence unit ! processor.processPersistenceUnitMetadata(session, persistenceUnitInfo, mappingFileNames, entities); Iterator fileNames = mappingFileNames.iterator(); InputStream inputStream = null; String fileName = null; ! while (fileNames.hasNext()){ try{ ! fileName = fileNames.next(); ! inputStream = PersistenceUnitProcessor.createInputStreamForFileInPersistenceUnit(fileName, persistenceUnitInfo, privateClassLoader); ! processor.processXML(inputStream, fileName); } catch (RuntimeException e){ handleORMException(e, session, fileName); - } catch (IOException exc){ - handleORMException(PersistenceUnitLoadingException.exceptionLoadingORMXML(fileName, exc), session, fileName); } finally { try{ inputStream.close(); --- 983,1016 ---- private void processORMetadata(ClassLoader privateClassLoader, AbstractSession session, Collection entities, boolean enableLazyForOneToOne){ processor = new MetadataProcessor(session, privateClassLoader, enableLazyForOneToOne); ! List mappingFileStreams = new Vector(); ! List mappingFileNames = new Vector(); ! try{ ! populateORMXMLStreamList(mappingFileStreams, mappingFileNames, privateClassLoader); ! // process persistence unit metadata/defaults defined in ORM XML instance documents in the persistence unit ! processor.processPersistenceUnitMetadata(mappingFileStreams, mappingFileNames, entities); ! } finally { ! Iterator streamsToClose = mappingFileStreams.iterator(); ! while (streamsToClose.hasNext()){ ! try{ ! streamsToClose.next().close(); ! } catch (IOException exc){} ! } ! } + mappingFileStreams = new Vector(); + mappingFileNames = new Vector(); + populateORMXMLStreamList(mappingFileStreams, mappingFileNames, privateClassLoader); + Iterator streams = mappingFileStreams.iterator(); Iterator fileNames = mappingFileNames.iterator(); InputStream inputStream = null; String fileName = null; ! while (streams.hasNext()){ try{ ! inputStream = streams.next(); ! processor.processXML(inputStream, fileNames.next()); } catch (RuntimeException e){ handleORMException(e, session, fileName); } finally { try{ inputStream.close(); ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/localization/i18n/LoggingLocalizationResource.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000008/AB0952363AC40CBFE034080020E8C54E.26 Report generated at Thu Jun 29 11:21:43 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/localization/i18n/LoggingLocalizationResource.java Thu Jun 29 11:21:43 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000008/AB0952363AC40CBFE034080020E8C54E.26 Mon Jun 26 10:03:44 2006 *************** *** 228,234 **** { "annotation_warning_ignore_inheritance", "Inheritance information is already defined on the descriptor for the entity [{0}]. Ignoring @Inheritance information." }, { "annotation_warning_ignore_get_method", "Ignoring getter method [{1}] on entity class [{0}] since its corresponding setter method is not defined. If this method should be treated as a persistent property, define the corresponding setter method. To avoid this warning all together, decorate the getter method with a @Transient." }, { "annotation_warning_ignore_basic_fetch_lazy", "Ignoring LAZY fetch type on attribute [{1}] within entity class [{0}]. All basic mappings default to use EAGER fetching." }, - { "annotation_warning_exception_loading_orm_xml_file", "An exception was thrown loading ORM XML file [{0}] : [{1}]" }, { "orm_warning_ignore_mapping", "A mapping for the attribute [{1}] is already defined on the descriptor for the entity [{0}]. Ignoring mapping element." }, { "orm_warning_ignore_mapping_on_write", "Only DirectToField and TypeConversion (BLOB/CLOB) mappings are allowed for embeddable-attributes. The mapping for the attribute [{1}] on the descriptor for the entity [{0}] will not be written to the entity-mappings file." }, --- 228,233 ---- *************** *** 267,279 **** { "resource_local_persistence_init_info_ignores_jta_data_source", "PersistenceUnitInfo {0} has transactionType RESOURCE_LOCAL and therefore jtaDataSource will be ignored"}, { "obsolete_property", "property {1} is obsolete, property {0} should be used instead."}, ! { "persistence_unit_processor_error_loading_class", "{0}: {1} was thrown on attempt of PersistenceLoadProcessor to load class {2}. The class is ignored."}, ! ! { "attempted_to_open_url_as_jar", "{1} was thrown on attempt to open {0} as a jar."}, ! { "attempted_to_open_url_as_directory", "{1} was thrown on attempt to open {0} as a directory."}, ! { "attempted_to_open_entry_in_url_as_jar", "{2} was thrown on attempt to open {0} as a jar and access entry: {1}."}, ! { "attempted_to_open_file_url_as_directory", "{2} was thrown on attempt to open {0} as a directory and access entry: {1}."} ! }; /** --- 266,272 ---- { "resource_local_persistence_init_info_ignores_jta_data_source", "PersistenceUnitInfo {0} has transactionType RESOURCE_LOCAL and therefore jtaDataSource will be ignored"}, { "obsolete_property", "property {1} is obsolete, property {0} should be used instead."}, ! { "persistence_unit_processor_error_loading_class", "{0}: {1} was thrown on attempt of PersistenceLoadProcessor to load class {2}. The class is ignored."} }; /** ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/ejb/cmp3/persistence/PersistenceUnitProcessor.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.25 Report generated at Thu Jun 29 11:36:20 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/ejb/cmp3/persistence/PersistenceUnitProcessor.java Thu Jun 29 11:21:43 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.25 Mon Jun 26 10:01:23 2006 *************** *** 24,30 **** import java.net.URL; import java.net.URI; import java.net.URISyntaxException; ! import java.util.jar.JarInputStream; import java.util.zip.ZipEntry; import java.util.Enumeration; import java.io.File; --- 24,30 ---- import java.net.URL; import java.net.URI; import java.net.URISyntaxException; ! import java.util.jar.JarFile; import java.util.zip.ZipEntry; import java.util.Enumeration; import java.io.File; *************** *** 61,71 **** */ public class PersistenceUnitProcessor { - public static final String JAR_OPENING_EXCEPTION = "attempted_to_open_url_as_jar"; - public static final String DIRECTORY_OPENING_EXCEPTION = "attempted_to_open_url_as_directory"; - public static final String JAR_ENTRY_OPENING_EXCEPTION = "attempted_to_open_entry_in_url_as_jar"; - public static final String DIRECTORY_ENTRY_OPENING_EXCEPTION = "attempted_to_open_file_url_as_directory"; - /** * Get a list of persitence units from the file or directory at the given url * PersistenceUnits are built based on the presence of persistence.xml in a META-INF directory --- 61,66 ---- *************** *** 139,207 **** * The file passed into this method should be a jar file. * @param file */ ! protected static List processJarFile(URL baseURL, ClassLoader loader){ ! JarInputStream jarFile = null; InputStream stream = null; try{ ! stream = baseURL.openStream(); ! jarFile = new JarInputStream(stream); ! ZipEntry entry = jarFile.getNextEntry(); ! while (entry != null && !entry.getName().equals("META-INF/persistence.xml") && !entry.getName().equals("meta-inf/persistence.xml")){ ! entry = jarFile.getNextEntry(); } ! if (entry != null && (entry.getName().equals("META-INF/persistence.xml") || entry.getName().equals("meta-inf/persistence.xml"))){ ! return processPersistenceXML(baseURL, jarFile, loader); } return null; } catch (IOException exc){ ! throw PersistenceUnitLoadingException.exceptionLoadingFromJar(baseURL, exc); } finally { try{ - if (jarFile != null){ - jarFile.close(); - } if (stream != null){ stream.close(); } } catch (IOException exc){}; } } /** ! * Go through the jar file for this PeristeneUnitProcessor and process any XML provided in it */ private static List processPersistenceArchive(URL url, ClassLoader loader){ File file = null; - List persistenceUnitList = null; - // Should be called from JavaSE, and so the url string should still contain - // the meta-inf/persistence.xml at the end that should be stripped off to be handled as a file - URL tempURL = truncateURL(url); - try{ - persistenceUnitList = processJarFile(tempURL, loader); - if (persistenceUnitList != null){ - return persistenceUnitList; - } - } catch (Exception exception){ - AbstractSessionLog.getLog().log(AbstractSessionLog.FINEST, JAR_OPENING_EXCEPTION, url, exception); - }; - try{ // Only URL.toURI() handles spaces and special characters correctly file = new File(convertURLToURI(tempURL)); ! if (file.isDirectory()){ ! persistenceUnitList = processDirectory(tempURL, file, loader); ! if (persistenceUnitList != null){ ! return persistenceUnitList; ! } } ! } catch (Exception exception){ ! AbstractSessionLog.getLog().log(AbstractSessionLog.FINEST, DIRECTORY_OPENING_EXCEPTION, url, exception); ! }; ! ! persistenceUnitList = processPersistenceArchveFromUnconvertableURL(url, loader); ! ! return persistenceUnitList; } /** --- 134,189 ---- * The file passed into this method should be a jar file. * @param file */ ! protected static List processJarFile(URL baseURL, File file, ClassLoader loader){ ! JarFile jarFile = null; InputStream stream = null; try{ ! jarFile = new JarFile(file); ! ZipEntry entry = jarFile.getEntry("META-INF/persistence.xml"); ! if (entry == null){ ! entry = jarFile.getEntry("meta-inf/persistence.xml"); } ! if (entry != null){ ! stream = jarFile.getInputStream(entry); ! return processPersistenceXML(baseURL, stream, loader); } return null; } catch (IOException exc){ ! throw PersistenceUnitLoadingException.exceptionLoadingFromJar(file, exc); } finally { try{ if (stream != null){ stream.close(); } + if (jarFile != null){ + jarFile.close(); + } } catch (IOException exc){}; } } /** ! * Go through the par file for this ParProcessor and process any XML provided in it */ private static List processPersistenceArchive(URL url, ClassLoader loader){ File file = null; try{ + // Should be called from JavaSE, and so the url string should still contain + // the meta-inf/persistence.xml at the end that should be stripped off to be handled as a file + URL tempURL = truncateURL(url); // Only URL.toURI() handles spaces and special characters correctly file = new File(convertURLToURI(tempURL)); ! if (file.isFile()){ ! return processJarFile(tempURL, file, loader); ! } else if (file.isDirectory()){ ! return processDirectory(tempURL, file, loader); } ! }catch(java.lang.IllegalArgumentException e){ ! return processPersistenceArchveFromUnconvertableURL(url, loader); ! } ! ! return null; } /** *************** *** 213,256 **** * special manner and if it fails, will guess which System resource to use. */ public static InputStream createInputStreamForFileInPersistenceUnit(String fileName, PersistenceUnitInfo persistenceUnitInfo, ClassLoader classLoader) throws IOException{ ! InputStream stream = null; try{ - stream = createInputStreamForJarFile(fileName, persistenceUnitInfo.getPersistenceUnitRootUrl()); - if (stream != null){ - return stream; - } - } catch (Exception e){ - AbstractSessionLog.getLog().log(AbstractSessionLog.FINEST, JAR_ENTRY_OPENING_EXCEPTION, persistenceUnitInfo.getPersistenceUnitRootUrl(), fileName, e); - }; - - try { // Only URL.toURI() handles spaces and special characters correctly ! File file = new File(convertURLToURI(persistenceUnitInfo.getPersistenceUnitRootUrl())); ! if (file.isDirectory()){ ! stream = createInputStreamForDirectory(fileName, file); ! if (stream != null){ ! return stream; ! } } ! } catch (Exception e){ ! AbstractSessionLog.getLog().log(AbstractSessionLog.FINEST, DIRECTORY_ENTRY_OPENING_EXCEPTION, persistenceUnitInfo.getPersistenceUnitRootUrl(), fileName, e); ! }; ! ! return createInputStreamForUnconvertableURL(fileName, persistenceUnitInfo.getPersistenceUnitRootUrl(), classLoader); ! } /** * Create an input stream for a file in a jar file */ ! public static InputStream createInputStreamForJarFile(String fileName, URL url) throws IOException{ ! JarInputStream jarInputStream = new JarInputStream(url.openStream()); ! ! ZipEntry entry = jarInputStream.getNextEntry(); ! while (entry != null && !entry.getName().equals(fileName)){ ! entry = jarInputStream.getNextEntry(); ! } ! if (entry != null && (entry.getName().equals(fileName))){ ! return jarInputStream; } return null; } --- 195,225 ---- * special manner and if it fails, will guess which System resource to use. */ public static InputStream createInputStreamForFileInPersistenceUnit(String fileName, PersistenceUnitInfo persistenceUnitInfo, ClassLoader classLoader) throws IOException{ ! File file = null; try{ // Only URL.toURI() handles spaces and special characters correctly ! file = new File(convertURLToURI(persistenceUnitInfo.getPersistenceUnitRootUrl())); ! if (file.isFile()){ ! return createInputStreamForJarFile(fileName, file); ! } else if (file.isDirectory()){ ! return createInputStreamForDirectory(fileName, file); } ! }catch(java.lang.IllegalArgumentException e){ ! return createInputStreamForUnconvertableURL(fileName, persistenceUnitInfo.getPersistenceUnitRootUrl(), classLoader); ! } ! return null; ! } /** * Create an input stream for a file in a jar file */ ! public static InputStream createInputStreamForJarFile(String fileName, File inputFile) throws IOException{ ! JarFile jarFile = null; ! InputStream stream = null; ! jarFile = new JarFile(inputFile); ! ZipEntry entry = jarFile.getEntry(fileName); ! if (entry != null){ ! return jarFile.getInputStream(entry); } return null; } *************** *** 498,528 **** * @param file * @return */ ! private static List getClassNamesFromJar(URL url){ ! JarInputStream jarFile = null; ! InputStream stream = null; List persistentClasses = new Vector(); try { ! stream = url.openStream(); ! jarFile = new JarInputStream(stream); ! ZipEntry entry = jarFile.getNextEntry(); ! if (entry == null){ ! return null; ! } ! while (entry != null){ String classNameForLoader = buildClassNameFromEntryString(entry.getName()); if (entry.getName().endsWith(".class")){ persistentClasses.add(classNameForLoader); } - entry = jarFile.getNextEntry(); } } catch (IOException exc){ ! throw PersistenceUnitLoadingException.exceptionSearchingForEntities(url, exc); } finally { try{ - if (stream != null){ - stream.close(); - } if (jarFile != null){ jarFile.close(); } --- 467,490 ---- * @param file * @return */ ! private static List getClassNamesFromJar(File file){ List persistentClasses = new Vector(); + JarFile jarFile = null; try { ! // Only URL.toURI() handles spaces and special characters correctly ! jarFile = new JarFile(file); ! Enumeration e = jarFile.entries(); ! while (e.hasMoreElements()){ ! ZipEntry entry = (ZipEntry)e.nextElement(); String classNameForLoader = buildClassNameFromEntryString(entry.getName()); if (entry.getName().endsWith(".class")){ persistentClasses.add(classNameForLoader); } } } catch (IOException exc){ ! throw PersistenceUnitLoadingException.exceptionSearchingForEntities(file, exc); } finally { try{ if (jarFile != null){ jarFile.close(); } *************** *** 537,562 **** * @param url * @return */ ! private static List getClassNamesFromURL(URL url){ ! List classNames = null; ! try { ! classNames = getClassNamesFromJar(url); ! if (classNames != null){ ! return classNames; ! } ! } catch (Exception exception){ ! AbstractSessionLog.getLog().log(AbstractSessionLog.FINEST, JAR_OPENING_EXCEPTION, url, exception); ! }; ! try{ ! // Only URL.toURI() handles spaces and special characters correctly ! File file = new File(convertURLToURI(url)); ! if (file.isDirectory()){ ! return getClassNamesFromDirectory(file); ! } ! } catch (Exception exception){ ! AbstractSessionLog.getLog().log(AbstractSessionLog.FINEST, DIRECTORY_OPENING_EXCEPTION, url, exception); ! } ! return null; } /** --- 499,512 ---- * @param url * @return */ ! private static List getClassNamesFromURL(URL url){ ! // Only URL.toURI() handles spaces and special characters correctly ! File file = new File(convertURLToURI(url)); ! if (file.isDirectory()){ ! return getClassNamesFromDirectory(file); ! } else { ! return getClassNamesFromJar(file); ! } } /** *************** *** 602,630 **** * @param url * @return */ ! public static List getPersistentClassNamesFromURL(URL url, ClassLoader loader){ ! List classNames = null; ! try { ! classNames = getPersistentClassNamesFromJar(url, loader); ! if (classNames != null){ ! return classNames; ! } ! } catch (Exception exception){ ! AbstractSessionLog.getLog().log(AbstractSessionLog.FINEST, JAR_OPENING_EXCEPTION, url, exception); ! }; ! try{ ! // Only URL.toURI() handles spaces and special characters correctly ! File file = new File(convertURLToURI(url)); ! if (file.isDirectory()){ ! classNames = getPersistentClassNamesFromDirectory(file, loader); ! if (classNames != null){ ! return classNames; ! } ! } ! } catch (Exception exception){ ! AbstractSessionLog.getLog().log(AbstractSessionLog.FINEST, DIRECTORY_OPENING_EXCEPTION, url, exception); ! }; ! throw PersistenceUnitLoadingException.couldNotGetClassNamesFromUrl(url); } /** --- 552,565 ---- * @param url * @return */ ! public static List getPersistentClassNamesFromURL(URL url, ClassLoader loader){ ! // Only URL.toURI() handles spaces and special characters correctly ! File file = new File(convertURLToURI(url)); ! if (file.isDirectory()){ ! return getPersistentClassNamesFromDirectory(file, loader); ! } else { ! return getPersistentClassNamesFromJar(file, loader); ! } } /** *************** *** 634,645 **** * @param loader the ClassLoader to use * @return */ ! public static List getPersistentClassNamesFromJar(URL url, ClassLoader loader){ ! List classList = getClassNamesFromJar(url); ! if (classList == null){ ! return null; ! } List persistentClasses = new Vector(); for (String className: classList){ if (isClassPersistent(className, loader)){ persistentClasses.add(className); --- 569,577 ---- * @param loader the ClassLoader to use * @return */ ! public static List getPersistentClassNamesFromJar(File file, ClassLoader loader){ List persistentClasses = new Vector(); + List classList = getClassNamesFromJar(file); for (String className: classList){ if (isClassPersistent(className, loader)){ persistentClasses.add(className); ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/exceptions/PersistenceUnitLoadingException.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.9 Report generated at Thu Jun 29 11:36:20 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/exceptions/PersistenceUnitLoadingException.java Thu Jun 29 11:21:43 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.9 Mon Jun 26 10:01:58 2006 *************** *** 38,44 **** public static final int FILE_PATH_MISSING_EXCEPTION = 30008; public static final int EXCEPTION_LOADING_FROM_URL = 30009; public static final int EXCEPTION_OPENING_ORM_XML = 30010; - public static final int COULD_NOT_GET_CLASS_NAMES_FROM_URL = 30011; /** * INTERNAL: --- 38,43 ---- *************** *** 81,87 **** return loadingException; } ! public static PersistenceUnitLoadingException exceptionLoadingFromJar(URL jarFile, Exception cause) { Object[] args = { jarFile }; PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, EXCEPTION_LOADING_FROM_JAR, args), cause); --- 80,86 ---- return loadingException; } ! public static PersistenceUnitLoadingException exceptionLoadingFromJar(File jarFile, Exception cause) { Object[] args = { jarFile }; PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, EXCEPTION_LOADING_FROM_JAR, args), cause); *************** *** 121,128 **** return loadingException; } ! public static PersistenceUnitLoadingException exceptionSearchingForEntities(URL url, Exception cause) { ! Object[] args = { url }; PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, EXCEPTION_SEARCHING_FOR_ENTITIES, args), cause); loadingException.setErrorCode(EXCEPTION_SEARCHING_FOR_ENTITIES); --- 120,127 ---- return loadingException; } ! public static PersistenceUnitLoadingException exceptionSearchingForEntities(File file, Exception cause) { ! Object[] args = { file }; PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, EXCEPTION_SEARCHING_FOR_ENTITIES, args), cause); loadingException.setErrorCode(EXCEPTION_SEARCHING_FOR_ENTITIES); *************** *** 145,156 **** return loadingException; } - public static PersistenceUnitLoadingException couldNotGetClassNamesFromUrl(URL url) { - Object[] args = { url }; - - PersistenceUnitLoadingException loadingException = new PersistenceUnitLoadingException(ExceptionMessageGenerator.buildMessage(PersistenceUnitLoadingException.class, COULD_NOT_GET_CLASS_NAMES_FROM_URL, args)); - loadingException.setErrorCode(COULD_NOT_GET_CLASS_NAMES_FROM_URL); - return loadingException; - } - } --- 144,147 ---- ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/exceptions/i18n/PersistenceUnitLoadingExceptionResource.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.8 Report generated at Thu Jun 29 11:36:20 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/exceptions/i18n/PersistenceUnitLoadingExceptionResource.java Thu Jun 29 11:21:43 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.8 Mon Jun 26 10:01:59 2006 *************** *** 35,42 **** { "30007", "An exception was thrown while loading class: {0} to check whether it implements @Entity, @Embeddable, or @MappedSuperclass."}, { "30008", "File path returned was empty or null"}, { "30009", "An exception was thrown while trying to load persistence unit at url: {0}"}, ! { "30010", "An exception was thrown while loading ORM XML file: {0}"}, ! { "30011", "TopLink could not get classes from the URL: {0}. TopLink attempted to read this URL as a jarFile and as a Directory and was unable to process it."} }; /** --- 35,41 ---- { "30007", "An exception was thrown while loading class: {0} to check whether it implements @Entity, @Embeddable, or @MappedSuperclass."}, { "30008", "File path returned was empty or null"}, { "30009", "An exception was thrown while trying to load persistence unit at url: {0}"}, ! { "30010", "An exception was thrown while loading ORM XML file: {0}"} }; /** ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/base/EJBQueryImpl.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000004/AB0952363AC40CBFE034080020E8C54E.41 Report generated at Thu Jun 29 11:36:20 2006 -------------------------------------------------------------------------------- ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataLogger.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000005/AB0952363AC40CBFE034080020E8C54E.6 Report generated at Thu Jun 29 11:36:20 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataLogger.java Thu Jun 29 11:21:43 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000005/AB0952363AC40CBFE034080020E8C54E.6 Mon Jun 26 10:03:05 2006 *************** *** 41,48 **** public static final String IGNORE_BASIC_FETCH_LAZY = "annotation_warning_ignore_basic_fetch_lazy"; public static final String IGNORE_GET_METHOD = "annotation_warning_ignore_get_method"; public static final String IGNORE_SECONDARY_TABLE = "annotation_warning_ignore_secondary_table"; ! public static final String ERROR_LOADING_ORM_XML_FILE = "annotation_warning_exception_loading_orm_xml_file"; ! public static final String TABLE_NAME = "metadata_default_table_name"; public static final String TABLE_SCHEMA = "metadata_default_table_schema"; public static final String TABLE_CATALOG = "metadata_default_table_catalog"; --- 41,47 ---- public static final String IGNORE_BASIC_FETCH_LAZY = "annotation_warning_ignore_basic_fetch_lazy"; public static final String IGNORE_GET_METHOD = "annotation_warning_ignore_get_method"; public static final String IGNORE_SECONDARY_TABLE = "annotation_warning_ignore_secondary_table"; ! public static final String TABLE_NAME = "metadata_default_table_name"; public static final String TABLE_SCHEMA = "metadata_default_table_schema"; public static final String TABLE_CATALOG = "metadata_default_table_catalog"; ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataProcessor.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000006/AB0952363AC40CBFE034080020E8C54E.50 Report generated at Thu Jun 29 11:36:21 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataProcessor.java Thu Jun 29 11:21:43 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000006/AB0952363AC40CBFE034080020E8C54E.50 Wed Jun 28 15:28:26 2006 *************** *** 21,27 **** package oracle.toplink.essentials.internal.ejb.cmp3.metadata; import java.io.InputStream; - import java.io.IOException; import java.util.Collection; import java.util.HashMap; --- 21,26 ---- *************** *** 29,37 **** import java.util.Iterator; import java.util.Set; - import javax.persistence.spi.PersistenceUnitInfo; - - import oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor; import oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAccessor; import oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.objects.MetadataClass; --- 28,33 ---- *************** *** 246,266 **** * found will be added to a list in the order that they are read from the * instance document(s). */ ! public void processPersistenceUnitMetadata(AbstractSession session, PersistenceUnitInfo persistenceUnitInfo, Collection mappingFileNames, Collection entities) { ! if (! mappingFileNames.isEmpty()) { // For each orm xml instance document, process persistence unit // metadata/defaults and mapped superclasses. Iterator fileNames = mappingFileNames.iterator(); - - Iterator mappingFileNamesIt = mappingFileNames.iterator(); - while (mappingFileNamesIt.hasNext()){ - String fileName = mappingFileNamesIt.next(); - InputStream inputStream = null; - try { - inputStream = PersistenceUnitProcessor.createInputStreamForFileInPersistenceUnit(fileName, persistenceUnitInfo, m_loader); // Initialize a helper for navigating the instance document. ! XMLHelper helper = new XMLHelper(inputStream, fileNames.next(), m_loader); // Store all mapped-superclasses. NodeList nodes = helper.getNodes(XMLConstants.ENTITY_MAPPINGS, XMLConstants.MAPPED_SUPERCLASS); --- 242,257 ---- * found will be added to a list in the order that they are read from the * instance document(s). */ ! public void processPersistenceUnitMetadata(Collection mappingStreams, Collection mappingFileNames, Collection entities) { ! if (! mappingStreams.isEmpty()) { // For each orm xml instance document, process persistence unit // metadata/defaults and mapped superclasses. Iterator fileNames = mappingFileNames.iterator(); + for (InputStream mappingStream : mappingStreams) { + try { // Initialize a helper for navigating the instance document. ! XMLHelper helper = new XMLHelper(mappingStream, fileNames.next(), m_loader); // Store all mapped-superclasses. NodeList nodes = helper.getNodes(XMLConstants.ENTITY_MAPPINGS, XMLConstants.MAPPED_SUPERCLASS); *************** *** 321,338 **** m_project.setPersistenceUnit(persistenceUnit); } } - } catch (IOException exception){ - getLogger().logWarningMessage(MetadataLogger.ERROR_LOADING_ORM_XML_FILE, fileName, exception); } catch (RuntimeException re) { throw re; ! } finally { ! if (inputStream != null){ ! try{ ! inputStream.close(); ! } catch (IOException exc){}; ! } ! } ! } } --- 312,320 ---- m_project.setPersistenceUnit(persistenceUnit); } } } catch (RuntimeException re) { throw re; ! } } } ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/EntityManagerSetupImpl.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000007/AB0952363AC40CBFE034080020E8C54E.71 Report generated at Thu Jun 29 11:36:21 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/EntityManagerSetupImpl.java Thu Jun 29 11:21:43 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000007/AB0952363AC40CBFE034080020E8C54E.71 Mon Jun 26 10:03:29 2006 *************** *** 111,131 **** * @return */ public Set buildPersistentClassSetFromXMLDocuments(ClassLoader loader, PersistenceUnitInfo persistenceUnitInfo) { ! List mappingFileNames = getORMXMLFileNames(loader); HashSet classSet = new HashSet(); Iterator fileNames = mappingFileNames.iterator(); InputStream stream = null; ! String fileName = null; ! while (fileNames.hasNext()){ try{ ! fileName = fileNames.next(); ! stream = PersistenceUnitProcessor.createInputStreamForFileInPersistenceUnit(fileName, persistenceUnitInfo, loader); ! if (stream != null){ ! classSet.addAll(MetadataProcessor.buildClassSet(stream, fileName, loader)); ! } ! } catch (IOException exception){ ! handleORMException(PersistenceUnitLoadingException.exceptionLoadingORMXML(fileName, exception), session, fileName); } finally { try{ if (stream != null){ --- 111,129 ---- * @return */ public Set buildPersistentClassSetFromXMLDocuments(ClassLoader loader, PersistenceUnitInfo persistenceUnitInfo) { ! List mappingFileStreams = new Vector(); ! List mappingFileNames = new Vector(); ! populateORMXMLStreamList(mappingFileStreams, mappingFileNames, loader); ! HashSet classSet = new HashSet(); + Iterator streams = mappingFileStreams.iterator(); Iterator fileNames = mappingFileNames.iterator(); InputStream stream = null; ! while (streams.hasNext()){ try{ ! stream = streams.next(); ! classSet.addAll(MetadataProcessor.buildClassSet(stream, fileNames.next(), loader)); } finally { try{ if (stream != null){ *************** *** 617,652 **** } } ! private List getORMXMLFileNames(ClassLoader loader){ ! ArrayList list = new ArrayList(); ! String ormXMLFile = "META-INF/orm.xml"; ! InputStream stream = null; ! try { ! stream = PersistenceUnitProcessor.createInputStreamForFileInPersistenceUnit(ormXMLFile, persistenceUnitInfo, loader); if (stream != null){ ! list.add(ormXMLFile); } ! } catch (IOException e){ ! } finally { ! try{ ! if (stream != null){ ! stream.close(); ! } ! } catch (IOException e) {} ! } ! if (persistenceUnitInfo != null) { ! if (persistenceUnitInfo.getMappingFileNames() != null) { ! Iterator mappingFiles = persistenceUnitInfo.getMappingFileNames().iterator();{ ! while (mappingFiles.hasNext()){ ! list.add((String)mappingFiles.next()); } } } ! } ! return list; } - /** * Override the default login creation method. --- 615,662 ---- } } ! /** ! * Populates a list of streams with open InputStreams for all the ORM XML files relevant to this ! * EntityManagerSetupImpl. That will include META-INF/orm.xml and any ORM xml files listed in the ! * PersistenceUnitInfo ! * This method will also populate a parallel list of the file names associated with those streams ! * @param streams ! * @param streamFileNames ! * @param privateClassLoader ! */ ! private void populateORMXMLStreamList(List streams, List streamFileNames, ClassLoader privateClassLoader){ ! String ormStr = "META-INF/orm.xml"; ! try{ ! InputStream stream = PersistenceUnitProcessor.createInputStreamForFileInPersistenceUnit(ormStr, persistenceUnitInfo, privateClassLoader); if (stream != null){ ! streams.add(stream); ! streamFileNames.add(ormStr); } ! } catch (IOException e){/* ignore */} ! if (persistenceUnitInfo != null) { ! if (!persistenceUnitInfo.getMappingFileNames().isEmpty()) { ! Iterator mappingFiles = persistenceUnitInfo.getMappingFileNames().iterator(); ! String mappingFileResourceName = null; ! while (mappingFiles.hasNext()) { ! try{ ! mappingFileResourceName = (String)mappingFiles.next(); ! InputStream stream = PersistenceUnitProcessor.createInputStreamForFileInPersistenceUnit(mappingFileResourceName, persistenceUnitInfo, privateClassLoader); ! // If we find the same META-INF/orm.xml resource again ! // in the entity-mappings list, ignore it. ! if (! mappingFileResourceName.equals(ormStr) && stream != null) { ! streamFileNames.add(mappingFileResourceName); ! streams.add(stream); ! } ! } catch (IOException e){ ! handleORMException(PersistenceUnitLoadingException.exceptionLoadingORMXML(mappingFileResourceName, e), session, mappingFileResourceName); ! } catch (RuntimeException e){ ! handleORMException(e, session, mappingFileResourceName); } } } ! } } /** * Override the default login creation method. *************** *** 973,995 **** private void processORMetadata(ClassLoader privateClassLoader, AbstractSession session, Collection entities, boolean enableLazyForOneToOne){ processor = new MetadataProcessor(session, privateClassLoader, enableLazyForOneToOne); ! List mappingFileNames = getORMXMLFileNames(privateClassLoader); ! ! // process persistence unit metadata/defaults defined in ORM XML instance documents in the persistence unit ! processor.processPersistenceUnitMetadata(session, persistenceUnitInfo, mappingFileNames, entities); Iterator fileNames = mappingFileNames.iterator(); InputStream inputStream = null; String fileName = null; ! while (fileNames.hasNext()){ try{ ! fileName = fileNames.next(); ! inputStream = PersistenceUnitProcessor.createInputStreamForFileInPersistenceUnit(fileName, persistenceUnitInfo, privateClassLoader); ! processor.processXML(inputStream, fileName); } catch (RuntimeException e){ handleORMException(e, session, fileName); - } catch (IOException exc){ - handleORMException(PersistenceUnitLoadingException.exceptionLoadingORMXML(fileName, exc), session, fileName); } finally { try{ inputStream.close(); --- 983,1016 ---- private void processORMetadata(ClassLoader privateClassLoader, AbstractSession session, Collection entities, boolean enableLazyForOneToOne){ processor = new MetadataProcessor(session, privateClassLoader, enableLazyForOneToOne); ! List mappingFileStreams = new Vector(); ! List mappingFileNames = new Vector(); ! try{ ! populateORMXMLStreamList(mappingFileStreams, mappingFileNames, privateClassLoader); ! // process persistence unit metadata/defaults defined in ORM XML instance documents in the persistence unit ! processor.processPersistenceUnitMetadata(mappingFileStreams, mappingFileNames, entities); ! } finally { ! Iterator streamsToClose = mappingFileStreams.iterator(); ! while (streamsToClose.hasNext()){ ! try{ ! streamsToClose.next().close(); ! } catch (IOException exc){} ! } ! } + mappingFileStreams = new Vector(); + mappingFileNames = new Vector(); + populateORMXMLStreamList(mappingFileStreams, mappingFileNames, privateClassLoader); + Iterator streams = mappingFileStreams.iterator(); Iterator fileNames = mappingFileNames.iterator(); InputStream inputStream = null; String fileName = null; ! while (streams.hasNext()){ try{ ! inputStream = streams.next(); ! processor.processXML(inputStream, fileNames.next()); } catch (RuntimeException e){ handleORMException(e, session, fileName); } finally { try{ inputStream.close(); ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/localization/i18n/LoggingLocalizationResource.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000008/AB0952363AC40CBFE034080020E8C54E.26 Report generated at Thu Jun 29 11:36:21 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/localization/i18n/LoggingLocalizationResource.java Thu Jun 29 11:21:43 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_gf713_5304011_persistence_unit_processing_060623/ade_storage/000008/AB0952363AC40CBFE034080020E8C54E.26 Mon Jun 26 10:03:44 2006 *************** *** 228,234 **** { "annotation_warning_ignore_inheritance", "Inheritance information is already defined on the descriptor for the entity [{0}]. Ignoring @Inheritance information." }, { "annotation_warning_ignore_get_method", "Ignoring getter method [{1}] on entity class [{0}] since its corresponding setter method is not defined. If this method should be treated as a persistent property, define the corresponding setter method. To avoid this warning all together, decorate the getter method with a @Transient." }, { "annotation_warning_ignore_basic_fetch_lazy", "Ignoring LAZY fetch type on attribute [{1}] within entity class [{0}]. All basic mappings default to use EAGER fetching." }, - { "annotation_warning_exception_loading_orm_xml_file", "An exception was thrown loading ORM XML file [{0}] : [{1}]" }, { "orm_warning_ignore_mapping", "A mapping for the attribute [{1}] is already defined on the descriptor for the entity [{0}]. Ignoring mapping element." }, { "orm_warning_ignore_mapping_on_write", "Only DirectToField and TypeConversion (BLOB/CLOB) mappings are allowed for embeddable-attributes. The mapping for the attribute [{1}] on the descriptor for the entity [{0}] will not be written to the entity-mappings file." }, --- 228,233 ---- *************** *** 267,279 **** { "resource_local_persistence_init_info_ignores_jta_data_source", "PersistenceUnitInfo {0} has transactionType RESOURCE_LOCAL and therefore jtaDataSource will be ignored"}, { "obsolete_property", "property {1} is obsolete, property {0} should be used instead."}, ! { "persistence_unit_processor_error_loading_class", "{0}: {1} was thrown on attempt of PersistenceLoadProcessor to load class {2}. The class is ignored."}, ! ! { "attempted_to_open_url_as_jar", "{1} was thrown on attempt to open {0} as a jar."}, ! { "attempted_to_open_url_as_directory", "{1} was thrown on attempt to open {0} as a directory."}, ! { "attempted_to_open_entry_in_url_as_jar", "{2} was thrown on attempt to open {0} as a jar and access entry: {1}."}, ! { "attempted_to_open_file_url_as_directory", "{2} was thrown on attempt to open {0} as a directory and access entry: {1}."} ! }; /** --- 266,272 ---- { "resource_local_persistence_init_info_ignores_jta_data_source", "PersistenceUnitInfo {0} has transactionType RESOURCE_LOCAL and therefore jtaDataSource will be ignored"}, { "obsolete_property", "property {1} is obsolete, property {0} should be used instead."}, ! { "persistence_unit_processor_error_loading_class", "{0}: {1} was thrown on attempt of PersistenceLoadProcessor to load class {2}. The class is ignored."} }; /**