Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Oracle sequence problem ... I think ?
I am posting here in the hope that I have hit a simple Oracle configuration
issue - one that is not simple to me !!
I have written a test to perform the same functions twice in the Java reference application - Pet Store (add an AngelFish to a basket, go to checkout, log on, commit purchase, log out).
When I run the test and tell it to run twice sequentially I get the following error on the second commit: (please scoll down for more information)
<18-Apr-02 16:54:16 BST> <Error> <HTTP>
<[WebAppServletContext(1628959,petstore,
/petstore)] Servlet failed with ServletException
javax.servlet.ServletException: MainServlet: unknown exception:
com.sun.j2ee.blu
eprints.petstore.control.exceptions.EStoreAppException
at
com.sun.j2ee.blueprints.petstore.control.web.MainServlet.doProcess(Ma
inServlet.java:125)
at
com.sun.j2ee.blueprints.petstore.control.web.MainServlet.doGet(MainSe
rvlet.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2495)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2204)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Through investigation I have identified that the underlying exception is being thrown from the OrderDAOOracle class in the insertOrder method. I have trapped the SQL statements beign issued and they are identical with the order number being generated with "ordernum.nextval".
Would I be right in thinking I have hit a duplicate key (row?) error and if so anyone care to guess why? Is there a problem with Oracle sequencing - these tests are running sequentially as opposed to in parallel ?
Regards
Ed Received on Thu Apr 18 2002 - 11:16:57 CDT
![]() |
![]() |