You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Florent BENOIT (JIRA)" <ji...@apache.org> on 2007/02/14 22:46:05 UTC

[jira] Created: (OPENJPA-148) Parsing exception while using an "exploded" archive

Parsing exception while using an "exploded" archive
---------------------------------------------------

                 Key: OPENJPA-148
                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
             Project: OpenJPA
          Issue Type: Bug
          Components: jpa
         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
            Reporter: Florent BENOIT


This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
The error is happening with "exploded" archive.
Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.

It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.

I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
And 4 steps used to reproduce this problem

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


[jira] Reopened: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Jencks reopened OPENJPA-148:
----------------------------------


Some more experience indicates my previous patch suffers from at least 2 problems:

- NPE if files is null
- If one of the URLs is a directory, but not a file, we still get the same problem of trying to read a directory like an xml document.

> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>            Priority: Minor
>             Fix For: 0.9.8
>
>         Attachments: debug_traces_directorymode.txt, debug_traces_filemode_working.txt, OPENJPA-148-2.patch, OPENJPA-148.patch, stacktrace-error.txt, steps.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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


[jira] Updated: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "Florent BENOIT (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florent BENOIT updated OPENJPA-148:
-----------------------------------

    Attachment: stacktrace-error.txt

On the top of the file, the error.

At the end, the same data but packaged in a .jar file and in this case, it works.

> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>         Attachments: stacktrace-error.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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


[jira] Resolved: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "Marc Prud'hommeaux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marc Prud'hommeaux resolved OPENJPA-148.
----------------------------------------

    Resolution: Fixed

Applied (partial) patch.

> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>            Priority: Minor
>             Fix For: 0.9.8
>
>         Attachments: debug_traces_directorymode.txt, debug_traces_filemode_working.txt, OPENJPA-148.patch, stacktrace-error.txt, steps.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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


[jira] Updated: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Jencks updated OPENJPA-148:
---------------------------------

    Attachment: OPENJPA-148-2.patch

Attached patch fixes the 2 additional issues I've found.

> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>            Priority: Minor
>             Fix For: 0.9.8
>
>         Attachments: debug_traces_directorymode.txt, debug_traces_filemode_working.txt, OPENJPA-148-2.patch, OPENJPA-148.patch, stacktrace-error.txt, steps.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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


[jira] Commented: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "Marc Prud'hommeaux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497575 ] 

Marc Prud'hommeaux commented on OPENJPA-148:
--------------------------------------------

I've gone ahead and applied OPENJPA-148-2.patch. If this works for you, please go ahead and mark this issue as resolved.

> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>            Priority: Minor
>             Fix For: 0.9.8
>
>         Attachments: debug_traces_directorymode.txt, debug_traces_filemode_working.txt, OPENJPA-148-2.patch, OPENJPA-148.patch, stacktrace-error.txt, steps.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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


[jira] Updated: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "Florent BENOIT (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florent BENOIT updated OPENJPA-148:
-----------------------------------

    Attachment: debug_traces_directorymode.txt

add traces with debug mode on (for the directory failing case)

> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>         Attachments: debug_traces_directorymode.txt, stacktrace-error.txt, steps.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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


Re: [jira] Commented: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by Marina Vatkina <Ma...@Sun.COM>.
Just one note (this problem caused us a lot of headaches in GlassFish): I'm not 
sure if url.getFile() handles spaces in the url correctly. If it doesn't, our 
solution was to use 'new File(url.toURI())'.

-marina

David Jencks (JIRA) wrote:
>     [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493730 ] 
> 
> David Jencks commented on OPENJPA-148:
> --------------------------------------
> 
> Marc did not apply this part of the patch, which was actually the crucial part to get this to work for geronimo :-).  As I noted before this may well not be the best way to solve the problem, its only virtue is that it works:
> 
> +                if ("file".equals(url.getProtocol())) {
> +                    File file = new File(url.getFile()).getAbsoluteFile();
> +                    if (files.contains(file)) {
> +                        continue;
> +                    }
> +                }
> 
> For reasons that are not entirely clear to me yet, the war WEB-INF/classes directory is showing up both in the files list (where it is processed correctly) and the urls list where it is causing an error since the code tries to treat it as an xml file.  The patch excerpt above is a bit of a hack but it checks each url to see if it matches a file in the files list and if so skips it.  In particular the directory WEB-INF/classes is matched so it is skipped, thus sidestepping the problem.
> 
> IMO it would be better to avoid duplicating locations in the files and urls list but I haven't figured out how to make that happen yet.  I don't see much harm in this patch in any case since AFAICT there is never a reason to process a location twice.
> 
> 
>>Parsing exception while using an "exploded" archive
>>---------------------------------------------------
>>
>>                Key: OPENJPA-148
>>                URL: https://issues.apache.org/jira/browse/OPENJPA-148
>>            Project: OpenJPA
>>         Issue Type: Bug
>>         Components: jpa
>>        Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>>           Reporter: Florent BENOIT
>>           Priority: Minor
>>            Fix For: 0.9.8
>>
>>        Attachments: debug_traces_directorymode.txt, debug_traces_filemode_working.txt, OPENJPA-148.patch, stacktrace-error.txt, steps.txt
>>
>>
>>This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
>>The error is happening with "exploded" archive.
>>Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
>>It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
>>This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
>>Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
>>I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
>>And 4 steps used to reproduce this problem
> 
> 


[jira] Commented: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493730 ] 

David Jencks commented on OPENJPA-148:
--------------------------------------

Marc did not apply this part of the patch, which was actually the crucial part to get this to work for geronimo :-).  As I noted before this may well not be the best way to solve the problem, its only virtue is that it works:

+                if ("file".equals(url.getProtocol())) {
+                    File file = new File(url.getFile()).getAbsoluteFile();
+                    if (files.contains(file)) {
+                        continue;
+                    }
+                }

For reasons that are not entirely clear to me yet, the war WEB-INF/classes directory is showing up both in the files list (where it is processed correctly) and the urls list where it is causing an error since the code tries to treat it as an xml file.  The patch excerpt above is a bit of a hack but it checks each url to see if it matches a file in the files list and if so skips it.  In particular the directory WEB-INF/classes is matched so it is skipped, thus sidestepping the problem.

IMO it would be better to avoid duplicating locations in the files and urls list but I haven't figured out how to make that happen yet.  I don't see much harm in this patch in any case since AFAICT there is never a reason to process a location twice.

> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>            Priority: Minor
>             Fix For: 0.9.8
>
>         Attachments: debug_traces_directorymode.txt, debug_traces_filemode_working.txt, OPENJPA-148.patch, stacktrace-error.txt, steps.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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


[jira] Updated: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "Florent BENOIT (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florent BENOIT updated OPENJPA-148:
-----------------------------------

    Attachment: debug_traces_filemode_working.txt

Add debug traces for the same classes packaged in a .jar file and that is working.

> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>         Attachments: debug_traces_directorymode.txt, debug_traces_filemode_working.txt, stacktrace-error.txt, steps.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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


[jira] Commented: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493746 ] 

David Jencks commented on OPENJPA-148:
--------------------------------------

Craig said...
<Just thinking a bit outside the box here. Is it possibly a bug that the classes directory is being presented as a file?

I don't think presenting it as a file is a problem, that part works fine.  Presenting it as a URL is what causes problems.

<And perhaps defensively OpenJPA might check to see if the file is actually a directory and then just ignore it. i.e. if (file.isDirectory()) continue;

A couple lines above this patch file.isDirectory() is treated correctly, and ignoring it is not necessary :-)

<But I'd like to see a bit more investigation into whether the behavior of the container is correct. It does seem odd that the container is expecting the provider to remove duplicate items from the <deployment artifact.

I agree.  I think there's something wrong that the same things are showing up in the list of files and the list of urls.  However based on my very limited tracing through the code I think this is caused by some multiple format conversions openjpa is doing: list of urls >> ';' separated string >> list of files + list of urls.  I haven't figured out exactly what is going on here, and any comments on the codes' purpose would be welcome :-)




> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>            Priority: Minor
>             Fix For: 0.9.8
>
>         Attachments: debug_traces_directorymode.txt, debug_traces_filemode_working.txt, OPENJPA-148.patch, stacktrace-error.txt, steps.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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


[jira] Commented: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "Florent BENOIT (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473942 ] 

Florent BENOIT commented on OPENJPA-148:
----------------------------------------

Here is a follow up for explaining the process that OpenJPA is using on exploded jar files:

The PersistenceUnitInfo object build by the EJB3 container(EasyBeans in my testcase) is sent to OpenJPA.
Then, in the method toOpenJPAProperties of org.apache.openjpa.persistence.PersistenceUnitInfoImpl class

The getPersistenceUnitRootUrl() URL (which is the directory URL
 file:/home/florent/workspace/easybeans/ejb3s/entitybean.jar/) is transformed
 into /home/florent/workspace/easybeans/ejb3s/entitybean.jar/ as it is a "file:" URL


Then, the getJarFileUrls() is returning the same URL (file:/home/florent/workspace/easybeans/ejb3s/entitybean.jar/)
This URL is an exploded JAR file URL which is valid for this method as said in the specification
 "Returns a list of URLs for the jar files or exploded jar file directories that the persistence provider [...]"
 (It has been clarified between the proposed final specification and the final specification)

The PersistenceUnitInfoImpl class is then transforming these two URLs into:
  - "Files" property with the value /home/florent/workspace/easybeans/ejb3s/entitybean.jar/
  - "URLs" property with the value file:/home/florent/workspace/easybeans/ejb3s/entitybean.jar/

Then, these values will be analyzed in  parsePersistentTypeNames(ClassLoader loader) method of
 the class org.apache.openjpa.meta.AbstractCFMetaDataFactory

1/ First, the "Files" property is analyzed:
As /home/florent/workspace/easybeans/ejb3s/entitybean.jar/ is a directory, it goes in:

                if (file.isDirectory()) {
                    if (log.isTraceEnabled())
                        log.trace(_loc.get("scanning-directory", file));
                    scan(new FileMetaDataIterator(dir, newMetaDataFilter()),
                        cparser, names, true, file);
                } 

which found...nothing. (I have done another test with a file for the PersistenceUnitRootUrl
 (and not a directory) and in this case the scan of the file finds the Entity class while it doesn't
 find the entity class in directory mode).
Also here, dir is null, if dir = file, it finds the entity class.

The corresponding debug trace is:
[TRACE] MetaData - Scanning directory "/home/florent/workspace/easybeans/ejb3s/entitybean.jar" for persistent types.


2/ Then, the "URLs" property is analyzed:
It's not a .jar file so the case "else if (url.getPath().endsWith(".jar"))" is not used and it fallbacks
 in the default case:

                } else {
                    if (log.isTraceEnabled())
                        log.trace(_loc.get("scanning-url", url));
                    clss = cparser.parseTypeNames(new URLMetaDataIterator(url));
                    if (log.isTraceEnabled())
                        log.trace(_loc.get("scan-found-names", clss, url));
                    names.addAll(Arrays.asList(clss));
                    mapPersistentTypeNames(url, clss);
                }

And mapPersistentTypeNames method do the following:
_unparsed.add((URL) rsrc);

so, the URL which is referencing an exploded jar is considered as an unparsed URL from now.

The corresponding traces are:
[TRACE] MetaData - Scanning URL "file:/home/florent/workspace/easybeans/ejb3s/entitybean.jar/" for persistent types.
[TRACE] MetaData - Scan of "file:/home/florent/workspace/easybeans/ejb3s/entitybean.jar/" found persistent types [Ljava.lang.String;@14c7cd.
[TRACE] MetaData - Mapping resource location "file:/home/florent/workspace/easybeans/ejb3s/entitybean.jar/" to persistent types "[]".

(with [Ljava.lang.String;@14c7cd. being an empty array.)

When a class needs to be loaded by the load(Class cls, int mode, ClassLoader envLoader) method of org.apache.openjpa.persistence.PersistenceMetaDataFactory class, there is a check on the _unparsed attribute.

And in this case, it tries to parse the URL as an XML file:
  for (URL url : _unparsed)
    parseXML(url, cls, mode, envLoader);

And we can imagine the result of parsing a directory as an XML file.

The result is:
[WARN] Enhance - An exception was thrown while attempting to perform class file transformation on "org/objectweb/easybeans/examples/entitybean/SessionFacadeRemote": <<0|false|0.9.7-incubating-SNAPSHOT> org.apache.openjpa.util.GeneralException: org.xml.sax.SAXException: file:/home/florent/workspace/easybeans/ejb3s/entitybean.jar/ [Location: Line: 1, C: 1]: org.xml.sax.SAXParseException: Content is not allowed in prolog.><0|false|0.9.7-incubating-SNAPSHOT> org.apache.openjpa.util.GeneralException: org.xml.sax.SAXException: file:/home/florent/workspace/easybeans/ejb3s/entitybean.jar/ [Location: Line: 1, C: 1]: org.xml.sax.SAXParseException: Content is not allowed in prolog.
	at org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML(PersistenceMetaDataFactory.java:233)


So, I think that you have now a complete report and that you're understanding why OpenJPA is failing.




> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>         Attachments: debug_traces_directorymode.txt, stacktrace-error.txt, steps.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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


Re: [jira] Updated: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by Marc Prud'hommeaux <mp...@apache.org>.
David-

This part of the patch fixes what is clearly a bug with scanning  
directories:

-                    scan(new FileMetaDataIterator(dir,  
newMetaDataFilter()),
+                    //TODO should this call setStoreDirectory(file)????
+                    scan(new FileMetaDataIterator(file,  
newMetaDataFilter()),


I've gone ahead and applied that part of the patch. However, I don't  
know what this part is expected to do:

+                if ("file".equals(url.getProtocol())) {
+                    File file = new File(url.getFile 
()).getAbsoluteFile();
+                    if (files.contains(file)) {
+                        continue;
+                    }
+                }


If you explain this part, I'll also apply it. For the time being,  
though, I'm marking the issue closed. Let me know if Geronimo works  
once you have tested with the partial patch applied. If it doesn't,  
please re-open the issue.




On May 3, 2007, at 11:54 PM, David Jencks wrote:

> I'd really appreciate it if a committer could take a look at this  
> patch fairly soon and provide feedback or apply it.  I don't think  
> geronimo can deploy persistence units in wars without it or its  
> equivalent.
>
> Of course I'd also like to know if it helps EasyBeans :-)
>
> thanks
> david jencks
>
> On May 2, 2007, at 3:07 PM, David Jencks (JIRA) wrote:
>
>>
>>      [ https://issues.apache.org/jira/browse/OPENJPA-148? 
>> page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>>
>> David Jencks updated OPENJPA-148:
>> ---------------------------------
>>
>>     Attachment: OPENJPA-148.patch
>>
>> This patch fixes the issue for me in the geronimo integration.   
>> There are 2 changes:
>>
>> 1. there's an apparent bug in the treatment of a directory.   
>> There's a var "dir" which is AFAICT never set that used to be  
>> scanned.  I changed it to scan the directory under consideration,  
>> which does find the persistent classes in the dir.  I don't know  
>> if dir should be set to one of the scanned directories.
>>
>> 2. In the geronimo environment, the same locations show up in both  
>> the files and urls lists.  I haven't figured out exactly why.   
>> However, this lets the second part of the fix work, which is to  
>> ignore urls that point to a file that has already been scanned.  I  
>> think this is probably OK since non-file urls generally can't be  
>> scanned like a directory.
>>
>> I'll be happy to work on improvements given advice on problems  
>> with this patch, but this patch would IMO be a good start.
>>
>>> Parsing exception while using an "exploded" archive
>>> ---------------------------------------------------
>>>
>>>                 Key: OPENJPA-148
>>>                 URL: https://issues.apache.org/jira/browse/ 
>>> OPENJPA-148
>>>             Project: OpenJPA
>>>          Issue Type: Bug
>>>          Components: jpa
>>>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot  
>>> 0.9.7
>>>            Reporter: Florent BENOIT
>>>            Priority: Minor
>>>             Fix For: 0.9.8
>>>
>>>         Attachments: debug_traces_directorymode.txt,  
>>> debug_traces_filemode_working.txt, OPENJPA-148.patch, stacktrace- 
>>> error.txt, steps.txt
>>>
>>>
>>> This happens when using OpenJPA as persistence provider for the  
>>> EasyBeans ObjectWeb container.
>>> The error is happening with "exploded" archive.
>>> Exploded means that there is a directory, named "entitybean.jar"  
>>> with a folder META-INF which contains a file named  
>>> persistence.xml, and other directories/files for the classes.
>>> It seems that when using this mode, OpenJPA is trying to parse  
>>> the directory inputstream (which is failing).
>>> This exception is not occuring if a jar file is used instead of  
>>> the "exploded" mode, but the exploded mode is the default mode  
>>> for EasyBeans.
>>> Note also that this exception don't occur by using Hibernate  
>>> Entity Manager or Oracle TopLink Essentials as persistence provider.
>>> I will attach to this issue a stack trace (with the exploded  
>>> directory) which fails and at the end with a jar file (which work)
>>> And 4 steps used to reproduce this problem
>>
>> -- 
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>


Re: [jira] Updated: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by David Jencks <da...@yahoo.com>.
I'd really appreciate it if a committer could take a look at this  
patch fairly soon and provide feedback or apply it.  I don't think  
geronimo can deploy persistence units in wars without it or its  
equivalent.

Of course I'd also like to know if it helps EasyBeans :-)

thanks
david jencks

On May 2, 2007, at 3:07 PM, David Jencks (JIRA) wrote:

>
>      [ https://issues.apache.org/jira/browse/OPENJPA-148? 
> page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> David Jencks updated OPENJPA-148:
> ---------------------------------
>
>     Attachment: OPENJPA-148.patch
>
> This patch fixes the issue for me in the geronimo integration.   
> There are 2 changes:
>
> 1. there's an apparent bug in the treatment of a directory.   
> There's a var "dir" which is AFAICT never set that used to be  
> scanned.  I changed it to scan the directory under consideration,  
> which does find the persistent classes in the dir.  I don't know if  
> dir should be set to one of the scanned directories.
>
> 2. In the geronimo environment, the same locations show up in both  
> the files and urls lists.  I haven't figured out exactly why.   
> However, this lets the second part of the fix work, which is to  
> ignore urls that point to a file that has already been scanned.  I  
> think this is probably OK since non-file urls generally can't be  
> scanned like a directory.
>
> I'll be happy to work on improvements given advice on problems with  
> this patch, but this patch would IMO be a good start.
>
>> Parsing exception while using an "exploded" archive
>> ---------------------------------------------------
>>
>>                 Key: OPENJPA-148
>>                 URL: https://issues.apache.org/jira/browse/ 
>> OPENJPA-148
>>             Project: OpenJPA
>>          Issue Type: Bug
>>          Components: jpa
>>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>>            Reporter: Florent BENOIT
>>            Priority: Minor
>>             Fix For: 0.9.8
>>
>>         Attachments: debug_traces_directorymode.txt,  
>> debug_traces_filemode_working.txt, OPENJPA-148.patch, stacktrace- 
>> error.txt, steps.txt
>>
>>
>> This happens when using OpenJPA as persistence provider for the  
>> EasyBeans ObjectWeb container.
>> The error is happening with "exploded" archive.
>> Exploded means that there is a directory, named "entitybean.jar"  
>> with a folder META-INF which contains a file named  
>> persistence.xml, and other directories/files for the classes.
>> It seems that when using this mode, OpenJPA is trying to parse the  
>> directory inputstream (which is failing).
>> This exception is not occuring if a jar file is used instead of  
>> the "exploded" mode, but the exploded mode is the default mode for  
>> EasyBeans.
>> Note also that this exception don't occur by using Hibernate  
>> Entity Manager or Oracle TopLink Essentials as persistence provider.
>> I will attach to this issue a stack trace (with the exploded  
>> directory) which fails and at the end with a jar file (which work)
>> And 4 steps used to reproduce this problem
>
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>


[jira] Updated: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Jencks updated OPENJPA-148:
---------------------------------

    Attachment: OPENJPA-148.patch

This patch fixes the issue for me in the geronimo integration.  There are 2 changes:

1. there's an apparent bug in the treatment of a directory.  There's a var "dir" which is AFAICT never set that used to be scanned.  I changed it to scan the directory under consideration, which does find the persistent classes in the dir.  I don't know if dir should be set to one of the scanned directories.

2. In the geronimo environment, the same locations show up in both the files and urls lists.  I haven't figured out exactly why.  However, this lets the second part of the fix work, which is to ignore urls that point to a file that has already been scanned.  I think this is probably OK since non-file urls generally can't be scanned like a directory.  

I'll be happy to work on improvements given advice on problems with this patch, but this patch would IMO be a good start.

> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>            Priority: Minor
>             Fix For: 0.9.8
>
>         Attachments: debug_traces_directorymode.txt, debug_traces_filemode_working.txt, OPENJPA-148.patch, stacktrace-error.txt, steps.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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


[jira] Commented: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "Florent BENOIT (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493739 ] 

Florent BENOIT commented on OPENJPA-148:
----------------------------------------

I tested with the last revision 535321 (that includes the second commit of this patch) and the deployment works fine on EasyBeans when using exploded archive.

Thanks.

> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>            Priority: Minor
>             Fix For: 0.9.8
>
>         Attachments: debug_traces_directorymode.txt, debug_traces_filemode_working.txt, OPENJPA-148.patch, stacktrace-error.txt, steps.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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


[jira] Commented: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493736 ] 

Craig Russell commented on OPENJPA-148:
---------------------------------------

Just thinking a bit outside the box here. Is it possibly a bug that the classes directory is being presented as a file? 

And perhaps defensively OpenJPA might check to see if the file is actually a directory and then just ignore it. i.e. if (file.isDirectory()) continue;

But I'd like to see a bit more investigation into whether the behavior of the container is correct. It does seem odd that the container is expecting the provider to remove duplicate items from the deployment artifact.

> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>            Priority: Minor
>             Fix For: 0.9.8
>
>         Attachments: debug_traces_directorymode.txt, debug_traces_filemode_working.txt, OPENJPA-148.patch, stacktrace-error.txt, steps.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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


[jira] Resolved: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Jencks resolved OPENJPA-148.
----------------------------------

    Resolution: Fixed

It works for geronimo now, many thanks!

> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>            Priority: Minor
>             Fix For: 0.9.8
>
>         Attachments: debug_traces_directorymode.txt, debug_traces_filemode_working.txt, OPENJPA-148-2.patch, OPENJPA-148.patch, stacktrace-error.txt, steps.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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


[jira] Updated: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Linskey updated OPENJPA-148:
------------------------------------

    Priority: Minor  (was: Major)

> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>            Priority: Minor
>             Fix For: 0.9.7
>
>         Attachments: debug_traces_directorymode.txt, debug_traces_filemode_working.txt, stacktrace-error.txt, steps.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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


[jira] Updated: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Linskey updated OPENJPA-148:
------------------------------------

    Fix Version/s: 0.9.7

> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>             Fix For: 0.9.7
>
>         Attachments: debug_traces_directorymode.txt, debug_traces_filemode_working.txt, stacktrace-error.txt, steps.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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


[jira] Updated: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "Florent BENOIT (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florent BENOIT updated OPENJPA-148:
-----------------------------------

    Attachment: steps.txt

The steps to reproduce this error.

> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>         Attachments: stacktrace-error.txt, steps.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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


[jira] Commented: (OPENJPA-148) Parsing exception while using an "exploded" archive

Posted by "Marc Prud'hommeaux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493735 ] 

Marc Prud'hommeaux commented on OPENJPA-148:
--------------------------------------------

I understand the reason for that part now. I've applied and committed the rest of the patch. Please comment in this issue if you still experience the problem with this patch.

> Parsing exception while using an "exploded" archive
> ---------------------------------------------------
>
>                 Key: OPENJPA-148
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-148
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
>            Reporter: Florent BENOIT
>            Priority: Minor
>             Fix For: 0.9.8
>
>         Attachments: debug_traces_directorymode.txt, debug_traces_filemode_working.txt, OPENJPA-148.patch, stacktrace-error.txt, steps.txt
>
>
> This happens when using OpenJPA as persistence provider for the EasyBeans ObjectWeb container.
> The error is happening with "exploded" archive.
> Exploded means that there is a directory, named "entitybean.jar" with a folder META-INF which contains a file named persistence.xml, and other directories/files for the classes.
> It seems that when using this mode, OpenJPA is trying to parse the directory inputstream (which is failing).
> This exception is not occuring if a jar file is used instead of the "exploded" mode, but the exploded mode is the default mode for EasyBeans.
> Note also that this exception don't occur by using Hibernate Entity Manager or Oracle TopLink Essentials as persistence provider.
> I will attach to this issue a stack trace (with the exploded directory) which fails and at the end with a jar file (which work)
> And 4 steps used to reproduce this problem

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