Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings Question #254

Closed
gesker opened this issue Mar 29, 2023 · 13 comments
Closed

Warnings Question #254

gesker opened this issue Mar 29, 2023 · 13 comments
Assignees
Labels
enhancement New feature or request

Comments

@gesker
Copy link
Contributor

gesker commented Mar 29, 2023

GraalVM is issuing a lot of reflection related warnings

Warning: Could not resolve xyz.somepackage_ClientProxy for reflection configuration. Reason: java.lang.ClassNotFoundException: xyz.somepackage_ClientProxy_ClientProxy.

is there a clean way to have GraalVM work around these classes without warnings? Or, really, handle these better?

I'm guessing "--initialize-at-run-time" would NOT be the way to go as I could see one quickly hitting a point where there would just be too many command line parameters.

@melloware
Copy link
Owner

Are you seeing that with this project in 3.0.0. Beta1 ?? I have not tried it in a few weeks but I don't remember seeing these

@melloware
Copy link
Owner

You can add @RegisterForRelefction on any class you want registered

@gesker
Copy link
Contributor Author

gesker commented Mar 29, 2023 via email

@melloware
Copy link
Owner

if you can give me an example class that is not registered I need to add them to the PF Extension so they get registered.

@melloware melloware self-assigned this Mar 29, 2023
@melloware melloware added the enhancement New feature or request label Mar 29, 2023
@gesker
Copy link
Contributor Author

gesker commented Mar 29, 2023

I've grepped out the warnings.

But, now I'm wondering if there is something else going on. There are classes indicated that seem odd like those in java.lang and java .util

java.lang.Object_ClientProxy
java.util.Map_ClientProxy

Some from the jakarta project which struck me as interesting...

jakarta.faces.application.Application_ClientProxy
jakarta.faces.application.FacesMessage$Severity_ClientProxy
jakarta.faces.application.NavigationHandler_ClientProxy
jakarta.faces.application.ProjectStage_ClientProxy
jakarta.faces.application.ResourceHandler_ClientProxy
jakarta.faces.application.Resource_ClientProxy
jakarta.faces.application.StateManager_ClientProxy
jakarta.faces.application.ViewHandler_ClientProxy
jakarta.faces.component.Doctype_ClientProxy
jakarta.faces.component.TransientStateHelper_ClientProxy
jakarta.faces.component.UIComponent_ClientProxy
jakarta.faces.component.UIViewRoot_ClientProxy
jakarta.faces.component.search.SearchExpressionHandler_ClientProxy
jakarta.faces.component.search.SearchKeywordResolver_ClientProxy
jakarta.faces.context.ExceptionHandler_ClientProxy
jakarta.faces.context.ExternalContext_ClientProxy
jakarta.faces.context.FacesContext_ClientProxy
jakarta.faces.context.Flash_ClientProxy
jakarta.faces.context.PartialResponseWriter_ClientProxy
jakarta.faces.context.PartialViewContext_ClientProxy
jakarta.faces.context.ResponseStream_ClientProxy
jakarta.faces.context.ResponseWriter_ClientProxy
jakarta.faces.convert.Converter_ClientProxy
jakarta.faces.event.ActionListener_ClientProxy
jakarta.faces.event.ExceptionQueuedEventContext_ClientProxy
jakarta.faces.event.ExceptionQueuedEvent_ClientProxy
jakarta.faces.event.PhaseId_ClientProxy
jakarta.faces.flow.FlowCallNode_ClientProxy
jakarta.faces.flow.FlowHandler_ClientProxy
jakarta.faces.flow.FlowNode_ClientProxy
jakarta.faces.flow.Flow_ClientProxy
jakarta.faces.lifecycle.ClientWindow_ClientProxy
jakarta.faces.lifecycle.Lifecycle_ClientProxy
jakarta.faces.render.ClientBehaviorRenderer_ClientProxy
jakarta.faces.render.RenderKit_ClientProxy
jakarta.faces.render.Renderer_ClientProxy
jakarta.faces.render.ResponseStateManager_ClientProxy
jakarta.faces.view.StateManagementStrategy_ClientProxy
jakarta.faces.view.ViewDeclarationLanguage_ClientProxy
jakarta.faces.view.ViewMetadata_ClientProxy
org.omnifaces.cdi.GraphicImageBean_ClientProxy
org.omnifaces.cdi.config.DateProducer$TemporalDate_ClientProxy
org.primefaces.cache.CacheProvider_ClientProxy
org.primefaces.component.export.ExcelOptions_ClientProxy
org.primefaces.component.export.ExportConfiguration_ClientProxy
org.primefaces.component.export.ExporterOptions_ClientProxy
org.primefaces.component.export.Exporter_ClientProxy
org.primefaces.component.export.PDFOptions_ClientProxy
org.primefaces.component.export.PDFOrientationType_ClientProxy
org.primefaces.extensions.model.monaco.MonacoDiffEditorModel_ClientProxy
org.primefaces.extensions.model.monacoeditor.DiffEditorOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EQuickSuggestionsValue_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorBracketPairColorizationOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorCommentsOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorDimension_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorDropIntoEditorOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorFindOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorGotoLocationOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorGuidesOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorHoverOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorInlayHintOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorInlineSuggestOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorLightbulbOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorMinimapOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorPaddingOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorParameterHints_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorQuickSuggestionsOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorScrollbarOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorSmartSelectOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorStickyScrollOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorSuggestOptions_ClientProxy
org.primefaces.extensions.model.monacoeditor.EditorUnicodeHighlightOptions_ClientProxy
org.primefaces.model.CroppedImage_ClientProxy
org.primefaces.model.DashboardColumn_ClientProxy
org.primefaces.model.DashboardModel_ClientProxy
org.primefaces.model.DualListModel_ClientProxy
org.primefaces.model.LazyDataModel_ClientProxy
org.primefaces.model.OrganigramNode_ClientProxy
org.primefaces.model.ScheduleDisplayMode_ClientProxy
org.primefaces.model.ScheduleEvent_ClientProxy
org.primefaces.model.ScheduleModel_ClientProxy
org.primefaces.model.StreamedContent_ClientProxy
org.primefaces.model.TreeNode_ClientProxy
org.primefaces.model.charts.ChartData_ClientProxy
org.primefaces.model.charts.ChartFont_ClientProxy
org.primefaces.model.charts.axes.AxesGridLines_ClientProxy
org.primefaces.model.charts.axes.cartesian.CartesianScales_ClientProxy
org.primefaces.model.charts.axes.radial.RadialScales_ClientProxy
org.primefaces.model.charts.axes.radial.linear.RadialLinearAngleLines_ClientProxy
org.primefaces.model.charts.axes.radial.linear.RadialLinearPointLabels_ClientProxy
org.primefaces.model.charts.axes.radial.linear.RadialLinearTicks_ClientProxy
org.primefaces.model.charts.bar.BarChartModel_ClientProxy
org.primefaces.model.charts.bar.BarChartOptions_ClientProxy
org.primefaces.model.charts.bubble.BubbleChartModel_ClientProxy
org.primefaces.model.charts.bubble.BubbleChartOptions_ClientProxy
org.primefaces.model.charts.donut.DonutChartModel_ClientProxy
org.primefaces.model.charts.donut.DonutChartOptions_ClientProxy
org.primefaces.model.charts.hbar.HorizontalBarChartModel_ClientProxy
org.primefaces.model.charts.line.LineChartModel_ClientProxy
org.primefaces.model.charts.line.LineChartOptions_ClientProxy
org.primefaces.model.charts.pie.PieChartModel_ClientProxy
org.primefaces.model.charts.pie.PieChartOptions_ClientProxy
org.primefaces.model.charts.polar.PolarAreaChartModel_ClientProxy
org.primefaces.model.charts.polar.PolarAreaChartOptions_ClientProxy
org.primefaces.model.charts.radar.RadarChartModel_ClientProxy
org.primefaces.model.charts.radar.RadarChartOptions_ClientProxy
org.primefaces.model.charts.scatter.ScatterChartModel_ClientProxy
org.primefaces.model.datepicker.DateMetadataModel_ClientProxy
org.primefaces.model.diagram.DiagramModel_ClientProxy
org.primefaces.model.diagram.connector.Connector_ClientProxy
org.primefaces.model.file.UploadedFile_ClientProxy
org.primefaces.model.file.UploadedFiles_ClientProxy
org.primefaces.model.map.Animation_ClientProxy
org.primefaces.model.map.LatLng_ClientProxy
org.primefaces.model.map.MapModel_ClientProxy
org.primefaces.model.map.MarkerLabel_ClientProxy
org.primefaces.model.map.Marker_ClientProxy
org.primefaces.model.menu.MenuModel_ClientProxy
org.primefaces.model.mindmap.MindmapNode_ClientProxy
org.primefaces.model.tagcloud.TagCloudModel_ClientProxy
org.primefaces.model.terminal.TerminalAutoCompleteModel_ClientProxy
org.primefaces.model.timeline.TimelineEvent_ClientProxy
org.primefaces.model.timeline.TimelineModel_ClientProxy
org.primefaces.shaded.json.JSONArray_ClientProxy
org.primefaces.shaded.json.JSONObject_ClientProxy
org.primefaces.showcase.domain.Book_ClientProxy
org.primefaces.showcase.domain.Country_ClientProxy
org.primefaces.showcase.domain.CustomerStatus_ClientProxy
org.primefaces.showcase.domain.Customer_ClientProxy
org.primefaces.showcase.domain.Document_ClientProxy
org.primefaces.showcase.domain.InventoryStatus_ClientProxy
org.primefaces.showcase.domain.Mail_ClientProxy
org.primefaces.showcase.domain.Movie_ClientProxy
org.primefaces.showcase.domain.Product_ClientProxy
org.primefaces.showcase.domain.Representative_ClientProxy
org.primefaces.showcase.domain.Theme_ClientProxy
org.primefaces.showcase.domain.User_ClientProxy
org.primefaces.showcase.rest.CountryService_ClientProxy
org.primefaces.showcase.service.ExtenderService$ExtenderExample_ClientProxy

@gesker
Copy link
Contributor Author

gesker commented Mar 29, 2023

Should have snipped off the ClientProxy parts

org.omnifaces.cdi.GraphicImageBean
org.omnifaces.cdi.config.DateProducer$TemporalDate

org.primefaces.cache.CacheProvider
org.primefaces.component.export.ExcelOptions
org.primefaces.component.export.ExportConfiguration
org.primefaces.component.export.ExporterOptions
org.primefaces.component.export.Exporter
org.primefaces.component.export.PDFOptions
org.primefaces.component.export.PDFOrientationType
org.primefaces.extensions.model.monaco.MonacoDiffEditorModel
org.primefaces.extensions.model.monacoeditor.DiffEditorOptions
org.primefaces.extensions.model.monacoeditor.EQuickSuggestionsValue
org.primefaces.extensions.model.monacoeditor.EditorBracketPairColorizationOptions
org.primefaces.extensions.model.monacoeditor.EditorCommentsOptions
org.primefaces.extensions.model.monacoeditor.EditorDimension
org.primefaces.extensions.model.monacoeditor.EditorDropIntoEditorOptions
org.primefaces.extensions.model.monacoeditor.EditorFindOptions
org.primefaces.extensions.model.monacoeditor.EditorGotoLocationOptions
org.primefaces.extensions.model.monacoeditor.EditorGuidesOptions
org.primefaces.extensions.model.monacoeditor.EditorHoverOptions
org.primefaces.extensions.model.monacoeditor.EditorInlayHintOptions
org.primefaces.extensions.model.monacoeditor.EditorInlineSuggestOptions
org.primefaces.extensions.model.monacoeditor.EditorLightbulbOptions
org.primefaces.extensions.model.monacoeditor.EditorMinimapOptions
org.primefaces.extensions.model.monacoeditor.EditorOptions
org.primefaces.extensions.model.monacoeditor.EditorPaddingOptions
org.primefaces.extensions.model.monacoeditor.EditorParameterHints
org.primefaces.extensions.model.monacoeditor.EditorQuickSuggestionsOptions
org.primefaces.extensions.model.monacoeditor.EditorScrollbarOptions
org.primefaces.extensions.model.monacoeditor.EditorSmartSelectOptions
org.primefaces.extensions.model.monacoeditor.EditorStickyScrollOptions
org.primefaces.extensions.model.monacoeditor.EditorSuggestOptions
org.primefaces.extensions.model.monacoeditor.EditorUnicodeHighlightOptions
org.primefaces.model.CroppedImage
org.primefaces.model.DashboardColumn
org.primefaces.model.DashboardModel
org.primefaces.model.DualListModel
org.primefaces.model.LazyDataModel
org.primefaces.model.OrganigramNode
org.primefaces.model.ScheduleDisplayMode
org.primefaces.model.ScheduleEvent
org.primefaces.model.ScheduleModel
org.primefaces.model.StreamedContent
org.primefaces.model.TreeNode
org.primefaces.model.charts.ChartData
org.primefaces.model.charts.ChartFont
org.primefaces.model.charts.axes.AxesGridLines
org.primefaces.model.charts.axes.cartesian.CartesianScales
org.primefaces.model.charts.axes.radial.RadialScales
org.primefaces.model.charts.axes.radial.linear.RadialLinearAngleLines
org.primefaces.model.charts.axes.radial.linear.RadialLinearPointLabels
org.primefaces.model.charts.axes.radial.linear.RadialLinearTicks
org.primefaces.model.charts.bar.BarChartModel
org.primefaces.model.charts.bar.BarChartOptions
org.primefaces.model.charts.bubble.BubbleChartModel
org.primefaces.model.charts.bubble.BubbleChartOptions
org.primefaces.model.charts.donut.DonutChartModel
org.primefaces.model.charts.donut.DonutChartOptions
org.primefaces.model.charts.hbar.HorizontalBarChartModel
org.primefaces.model.charts.line.LineChartModel
org.primefaces.model.charts.line.LineChartOptions
org.primefaces.model.charts.pie.PieChartModel
org.primefaces.model.charts.pie.PieChartOptions
org.primefaces.model.charts.polar.PolarAreaChartModel
org.primefaces.model.charts.polar.PolarAreaChartOptions
org.primefaces.model.charts.radar.RadarChartModel
org.primefaces.model.charts.radar.RadarChartOptions
org.primefaces.model.charts.scatter.ScatterChartModel
org.primefaces.model.datepicker.DateMetadataModel
org.primefaces.model.diagram.DiagramModel
org.primefaces.model.diagram.connector.Connector
org.primefaces.model.file.UploadedFile
org.primefaces.model.file.UploadedFiles
org.primefaces.model.map.Animation
org.primefaces.model.map.LatLng
org.primefaces.model.map.MapModel
org.primefaces.model.map.MarkerLabel
org.primefaces.model.map.Marker
org.primefaces.model.menu.MenuModel
org.primefaces.model.mindmap.MindmapNode
org.primefaces.model.tagcloud.TagCloudModel
org.primefaces.model.terminal.TerminalAutoCompleteModel
org.primefaces.model.timeline.TimelineEvent
org.primefaces.model.timeline.TimelineModel
org.primefaces.shaded.json.JSONArray
org.primefaces.shaded.json.JSONObject
org.primefaces.showcase.domain.Book
org.primefaces.showcase.domain.Country
org.primefaces.showcase.domain.CustomerStatus
org.primefaces.showcase.domain.Customer
org.primefaces.showcase.domain.Document
org.primefaces.showcase.domain.InventoryStatus
org.primefaces.showcase.domain.Mail
org.primefaces.showcase.domain.Movie
org.primefaces.showcase.domain.Product
org.primefaces.showcase.domain.Representative
org.primefaces.showcase.domain.Theme
org.primefaces.showcase.domain.User
org.primefaces.showcase.rest.CountryService
org.primefaces.showcase.service.ExtenderService$ExtenderExample


jakarta.faces.application.Application
jakarta.faces.application.FacesMessage$Severity
jakarta.faces.application.NavigationHandler
jakarta.faces.application.ProjectStage
jakarta.faces.application.ResourceHandler
jakarta.faces.application.Resource
jakarta.faces.application.StateManager
jakarta.faces.application.ViewHandler
jakarta.faces.component.Doctype
jakarta.faces.component.TransientStateHelper
jakarta.faces.component.UIComponent
jakarta.faces.component.UIViewRoot
jakarta.faces.component.search.SearchExpressionHandler
jakarta.faces.component.search.SearchKeywordResolver
jakarta.faces.context.ExceptionHandler
jakarta.faces.context.ExternalContext
jakarta.faces.context.FacesContext
jakarta.faces.context.Flash
jakarta.faces.context.PartialResponseWriter
jakarta.faces.context.PartialViewContext
jakarta.faces.context.ResponseStream
jakarta.faces.context.ResponseWriter
jakarta.faces.convert.Converter
jakarta.faces.event.ActionListener
jakarta.faces.event.ExceptionQueuedEventContext
jakarta.faces.event.ExceptionQueuedEvent
jakarta.faces.event.PhaseId
jakarta.faces.flow.FlowCallNode
jakarta.faces.flow.FlowHandler
jakarta.faces.flow.FlowNode
jakarta.faces.flow.Flow
jakarta.faces.lifecycle.ClientWindow
jakarta.faces.lifecycle.Lifecycle
jakarta.faces.render.ClientBehaviorRenderer
jakarta.faces.render.RenderKit
jakarta.faces.render.Renderer
jakarta.faces.render.ResponseStateManager
jakarta.faces.view.StateManagementStrategy
jakarta.faces.view.ViewDeclarationLanguage
jakarta.faces.view.ViewMetadata


java.lang.Object
java.util.Map

@melloware
Copy link
Owner

That is really weird the Faces stuff is all already registered by the MyFaces extension and all the PF stuff is already registered.

As for showcase that is also wrong as I already have this on the Book class.

@RegisterForReflection
public class Book implements Serializable {

So I think something is wrong. this is all working with 2.16.4 so something tells me Beta1 might have an issue with it

@melloware
Copy link
Owner

I will give everything a try and let you know.

@melloware
Copy link
Owner

Interesting I just pulled the latest code and on Windows I am getting this...

This was all working with a previous 3.0.0.Alpha.

Fatal error: java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near index 34
META-INF/resources/resources\demo\images\product\galaxy-earrings.jpg
                                  ^
        at java.base/java.util.regex.Pattern.error(Pattern.java:2028)
        at java.base/java.util.regex.Pattern.escape(Pattern.java:2608)
        at java.base/java.util.regex.Pattern.atom(Pattern.java:2286)
        at java.base/java.util.regex.Pattern.sequence(Pattern.java:2210)
        at java.base/java.util.regex.Pattern.expr(Pattern.java:2069)
        at java.base/java.util.regex.Pattern.compile(Pattern.java:1783)
        at java.base/java.util.regex.Pattern.<init>(Pattern.java:1430)
        at java.base/java.util.regex.Pattern.compile(Pattern.java:1069)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ResourcesFeature.makeResourcePattern(ResourcesFeature.java:289)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at java.base/java.util.concurrent.ConcurrentHashMap$KeySpliterator.forEachRemaining(ConcurrentHashMap.java:3573)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ResourcesFeature.compilePatterns(ResourcesFeature.java:282)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ResourcesFeature.duringAnalysis(ResourcesFeature.java:270)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$10(NativeImageGenerator.java:748)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:85)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$11(NativeImageGenerator.java:748)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.AbstractAnalysisEngine.runAnalysis(AbstractAnalysisEngine.java:162)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:745)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:578)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:535)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:403)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:580)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:128)

@melloware
Copy link
Owner

Opened: quarkusio/quarkus#32272

@melloware
Copy link
Owner

melloware commented Mar 31, 2023

OK @gesker i just built the latest Quarkus Faces using my Linux machine instead of Windows and the native image built fine and worked out of the box. So not sure exactly all the issues you are having?

@gesker
Copy link
Contributor Author

gesker commented Mar 31, 2023

I'm good to go on CR1

@gesker gesker closed this as completed Mar 31, 2023
@melloware
Copy link
Owner

OK I just updated PF and OF extensions to CR1 and deployed to Maven Central.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants