[ 
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.

Reply via email to