Erro ao Salvar Dados no JavaDB ?
Ola pessoal tudo bem, espero que sim. Estou tendo um erro ao persistir os Dados no JavaDB:
java.sql.SQLSyntaxErrorExcepton: Shcema does not exist
o meu Schema e o seguinte :
jdbc:derby://localhost:1527/TimeSheet [timesheet on TIMESHEET]
Estou seguinte as video aulas do Dyego do Carmo e estou tendo sempre dificuldades, tanto com JPA como com Hibernate, fico grate pela ajuda de todos um forte abraco, Ricardo Scarpim.
java.sql.SQLSyntaxErrorExcepton: Shcema does not exist
o meu Schema e o seguinte :
jdbc:derby://localhost:1527/TimeSheet [timesheet on TIMESHEET]
Estou seguinte as video aulas do Dyego do Carmo e estou tendo sempre dificuldades, tanto com JPA como com Hibernate, fico grate pela ajuda de todos um forte abraco, Ricardo Scarpim.
Ricardo Scarpim
Curtidas 0
Respostas
Davi Costa
16/10/2011
Cola o erro(StackTrace) inteiro, vai ficar melhor de te ajudar.
Esse banco que vc está tentando se conectar já existe?
att Davi
Esse banco que vc está tentando se conectar já existe?
att Davi
GOSTEI 0
Ricardo Scarpim
16/10/2011
O Erro Esta Aarecendo em um JOptionPane e estou usando o javaDB nao tenho o banco definido em outro SGD.Obrigado.
GOSTEI 0
Davi Costa
16/10/2011
Dá uma olhada no seu console, ou no seu tratamento de erro (se tiver) coloca algo como:
try{
...
}catch(Exception e){
e.printStackTrace();
}
Daí vc vai conseguir pegar o erro completo
att Davi
try{
...
}catch(Exception e){
e.printStackTrace();
}
Daí vc vai conseguir pegar o erro completo
att Davi
GOSTEI 0
Ricardo Scarpim
16/10/2011
Ola Davi, coloquei, e o erro e o seguinte :
run: java.sql.SQLSyntaxErrorException: Schema TIMESHEET does not exist at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) at com.TimeSheet.DAOs.GenericDAO.getStatement(GenericDAO.java:52) at com.TimeSheet.DAOs.GenericDAO.executeQuery(GenericDAO.java:59) at com.TimeSheet.DAOs.GenericDAO.getNextId(GenericDAO.java:85) at com.TimeSheet.DAOs.us_UsuariosDAO.IncluiUsuario(us_UsuariosDAO.java:43) at com.TimeSheet.Formularios.FCadUsuarios.jButton2ActionPerformed(FCadUsuarios.java:232) at com.TimeSheet.Formularios.FCadUsuarios.access$100(FCadUsuarios.java:22) at com.TimeSheet.Formularios.FCadUsuarios$2.actionPerformed(FCadUsuarios.java:109) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6504) at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) at java.awt.Component.processEvent(Component.java:6269) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4860) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4686) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2713) at java.awt.Component.dispatchEvent(Component.java:4686) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707) at java.awt.EventQueue.access$000(EventQueue.java:101) at java.awt.EventQueue$3.run(EventQueue.java:666) at java.awt.EventQueue$3.run(EventQueue.java:664) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:680) at java.awt.EventQueue$4.run(EventQueue.java:678) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:677) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) Caused by: org.apache.derby.client.am.SqlException: Schema TIMESHEET does not exist at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) ... 44 more BUILD SUCCESSFUL (total time: 10 seconds)
GOSTEI 0
Davi Costa
16/10/2011
Esse schema não existe (TIMESHEET):
jdbc:derby://localhost:1527/TimeSheet [timesheet on TIMESHEET]
att Davi
jdbc:derby://localhost:1527/TimeSheet [timesheet on TIMESHEET]
att Davi
GOSTEI 0
Dyego Carmo
16/10/2011
Opa !
Conseguiu resolver ?
Se sim... por favor feche o chamado :)
Valeu !
Conseguiu resolver ?
Se sim... por favor feche o chamado :)
Valeu !
GOSTEI 0
Dyego Carmo
16/10/2011
tenta usar o contexto APP :)
GOSTEI 0