Giter Site home page Giter Site logo

spring-guides / gs-crud-with-vaadin Goto Github PK

View Code? Open in Web Editor NEW
106.0 106.0 140.0 1.17 MB

Creating CRUD UI with Vaadin :: Use Vaadin and Spring Data JPA to build a dynamic UI

Home Page: https://spring.io/guides/gs/crud-with-vaadin

License: Apache License 2.0

Java 100.00%

gs-crud-with-vaadin's People

Contributors

bclozel avatar buzzardo avatar dependabot[bot] avatar dominiquecomte avatar freducom avatar gregturn avatar juhopiirainen avatar manolo avatar marcingrzejszczak avatar mehdi-vaadin avatar mstahv avatar patelherat avatar qtdzz avatar robertmcnees avatar senk avatar snicoll avatar spring-operator avatar sushnag22 avatar tarekoraby avatar zhesun88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gs-crud-with-vaadin's Issues

How to handle repository events?

I have a project using Spring Data JPA and would like to do something similar to what gs-crud-with-vaadin is doing by using the Repository as a data source for vaadin. However, i have business logic in RepositoryEventListeners (AbstractRepositoryEventListener<> instances), eg, onBeforeSave.

The events in Spring data jpa are fired higher up at the web mvc controller level, so using the repository in vaadin like this example would not cause the events to fire.

Any suggestions on how to deal with this?

run.sh script should use maven wrapper

run.sh shows the following message:

[ERROR]
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit-platform/2.22.2/surefire-junit-platform-2.22.2.pom
Return code is: 501 , ReasonPhrase:HTTPS Required

I searched, found and followed the instructions: https://blog.adamgamboa.dev/2020/01/16/maven-central-repository-is-moving-to-https-and-disablig-http-access/

According these instructions I changed pom.xml in both maps (complete and initial) but the above error still occurs.

What is it I am doing wrong?
Thanks

bean validation

Is there a easy way to get bean validation working on vaadin ?

hibernate class missing

when trying to run the project from the initial folder I'm getting an error about a hibernate class not found

Caused by: java.lang.ClassNotFoundException: org.hibernate.HibernateException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_162]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_162]
at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:94) ~[gs-crud-with-vaadin-0.1.0.jar:0.1.0]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_162]
... 67 common frames omitted

Cannot incorporate into pom.xml

Neither spring initialiser nor direct incorporation into pom.xml in accordance with your example get the module working properly. Is this because I am using Eclipse and not IntelliJ, or is there some other reason?

Missing javascript module

Simply running the complete example gives me the following error (using node v16.13.0 which is the current LTS). Not sure what's wrong.


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.5.2)

2021-11-15 09:42:27.753  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : Starting CrudWithVaadinApplication using Java 1.8.0_282 on 101P019 with PID 3180 (C:\Users\MY_USER_NAME\git\gs-crud-with-vaadin-main\complete\target\classes started by MY_USER_NAMEin C:\Users\MY_USER_NAME\git\gs-crud-with-vaadin-main\complete)
2021-11-15 09:42:27.755  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : No active profile set, falling back to default profiles: default
2021-11-15 09:42:28.454  INFO 3180 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2021-11-15 09:42:28.502  INFO 3180 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 39 ms. Found 1 JPA repository interfaces.
2021-11-15 09:42:29.539  INFO 3180 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2021-11-15 09:42:29.551  INFO 3180 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2021-11-15 09:42:29.551  INFO 3180 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.48]
2021-11-15 09:42:29.721  INFO 3180 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2021-11-15 09:42:29.721  INFO 3180 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1917 ms
2021-11-15 09:42:31.984  INFO 3180 --- [           main] c.v.f.s.VaadinServletContextInitializer  : Search for subclasses and classes with annotations took 2 seconds
2021-11-15 09:42:31.990  INFO 3180 --- [           main] c.v.f.server.startup.DevModeInitializer  : Starting dev-mode updaters in C:\Users\MY_USER_NAME\git\gs-crud-with-vaadin-main\complete folder.
2021-11-15 09:42:32.108  INFO 3180 --- [           main] dev-updater                              : Visited 92 classes. Took 108 ms.
2021-11-15 09:42:32.176  INFO 3180 --- [           main] dev-updater                              : Skipping `npm install` because the frontend packages are already installed in the folder 'C:\Users\MY_USER_NAME\git\gs-crud-with-vaadin-main\complete\node_modules' and the hash in the file 'C:\Users\MY_USER_NAME\git\gs-crud-with-vaadin-main\complete\node_modules\.vaadin\vaadin.json' is the same as in 'package.json'
2021-11-15 09:42:32.195  INFO 3180 --- [           main] dev-updater                              : Copying frontend resources from jar files ...
2021-11-15 09:42:32.234  INFO 3180 --- [           main] dev-updater                              : Visited 13 resources. Took 39 ms.
2021-11-15 09:42:32.282  INFO 3180 --- [           main] dev-updater                              : Visited 92 classes. Took 3 ms.
�[94mVaadin application has been deployed and started to the context path "/".
�[0m2021-11-15 09:42:32.309  INFO 3180 --- [onPool-worker-1] dev-updater                              : Skipping `npm install` because the frontend packages are already installed in the folder 'C:\Users\MY_USER_NAME\git\gs-crud-with-vaadin-main\complete\node_modules' and the hash in the file 'C:\Users\MY_USER_NAME\git\gs-crud-with-vaadin-main\complete\node_modules\.vaadin\vaadin.json' is the same as in 'package.json'
2021-11-15 09:42:32.333  INFO 3180 --- [onPool-worker-1] dev-updater                              : Copying frontend resources from jar files ...
2021-11-15 09:42:32.364  INFO 3180 --- [onPool-worker-1] dev-updater                              : Visited 13 resources. Took 31 ms.
2021-11-15 09:42:32.409  INFO 3180 --- [onPool-worker-1] dev-webpack                              : Starting webpack-dev-server
2021-11-15 09:42:32.527  INFO 3180 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2021-11-15 09:42:32.775  INFO 3180 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2021-11-15 09:42:32.862  INFO 3180 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
2021-11-15 09:42:32.961  INFO 3180 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate ORM core version 5.4.32.Final
2021-11-15 09:42:33.144  INFO 3180 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2021-11-15 09:42:33.315  INFO 3180 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2021-11-15 09:42:33.889  INFO 3180 --- [           main] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2021-11-15 09:42:33.899  INFO 3180 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2021-11-15 09:42:34.541  WARN 3180 --- [           main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2021-11-15 09:42:35.267  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Installed AtmosphereHandler com.vaadin.flow.server.communication.PushAtmosphereHandler mapped to context-path: /*
2021-11-15 09:42:35.267  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Installed the following AtmosphereInterceptor mapped to AtmosphereHandler com.vaadin.flow.server.communication.PushAtmosphereHandler
2021-11-15 09:42:35.305  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Atmosphere is using org.atmosphere.util.VoidAnnotationProcessor for processing annotation
2021-11-15 09:42:35.325  INFO 3180 --- [           main] org.atmosphere.util.ForkJoinPool         : Using ForkJoinPool  java.util.concurrent.ForkJoinPool. Set the org.atmosphere.cpr.broadcaster.maxAsyncWriteThreads to -1 to fully use its power.
2021-11-15 09:42:35.333  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 
2021-11-15 09:42:35.345  INFO 3180 --- [           main] o.a.container.JSR356AsyncSupport         : JSR 356 Mapping path /vaadinServlet
2021-11-15 09:42:35.369  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Installing Default AtmosphereInterceptors
2021-11-15 09:42:35.370  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : 	org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
2021-11-15 09:42:35.370  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : 	org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
2021-11-15 09:42:35.371  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : 	org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
2021-11-15 09:42:35.372  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : 	org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
2021-11-15 09:42:35.372  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Dropping Interceptor org.atmosphere.interceptor.HeartbeatInterceptor
2021-11-15 09:42:35.372  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : 	org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
2021-11-15 09:42:35.373  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : 	org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
2021-11-15 09:42:35.374  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : 	org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
2021-11-15 09:42:35.375  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : 	org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
2021-11-15 09:42:35.375  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : 	org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
2021-11-15 09:42:35.375  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : 	org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
2021-11-15 09:42:35.375  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
2021-11-15 09:42:35.376  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Installed AtmosphereInterceptor CORS Interceptor Support with priority FIRST_BEFORE_DEFAULT 
2021-11-15 09:42:35.381  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Installed AtmosphereInterceptor Default Response's Headers Interceptor with priority AFTER_DEFAULT 
2021-11-15 09:42:35.382  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Installed AtmosphereInterceptor Browser Padding Interceptor Support with priority AFTER_DEFAULT 
2021-11-15 09:42:35.382  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Installed AtmosphereInterceptor Android Interceptor Support with priority AFTER_DEFAULT 
2021-11-15 09:42:35.382  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Installed AtmosphereInterceptor SSE Interceptor Support with priority AFTER_DEFAULT 
2021-11-15 09:42:35.382  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Installed AtmosphereInterceptor JSONP Interceptor Support with priority AFTER_DEFAULT 
2021-11-15 09:42:35.382  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Installed AtmosphereInterceptor Atmosphere JavaScript Protocol with priority AFTER_DEFAULT 
2021-11-15 09:42:35.382  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Installed AtmosphereInterceptor org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor with priority AFTER_DEFAULT 
2021-11-15 09:42:35.382  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Installed AtmosphereInterceptor Browser disconnection detection with priority AFTER_DEFAULT 
2021-11-15 09:42:35.383  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Installed AtmosphereInterceptor org.atmosphere.interceptor.IdleResourceInterceptor with priority BEFORE_DEFAULT 
2021-11-15 09:42:35.383  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper
2021-11-15 09:42:35.383  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache
2021-11-15 09:42:35.383  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
2021-11-15 09:42:35.383  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Broadcaster Shared List Resources: false
2021-11-15 09:42:35.383  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Broadcaster Polling Wait Time 100
2021-11-15 09:42:35.383  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Shared ExecutorService supported: true
2021-11-15 09:42:35.383  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Messaging ExecutorService Pool Size unavailable - Not instance of ThreadPoolExecutor
2021-11-15 09:42:35.383  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Async I/O Thread Pool Size: 200
2021-11-15 09:42:35.383  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
2021-11-15 09:42:35.383  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Using AtmosphereResurceFactory: org.atmosphere.cpr.DefaultAtmosphereResourceFactory
2021-11-15 09:42:35.383  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
2021-11-15 09:42:35.390  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Invoke AtmosphereInterceptor on WebSocket message true
2021-11-15 09:42:35.390  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : HttpSession supported: true
2021-11-15 09:42:35.390  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Atmosphere is using DefaultAtmosphereObjectFactory for dependency injection and object creation
2021-11-15 09:42:35.390  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Atmosphere is using async support: org.atmosphere.container.JSR356AsyncSupport running under container: Apache Tomcat/9.0.48 using javax.servlet/3.0 and jsr356/WebSocket API
2021-11-15 09:42:35.390  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Atmosphere Framework 2.4.30.slf4jvaadin1 started.
2021-11-15 09:42:35.396  INFO 3180 --- [           main] org.atmosphere.cpr.AtmosphereFramework   : Installed AtmosphereInterceptor  Track Message Size Interceptor using | with priority BEFORE_DEFAULT 
2021-11-15 09:42:35.418  INFO 3180 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2021-11-15 09:42:35.429  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : Started CrudWithVaadinApplication in 8.046 seconds (JVM running for 8.574)
2021-11-15 09:42:35.492  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : Customers found with findAll():
2021-11-15 09:42:35.492  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : -------------------------------
2021-11-15 09:42:35.651  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : Customer[id=1, firstName='Jack', lastName='Bauer']
2021-11-15 09:42:35.651  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : Customer[id=2, firstName='Chloe', lastName='O'Brian']
2021-11-15 09:42:35.651  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : Customer[id=3, firstName='Kim', lastName='Bauer']
2021-11-15 09:42:35.651  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : Customer[id=4, firstName='David', lastName='Palmer']
2021-11-15 09:42:35.651  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : Customer[id=5, firstName='Michelle', lastName='Dessler']
2021-11-15 09:42:35.651  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : 
2021-11-15 09:42:35.666  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : Customer found with findOne(1L):
2021-11-15 09:42:35.666  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : --------------------------------
2021-11-15 09:42:35.666  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : Customer[id=1, firstName='Jack', lastName='Bauer']
2021-11-15 09:42:35.666  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : 
2021-11-15 09:42:35.666  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : Customer found with findByLastNameStartsWithIgnoreCase('Bauer'):
2021-11-15 09:42:35.666  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : --------------------------------------------
2021-11-15 09:42:35.730  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : Customer[id=1, firstName='Jack', lastName='Bauer']
2021-11-15 09:42:35.730  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : Customer[id=3, firstName='Kim', lastName='Bauer']
2021-11-15 09:42:35.730  INFO 3180 --- [           main] c.e.c.CrudWithVaadinApplication          : 
�[38;5;35m
------------------ Starting Frontend compilation. ------------------
�[0m2021-11-15 09:42:35.951  INFO 3180 --- [onPool-worker-1] dev-webpack                              : Running webpack to compile frontend resources. This may take a moment, please stand by...
2021-11-15 09:42:36.123 ERROR 3180 --- [onPool-worker-1] dev-webpack                              : Webpack failed with the exception:
node:internal/modules/cjs/loader:361
      throw err;
      ^

Error: Cannot find module 'C:\Users\MY_USER_NAME\git\gs-crud-with-vaadin-main\complete\node_modules\source-map\source-map.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:353:19)
    at Function.Module._findPath (node:internal/modules/cjs/loader:566:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\Users\MY_USER_NAME\git\gs-crud-with-vaadin-main\complete\node_modules\webpack-sources\lib\Source.js:7:18)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32) {
  code: 'MODULE_NOT_FOUND',
  path: 'C:\\Users\\MY_USER_NAME\\git\\gs-crud-with-vaadin-main\\complete\\node_modules\\source-map\\package.json',
  requestPath: 'source-map'
}

Unable to determine mode of operation

Hi,
the guide doesn't state how to start the project.
I tried:
mvn spring-boot:run (inside the complete directory)
build is successful, but opening localhost:8080 yields the Whitelabel Error Page with this information:

There was an unexpected error (type=Internal Server Error, status=500).
Unable to determine mode of operation. To use npm mode, ensure 'flow-build-info.json' exists on the classpath. With Maven, this is handled by the 'prepare-frontend' goal. To use compatibility mode, add the 'flow-server-compatibility-mode' dependency. If using Vaadin with Spring Boot, instead set the property 'vaadin.compatibilityMode' to 'true' in 'application.properties'.

What am I missing?

Upgrade Spring Boot to the latest version

Update the guide to use the most recent Spring Boot version.

To do so, change the Spring Boot version in:

initial/build.gradle
initial/pom.xml
complete/build.gradle
complete/pom.xml

Requires node and npm to be installed

Title, basically. Just downloaded the complete example and tried to run it. You will get an error from Vaadin (which is a bug in Vaadin; it should be installing it itself, but doesn't). This can be solved by manually installing node and npm, but should be mentioned in the guide.

com.vaadin.flow.component cannot be resolved

In MainView.java I am getting the following error when trying to extend VerticalLayout:

The hierarchy of the type MainView is inconsistent.
The type com.vaadin.flow.component.Component cannot be resolved. It is indirectly referenced from required .class files

Help. Is this repo still working?

Hello there. I was trying to find a tool to create a Full CRUD UI quickly and ended up here. I tried to run the complete and initial and hit localhost:8080 and it throws an error

com.vaadin.flow.router.NotFoundException: Couldn't find route for ''
com.vaadin.flow.server.BootstrapException: Unable to read webpack stats file.
java.net.ConnectException: Connection refused: no further information_

In addition, when It loads frontend dependencies It throws many warnings related to deprecated dependencies.

npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

Is this repo still updated?

Application failed to start

The application failed to start:

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 1 of constructor in org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration required a bean of type 'org.springframework.boot.autoconfigure.web.servlet.DispatcherServletPath' that could not be found.


Action:

Consider defining a bean of type 'org.springframework.boot.autoconfigure.web.servlet.DispatcherServletPath' in your configuration.

After updating to vaadin-bom 10.0.6 it works. Seems to be related to vaadin/spring#331.

The include at the end to build the executable JAR is missing the production profile

At the end of the tutorial, in the "Build an executable JAR" paragraph, the build instructions are missing the "production" profile that actually builds the frontend files to include in the JAR.

Without this, running the jar and trying to access the application produces an error page and this in the console:

java.lang.IllegalStateException: 

  Failed to find the following files: 
      - ./generated/jar-resources/lit-renderer.ts
      - ./generated/jar-resources/vaadin-time-picker/timepickerConnector.js
 [etc...]

includes in AsciiDoc do not seem to support a parameter that could contain the missing "-Pproduction" (for Maven), though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.