Comments (18)
Yep RES_NOTFOUND is a bad url and it's related. Just study exactly what Quarkus Faces is doing and don't deviate.
from quarkus-faces.
let me try
from quarkus-faces.
Yep because inside the CSS all the resources are coming back NULL
.help-page .help-search {
background-image: url("#{resource['freya-layout:images/pages/search.png']}");
padding: 0;
text-align: center;
}
It can't resolve that resource image.
from quarkus-faces.
Sounds like they are not being loaded. How are you loading the scripts in your XHMTL? Can you post that please?
from quarkus-faces.
They are at the bottom of template.xml:
<h:outputScript name="js/layout.js" library="freya-layout" />
<h:outputScript name="js/prism.js" library="freya-layout"/>
<h:outputScript name="jquery/jquery.js" library="primefaces" target="head"/>
<h:outputScript name="jquery/jquery-plugins.js" library="primefaces" target="head"/>
<h:outputScript name="locales/locale-en.js" library="primefaces" target="head"/>
<h:outputStylesheet name="css/primeicons.css" library="freya-layout" />
<h:outputStylesheet name="css/primeflex.min.css" library="freya-layout" />
<h:outputStylesheet name="css/layout-dark.css" library="freya-layout" />
<h:outputStylesheet name="css/collar_club.css"/>
</h:body>
</f:view>
</html>
from quarkus-faces.
In Quarkus Faces I have target="head"
for all of them I noticed you are missing that?
<h:outputScript name="script/layout.js" library="showcase" target="head"/>
<h:outputScript name="showcase/script/prism.js" target="head"/>
<h:outputScript name="jquery/jquery.js" library="primefaces" target="head"/>
<h:outputScript name="jquery/jquery-plugins.js" library="primefaces" target="head"/>
<h:outputScript name="locales/locale-#{app.locale.language}.js" library="primefaces" target="head"/>
</f:view>
from quarkus-faces.
I added target="head" to both of them, no change.
from quarkus-faces.
Hmmm tough for me to debug your issue but I am not having the same issues with any of my apps.
from quarkus-faces.
Added you to my project. Need to build and install (with -DskipTests) jar to mvn repo this library locally https://github.com/zeppelinux/core-lib-java/tree/feature/port-to-jakarta because of this apimatic/core-lib-java#66
Can send you a .env (with creds of db and other dev accounts), but not sure how.
from quarkus-faces.
Yep your code is in the wrong place I just verified. Take another look at Quarkus Faces where JS and CSS lives.
Yours (incorrect):
src/main/resources/META-INF/resources/freya-layout
Correct:
src/main/resources/META-INF/resources/resources/freya-layout
from quarkus-faces.
Think of src/main/resources/META-INF/resources
being just src/main/webapp
in your old app. All of the structure under webapp
is what goes in there.
from quarkus-faces.
I refactored the project in feature/fix-resources-location branch. Now it fails on
2023-05-11 15:52:51,265 ERROR [io.und.req.io] (executor-thread-4) Exception handling request 11543f44-ee4c-45d3-909a-0a78d8c39b21-1 to /jakarta.faces.resource/css/layout-dark.css.xhtml: java.lang.NullPointerException: Cannot invoke "String.length()" because "value" is null
but I can see it is loaded in Chrome inspector. It also has some RES_NOT_FOUD resource it tries to load, not sure if it's related
Can be reproduced by loading error page (i added all the .js and .css resources there) http://localhost:8080/error/error.xhtml
from quarkus-faces.
Without changing anything else in the Quarkus Faces I
- added freya-layout at the same level as showcase and demo
- copied the freya's layout-dark.css generated by the dart plugin in my project
- added this resource to the template.xhtml
The same error is logged when loading http://localhost:8081/error.xhtml
2023-05-12 12:54:50,142 ERROR [io.und.req.io] (executor-thread-3) Exception handling request ce46efdb-9fb3-481e-8c30-cd2b5533e1d3-1 to /jakarta.faces.resource/css/layout-dark.css.xhtml: java.lang.NullPointerException: Cannot invoke "String.length()" because "value" is null
at org.apache.myfaces.resource.ValueExpressionFilterInputStream.read(ValueExpressionFilterInputStream.java:134)
at java.base/java.io.InputStream.read(InputStream.java:293)
at java.base/java.io.InputStream.read(InputStream.java:218)
at org.apache.myfaces.application.ResourceHandlerImpl.pipeBytes(ResourceHandlerImpl.java:647)
Looks like there is some problem with the css file produced by the dart-sass-maven-plugin. Not sure where to go from here...
from quarkus-faces.
Dart SASS is working for me...try taking Dart SASS out of it and just using the freya-layout CSS
from quarkus-faces.
Fails with layout-dark.css from freya.4.1.0 distribution [(attaching)] (remove .zip extension). Does it work for you?
layout-dark.css.zip
from quarkus-faces.
works fine. I dropped it into src\main\resources\META-INF\resources\resources\showcase\css
and then added this to my template.xhtml.
<h:outputStylesheet name="css/layout-dark.css" library="showcase"/>
Loaded just fine.
And I know it loaded because now my screen has dark background.
from quarkus-faces.
I did the same, i see it is loaded
And there is also exception in the log (loading the error.xhtml):
2023-05-12 13:31:58,148 INFO [io.quarkus] (Quarkus Main Thread) quarkus-faces 12.0.2 on JVM (powered by Quarkus 3.0.3.Final) started in 7.991s. Listening on: http://localhost:8081
2023-05-12 13:31:58,151 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2023-05-12 13:31:58,151 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [awt, cache, cdi, hibernate-validator, itext, myfaces, omnifaces, poi, primefaces, primefaces-extensions, resteasy, resteasy-jackson, servlet, smallrye-context-propagation, smallrye-health, vertx, websockets, websockets-client]
2023-05-12 13:32:11,676 ERROR [io.und.req.io] (executor-thread-2) Exception handling request b0eb3cdc-1201-4124-a72a-00a2beca1098-1 to /jakarta.faces.resource/css/layout-dark.css.xhtml: java.lang.NullPointerException: Cannot invoke "String.length()" because "value" is null
at org.apache.myfaces.resource.ValueExpressionFilterInputStream.read(ValueExpressionFilterInputStream.java:134)
at java.base/java.io.InputStream.read(InputStream.java:293)
at java.base/java.io.InputStream.read(InputStream.java:218)
at org.apache.myfaces.application.ResourceHandlerImpl.pipeBytes(ResourceHandlerImpl.java:647)
at org.apache.myfaces.application.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:590)
at jakarta.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:72)
at org.primefaces.application.resource.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:87)
at jakarta.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:72)
at jakarta.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:72)
at jakarta.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:72)
at jakarta.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:72)
at jakarta.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:72)
at jakarta.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:72)
at jakarta.faces.webapp.FacesServlet.service(FacesServlet.java:215)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
at org.omnifaces.filter.CacheControlFilter.doFilter(CacheControlFilter.java:239)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:108)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.omnifaces.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:123)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:108)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:63)
at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:67)
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:133)
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:65)
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:247)
at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:56)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:111)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:108)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at io.quarkus.undertow.runtime.UndertowDeploymentRecorder$9$1.call(UndertowDeploymentRecorder.java:624)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)
at io.undertow.servlet.handlers.ServletInitialHandler.handleRequest(ServletInitialHandler.java:152)
at io.quarkus.undertow.runtime.UndertowDeploymentRecorder$1.handleRequest(UndertowDeploymentRecorder.java:124)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:284)
at io.undertow.server.DefaultExchangeHandler.handle(DefaultExchangeHandler.java:18)
at io.quarkus.undertow.runtime.UndertowDeploymentRecorder$5$2.run(UndertowDeploymentRecorder.java:439)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:833)
from quarkus-faces.
That was it for this error, Thanks a Lot! I would expect it to fail on images/pages/search.png though..
from quarkus-faces.
Related Issues (20)
- Native: PrimeExceptionHandler not finding error pages HOT 1
- PrimeFaces Extensions
- Native Error (XPathFactory) HOT 15
- Maven Build: Java version requirement? HOT 6
- Warnings Question HOT 13
- BeanArchiveProcessor Warning HOT 2
- CSS: Investigate reloading in dev mode HOT 1
- App restart triggered by quarkus:dev corrupts the app HOT 3
- Build: Revisit quarkus:dev mode HOT 1
- Docker JVM Runtime Error HOT 8
- Not compatible with quarkus-spring-data-jpa successfully HOT 1
- Question: Static HOT 2
- Freya's layout.js is not initialized HOT 12
- Growl: Double messages received HOT 2
- Optimizer: increases 400%
- Exception with LifecycleFactory.getLifecycle running app via docker HOT 10
- OIDC Example
- Native Build - PatternSyntaxException: Illegal/unsupported escape sequence HOT 3
- Programatically login using Form Authentication HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quarkus-faces.