alrauber 9 de mai. de 2005
Parece que ele não está conseguindo recuperar o id… não sei…
O erro que estou tomando é o seguinte:
An error occurred in the bean . Error Message is : EJBException :; nested exception is : javax . ejb . EJBException : Could not create entity : java . sql . SQLException : ERROR : null value in column “ co_tp_perfil ” violates not - null constraint
Stack Trace is :
java . rmi . ServerException : EJBException :; nested exception is :
javax . ejb . EJBException : Could not create entity : java . sql . SQLException : ERROR : null value in column “ co_tp_perfil ” violates not - null constraint
at org . jboss . ejb . plugins . LogInterceptor . handleException ( LogInterceptor . java : 351 )
at org . jboss . ejb . plugins . LogInterceptor . invoke ( LogInterceptor . java : 195 )
at org . jboss . ejb . plugins . ProxyFactoryFinderInterceptor . invoke ( ProxyFactoryFinderInterceptor . java : 122 )
at org . jboss . ejb . StatelessSessionContainer . internalInvoke ( StatelessSessionContainer . java : 331 )
at org . jboss . ejb . Container . invoke ( Container . java : 709 )
at sun . reflect . NativeMethodAccessorImpl . invoke0 ( Native Method )
at sun . reflect . NativeMethodAccessorImpl . invoke ( NativeMethodAccessorImpl . java : 39 )
at sun . reflect . DelegatingMethodAccessorImpl . invoke ( DelegatingMethodAccessorImpl . java : 25 )
at java . lang . reflect . Method . invoke ( Method . java : 324 )
at org . jboss . mx . server . ReflectedDispatcher . dispatch ( ReflectedDispatcher . java : 60 )
at org . jboss . mx . server . Invocation . dispatch ( Invocation . java : 62 )
at org . jboss . mx . server . Invocation . dispatch ( Invocation . java : 54 )
at org . jboss . mx . server . Invocation . invoke ( Invocation . java : 82 )
at org . jboss . mx . server . AbstractMBeanInvoker . invoke ( AbstractMBeanInvoker . java : 197 )
at org . jboss . mx . server . MBeanServerImpl . invoke ( MBeanServerImpl . java : 473 )
at org . jboss . invocation . local . LocalInvoker . invoke ( LocalInvoker . java : 97 )
at org . jboss . invocation . InvokerInterceptor . invoke ( InvokerInterceptor . java : 90 )
at org . jboss . proxy . TransactionInterceptor . invoke ( TransactionInterceptor . java : 46 )
at org . jboss . proxy . SecurityInterceptor . invoke ( SecurityInterceptor . java : 55 )
at org . jboss . proxy . ejb . StatelessSessionInterceptor . invoke ( StatelessSessionInterceptor . java : 100 )
at org . jboss . proxy . ClientContainer . invoke ( ClientContainer . java : 85 )
at $ Proxy49 . createTipoPerfil ( Unknown Source )
at seguranca . delegate . SegurancaDelegate . createTipoPerfil ( SegurancaDelegate . java : 18 )
at org . apache . jsp . index_jsp . _jspService ( index_jsp . java : 55 )
at org . apache . jasper . runtime . HttpJspBase . service ( HttpJspBase . java : 94 )
at javax . servlet . http . HttpServlet . service ( HttpServlet . java : 810 )
at org . apache . jasper . servlet . JspServletWrapper . service ( JspServletWrapper . java : 324 )
at org . apache . jasper . servlet . JspServlet . serviceJspFile ( JspServlet . java : 292 )
at org . apache . jasper . servlet . JspServlet . service ( JspServlet . java : 236 )
at javax . servlet . http . HttpServlet . service ( HttpServlet . java : 810 )
at org . apache . catalina . core . ApplicationFilterChain . internalDoFilter ( ApplicationFilterChain . java : 237 )
at org . apache . catalina . core . ApplicationFilterChain . doFilter ( ApplicationFilterChain . java : 157 )
at org . jboss . web . tomcat . filters . ReplyHeaderFilter . doFilter ( ReplyHeaderFilter . java : 75 )
at org . apache . catalina . core . ApplicationFilterChain . internalDoFilter ( ApplicationFilterChain . java : 186 )
at org . apache . catalina . core . ApplicationFilterChain . doFilter ( ApplicationFilterChain . java : 157 )
at org . apache . catalina . core . StandardWrapperValve . invoke ( StandardWrapperValve . java : 214 )
at org . apache . catalina . core . StandardValveContext . invokeNext ( StandardValveContext . java : 104 )
at org . apache . catalina . core . StandardPipeline . invoke ( StandardPipeline . java : 520 )
at org . apache . catalina . core . StandardContextValve . invokeInternal ( StandardContextValve . java : 198 )
at org . apache . catalina . core . StandardContextValve . invoke ( StandardContextValve . java : 152 )
at org . apache . catalina . core . StandardValveContext . invokeNext ( StandardValveContext . java : 104 )
at org . jboss . web . tomcat . security . CustomPrincipalValve . invoke ( CustomPrincipalValve . java : 66 )
at org . apache . catalina . core . StandardValveContext . invokeNext ( StandardValveContext . java : 102 )
at org . jboss . web . tomcat . security . SecurityAssociationValve . invoke ( SecurityAssociationValve . java : 158 )
at org . apache . catalina . core . StandardValveContext . invokeNext ( StandardValveContext . java : 102 )
at org . apache . catalina . core . StandardPipeline . invoke ( StandardPipeline . java : 520 )
at org . apache . catalina . core . StandardHostValve . invoke ( StandardHostValve . java : 137 )
at org . apache . catalina . core . StandardValveContext . invokeNext ( StandardValveContext . java : 104 )
at org . apache . catalina . valves . ErrorReportValve . invoke ( ErrorReportValve . java : 118 )
at org . apache . catalina . core . StandardValveContext . invokeNext ( StandardValveContext . java : 102 )
at org . apache . catalina . authenticator . SingleSignOn . invoke ( SingleSignOn . java : 417 )
at org . apache . catalina . core . StandardValveContext . invokeNext ( StandardValveContext . java : 102 )
at org . apache . catalina . core . StandardPipeline . invoke ( StandardPipeline . java : 520 )
at org . apache . catalina . core . StandardEngineValve . invoke ( StandardEngineValve . java : 109 )
at org . apache . catalina . core . StandardValveContext . invokeNext ( StandardValveContext . java : 104 )
at org . apache . catalina . core . StandardPipeline . invoke ( StandardPipeline . java : 520 )
at org . apache . catalina . core . ContainerBase . invoke ( ContainerBase . java : 929 )
at org . apache . coyote . tomcat5 . CoyoteAdapter . service ( CoyoteAdapter . java : 160 )
at org . apache . coyote . http11 . Http11Processor . process ( Http11Processor . java : 799 )
at org . apache . coyote . http11 . Http11Protocol $ Http11ConnectionHandler . processConnection ( Http11Protocol . java : 705 )
at org . apache . tomcat . util . net . TcpWorkerThread . runIt ( PoolTcpEndpoint . java : 577 )
at org . apache . tomcat . util . threads . ThreadPool $ ControlRunnable . run ( ThreadPool . java : 683 )
at java . lang . Thread . run ( Thread . java : 534 )
Caused by : javax . ejb . EJBException : Could not create entity : java . sql . SQLException : ERROR : null value in column “ co_tp_perfil ” violates not - null constraint
at seguranca . SegurancaSfBean . createTipoPerfil ( SegurancaSfBean . java : 50 )
at sun . reflect . NativeMethodAccessorImpl . invoke0 ( Native Method )
at sun . reflect . NativeMethodAccessorImpl . invoke ( NativeMethodAccessorImpl . java : 39 )
at sun . reflect . DelegatingMethodAccessorImpl . invoke ( DelegatingMethodAccessorImpl . java : 25 )
at java . lang . reflect . Method . invoke ( Method . java : 324 )
at org . jboss . ejb . StatelessSessionContainer $ ContainerInterceptor . invoke ( StatelessSessionContainer . java : 683 )
at org . jboss . resource . connectionmanager . CachedConnectionInterceptor . invoke ( CachedConnectionInterceptor . java : 186 )
at org . jboss . ejb . plugins . StatelessSessionInstanceInterceptor . invoke ( StatelessSessionInstanceInterceptor . java : 72 )
at org . jboss . ejb . plugins . AbstractTxInterceptor . invokeNext ( AbstractTxInterceptor . java : 84 )
at org . jboss . ejb . plugins . TxInterceptorCMT . runWithTransactions ( TxInterceptorCMT . java : 315 )
at org . jboss . ejb . plugins . TxInterceptorCMT . invoke ( TxInterceptorCMT . java : 148 )
at org . jboss . ejb . plugins . SecurityInterceptor . invoke ( SecurityInterceptor . java : 111 )
at org . jboss . ejb . plugins . LogInterceptor . invoke ( LogInterceptor . java : 191 )
… 61 more
alrauber 9 de mai. de 2005
Eu nao estou usando xdoclet…
alrauber 9 de mai. de 2005
Coloquei o xdoclet aki…
package seguranca;
import javax.ejb.EntityBean ;
import javax.ejb.EntityContext ;
import javax.ejb.CreateException ;
import javax.ejb.RemoveException ;
public abstract class TipoPerfilBean implements EntityBean {
EntityContext entityContext ;
public Short ejbCreate ( String nome ) throws CreateException {
setNome ( nome );
return null ;
}
public void ejbPostCreate ( String nome ) throws CreateException {
}
public void ejbRemove () throws RemoveException {
}
/**
* @ejb.interface-method view-type="local"
* @jboss.auto-increment
*/
public abstract void setId ( Short id );
public abstract Short getId ();
public abstract void setNome ( String nome );
public abstract String getNome ();
public void ejbLoad () {
}
public void ejbStore () {
}
public void ejbActivate () {
}
public void ejbPassivate () {
}
public void unsetEntityContext () {
this . entityContext = null ;
}
public void setEntityContext ( EntityContext entityContext ) {
this . entityContext = entityContext ;
}
}