JPro-one / JPro

The right place to report about bugs or suggest improvements for JPro.
https://www.jpro.one
9 stars 4 forks source link

Upgrading jpro-routing-core dependency some classes are missing #143

Closed Muhammad-Muddasir closed 1 year ago

Muhammad-Muddasir commented 1 year ago

Hi, I upgraded jpro routing 0.11.0 to 0.13.0 to solve problem #142. After upgrading these classes are missing in the latest version.

3:00:27 PM: Executing 'jproRun'...

SUCCESS: The process with PID 7580 has been terminated.

> Task :compileJava
F:\MyWork\NetBeansProjects\android-projects\update\MyAppWeb\src\main\java\com\myapp\module\MainClass.java:13: error: cannot find symbol
import com.jpro.routing.WebApp;
                       ^
  symbol:   class WebApp
  location: package com.jpro.routing
F:\MyWork\NetBeansProjects\android-projects\update\MyAppWeb\src\main\java\com\myapp\module\MainClass.java::32: error: cannot find symbol
public class MainClass extends WebApp {
                               ^
  symbol: class WebApp
F:\MyWork\NetBeansProjects\android-projects\update\MyAppWeb\src\main\java\com\myapp\App.java:45: error: incompatible types: MainClass cannot be converted to Parent
        Scene scene = new Scene(mainClass);
                                ^
F:\MyWork\NetBeansProjects\android-projects\update\MyAppWeb\src\main\java\com\myapp\App.java:53: error: incompatible types: MainClass cannot be converted to RouteNode
        SessionManager sessionManager = SessionManager.getDefault(mainClass,pStage);
                                                                  ^
F:\MyWork\NetBeansProjects\android-projects\update\MyAppWeb\src\main\java\com\myapp\App.java:54: error: cannot find symbol
        mainClass.start(sessionManager);
                 ^
  symbol:   method start(SessionManager)
  location: variable mainClass of type MainClass
F:\MyWork\NetBeansProjects\android-projects\update\MyAppWeb\src\main\java\com\myapp\module\MainClass.java:43: error: cannot find symbol
        addRoute(url -> {
        ^
  symbol:   method addRoute((url)->{ i[...]; } })
  location: class MainClass
F:\MyWork\NetBeansProjects\android-projects\update\MyAppWeb\src\main\java\com\myapp\module\MainClass.java:108: error: cannot find symbol
            Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
                             ^
  symbol:   method getClass()
  location: class MainClass
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
7 errors

> Task :compileJava FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings
1 actionable task: 1 executed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 43s
3:01:11 PM: Execution finished 'jproRun'.
FlorianKirmaier commented 1 year ago

Hi @Muhammad-Muddasir

We've refactored quite some parts some parts in the Library. For example, WebApp is now called RouteApp.

Check out this example, which shows how the routing currently works: https://github.com/JPro-one/jpro-routing/blob/master/example/src/main/java/example/colors/ColorsApp.java