Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCEEJBD
Search Coderanch
Advance search
Google search
Register / Login
Help coderanch get a
new server
by contributing to the
fundraiser
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Devaka Cooray
Liutauras Vilda
Sheriffs:
Jeanne Boyarsky
paul wheaton
Henry Wong
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Tim Moores
Carey Brown
Mikalai Zaikin
Bartenders:
Lou Hamers
Piet Souris
Frits Walraven
Forum:
EJB Certification (OCEEJBD)
Getting error chapter 8 of Ejb 3 in action using glassfish server 2.1
nav katoch
Ranch Hand
Posts: 246
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi all,
Thanks for your time and input to guide me for the following error:-
C:\forGlassFishEJB3\glassfish\chapter8\sql>tables.sql C:\forGlassFishEJB3\glassfish\chapter8\sql>cd C:\forGlassFishEJB3\glassfish\chapter8 C:\forGlassFishEJB3\glassfish\chapter8>ant Buildfile: build.xml common: [echo] BuildName: chapter8 [echo] BuildHome: C:\forGlassFishEJB3\glassfish\chapter8 [echo] BuildFile: C:\forGlassFishEJB3\glassfish\chapter8\build.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/chapter8.ear [exec] CLI171 Command deploy failed : Deploying application in domain failed; [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] all: [echo] -----> Creates and deploys all deployable units for the application BUILD SUCCESSFUL Total time: 4 seconds
Thanks again,
Naveen
nav katoch
Ranch Hand
Posts: 246
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi all,
Thanks for your time. I have been waiting for someone to show me the right direction.
Naveen
nav katoch
Ranch Hand
Posts: 246
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi everyone,
Thanks for your time. I have made a little progress but this time I am getting a different error message when I ran the
ant
script:-
C:\forGlassFishEJB3\glassfish\chapter8>ant Buildfile: build.xml common: [echo] BuildName: chapter8 [echo] BuildHome: C:\forGlassFishEJB3\glassfish\chapter8 [echo] BuildFile: C:\forGlassFishEJB3\glassfish\chapter8\build.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/chapter8.ear [exec] Command deploy executed successfully with following warning messages: WARNING: [exec] [exec] JDO76614: Deployment encountered SQL Exceptions: [exec] JDO76609: Got SQLException executing statement "CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL, PRIMARY KEY (SEQ_N AME))": java.sql.SQLException: Table/View 'SEQUENCE' already exists in Schema 'APP'. [exec] all: [echo] -----> Creates and deploys all deployable units for the application BUILD SUCCESSFUL Total time: 6 seconds
And the following error message with ant run:-
C:\forGlassFishEJB3\glassfish\chapter8>ant run Buildfile: build.xml common: [echo] BuildName: chapter8 [echo] BuildHome: C:\forGlassFishEJB3\glassfish\chapter8 [echo] BuildFile: C:\forGlassFishEJB3\glassfish\chapter8\build.xml [echo] BuildJVM: 1.6 java-env-check: init: [echo] -----> Initializing project properties run: [echo] Executing client class using C:\EXAMPLES_HOME\glassfish/bin/appclient.bat [exec] Dec 25, 2009 8:34:28 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: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.; nested exception is: [exec] javax.transaction.RollbackException: Transaction marked for rollback. [exec] java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: [exec] java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.; nested exception is: [exec] javax.transaction.RollbackException: Transaction marked for rollback. [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.__BazaarAdmin_Remote_DynamicStub.createBidder(actionbazaar/buslogic/__BazaarAdmin_Remote_DynamicStub.java) [exec] at actionbazaar.buslogic._BazaarAdmin_Wrapper.createBidder(actionbazaar/buslogic/_BazaarAdmin_Wrapper.java) [exec] at actionbazaar.buslogic.BazaarAdminClient.main(BazaarAdminClient.java:19) [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: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for roll back.; nested exception is: [exec] javax.transaction.RollbackException: Transaction marked for rollback. [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 $Proxy96.createBidder(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:1088) [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: javax.transaction.RollbackException: Transaction marked for rollback. [exec] at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:465) [exec] at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:371) [exec] at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3826) [exec] at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3605) [exec] at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1388) [exec] ... 19 more [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.SQLIntegrityConstraintViolationException: INSERT on table 'USERS' caused a violation of foreign key constraint 'FK _USERS_USER_ID' for key (idiot2). The statement has been rolled back. [exec] Error Code: -1 [exec] at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:311) [exec] at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:654) [exec] at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:703) [exec] at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:492) [exec] at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:452) [exec] at oracle.toplink.essentials.internal.sessions.AbstractSession.executeCall(AbstractSession.java:690) [exec] at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228) [exec] at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:214) [exec] at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:346) [exec] at oracle.toplink.essentials.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:191) [exec] at oracle.toplink.essentials.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:205) [exec] at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:564) [exec] at oracle.toplink.essentials.queryframework.InsertObjectQuery.executeCommit(InsertObjectQuery.java:89) [exec] at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(DatabaseQueryMechanism.java:760) [exec] at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(DatabaseQueryMechanism.java:724) [exec] at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.insertObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:6 02) [exec] at oracle.toplink.essentials.queryframework.WriteObjectQuery.executeCommitWithChangeSet(WriteObjectQuery.java:162) [exec] at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:390) [exec] at oracle.toplink.essentials.queryframework.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:109) [exec] at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:628) [exec] at oracle.toplink.essentials.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:555) [exec] at oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:13 8) [exec] at oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:110) [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.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:269) [exec] at oracle.toplink.essentials.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:190) [exec] at oracle.toplink.essentials.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:2668) [exec] at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1044) [exec] at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:496) [exec] at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1126) [exec] at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion(UnitOfWorkImpl.java:2454) [exec] at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:277) [exec] at oracle.toplink.essentials.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:131) [exec] at oracle.toplink.essentials.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:91) [exec] at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:429) [exec] ... 23 more [exec] Caused by: java.sql.SQLIntegrityConstraintViolationException: INSERT on table 'USERS' caused a violation of foreign key constraint 'FK_USERS_US ER_ID' for key (idiot2). The statement has been rolled back. [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.PreparedStatement.executeUpdate(Unknown Source) [exec] at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:647) [exec] ... 58 more [exec] Caused by: org.apache.derby.client.am.SqlException: INSERT on table 'USERS' caused a violation of foreign key constraint 'FK_USERS_USER_ID' for key (idiot2). The statement has been rolled back. [exec] at org.apache.derby.client.am.Statement.completeExecute(Unknown Source) [exec] at org.apache.derby.client.net.NetStatementReply.parseEXCSQLSTTreply(Unknown Source) [exec] at org.apache.derby.client.net.NetStatementReply.readExecute(Unknown Source) [exec] at org.apache.derby.client.net.StatementReply.readExecute(Unknown Source) [exec] at org.apache.derby.client.net.NetPreparedStatement.readExecute_(Unknown Source) [exec] at org.apache.derby.client.am.PreparedStatement.readExecute(Unknown Source) [exec] at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source) [exec] at org.apache.derby.client.am.PreparedStatement.executeUpdateX(Unknown Source) [exec] ... 60 more [exec] javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: [exec] java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.; nested exception is: [exec] javax.transaction.RollbackException: Transaction marked for rollback. [exec] at actionbazaar.buslogic._BazaarAdmin_Wrapper.createBidder(actionbazaar/buslogic/_BazaarAdmin_Wrapper.java) [exec] at actionbazaar.buslogic.BazaarAdminClient.main(BazaarAdminClient.java:19) [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: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.; nested exception is: [exec] javax.transaction.RollbackException: Transaction marked for rollback. [exec] at actionbazaar.buslogic._BazaarAdmin_Wrapper.createBidder(actionbazaar/buslogic/_BazaarAdmin_Wrapper.java) [exec] at actionbazaar.buslogic.BazaarAdminClient.main(BazaarAdminClient.java:19) [exec] ... 8 more BUILD SUCCESSFUL Total time: 7 seconds
Thanks again for your time and kind input,
Naveen Katoch
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Getting error message - chapter 9 of ejb 3 in action using glassfish server 2.1
Problem running ant script chapter 1 of ejb 3 in action with weblogic 10
Getting Error:- Chapter 3 of EJB 3 in action using glassfish server 2.1
creating ejb-jar.xml ??
Getting error - Chapter 4 of Ejb3 in action using glassfish server 2.1
We need your help - Coderanch server fundraiser
More...