eu estou usando o JXDatePicker do SwingX pra pegar uma data digitada pelo usuario, mas tem aparecido esse erro:
[EL Info]: 2012-07-19 08:41:42.903--ServerSession(18589815)--EclipseLink, version: Eclipse Persistence Services - 2.3.0.v20110604-r9504
[EL Info]: 2012-07-19 08:41:43.409--ServerSession(18589815)--file:/C:/Users/yurifw/Documents/NetBeansProjects/ThreeMasters2/build/classes/_ThreeMastersPU login successful
[EL Warning]: 2012-07-19 08:41:43.488--ServerSession(18589815)--java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date
[EL Warning]: 2012-07-19 08:41:43.489--UnitOfWork(33397988)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.DatabaseException
Exception in thread "AWT-EventQueue-0" Local Exception Stack:
[color=red]Internal Exception: java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date[/color]
Error Code: 0
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.DatabaseException
Call: SELECT id, data_cadastro, data_fim, data_inicio, descricao, previsao_termino, titulo, projeto FROM tarefa
Internal Exception: java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date
Query: ReadAllQuery(name="Tarefa.findAll" referenceClass=Tarefa sql="SELECT id, data_cadastro, data_fim, data_inicio, descricao, previsao_termino, titulo, projeto FROM tarefa")
Error Code: 0
Call: SELECT id, data_cadastro, data_fim, data_inicio, descricao, previsao_termino, titulo, projeto FROM tarefa
Query: ReadAllQuery(name="Tarefa.findAll" referenceClass=Tarefa sql="SELECT id, data_cadastro, data_fim, data_inicio, descricao, previsao_termino, titulo, projeto FROM tarefa")
eu já mudei o campo do mysql pra DATE mas continua dando o mesmo erro, o meu código pra cadastrar ta aki:
Tarefa tarefa = new Tarefa();
TarefaJpaController tarefaJPA = new TarefaJpaController(emf);
ProjetoJpaController projetoJpa = new ProjetoJpaController(emf);
Projeto projeto = (Projeto) projetoJpa.getEntityManager().createNamedQuery("Projeto.findById").
setParameter("id",Integer.parseInt(txtProjetoId.getText())).getSingleResult();
tarefa.setDataCadastro(new java.util.Date());
tarefa.setDataFim(dataFim.getDate());
tarefa.setDataInicio(dataInicio.getDate());
tarefa.setDescricao(txtDescricao.getText());
tarefa.setProjeto(projeto);
tarefa.setTitulo(txtTitulo.getText());
tarefa.setPrevisaoTermino(dataTermino.getDate());
tarefaJPA.create(tarefa);
//os campos que começam com data são JXDatePicker
os CRUD de outras classes (sem campo data) estão todos funcionando perfeitamente, mas nessa eu não consigo fazer nada