Kobee1203 / jcrom

A lightweight framework for mapping Java objects to/from a Java Content Repository (JCR)
Apache License 2.0
18 stars 13 forks source link

mapPackage fails for non-exploded EAR projects #101

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call mapPackage in non-exploded EAR application.

What is the expected output? What do you see instead?
Mapping of packages in Jar files in the Ear.  Classes are not found in the EAR.

What version of the product are you using? On what operating system?
JCROM 2.1.0, Jboss AS7/EAP6.1

Please provide any additional information below.

The getClasses method in the ReflectionUtils determines that it should use 
getFromDirectory to try and load the classes, but the filePath looks something 
like "/content/xxx.ear/xxx-ejb.jar/com/..." which then fails the 
directory.exists() call. This is under Jboss AS7 (EAP 6.1).

While I found what the problem is, I have no idea how to fix it. :-( It all 
works with an exploded EAR (ie, from Eclipse), but when deploying to a server 
(non-exploded), it fails.

Original issue reported on code.google.com by rharerh...@gmail.com on 11 Nov 2013 at 6:45

rkozma commented 9 years ago

Hi, We are facing this issue with jcorm-2.2.0. Will it be fixed in an upcoming version, or there is an accepted workaround? Thanks,