Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Load Exception??

3463663May 11 2017 — edited May 11 2017

Hi all,

I am facing this problem,

Caused by: javafx.fxml.LoadException: Error resolving onAction='#MakeNewProject', either the event handler is not in the Namespace or there is an error in the script.

On button click, I face this problem.  I write the following code,

  @FXML

    private void handleButtonAction(ActionEvent event) throws IOException {

        if(event.getSource()==btnEnglish)

        {

              Parent root = FXMLLoader.load(getClass().getResource("/fxml/View_homescreen.fxml"));

       

       Stage addDialogStage=new Stage();

       addDialogStage.setTitle("Home Screen");

       addDialogStage.initModality(Modality.APPLICATION_MODAL);

    

      

       Scene scene=new Scene(root);

       scene.getStylesheets().add("/styles/Style_selectlanguage.css");

       addDialogStage.setScene(scene);

       addDialogStage.showAndWait();

        }

How do we solve this problem?

Comments

cormaco
Answer

Here is a corrected version of your query,
I removed the leading slash in the starttime path and added the namespace declaration:

SELECT x.*
FROM owxml t,
   XMLTABLE (
        xmlnamespaces(default 'http://winscp.net/schema/session/1.0'),
        '/session'
        PASSING t.content
        COLUMNS
            starttime VARCHAR2(255) PATH 'group[@name="pwd"]/@start'
        ) x

STARTTIME                     
------------------------------
2020-12-01T18:22:06.383Z



Marked as Answer by CarstenDD · Dec 3 2020
CarstenDD

Hello cormaco,
thanks a lot for the quick response and the solution. Can you tell me, why the xmlnamespaces() is solving the problem?
Regards
Carsten

cormaco

You always have to declare all the namespaces that are referenced in the path expressions in your xmltable statement.
Xquery only matches tags if the name and the namespace are the same.
In you code there was no namespace declaration, so starttime had the empty default namespace xmlns="" while in your xml it was xmlns="http://winscp.net/schema/session/1.0" so the tags did not match.

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 8 2017
Added on May 11 2017
1 comment
3,045 views