[ 
https://issues.apache.org/jira/browse/MYFACES-4571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17691701#comment-17691701
 ] 

Thomas Andraschko commented on MYFACES-4571:
--------------------------------------------

TBH: no idea
i would check how the paths are constructed
for facelets, resources and so on propably the ResourceHandler is used

is it also used for the source tag? search for "new URL(tag.getSource())" in 
the codebase, maybe thats the difference and the source-tag should also use a 
ResourceHandler? no idea

> Quarkus: GraalVM Native never use JAR resource
> ----------------------------------------------
>
>                 Key: MYFACES-4571
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4571
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: Extension Feature
>    Affects Versions: 2.3-next-M7, 4.0.0-RC5
>            Reporter: Melloware
>            Assignee: Melloware
>            Priority: Major
>
> [~tandraschko] I need some advice. I have 99% of functionality now working in 
> GraalVM native image I am down to my last issue.   It use using Tag Library 
> in Faces config is blowing up in Native Mode and here is why when its 
> resolving the Facelet URL.
> It is listed in *faces-config.xml* like this..
> {code:java}
>     <tag>
>         <tag-name>tabscode</tag-name>
>         <source>resources/tags/tabscode.xhtml</source>
>     </tag> {code}
> *DEV MODE (works):*
> {noformat}
> Source URL = 
> file:/C:/dev/primefaces/quarkus-faces/src/main/resources/META-INF/resources/template/template.xhtml
>  Path = ./config.xhtml
> Facelet URL = 
> file:/C:/dev/primefaces/quarkus-faces/src/main/resources/META-INF/resources/template/config.xhtml
> Facelet URL = 
> file:/C:/dev/primefaces/quarkus-faces/target/classes/META-INF/resources/tags/tabscode.xhtml{noformat}
> *PROD JAR MODE (works):*
> {noformat}
> Source URL = 
> jar:file:/C:/dev/primefaces/quarkus-faces/target/quarkus-app/app/quarkus-faces.jar!/META-INF/resources/template/template.xhtml
>  Path = ./config.xhtml
> Facelet URL = 
> jar:file:/C:/dev/primefaces/quarkus-faces/target/quarkus-app/app/quarkus-faces.jar!/META-INF/resources/template/config.xhtml
> Facelet URL = 
> jar:file:/C:/dev/primefaces/quarkus-faces/target/quarkus-app/app/quarkus-faces.jar!/META-INF/resources/tags/tabscode.xhtml{noformat}
> *GRAALVM NATIVE MODE (fails):*
> {noformat}
> Source URL = resource:/META-INF/resources/template/template.xhtml Path = 
> ./config.xhtml
> Facelet URL = resource:/META-INF/resources/template/config.xhtml
> Facelet URL = 
> jar:file:/project/quarkus-faces-runner.jar!/META-INF/resources/tags/tabscode.xhtml{noformat}
> As you can see tabscode then blows up with...
> {noformat}
> java.nio.file.NoSuchFileException: /project/quarkus-faces-runner.jar
>         at 
> [email protected]/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
>         at 
> [email protected]/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:148)
>         at 
> [email protected]/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
>         at 
> [email protected]/java.nio.file.Files.readAttributes(Files.java:1851)
>         at 
> [email protected]/java.util.zip.ZipFile$Source.get(ZipFile.java:1264)
>         at 
> [email protected]/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:709)
>         at [email protected]/java.util.zip.ZipFile.<init>(ZipFile.java:243)
>         at [email protected]/java.util.zip.ZipFile.<init>(ZipFile.java:172)
>         at [email protected]/java.util.jar.JarFile.<init>(JarFile.java:347)
>         at 
> [email protected]/sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:103)
>         at 
> [email protected]/sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:72)
>         at 
> [email protected]/sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:168)
>         at 
> [email protected]/sun.net.www.protocol.jar.JarFileFactory.getOrCreate(JarFileFactory.java:91)
>         at 
> [email protected]/sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:132)
>         at 
> [email protected]/sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:175)
>         at [email protected]/java.net.URL.openStream(URL.java:1161)
>         at 
> org.apache.myfaces.view.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:824)
>         at 
> org.apache.myfaces.view.facelets.compiler.Compiler.compile(Compiler.java:80)
>         at 
> org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory._createFacelet(DefaultFaceletFactory.java:344)
>         at 
> org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory.lambda$new$0(DefaultFaceletFactory.java:105)
>         at 
> org.apache.myfaces.view.facelets.impl.CacheELFaceletCacheImpl.getFacelet(CacheELFaceletCacheImpl.java:137)
>         at 
> org.apache.myfaces.view.facelets.impl.CacheELFaceletCacheImpl.getFacelet(CacheELFaceletCacheImpl.java:45){noformat}
> Basically I was hoping you could point to me in the code based 1 or two spots 
> where in GRAAL mode I can override anything that is a JAR to be 
> "resource:/META-INF" instead of a JAR ever  I can do it with a GraalVM 
> Substitution but was hoping for some guidance on where to look at the best 
> spot. 
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to