geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CG <learn....@gmail.com>
Subject record not created in table (tutorial StatelessSessionBean)
Date Sun, 23 Mar 2008 00:57:03 GMT
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.getPhysicalConnection(AbstractXADataSourceMCF.java:76)
	at org.tranql.connector.jdbc.AbstractXADataSourceMCF.createManagedConnection(AbstractXADataSourceMCF.java:64)
	at org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:48)
	at org.apache.geronimo.connector.outbound.LocalXAResourceInsertionInterceptor.getConnection(LocalXAResourceInsertionInterceptor.java:41)
	at org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor.internalGetConnection(SinglePoolConnectionInterceptor.java:70)
	at org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:80)
	at org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:46)
	at org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:94)
	at org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnection(ConnectionHandleInterceptor.java:43)
	at org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39)
	at org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.getConnection(ConnectionTrackingInterceptor.java:66)
	at org.apache.geronimo.connector.outbound.AbstractConnectionManager.allocateConnection(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.proceed(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.getPhysicalConnection(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.newNetConnection(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.getPhysicalConnection(AbstractXADataSourceMCF.java:74)
	at org.tranql.connector.jdbc.AbstractXADataSourceMCF.createManagedConnection(AbstractXADataSourceMCF.java:64)
	at org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:48)
	at org.apache.geronimo.connector.outbound.LocalXAResourceInsertionInterceptor.getConnection(LocalXAResourceInsertionInterceptor.java:41)
	at org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor.internalGetConnection(SinglePoolConnectionInterceptor.java:70)
	at org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:80)
	at org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:46)
	at org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:94)
	at org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnection(ConnectionHandleInterceptor.java:43)
	at org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39)
	at org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.getConnection(ConnectionTrackingInterceptor.java:66)
	at org.apache.geronimo.connector.outbound.AbstractConnectionManager.allocateConnection(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.proceed(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.newNetConnection(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.proceed(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