Oi Otávio, eu fiz as alterações que você sugeriu e também
tentei alterar as versões das minhas dependências para as
mais atuais, mas logo voltei atras, pois tive mais erros.
Contudo, o erro ainda persiste, e diferente de antes,
que só dava erro na hora de cadastrar um produto,
o erro agora acontece logo quando rodo o servidor.
Essa é a mensagem que recebo:
SEVERE: Servlet.init() for servlet [SpringDispatcher] threw exception
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productsController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private homecode.CasadoCodigo.daos.DAOProduct homecode.CasadoCodigo.controller.ProductsController.daop; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DAOProduct': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory]
...
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private homecode.CasadoCodigo.daos.DAOProduct homecode.CasadoCodigo.controller.ProductsController.daop; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DAOProduct': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory]
...
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DAOProduct': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory]
...
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory]
...
SEVERE: Servlet [SpringDispatcher] in web application [/CasadoCodigo] threw load() exception
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory]
Porém, embora todos esses erros, teve uma mudança no banco de dados:
Hibernate: alter table Product_preços drop foreign key FK_2ytx0bjix3jc13fywme06sujd
Hibernate: drop table if exists Product
Hibernate: drop table if exists Product_preços
Hibernate: create table Product (id integer not null auto_increment, desc varchar(255), paginas integer, titulo varchar(255), primary key (id))
Hibernate: create table Product_preços (Product_id integer not null, tipo integer, valor decimal(19,2))
Hibernate: alter table Product_preços add constraint FK_2ytx0bjix3jc13fywme06sujd foreign key (Product_id) references Product (id)