Ola pessoa, estou com o seguinte problema, eu criei uma entidade chamada cargos até ai tudo ok, posteriormente quis adicionar outro campo chamado excluido que é um booleano inicializado como false so que o hibernate não esta criando este ultimo campo adicionado e não da nenhum erro no console.
segue as informações:
Classe Cargos:
package br.ce.fortaleza.sms.model;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@SuppressWarnings("serial")
@Entity(name = "cargos")
public class Cargo implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false, length = 50)
private String descricao;
private Boolean excluido = false;
//Inicio dos metodos Get's e Set's
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getDescricao() {
return descricao;
}
public void setDescricao(String descricao) {
this.descricao = descricao;
}
public Boolean getExcluido() {
return excluido;
}
public void setExcluido(Boolean excluido) {
this.excluido = excluido;
}
//Fim dos metodosGet's e Set's
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Cargo other = (Cargo) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
}
}
Aqui é o que aparece no console:
Out 22, 2012 4:01:56 PM org.apache.catalina.core.AprLifecycleListener init
Informações: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jre7/bin/client;C:/Program Files (x86)/Java/jre7/bin;C:/Program Files (x86)/Java/jre7/lib/i386;C:\oracle\product\10.2.0\client_1\bin;C:\oracle\product\10.2.0\client_1;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Dell\DW WLAN Card;C:\Program Files (x86)\Intel\Services\IPT\;C:\Program Files (x86)\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\Dell\Dell Data Protection\Access\Advanced\Wave\Gemalto\Access Client\v5\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\j2sdk1.4.2_16\bin;C:\jboss-3.0.6_tomcat-4.1.18-8084\bin\bin;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files (x86)\Roxio\OEM\AudioCore\;C:\eclipse;;.
Out 22, 2012 4:01:57 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
Advertência: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:spl' did not find a matching property.
Out 22, 2012 4:01:57 PM org.apache.coyote.AbstractProtocol init
Informações: Initializing ProtocolHandler ["http-bio-8080"]
Out 22, 2012 4:01:57 PM org.apache.coyote.AbstractProtocol init
Informações: Initializing ProtocolHandler ["ajp-bio-8009"]
Out 22, 2012 4:01:57 PM org.apache.catalina.startup.Catalina load
Informações: Initialization processed in 379 ms
Out 22, 2012 4:01:57 PM org.apache.catalina.core.StandardService startInternal
Informações: Starting service Catalina
Out 22, 2012 4:01:57 PM org.apache.catalina.core.StandardEngine startInternal
Informações: Starting Servlet Engine: Apache Tomcat/7.0.26
Out 22, 2012 4:02:04 PM org.apache.catalina.core.ApplicationContext log
Informações: No Spring WebApplicationInitializer types detected on classpath
Out 22, 2012 4:02:04 PM org.apache.catalina.core.ApplicationContext log
Informações: Initializing Spring root WebApplicationContext
INFO - Root WebApplicationContext: initialization started
INFO - Refreshing Root WebApplicationContext: startup date [Mon Oct 22 16:02:04 GMT-03:00 2012]; root of context hierarchy
INFO - Loading XML bean definitions from ServletContext resource [/WEB-INF/config/spring/applicationContext.xml]
INFO - Loading XML bean definitions from ServletContext resource [/WEB-INF/config/spring/applicationContext-persistence.xml]
INFO - Loading XML bean definitions from ServletContext resource [/WEB-INF/config/spring/applicationContext-security.xml]
INFO - Creating access control expression attribute 'isAuthenticated()' for /*.jsp
INFO - Creating access control expression attribute 'hasAnyRole('ADMINISTRADOR','USUARIO','ESPECIAL')' for /pages/index.xhtml
INFO - Creating access control expression attribute 'hasRole('ADMINISTRADOR')' for /pages/usuario/**
INFO - Checking sorted filter chain: [Root bean: class [org.springframework.security.web.context.SecurityContextPersistenceFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 300, Root bean: class [org.springframework.security.web.authentication.logout.LogoutFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 400, Root bean: class [org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 800, Root bean: class [org.springframework.security.web.authentication.www.BasicAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1200, Root bean: class [org.springframework.security.web.savedrequest.RequestCacheAwareFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1300, Root bean: class [org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1400, Root bean: class [org.springframework.security.web.authentication.AnonymousAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1600, Root bean: class [org.springframework.security.web.session.SessionManagementFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1700, Root bean: class [org.springframework.security.web.access.ExceptionTranslationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1800, <org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0>, order = 1900]
INFO - Loading properties file from class path resource [jdbc/jdbc.properties]
INFO - MLog clients using log4j logging.
INFO - Initializing c3p0-0.9.1 [built 16-January-2007 14:46:42; debug? true; trace: 10]
INFO - Bean 'dataSource' of type [class com.mchange.v2.c3p0.ComboPooledDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO - Bean 'org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter#9f4fdb' of type [class org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO - Building JPA container EntityManagerFactory for persistence unit 'BlankPU'
INFO - Hibernate Commons Annotations 3.2.0.Final
INFO - Hibernate 3.6.9.Final
INFO - hibernate.properties not found
INFO - Bytecode provider name : javassist
INFO - using JDK 1.4 java.sql.Timestamp handling
INFO - Hibernate EntityManager 3.6.9.Final
INFO - Processing PersistenceUnitInfo [
name: BlankPU
...]
INFO - Binding entity from annotated class: br.ce.fortaleza.sms.model.Status
INFO - Bind entity br.ce.fortaleza.sms.model.Status on table status
INFO - Binding entity from annotated class: br.ce.fortaleza.sms.model.Usuario
INFO - Binding Named query: Usuario.findByUsername => SELECT u FROM Usuario u WHERE u.username=:username and u.enabled=true
INFO - Bind entity br.ce.fortaleza.sms.model.Usuario on table usuario
INFO - Binding entity from annotated class: br.ce.fortaleza.sms.model.Equipamento
INFO - Bind entity br.ce.fortaleza.sms.model.Equipamento on table equipamentos
INFO - Binding entity from annotated class: br.ce.fortaleza.sms.model.Feriados
INFO - Bind entity br.ce.fortaleza.sms.model.Feriados on table feriados
INFO - Binding entity from annotated class: br.ce.fortaleza.sms.model.RegistroPonto
INFO - Bind entity br.ce.fortaleza.sms.model.RegistroPonto on table registro_ponto
INFO - Binding entity from annotated class: br.ce.fortaleza.sms.model.DiaSemana
INFO - Bind entity br.ce.fortaleza.sms.model.DiaSemana on table dias_semana
INFO - Binding entity from annotated class: br.ce.fortaleza.sms.model.Cargo
INFO - Bind entity br.ce.fortaleza.sms.model.Cargo on table cargos
INFO - Binding entity from annotated class: br.ce.fortaleza.sms.model.Lotacao
INFO - Bind entity br.ce.fortaleza.sms.model.Lotacao on table lotacoes
INFO - Binding entity from annotated class: br.ce.fortaleza.sms.model.Profissional
INFO - Bind entity br.ce.fortaleza.sms.model.Profissional on table profissionais
INFO - Binding entity from annotated class: br.ce.fortaleza.sms.model.Horario
INFO - Bind entity br.ce.fortaleza.sms.model.Horario on table horarios
INFO - Binding entity from annotated class: br.ce.fortaleza.sms.model.Empregador
INFO - Bind entity br.ce.fortaleza.sms.model.Empregador on table empregador
INFO - Binding entity from annotated class: br.ce.fortaleza.sms.model.Estabelecimento
INFO - Bind entity br.ce.fortaleza.sms.model.Estabelecimento on table estabelecimentos
INFO - Binding entity from annotated class: br.ce.fortaleza.sms.model.Role
INFO - Bind entity br.ce.fortaleza.sms.model.Role on table role
INFO - Binding entity from annotated class: br.ce.fortaleza.sms.model.Especialidade
INFO - Bind entity br.ce.fortaleza.sms.model.Especialidade on table especialidades
INFO - Binding entity from annotated class: br.ce.fortaleza.sms.model.TipoContrato
INFO - Bind entity br.ce.fortaleza.sms.model.TipoContrato on table tipos_contrato
INFO - Mapping collection: br.ce.fortaleza.sms.model.Estabelecimento.equipamentos -> equipamentos
INFO - Hibernate Validator not found: ignoring
INFO - HV000001: Hibernate Validator 4.3.0.Final
INFO - Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
INFO - Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
INFO - Using provided datasource
INFO - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1bqon338q128z7kn1r464eu|22e323, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> org.postgresql.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1bqon338q128z7kn1r464eu|22e323, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:postgresql://127.0.0.1:5432/ponto_lotacao, lastAcquisitionFailureDefaultUser -> null, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 20, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 6, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
INFO - Using dialect: org.hibernate.dialect.PostgreSQLDialect
INFO - Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
INFO - Database ->
name : PostgreSQL
version : 9.1.4
major : 9
minor : 1
INFO - Driver ->
name : PostgreSQL Native Driver
version : PostgreSQL 9.1 JDBC4 (build 901)
major : 9
minor : 1
INFO - Using default transaction strategy (direct JDBC transactions)
INFO - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
INFO - Automatic flush during beforeCompletion(): disabled
INFO - Automatic session close at end of transaction: disabled
INFO - JDBC batch size: 15
INFO - JDBC batch updates for versioned data: disabled
INFO - Scrollable result sets: enabled
INFO - JDBC3 getGeneratedKeys(): enabled
INFO - Connection release mode: auto
INFO - Default schema: efetivo
INFO - Default batch fetch size: 1
INFO - Generate SQL with comments: disabled
INFO - Order SQL updates by primary key: disabled
INFO - Order SQL inserts for batching: disabled
INFO - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
INFO - Using ASTQueryTranslatorFactory
INFO - Query language substitutions: {}
INFO - JPA-QL strict compliance: enabled
INFO - Second-level cache: enabled
INFO - Query cache: disabled
INFO - Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
INFO - Optimize cache for minimal puts: disabled
INFO - Structured second-level cache entries: disabled
INFO - Echoing all SQL to stdout
INFO - Statistics: disabled
INFO - Deleted entity synthetic identifier rollback: disabled
INFO - Default entity-mode: pojo
INFO - Named query checking : enabled
INFO - Check Nullability in Core (should be disabled when Bean Validation is on): disabled
INFO - building session factory
INFO - Type registration [materialized_blob] overrides previous : org.hibernate.type.MaterializedBlobType@1253d3a
INFO - Not binding factory to JNDI, no JNDI name configured
INFO - Running hbm2ddl schema update
INFO - fetching database metadata
INFO - updating schema
INFO - table not found: cargos
INFO - table not found: dias_semana
INFO - table not found: dias_semana_horarios
INFO - table not found: empregador
INFO - table not found: equipamentos
INFO - table not found: especialidades
INFO - table not found: estabelecimentos
INFO - table not found: feriados
INFO - table not found: horarios
INFO - table not found: lotacoes
INFO - table not found: pessoas_especialidades
INFO - table not found: profissionais
INFO - table not found: registro_ponto
INFO - table not found: role
INFO - table not found: status
INFO - table not found: tipos_contrato
INFO - table not found: tipos_status
INFO - table not found: usuario
INFO - table not found: usuario_roles
INFO - table not found: cargos
INFO - table not found: dias_semana
INFO - table not found: dias_semana_horarios
INFO - table not found: empregador
INFO - table not found: equipamentos
INFO - table not found: especialidades
INFO - table not found: estabelecimentos
INFO - table not found: feriados
INFO - table not found: horarios
INFO - table not found: lotacoes
INFO - table not found: pessoas_especialidades
INFO - table not found: profissionais
INFO - table not found: registro_ponto
INFO - table not found: role
INFO - table not found: status
INFO - table not found: tipos_contrato
INFO - table not found: tipos_status
INFO - table not found: usuario
INFO - table not found: usuario_roles
INFO - schema update complete
INFO - Bean 'entityManagerFactory' of type [class org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO - Bean 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0' of type [class org.springframework.transaction.annotation.AnnotationTransactionAttributeSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO - Bean '(inner bean)' of type [class org.springframework.security.access.annotation.SecuredAnnotationSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO - Bean 'org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource#0' of type [class org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO - Bean 'org.springframework.security.methodSecurityMetadataSourceAdvisor' of type [class org.springframework.security.access.intercept.aopalliance.MethodSecurityMetadataSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO - Bean 'org.springframework.transaction.config.internalTransactionAdvisor' of type [class org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1075406: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,usuarioWeb,cargoDao,empregadorDao,equipamentoDao,especialidadeDao,estabelecimentoDao,horarioDao,lotacaoDao,profissionalDao,roleDao,statusDao,tipoLotacaoDao,usuarioDao,autenticador,authenticationService,userDetailService,bootstrap,facesContextFactory,facesUtils,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,dataSource,entityManagerFactory,transactionManager,org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0,org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource#0,org.springframework.security.access.vote.AffirmativeBased#0,org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor#0,org.springframework.security.methodSecurityMetadataSourceAdvisor,org.springframework.security.web.PortMapperImpl#0,org.springframework.security.web.context.HttpSessionSecurityContextRepository#0,org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy#0,org.springframework.security.authentication.ProviderManager#0,org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler#0,org.springframework.security.access.vote.AffirmativeBased#1,org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0,org.springframework.security.web.access.DefaultWebInvocationPrivilegeEvaluator#0,org.springframework.security.authentication.AnonymousAuthenticationProvider#0,org.springframework.security.web.savedrequest.HttpSessionRequestCache#0,org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint#0,org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0,org.springframework.security.config.http.UserDetailsServiceInjectionBeanPostProcessor#0,org.springframework.security.filterChainProxy,org.springframework.security.authentication.dao.DaoAuthenticationProvider#0,org.springframework.security.authentication.DefaultAuthenticationEventPublisher#0,org.springframework.security.authenticationManager,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0,scopedTarget.getInstance,getInstance]; root of factory hierarchy
INFO - Validated configuration attributes
INFO - Validated configuration attributes
INFO - Root WebApplicationContext: initialization completed in 4451 ms
Out 22, 2012 4:02:08 PM com.sun.faces.config.ConfigureListener contextInitialized
Informações: Inicializando Mojarra 2.1.7 (SNAPSHOT 20120206) para o contexto '/spl'
Out 22, 2012 4:02:09 PM com.sun.faces.spi.InjectionProviderFactory createInstance
Informações: JSF1048: Anotações PostConstruct/PreDestroy presentes. Os métodos ManagedBeans marcados com essas anotações informarão as anotações processadas.
Out 22, 2012 4:02:09 PM org.primefaces.webapp.PostConstructApplicationEventListener processEvent
Informações: Running on PrimeFaces 3.3.1
Out 22, 2012 4:02:09 PM com.sun.faces.config.ConfigureListener$WebConfigResourceMonitor$Monitor <init>
Informações: Monitoring jndi:/localhost/spl/WEB-INF/faces-config.xml for modifications
Out 22, 2012 4:02:09 PM org.apache.coyote.AbstractProtocol start
Informações: Starting ProtocolHandler ["http-bio-8080"]
Out 22, 2012 4:02:09 PM org.apache.coyote.AbstractProtocol start
Informações: Starting ProtocolHandler ["ajp-bio-8009"]
Out 22, 2012 4:02:09 PM org.apache.catalina.startup.Catalina start
Informações: Server startup in 12781 ms