4 Replies Latest reply: Nov 18, 2013 11:34 PM by Philip Stoyanov-Oracle RSS

    export error reporting scheme

    1047836

      Hello,

       

      If I make a schema export reports me the following error:

       

      [Thread-99] ERROR ReportsHandler - Error Exporting to Reporting Schema:

      java.lang.NullPointerException

          at oracle.dbtools.crest.exports.reports.RSFKeys.export(Unknown Source)

          at oracle.dbtools.crest.exports.reports.RSRelationalModel.export(Unknown Source)

          at oracle.dbtools.crest.exports.reports.ReportsHandler.export(Unknown Source)

          at oracle.dbtools.crest.swingui.ControllerApplication$ExportToReportsSchema$1.run(Unknown Source)

       

      What can happen?


      thanks

        • 1. Re: export error reporting scheme
          Philip Stoyanov-Oracle

          Hello,

           

          probably the same problem as here Export to csv

          I think your model is corrupted in some how and you have foreign key(s) without referring key (table).

          Try to reopen the design. Can you send that design to me?

           

          Philip

          • 2. Re: export error reporting scheme
            1047836

            Hello,

             

            thanks for the help

            Can you see through script transform foreign key(s) without referring key (table)? Once detected can they be cleaned by transfom script p.e model.getDesign().getLogicalDesign().getMainView().getController();?


            thanks


            • 3. Re: export error reporting scheme
              1047836

              hello,

               

              thanks for the help

              Can I see through script transform foreign key(s) without referring key (table)? Once detected can they be cleaned by transfom script p.e model.getDesign().getLogicalDesign().getMainView().getController();?


              thanks

              • 4. Re: export error reporting scheme
                Philip Stoyanov-Oracle

                You can use following script to see wrong foreign keys - in form table_name.fk_name:

                 

                log_rep = new Packages.oracle.dbtools.crest.swingui.LogReport(model.getAppView());
                log_rep.setName("wrong FKs");
                text = "";
                fks = model.getFKIndexAssociationSet().toArray();
                for(var i=0;i<fks.length;i++){
                     fk = fks;
                     if(fk.getRemoteIndex() == null){
                          text = text + "\n" + fk.getLongName();
                     }
                }
                log_rep.setLog(text);
                log_rep.showModalDialog(new java.awt.Dimension(750, 550));
                

                 

                 

                and following script to remove them

                 

                 

                 

                fks = model.getFKIndexAssociationSet().toArray();
                for(var i=0;i<fks.length;i++){
                     fk = fks[i];
                     if(fk.getRemoteIndex() == null){
                          fk.remove();
                     }
                }
                

                 

                Philip