Missing class files.(Druing local idea debugging) (OD-2343)
Kyo opened 10 months ago

During local debugging and development, I followed the instructions at https://docs.onedev.io/development-guide/development-environment-setup. I followed all the step: -pull the project. -mvn clean install -Pce -DskipTests(cause i was using a windows enviroment, and the test may fail science the coding format could be different). -set SDK and project level to 11(also tried 17) -only check cd,then reload and generate sources -create a local machine application. Starting class as [io.onedev.commons.bootstrap.Bootstrap]. -start debug

And then i cound there's a lot of class missing: [io.onedev.server.search.entity.issue.IssueQueryLexer][io.onedev.server.search.entity.issue.IssueQueryParser][io.onedev.server.util.patternset.PatternSetParser][io.onedev.server.util.reviewrequirement.ReviewRequirementParser][io.onedev.server.search.entity.agent.AgentQueryLexer]...etc I checked the project on github. Founding theres no such .class file in the path pointed.(Like no class named IssueQueryParser in io.onedev.server.search.entity.issue). Did i missed something? How can i get the full project and start my first debugging? 1.png 2.png 3.png 4.png 5 after reload and generate _2.png 6.png

  • Robin Shen changed fields 10 months ago
    Name Previous Value Current Value
    Priority
    Critical
    Minor
  • Robin Shen commented 10 months ago

    Please do not use critical priority level for dev issues like this.

  • Robin Shen changed fields 10 months ago
    Name Previous Value Current Value
    Type
    Build Failure
    Question
  • Robin Shen commented 10 months ago

    For the issue itself, make sure to generate sources inside IntelliJ (. Sometimes, generate sources can fail, and you will need to restart IntelliJ and try again until it succeeds.

  • Kyo commented 10 months ago

    Please do not use critical priority level for dev issues like this.

    Sry, never next time here.

    For the issue itself, make sure to generate sources inside IntelliJ (. Sometimes, generate sources can fail, and you will need to restart IntelliJ and try again until it succeeds.

    I tried a lot. Science theres no window shows what happened if i just press [Generate sources and Update Floders For All Projects] button. I choose the mvn command line in IDEA to execute the generate sources command. 7.png It ends sucessfully. However, theres a warning:[The requested profile "repoConfig" could not be activated because it does not exist.],Idk if it can become a trouble in further development. 8.png I tried it over 10 times. But the class still missing. 9.png And theres no such file contains such class definition. 10.png Shall i import somthing manually? All the steps i did was showned in the screenshots, does it missed something?

  • Kyo commented 9 months ago

    I tried again today. generate sources is succeed , again. And the classes are still missing.😰 11.png

  • Robin Shen commented 9 months ago

    I have not been used IntelliJ for some time (using vscode for now), and opened OneDev with IntelliJ and it does have the issue you mentioned.

    Seems that IntelliJ is not able to find generated antlr sources for some reason, and I do not want to waste time investigating that. Please switch to use vscode, and specify active maven profile in Java project setting as ce. Also below launch.json can be used to launch OneDev server:

    {
        // Use IntelliSense to learn about possible attributes.
        // Hover to view descriptions of existing attributes.
        // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
        "version": "0.2.0",
        "configurations": [        
            {
                "type": "java",
                "name": "Server",
                "request": "launch",
                "mainClass": "io.onedev.commons.bootstrap.Bootstrap",
                "projectName": "server-product"
            }
        ]
    }
    
  • Robin Shen changed state to 'Closed' 9 months ago
    Previous Value Current Value
    Open
    Closed
  • Kyo removed comment 9 months ago
  • Kyo commented 9 months ago

    I have not been used IntelliJ for some time (using vscode for now), and opened OneDev with IntelliJ and it does have the issue you mentioned.

    Seems that IntelliJ is not able to find generated antlr sources for some reason, and I do not want to waste time investigating that. Please switch to use vscode, and specify active maven profile in Java project setting as ce. Also below launch.json can be used to launch OneDev server:

    {
        // Use IntelliSense to learn about possible attributes.
        // Hover to view descriptions of existing attributes.
        // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
        "version": "0.2.0",
        "configurations": [        
            {
                "type": "java",
                "name": "Server",
                "request": "launch",
                "mainClass": "io.onedev.commons.bootstrap.Bootstrap",
                "projectName": "server-product"
            }
        ]
    }
    

    Seems it works. Thanks. I made assess to Server Setup Page st 127.0.0.1:6610 🤗

issue 1/1
Type
Question
Priority
Minor
Assignee
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-2343
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover