geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: record not created in table (tutorial StatelessSessionBean)
Date Sun, 23 Mar 2008 06:01:12 GMT
I don't recall running into this problem recently.... however it  
looks like you have set up your datasource to use the client rather  
than embedded derby datasource.  I think for that one you need to  
supply user and password.  If you use the embedded (local) connector  
then you don't need to; this is what the system-datasource uses.

thanks
david jencks

On Mar 22, 2008, at 5:57 PM, CG wrote:

> Hi ,
>   I have settled the previous problem , but now I face another problem
> , where the databases is not updated.
>
> I try to register a user but there is no record added to the table
> after successfully created. From the error message , I think it should
> be the db configuration problem but I am not sure which configuration
> I have missed out
>
> I have a question here also ,  in this tutorial , ApplicationClient is
> the UI , StatelessSessionBean is the backend that do the
> databases-related thing. Is the configuration need to be done at
> StatelessSessionBean (openejb-jar.xml) only , or at both
> StatelessSessionBean & ApplicationClient ?
>
> Hopefully can get some guidance , thanks.
> CG
>
>
> Error message is as below
> ======================
>
> 09:03:10,544 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for
> org.apache.geronimo.connector.outbound.ConnectionInfo@37cbd8
> javax.resource.spi.ResourceAdapterInternalException: Unable to obtain
> physical connection to org.apache.derby.jdbc.ClientXADataSource@21b229
> 	at  
> org.tranql.connector.jdbc.AbstractXADataSourceMCF.getPhysicalConnectio 
> n(AbstractXADataSourceMCF.java:76)
> 	at  
> org.tranql.connector.jdbc.AbstractXADataSourceMCF.createManagedConnect 
> ion(AbstractXADataSourceMCF.java:64)
> 	at  
> org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getCon 
> nection(MCFConnectionInterceptor.java:48)
> 	at  
> org.apache.geronimo.connector.outbound.LocalXAResourceInsertionInterce 
> ptor.getConnection(LocalXAResourceInsertionInterceptor.java:41)
> 	at  
> org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor 
> .internalGetConnection(SinglePoolConnectionInterceptor.java:70)
> 	at  
> org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInt 
> erceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java: 
> 80)
> 	at  
> org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor 
> .getConnection(TransactionEnlistingInterceptor.java:46)
> 	at  
> org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.g 
> etConnection(TransactionCachingInterceptor.java:94)
> 	at  
> org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.get 
> Connection(ConnectionHandleInterceptor.java:43)
> 	at  
> org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection 
> (TCCLInterceptor.java:39)
> 	at  
> org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.g 
> etConnection(ConnectionTrackingInterceptor.java:66)
> 	at  
> org.apache.geronimo.connector.outbound.AbstractConnectionManager.alloc 
> ateConnection(AbstractConnectionManager.java:87)
> 	at org.tranql.connector.jdbc.DataSource.getConnection 
> (DataSource.java:56)
> 	at statelessejb.RegisterBean.initialize(RegisterBean.java:19)
> 	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:597)
> 	at org.apache.openejb.core.interceptor.ReflectionInvocationContext 
> $Invocation.invoke(ReflectionInvocationContext.java:146)
> 	at org.apache.openejb.core.interceptor.ReflectionInvocationContext 
> $LifecycleInvocation.invoke(ReflectionInvocationContext.java:177)
> 	at  
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.procee 
> d(ReflectionInvocationContext.java:129)
> 	at org.apache.openejb.core.interceptor.InterceptorStack.invoke 
> (InterceptorStack.java:67)
> 	at  
> org.apache.openejb.core.stateless.StatelessInstanceManager.getInstance 
> (StatelessInstanceManager.java:190)
> 	at org.apache.openejb.core.stateless.StatelessContainer.invoke 
> (StatelessContainer.java:156)
> 	at  
> org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_ 
> METHOD(EjbRequestHandler.java:214)
> 	at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest 
> (EjbRequestHandler.java:121)
> 	at org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest 
> (EjbDaemon.java:164)
> 	at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java: 
> 122)
> 	at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java: 
> 84)
> 	at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java: 
> 60)
> 	at org.apache.openejb.server.ServiceLogger.service 
> (ServiceLogger.java:76)
> 	at org.apache.openejb.server.ServiceAccessController.service 
> (ServiceAccessController.java:55)
> 	at org.apache.openejb.server.ServiceDaemon$1.run 
> (ServiceDaemon.java:118)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: java.sql.SQLTransientConnectionException: User id length
> (0) is outside the range of 1 to 255.
> 	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.ClientPooledConnection.<init>(Unknown  
> Source)
> 	at org.apache.derby.client.ClientXAConnection.<init>(Unknown Source)
> 	at org.apache.derby.jdbc.ClientXADataSource.getXAConnection 
> (Unknown Source)
> 	at  
> org.tranql.connector.jdbc.AbstractXADataSourceMCF.getPhysicalConnectio 
> n(AbstractXADataSourceMCF.java:74)
> 	... 33 more
> Caused by: org.apache.derby.client.am.SqlException: User id length (0)
> is outside the range of 1 to 255.
> 	at org.apache.derby.client.net.NetConnection.checkUserLength 
> (Unknown Source)
> 	at org.apache.derby.client.net.NetConnection.checkUser(Unknown  
> Source)
> 	at org.apache.derby.client.net.NetConnection.checkUserPassword 
> (Unknown Source)
> 	at org.apache.derby.client.net.NetConnection.flowConnect(Unknown  
> Source)
> 	at org.apache.derby.client.net.NetConnection.initialize(Unknown  
> Source)
> 	at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
> 	at org.apache.derby.client.net.NetConnection40.<init>(Unknown Source)
> 	at  
> org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40.newNetConnec 
> tion(Unknown
> Source)
> 	at org.apache.derby.client.net.NetXAConnection.createNetConnection 
> (Unknown
> Source)
> 	at org.apache.derby.client.net.NetXAConnection.<init>(Unknown Source)
> 	at  
> org.apache.derby.client.ClientPooledConnection.getNetXAConnection 
> (Unknown
> Source)
> 	... 37 more
> java.sql.SQLTransientConnectionException: User id length (0) is
> outside the range of 1 to 255.
> 	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.ClientPooledConnection.<init>(Unknown  
> Source)
> 	at org.apache.derby.client.ClientXAConnection.<init>(Unknown Source)
> 	at org.apache.derby.jdbc.ClientXADataSource.getXAConnection 
> (Unknown Source)
> 	at  
> org.tranql.connector.jdbc.AbstractXADataSourceMCF.getPhysicalConnectio 
> n(AbstractXADataSourceMCF.java:74)
> 	at  
> org.tranql.connector.jdbc.AbstractXADataSourceMCF.createManagedConnect 
> ion(AbstractXADataSourceMCF.java:64)
> 	at  
> org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getCon 
> nection(MCFConnectionInterceptor.java:48)
> 	at  
> org.apache.geronimo.connector.outbound.LocalXAResourceInsertionInterce 
> ptor.getConnection(LocalXAResourceInsertionInterceptor.java:41)
> 	at  
> org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor 
> .internalGetConnection(SinglePoolConnectionInterceptor.java:70)
> 	at  
> org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInt 
> erceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java: 
> 80)
> 	at  
> org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor 
> .getConnection(TransactionEnlistingInterceptor.java:46)
> 	at  
> org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.g 
> etConnection(TransactionCachingInterceptor.java:94)
> 	at  
> org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.get 
> Connection(ConnectionHandleInterceptor.java:43)
> 	at  
> org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection 
> (TCCLInterceptor.java:39)
> 	at  
> org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.g 
> etConnection(ConnectionTrackingInterceptor.java:66)
> 	at  
> org.apache.geronimo.connector.outbound.AbstractConnectionManager.alloc 
> ateConnection(AbstractConnectionManager.java:87)
> 	at org.tranql.connector.jdbc.DataSource.getConnection 
> (DataSource.java:56)
> 	at statelessejb.RegisterBean.initialize(RegisterBean.java:19)
> 	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:597)
> 	at org.apache.openejb.core.interceptor.ReflectionInvocationContext 
> $Invocation.invoke(ReflectionInvocationContext.java:146)
> 	at org.apache.openejb.core.interceptor.ReflectionInvocationContext 
> $LifecycleInvocation.invoke(ReflectionInvocationContext.java:177)
> 	at  
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.procee 
> d(ReflectionInvocationContext.java:129)
> 	at org.apache.openejb.core.interceptor.InterceptorStack.invoke 
> (InterceptorStack.java:67)
> 	at  
> org.apache.openejb.core.stateless.StatelessInstanceManager.getInstance 
> (StatelessInstanceManager.java:190)
> 	at org.apache.openejb.core.stateless.StatelessContainer.invoke 
> (StatelessContainer.java:156)
> 	at  
> org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_ 
> METHOD(EjbRequestHandler.java:214)
> 	at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest 
> (EjbRequestHandler.java:121)
> 	at org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest 
> (EjbDaemon.java:164)
> 	at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java: 
> 122)
> 	at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java: 
> 84)
> 	at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java: 
> 60)
> 	at org.apache.openejb.server.ServiceLogger.service 
> (ServiceLogger.java:76)
> 	at org.apache.openejb.server.ServiceAccessController.service 
> (ServiceAccessController.java:55)
> 	at org.apache.openejb.server.ServiceDaemon$1.run 
> (ServiceDaemon.java:118)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: org.apache.derby.client.am.SqlException: User id length (0)
> is outside the range of 1 to 255.
> 	at org.apache.derby.client.net.NetConnection.checkUserLength 
> (Unknown Source)
> 	at org.apache.derby.client.net.NetConnection.checkUser(Unknown  
> Source)
> 	at org.apache.derby.client.net.NetConnection.checkUserPassword 
> (Unknown Source)
> 	at org.apache.derby.client.net.NetConnection.flowConnect(Unknown  
> Source)
> 	at org.apache.derby.client.net.NetConnection.initialize(Unknown  
> Source)
> 	at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
> 	at org.apache.derby.client.net.NetConnection40.<init>(Unknown Source)
> 	at  
> org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40.newNetConnec 
> tion(Unknown
> Source)
> 	at org.apache.derby.client.net.NetXAConnection.createNetConnection 
> (Unknown
> Source)
> 	at org.apache.derby.client.net.NetXAConnection.<init>(Unknown Source)
> 	at  
> org.apache.derby.client.ClientPooledConnection.getNetXAConnection 
> (Unknown
> Source)
> 	... 37 more
> java.lang.NullPointerException
> 	at statelessejb.RegisterBean.register(RegisterBean.java:31)
> 	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:597)
> 	at org.apache.openejb.core.interceptor.ReflectionInvocationContext 
> $Invocation.invoke(ReflectionInvocationContext.java:146)
> 	at  
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.procee 
> d(ReflectionInvocationContext.java:129)
> 	at org.apache.openejb.core.interceptor.InterceptorStack.invoke 
> (InterceptorStack.java:67)
> 	at org.apache.openejb.core.stateless.StatelessContainer._invoke 
> (StatelessContainer.java:210)
> 	at org.apache.openejb.core.stateless.StatelessContainer._invoke 
> (StatelessContainer.java:188)
> 	at org.apache.openejb.core.stateless.StatelessContainer.invoke 
> (StatelessContainer.java:165)
> 	at  
> org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_ 
> METHOD(EjbRequestHandler.java:214)
> 	at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest 
> (EjbRequestHandler.java:121)
> 	at org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest 
> (EjbDaemon.java:164)
> 	at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java: 
> 122)
> 	at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java: 
> 84)
> 	at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java: 
> 60)
> 	at org.apache.openejb.server.ServiceLogger.service 
> (ServiceLogger.java:76)
> 	at org.apache.openejb.server.ServiceAccessController.service 
> (ServiceAccessController.java:55)
> 	at org.apache.openejb.server.ServiceDaemon$1.run 
> (ServiceDaemon.java:118)
> 	at java.lang.Thread.run(Thread.java:619)
>
>
>
> openejb-jar.xml for (StatelessSessionBean)
> =============
> <?xml version="1.0" encoding="UTF-8"?>
> <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.2"
> xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2"
> xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0"
> xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.2"
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
>   <sys:environment>
>     <sys:moduleId>
>       <sys:groupId>default</sys:groupId>
>       <sys:artifactId>StatelessSessionEJB</sys:artifactId>
>       <sys:version>1.0</sys:version>
>       <sys:type>car</sys:type>
>     </sys:moduleId>
>     <sys:dependencies>
>             <sys:dependency>
>                 <sys:groupId>console.dbpool</sys:groupId>
>                 <sys:artifactId>jdbc%2Fuserds</sys:artifactId>
>             </sys:dependency>
> </sys:dependencies>
>   </sys:environment>
>   <enterprise-beans/>
> </openejb-jar>
>
>
> geronimo-web.xml (for ApplicationClient)
> ====================================
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2"
> xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2"
> xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.2"
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
>   <sys:environment>
>     <sys:moduleId>
>       <sys:groupId>default</sys:groupId>
>       <sys:artifactId>ApplicationClient</sys:artifactId>
>       <sys:version>1.0</sys:version>
>       <sys:type>car</sys:type>
>     </sys:moduleId>
>     <sys:dependencies>
>        <sys:dependency>
>             <sys:groupId>default</sys:groupId>
>       		<sys:artifactId>StatelessSessionEJB</sys:artifactId>
>       		<sys:version>1.0</sys:version>
>       		<sys:type>car</sys:type>
>        </sys:dependency>
>     </sys:dependencies>
>   </sys:environment>
>   <context-root>/ApplicationClient</context-root>
> </web-app>
>
>
> web.xml (ApplicationClient)
> =========================
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="WebApp_ID" version="2.5"
> xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> </web-app>


Mime
View raw message