nkatoch2001 (35) [Avatar] Offline
#1
Hi all,

I am getting the following error message:-
C:forGlassFishEJB3glassfishchapter9>ant run
Buildfile: build.xml

common:
[echo] BuildName: chapter9
[echo] BuildHome: C:forGlassFishEJB3glassfishchapter9
[echo] BuildFile: C:forGlassFishEJB3glassfishchapter9uild.xml
[echo] BuildJVM: 1.6

java-env-check:

init:
[echo] -----> Initializing project properties

run:
[echo] Executing client class using C:EXAMPLES_HOMEglassfish/bin/appclient.bat
[exec] Dec 26, 2009 6:57:36 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>
[exec] WARNING: ACC003: Application threw an exception.
[exec] javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
[exec] java.rmi.RemoteException: null; nested exception is:
[exec] Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.DatabaseExce
ption
[exec] Internal Exception: java.sql.SQLSyntaxErrorException: Table/View 'USERS' does not exist.
[exec] Error Code: -1
[exec] java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
[exec] java.rmi.RemoteException: null; nested exception is:
[exec] Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.DatabaseExce
ption
[exec] Internal Exception: java.sql.SQLSyntaxErrorException: Table/View 'USERS' does not exist.
[exec] Error Code: -1
[exec] at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:243)
[exec] at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:205)
[exec] at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
[exec] at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
[exec] at actionbazaar.buslogic.__ItemManager_Remote_DynamicStub.addItem(actionbazaar/buslogic/__ItemManager_Remote_DynamicStub.java)
[exec] at actionbazaar.buslogic._ItemManager_Wrapper.addItem(actionbazaar/buslogic/_ItemManager_Wrapper.java)
[exec] at actionbazaar.buslogic.ItemManagerClient.main(ItemManagerClient.java:14)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:597)
[exec] at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
[exec] at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:450)
[exec] at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:260)
[exec] at com.sun.enterprise.appclient.Main.main(Main.java:200)
[exec] Caused by: java.rmi.RemoteException: null; nested exception is:
[exec] Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.DatabaseExce
ption
[exec] Internal Exception: java.sql.SQLSyntaxErrorException: Table/View 'USERS' does not exist.
[exec] Error Code: -1
[exec] at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:251)
[exec] at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1420)
[exec] at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1325)
[exec] at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:210)
[exec] at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:117)
[exec] at $Proxy88.addItem(Unknown Source)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:597)
[exec] at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:154)
[exec] at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
[exec] at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
[exec] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
[exec] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
[exec] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:108smilie
[exec] at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
[exec] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
[exec] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
[exec] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
[exec] at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
[exec] Caused by: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.Datab
aseException
[exec] Internal Exception: java.sql.SQLSyntaxErrorException: Table/View 'USERS' does not exist.
[exec] Error Code: -1
[exec] at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:319)
[exec] at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:566)
[exec] at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:452)
[exec] at oracle.toplink.essentials.threetier.ServerSession.executeCall(ServerSession.java:473)
[exec] at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:22smilie
[exec] at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:214)
[exec] at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.selectOneRow(DatasourceCallQueryMechanism.java:635)
[exec] at oracle.toplink.essentials.internal.queryframework.ExpressionQueryMechanism.selectOneRowFromTable(ExpressionQueryMechanism.java:2453)
[exec] at oracle.toplink.essentials.internal.queryframework.ExpressionQueryMechanism.selectOneRow(ExpressionQueryMechanism.java:242smilie
[exec] at oracle.toplink.essentials.queryframework.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:365)
[exec] at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:724)
[exec] at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:62smilie
[exec] at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:692)
[exec] at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:746)
[exec] at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2244)
[exec] at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952)
[exec] at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:909)
[exec] at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.findInternal(EntityManagerImpl.java:354)
[exec] at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.findInternal(EntityManagerImpl.java:330)
[exec] at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.find(EntityManagerImpl.java:14smilie
[exec] at com.sun.enterprise.util.EntityManagerWrapper.find(EntityManagerWrapper.java:546)
[exec] at actionbazaar.buslogic.ItemManagerBean.addItem(ItemManagerBean.java:26)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:597)
[exec] at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1011)
[exec] at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:175)
[exec] at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2929)
[exec] at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4020)
[exec] at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:203)
[exec] ... 17 more
[exec] Caused by: java.sql.SQLSyntaxErrorException: Table/View 'USERS' does not exist.
[exec] at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
[exec] at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
[exec] at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source)
[exec] at com.sun.gjc.spi.base.ConnectionHolder.prepareStatement(ConnectionHolder.java:475)
[exec] at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1162)
[exec] at oracle.toplink.essentials.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:612)
[exec] at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:485)
[exec] ... 46 more
[exec] Caused by: org.apache.derby.client.am.SqlException: Table/View 'USERS' does not exist.
[exec] at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
[exec] at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source)
[exec] at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source)
[exec] at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source)
[exec] at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source)
[exec] at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source)
[exec] at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source)
[exec] at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source)
[exec] at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source)
[exec] at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source)
[exec] at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source)
[exec] ... 51 more
[exec] javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
[exec] java.rmi.RemoteException: null; nested exception is:
[exec] Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.DatabaseExce
ption
[exec] Internal Exception: java.sql.SQLSyntaxErrorException: Table/View 'USERS' does not exist.
[exec] Error Code: -1
[exec] at actionbazaar.buslogic._ItemManager_Wrapper.addItem(actionbazaar/buslogic/_ItemManager_Wrapper.java)
[exec] at actionbazaar.buslogic.ItemManagerClient.main(ItemManagerClient.java:14)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:597)
[exec] at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
[exec] at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:450)
[exec] at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:260)
[exec] at com.sun.enterprise.appclient.Main.main(Main.java:200)
[exec] Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
[exec] at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:462)
[exec] at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:260)
[exec] at com.sun.enterprise.appclient.Main.main(Main.java:200)
[exec] Caused by: java.lang.reflect.InvocationTargetException
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:597)
[exec] at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
[exec] at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:450)
[exec] ... 2 more
[exec] Caused by: javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception i
s:
[exec] java.rmi.RemoteException: null; nested exception is:
[exec] Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.DatabaseExce
ption
[exec] Internal Exception: java.sql.SQLSyntaxErrorException: Table/View 'USERS' does not exist.
[exec] Error Code: -1
[exec] at actionbazaar.buslogic._ItemManager_Wrapper.addItem(actionbazaar/buslogic/_ItemManager_Wrapper.java)
[exec] at actionbazaar.buslogic.ItemManagerClient.main(ItemManagerClient.java:14)
[exec] ... 8 more

BUILD SUCCESSFUL
Total time: 11 seconds

Please guide me to fix this error message.

Thanks for your time,

Naveen
nkatoch2001 (35) [Avatar] Offline
#2
Re: Chapter 9 - Getting the following error message while running the client
Hi all,

Please give me your inputs to resolve this issue. Thanks,

Naveen
nkatoch2001 (35) [Avatar] Offline
#3
Re: Chapter 9 - Getting the following error message while running the client
Hi everybody,

Any inputs, please.

Thanks, Naveen
MarkEHansen (4) [Avatar] Offline
#4
Re: Chapter 9 - Getting the following error message while running the clien
Since no else has answered, let me make sure you noticed that the exception was complaining that the USERS table didn't exist in the database.

Was the build supposed to create this automatically, or were you supposed to have created the tables manually?
nkatoch2001 (35) [Avatar] Offline
#5
Re: Chapter 9 - Getting the following error message while running the client
Hi Mark,

Thanks for your reply. Yes, the build is supposed to create it automatically. I don't know why it is showing this error. If you want I could post the sql file which came with the source code. However, I have already run all these chapters using ant script for jboss but it's not working with glassfish server starting from chapter 8.

Thanks again,

Naveen
dpanda (136) [Avatar] Offline
#6
Re: Chapter 9 - Getting the following error message while running the client
What version of Glassfish are you using ?

-Debu
nkatoch2001 (35) [Avatar] Offline
#7
Re: Chapter 9 - Getting the following error message while running the client
Hi Debu,

Thanks for your reply. I am using glassfish server 2.1 and I am getting such error messages from chapter 8.

Thanks again,

Naveen
nkatoch2001 (35) [Avatar] Offline
#8
Re: Chapter 9 - Getting the following error message while running the client
Hi all,

Now I have only error message regarding toplink which is as below:-

C:forGlassFishEJB3glassfishchapter9>ant
Buildfile: build.xml

common:
[echo] BuildName: chapter9
[echo] BuildHome: C:forGlassFishEJB3glassfishchapter9
[echo] BuildFile: C:forGlassFishEJB3glassfishchapter9uild.xml
[echo] BuildJVM: 1.6

java-env-check:

init:
[echo] -----> Initializing project properties

setup:
[echo] -----> Creating the required sub-directories

compile-ejb-classes:
[echo] -----> Compiling EJBs

ejb-descriptor:

package-ejb:
[echo] -----> Create EJB jar file

compile-cli-classes:

cli-descriptor:

package-client:

package-app:

deploy:
[echo] asadmin.bat deploy --user admin --password adminadmin --host localhost --port 4848 --upload=true lib/chapter9.ear
[exec] Command deploy executed successfully.

all:
[echo] -----> Creates and deploys all deployable units for the application

BUILD SUCCESSFUL
Total time: 3 seconds
C:forGlassFishEJB3glassfishchapter9>ant run
Buildfile: build.xml

common:
[echo] BuildName: chapter9
[echo] BuildHome: C:forGlassFishEJB3glassfishchapter9
[echo] BuildFile: C:forGlassFishEJB3glassfishchapter9uild.xml
[echo] BuildJVM: 1.6

java-env-check:

init:
[echo] -----> Initializing project properties

run:
[echo] Executing client class using C:EXAMPLES_HOMEglassfish/bin/appclient.bat
[exec] Jan 4, 2010 6:42:11 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>
[exec] WARNING: ACC003: Application threw an exception.
[exec] javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
[exec] java.rmi.RemoteException: null; nested exception is:
[exec] Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.DatabaseExce
ption
[exec] Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.Connect
Exception : Error connecting to server localhost on port 1527 with message Connection refused: connect.
[exec] Error Code: 0
[exec] java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
[exec] java.rmi.RemoteException: null; nested exception is:
[exec] Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.DatabaseExce
ption
[exec] Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.Connect
Exception : Error connecting to server localhost on port 1527 with message Connection refused: connect.
[exec] Error Code: 0
[exec] at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:243)
[exec] at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:205)
[exec] at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
[exec] at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
[exec] at actionbazaar.buslogic.__ItemManager_Remote_DynamicStub.addItem(actionbazaar/buslogic/__ItemManager_Remote_DynamicStub.java)
[exec] at actionbazaar.buslogic._ItemManager_Wrapper.addItem(actionbazaar/buslogic/_ItemManager_Wrapper.java)
[exec] at actionbazaar.buslogic.ItemManagerClient.main(ItemManagerClient.java:14)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:597)
[exec] at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
[exec] at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:450)
[exec] at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:260)
[exec] at com.sun.enterprise.appclient.Main.main(Main.java:200)
[exec] Caused by: java.rmi.RemoteException: null; nested exception is:
[exec] Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.DatabaseExce
ption
[exec] Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.Connect
Exception : Error connecting to server localhost on port 1527 with message Connection refused: connect.
[exec] Error Code: 0
[exec] at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:251)
[exec] at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1420)
[exec] at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1325)
[exec] at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:210)
[exec] at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:117)
[exec] at $Proxy101.addItem(Unknown Source)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:597)
[exec] at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:154)
[exec] at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
[exec] at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
[exec] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
[exec] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
[exec] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:108smilie
[exec] at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
[exec] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
[exec] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
[exec] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
[exec] at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
[exec] Caused by: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.Datab
aseException
[exec] Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.Connect
Exception : Error connecting to server localhost on port 1527 with message Connection refused: connect.
[exec] Error Code: 0
[exec] at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
[exec] at oracle.toplink.essentials.jndi.JNDIConnector.connect(JNDIConnector.java:150)
[exec] at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:184)
[exec] at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:582)
[exec] at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:280)
[exec] at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:230)
[exec] at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
[exec] at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:13smilie
[exec] at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:99)
[exec] at com.sun.enterprise.util.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:326)
[exec] at com.sun.enterprise.util.EntityManagerWrapper.find(EntityManagerWrapper.java:546)
[exec] at actionbazaar.buslogic.ItemManagerBean.addItem(ItemManagerBean.java:26)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:597)
[exec] at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1011)
[exec] at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:175)
[exec] at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2929)
[exec] at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4020)
[exec] at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:203)
[exec] ... 17 more
[exec] Caused by: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException
: Error connecting to server localhost on port 1527 with message Connection refused: connect.
[exec] at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:115)
[exec] at oracle.toplink.essentials.jndi.JNDIConnector.connect(JNDIConnector.java:145)
[exec] ... 36 more
[exec] javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
[exec] java.rmi.RemoteException: null; nested exception is:
[exec] Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.DatabaseExce
ption
[exec] Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.Connect
Exception : Error connecting to server localhost on port 1527 with message Connection refused: connect.
[exec] Error Code: 0
[exec] at actionbazaar.buslogic._ItemManager_Wrapper.addItem(actionbazaar/buslogic/_ItemManager_Wrapper.java)
[exec] at actionbazaar.buslogic.ItemManagerClient.main(ItemManagerClient.java:14)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:597)
[exec] at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
[exec] at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:450)
[exec] at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:260)
[exec] at com.sun.enterprise.appclient.Main.main(Main.java:200)
[exec] Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
[exec] at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:462)
[exec] at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:260)
[exec] at com.sun.enterprise.appclient.Main.main(Main.java:200)
[exec] Caused by: java.lang.reflect.InvocationTargetException
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:597)
[exec] at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
[exec] at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:450)
[exec] ... 2 more
[exec] Caused by: javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception i
s:
[exec] java.rmi.RemoteException: null; nested exception is:
[exec] Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.DatabaseExce
ption
[exec] Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.Connect
Exception : Error connecting to server localhost on port 1527 with message Connection refused: connect.
[exec] Error Code: 0
[exec] at actionbazaar.buslogic._ItemManager_Wrapper.addItem(actionbazaar/buslogic/_ItemManager_Wrapper.java)
[exec] at actionbazaar.buslogic.ItemManagerClient.main(ItemManagerClient.java:14)
[exec] ... 8 more

BUILD SUCCESSFUL

Thanks for any inputs,

Naveen
dpanda (136) [Avatar] Offline
#9
Re: Chapter 9 - Getting the following error message while running the client
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.Connect
Exception : Error connecting to server localhost on port 1527 with message Connection refused: connect.


Make sure that your database is up and listening n port 1527

-Debu
nkatoch2001 (35) [Avatar] Offline
#10
Re: Chapter 9 - Getting the following error message while running the client
Hi Debu,

However my persistence.xml file looks like which is as below:-
<persistence>
<persistence-unit name="actionBazaar">
<jta-data-source>jdbc/ActionBazaarDS</jta-data-source>b
</persistence-unit>
</persistence>

Debu, I have run other examples upto chapters 4 and I didn't have any problem regarding this sqlException and port 1527.

Thanks for your inputs and whatelse I should do to make it working as I have been struggling for a long time.

Navenn
nkatoch2001 (35) [Avatar] Offline
#11
Re: Chapter 9 - Getting the following error message while running the client
Hi Debu,

I have resolved the issue by entering one thing in persistence.xml. I am moving to chapter 10 now.

If I get stuck, I will be back again to bug Reza and you. Never mind.

Thanks for clearing the doubts,

Naveen
Youness (1) [Avatar] Offline
#12
Re: Chapter 9 - Getting the following error message while running the client
Hi nkatoch2001,

Please, what did you added to persistence.xml to solve the problem?
I get the same error as port 1527. But I run mysql server which listens on 3306.

The same error I get:
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused: connect.