Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with net install -error-r(5004)

    I am using net install in Stata15.
    Code:
    net inst brewscheme, from("https://wbuchanan.github.io/brewscheme/")
    then:

    Java installation not found
    https://wbuchanan.github.io/brewscheme/ either
    1) is not a valid URL, or
    2) could not be contacted, or
    3) is not a Stata download site (has no stata.toc file).
    r(5004);

  • #2
    The net install command worked for me, from my computer in my location. Changing "https" to "http" also worked, so you might want to try doing that, in case it is the use of https protocol where your problem lies. If your computer is on a network using a proxy server to connect to the internet, it may be necessary for you to configure Stata accordingly - on my Mac it is in the "Stata Preferences" tab "Internet".

    Comment


    • #3
      I was having a similar problem and discovered that, in my case, it was being caused by my anti-virus program, BitDefender. Apparently a recent update to BitDefender has created problems in using Stata.

      Others have also reported conflicts with BitDefender on this forum in the past few days.

      If you have an anti-virus program running, try turning off your anti-virus protection temporarily while you run the -net install- command.

      That works for me.

      By the way, BitDefender is also blocking -adoupdate- and -search- and -findit- for me, but those commands work fine when I turn off my anti-virus temporarily.

      Red Owl
      Stata 15

      Comment


      • #4
        Originally posted by William Lisowski View Post
        The net install command worked for me, from my computer in my location. Changing "https" to "http" also worked, so you might want to try doing that, in case it is the use of https protocol where your problem lies. If your computer is on a network using a proxy server to connect to the internet, it may be necessary for you to configure Stata accordingly - on my Mac it is in the "Stata Preferences" tab "Internet".
        Thanks very much for your reply.
        I am using Stata15 on Windows 10 platform.
        Changing "https" to "http" worked at this time:
        Code:
        net inst brewscheme, from("https://wbuchanan.github.io/brewscheme/")
        However, when i download the github , r(5004)agian...
        Code:
          
         net install github, from("https://haghish.github.io/github/")

        Comment


        • #5
          xiaoshi zhou
          Stata handles requests to HTTPS served sites using the JVM. So, Stata seems to not being finding your Java installation. Try using query java to confirm the location of the JVM binaries. You may need to talk to your IT folks if they don’t allow Java binaries to run on your machine, otherwise try a fresh install and/or Stata tech support.

          Comment


          • #6
            Originally posted by wbuchanan View Post
            xiaoshi zhou
            Stata handles requests to HTTPS served sites using the JVM. So, Stata seems to not being finding your Java installation. Try using query java to confirm the location of the JVM binaries. You may need to talk to your IT folks if they don’t allow Java binaries to run on your machine, otherwise try a fresh install and/or Stata tech support.
            You are right, they don’t allow Java binaries to run on my machine...
            Thank you for your Help, Appreciated

            Comment


            • #7
              xiaoshi zhou Hi
              Could you please let me know how to solve this issue? I need to install
              Code:
              xfill
              :
              HTML Code:
              net from https://www.sealedenvelope.com/
              but I am confronting the same error.

              Thanks in advance.
              Best regards,

              Comment


              • #8
                First, let me say that having read the documentation for xfill, it seems likely that you can easily write code to fill in missing values in your panel data with values from earlier observations.

                Without knowing more about your data, its not possible to suggest precise code. If you want further advice about doing this, please use the dataex command to show example data. If you are running version 15.1 or a fully updated version 14.2, it is already part of your official Stata installation. If not, run ssc install dataex to get it. Either way, run help dataex and read the simple instructions for using it. dataex will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

                When asking for help with code, always show example data. When showing example data, always use dataex.

                Beyond that, the advice in post #5 above seems most relevant to your situation, if you are interested in devoting more time to solving what is probably some sort of installation or configuration issue.

                Have you been able to install other software, for example from SSC? Are you able to successfully run the command to install dataex given above? If not, what error do you receive?

                What does the query java command report on your system? Below is what it reports on mine, on which the net from command works as intended.
                Code:
                . query java
                --------------------------------------------------------------------------------
                    Java system information
                      Java initialized     yes
                      heap usage           123m
                      system classpath     /Applications/Stata/utilities/jar/libstata-core.jar:/
                > Applications/Stata/utilities/jar/libdeps-core.jar:/Applications/Stata/utilitie
                > s/jar/sfi-api.jar:
                      javacall classpath   (empty)
                
                    Advanced Java settings
                      set java_heapmax     384m
                      set java_vmpath      /Applications/Stata/utilities/java/macosx-x64/jre1.8.
                > 0_162.jre/Contents/Home/lib/jli/libjli.dylib
                Last edited by William Lisowski; 15 Sep 2018, 09:23.

                Comment


                • #9
                  William Lisowski First, I thank you very much for your time and consideration. Then, I am trying to run this code, which needs to use
                  Code:
                  xfill
                  .

                  I am able to install other software from SSC. It seems that
                  Code:
                  dataex
                  is already included in my Stata:

                  Code:
                  . ssc install dataex
                  checking dataex consistency and verifying not already installed...
                  
                  the following files already exist and are different:
                      c:\ado\plus\d\dataex.ado
                  
                  no files installed or copied
                  (no action taken)
                  Unfortunately, Java does not initialize on my system:

                  Code:
                  . query java
                  ----------------------------------------------------------------------------------------------------------------------------------
                      Java system information
                        Java initialized     no
                      Advanced Java settings
                        set java_heapinit    16m
                        set java_heapmax     128m
                        set java_vmpath      C:\Users\Markazi.co\Stata14\Stata14\utilities\java\windows-i586\jre1.8.0_31\bin\cl
                  > ient\jvm.dll
                  Best regards,

                  Comment


                  • #10
                    Then it does appear the problem lies with your installation of Java for Stata, if indeed "confronting the same error" means you are receiving the r(5004) return code. The output of search rc 5004 tells us
                    Code:
                    ------------------------------------------------------------------------------------
                    search for rc 5004                                             (manual:  [R] search)
                    ------------------------------------------------------------------------------------
                    
                    Search of official help files, FAQs, Examples, SJs, and STBs
                    
                    [P]     error . . . . . . . . . . . . . . . . . . . . . . . . Return code 5004
                            Java installation not found
                            Stata attempted to load the Java virtual machine but was
                            unable to locate the Java runtime library.  Contact Stata
                            Technical Support for assistance.
                    which seems to be an invitation to open a ticket with Stata Technical Support. How to do that is explained starting at http://www.stata.com/support/faqs/technical-support/

                    Comment


                    • #11
                      William Lisowski Thanks a lot. Sorry, should I follow the solution provided here?

                      Besides, you also provided an alternative solution here.
                      Last edited by shahla ebrahimi; 15 Sep 2018, 12:25.

                      Comment


                      • #12
                        I have no further advice to offer on Java beyond what Stata itself tells you in the output of search rc 5004.

                        I cannot comment on the relevance of the cited alternative solution to your situation since I have no understanding of what that code you are trying to make use of is doing at the point where xfill is used.

                        Comment


                        • #13
                          William Lisowski Thanks. I need to fill _ps based on id i.e.,
                          Code:
                           xfill _ps, i(id)
                          Code:
                          id    _ps
                          1    7914
                          1      .
                          2    7914
                          2      .
                          3    8607
                          3      .
                          4    8210
                          4      .
                          5    8210
                          5      .
                          6    8210
                          6      .
                          9    7914
                          9      .
                          10    7914
                          10     .
                          The result should be:
                          Code:
                          id    _ps
                          1    7914
                          1    7914
                          2    7914
                          2    7914
                          3    8607
                          3    8607
                          4    8210
                          4    8210
                          5    8210
                          5    8210
                          6    8210
                          6    8210
                          9    7914
                          9    7914
                          10   7914
                          10   7914
                          However, in the above example, each id is repeated just 2 times but in reality each id is repeated 7 times for example.
                          Last edited by shahla ebrahimi; 15 Sep 2018, 22:25.

                          Comment


                          • #14
                            Dimitriy V. Masterov is the author of the code linked to in post #9 and a frequent contributor to Statalist. Perhaps he will see this and be able to give definitive advice. With no understanding of the methodology his code implements, of the code itself, or of the features of xfill that led him to use it in his code, I'm reluctant to assume that the understanding you present in post #13 is complete.

                            With that said, the following demonstrates technique that does exactly what you describe on your sample data. Its simplicity leads me to believe something has been overlooked.
                            Code:
                            replace _ps = _ps[_n-1] if missing(_ps) & id==id[_n-1]
                            assert !missing(_ps)
                            Code:
                            . list, clean
                            
                                   id    _ps  
                              1.    1   7914  
                              2.    1   7914  
                              3.    2   7914  
                              4.    2   7914  
                              5.    3   8607  
                              6.    3   8607  
                              7.    4   8210  
                              8.    4   8210  
                              9.    5   8210  
                             10.    5   8210  
                             11.    6   8210  
                             12.    6   8210  
                             13.    9   7914  
                             14.    9   7914  
                             15.   10   7914  
                             16.   10   7914

                            Comment

                            Working...
                            X