Unit of Work and cache times

Hello!
I've got a question concerning read queries on a Unit of Work.
In my specific case I'm executing a ReadAllQuery on the Unit of Work getting about 7000 objects. The Performance Profiler is recording a cache time of about 900 milliseconds. If I execute this query on the Session the Profiler records a cache time of about 300 milliseconds.
Now I'd like to know what is happening within the Unit of Work? Why does it takes longer to maintain the objects in the cache? I know that the Unit of Work spends more time overall because of the registering of the objects.
Thanks

The UnitOfWork is a transaction abstraction beyond the shared cache. When you read through a UnitOfWork you still perform the same operations on the shared cache and then pull the working copies into the UnitOfWork's transactional cache. This means that your 300 ms case is really just a sub-set of what is happening in your 900 ms case.
The recommended approach is to read in the objects that you plan to use read-only through the session and then register those you may modify with a UnitOfWork. This allows you to control and optimize the transactional nature of TopLink. Reading everything through a UnitOfWork may be less complex but that complexity comes with a performance cost.
You may want to read through our UnitOfWork primer. It explains this much better then I can here.
http://www.oracle.com/technology/products/ias/toplink/technical/unitOfWorkWP.pdf
Doug

Similar Messages

  • Differences between Commit work, Logical Unit of Work and Roll back work

    Hi all,
    Can any one explain me in details what is the difference between Commit Work, Logical Unit of Work and Roll back work. Pls explain by providing some example.
    and also explain me where and when these are used and what are the importance of using these.
    Thanks in advance.
    Regards
    Ramana Prasad.T

    Hi Ramana Prasad,
    A Logical Unit of Work (LUW or database transaction) is an inseparable sequence of database operations which must be executed either in its entirety or not at all. For the database system, it thus constitutes a unit.
    LUWs help to guarantee database integrity. When an LUW has been successfully concluded, the database is once again in a correct state. If, however, an error occurs within an LUW, all database changes made since the beginning of the LUW are canceled and the database is then in the same state as before the LUW started.
    An LUW begins
    o each time you start a transaction
    o when the database changes of the previous LUW have been confirmed (database
    commit) or
    o when the database changes of the previous LUW have been cancelled (database rollback)
    An LUW ends
    o when the database changes have been confirmed (database commit) or
    o when the database changes have been canceled (database rollback)
    COMMIT WORK.
    Executes a database commit and thus closes a logical processing unit or Logical Unit of Work ( LUW ) (see also Transaction processing ). This means that
    all database changes are made irrevocable and cannot be reversed with ROLLBACK WORK and
    all database locks are released.
    COMMIT WORK also
    calls the subroutines specified by PERFORM ... ON COMMIT * executes asynchronously any update requests (see CALL FUNCTION ... IN UPDATE TASK ) specified in these subroutines or started just before,
    processes the function modules specified in CALL FUNCTION ... IN BACKGROUND TASK ,
    cancels all existing locks (see SAP locking concept ) if no update requests exist,
    closes all open database cursors (see OPEN CURSOR ) and
    resets the time slice counter to 0.
    COMMIT WORK belongs to the Open SQL command set.
    Return code value
    The SY-SUBRC is set to 0.
    ROLLBACK WORK.
    Closes a logical processing unit by reversing all database changes made since the last COMMIT .
    You use this statement if you cannot be certain that all the database changes have been executed correctly.
    The update routines are not performed.
    ROLLBACK WORK belongs to the Open SQL command set.
    Note
    If the ROLLBACK statement occurs within a SELECT loop, the processing cannot continue because the database cursor is invalid. After the ROLLBACK statement, you should therefore ensure that all SELECT processing has been explicitly terminated.
    <b>Plz. Avoid Duplicate Threads.</b>
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • Hello,  I have a problem, my computer is interrupted very often CAN I changed Maveric when working and 15 times a day is very disturbing and nustiu what I do is not only blocking and restarts

    hello,
    I have a problem, my computer is interrupted very often CAN I changed Maveric when working and 15 times a day is very disturbing and nustiu what I do is not only blocking and restarts

    If you are getting Kernel Panics, this article (available in many languages) will explain how to find the reports. You can post the latest one here for Readers to help you:
    How to Log a Kernel Panic

  • Finger sensor not working and some time iphone 6 screen also hang/pause  for few seconds

    In my iphone6 finger sensor not working and some time iphone 6 screen also hang/pause  for few seconds.

    Try cleaning the sensor, remove all fingerprints from the settings, and the start over in recognizing prints. There are a number of things that make prints hard to read, sweat, lotion, dirty hands, etc.

  • My macbook is loaded with microsoft work and every time I try and open the program I get an error reading and it will not open.  Powerpoint and the other applications still respond!

    my macbook is loaded with microsoft word for macs and every time I try and open the program I get an error reading and it will not open. This is what it says:
    The application Microsof Word quit eunexpectedly.  Powerpoint and the other applications still respond!

    The joys of Microsoft!
    Maybe the preferences file is corrupted.  You should be able to find the Word preferences file in the folder:
    your user name/Library/Preferences
    Its name is com.microsoft.Word.plist
    I suggest you drag this another folder and try Word again. 
    If that doesn't work then you might find clearing the cache files will fix the problem.  You can do this manually but I never bother. Instead I use a program like Snow Leopard Cache Cleaner (shareware) or Onyx (free). These programs do lots of other maintenance jobs so it's worth having at least one of them.
    Bob

  • My App Store has not been working and every time I hit it its just blank what do I do

    DDear Apple my App Store has not been working and i need to know what to do because I need to download things and I cant every time I touch the button it's just blank

    iOS: Resolving update and restore alert messages
    For error -50: See error 13 and 14: 
    Error 13 and 14: These errors are typically resolved by performing one or more of the steps listed below:
    Perform USB isolation troubleshooting, including trying a different USB port directly on the computer. See the advanced steps below for USB troubleshooting.
    Put a USB 2.0 hub between the device and the computer.
    Try a different USB 30-pin dock-connector cable.
    Eliminate third-party security software conflicts.
    There may be third-party software installed that modifies your default packet size in Windows by inserting one or more TcpWindowSize entries into your registry. Your default packet size being set incorrectly can cause this error. Contact the manufacturer of the software that installed the packet-size modification for assistance. Or, follow this article by Microsoft: How to reset Internet Protocol (TCP/IP) to reset the packet size back to the default for Windows.
    Connect your computer directly to your Internet source, bypassing any routers, hubs, or switches. You may need to restart your computer and modem to get online.
    Try to restore from another known-good computer and network.

  • Ios 6 orientation doesn't work and boot time increases. How to solve these issues for dummy? I don't understand code and strings suggested by others.

    I just upgraded from ios 5 to ios 6 on my ipad2. Now orientation doesn't work properly. Boot time increase, it takes longer time to boot. Is there any configuration to solve these issues? I can't understand the explanation with code and strings found on google to solve the orientation issue. Any easy configuration for dummy ?

    It supports well for ios 5. I couldn't remember (5.x.x) exactly but I always keeps update for ios5 and the abnormality starts when I upgraded to ios 6.

  • I cannot sync or restore my ipod. Sometimes it works and at times it doesn't. All I get is error -42408? Please help.

    I did try updating everything and it worked ONCE! Once I plugged in my ipod a second time error -42408 keeps popping up.

    See the appropriate section of this Apple support document under specific error codes.
    http://support.apple.com/kb/TS3297
    B-rock

  • I have problem to connect iChat. Sometime work and some time not working. When it was not working, there was a message on screen and said the mobile be server was not working. I needed to turn off computer and restarted the computer. Then it might. work

    To whom it may help,
           I use my iChat to do video chat with my granddaughter. I used to do iChat without any problem to connect with her in New York. However, After Mobil Me account closed, I accounted connection problems frequently. Sometime, I had to turn-off my computer then re-started the computer to make it work again. . When I had this problem to connect on iChat (the Mac did not allow me to choose "available"), the poped out window message said that " the iChat lost the Mobil Me account [email protected]" "The server connection was unexplected disconnect". Do you know what is my problem? My Apple ID for iCloud and previous Mobil Me account should be [email protected] I am no longer using [email protected] for Mobil Me e-mail address. My current iCloud e-mail address is [email protected] is no longer of using [email protected] account for my e-mail. If this is the problem, please let me know how to remove the [email protected] account from your system. Thanks!
    David

    SadisticIron wrote:
    i just baught my first iphone and it is a jalbroken
    Buzz! Thank you for playing!
    Discussing jailbroken devices is forbidden here by the Terms of Service.
    You can not get help here.

  • Help me save all my hard work and wasted time.

    i am trying to do the OS 5 update on all my devices. I did iPad, now I'm on to the iPhone. Question: on my phone I have almost all the stars in Stupid Zombies. On my iPad I did not. How can I keep the phone version? I can't bear to lose all those stars!!!

    Were you previously syncing them with your computer? Sync is 2 way. If you were already syncing them, any changes made on the phone will be reflected on your computer.

  • TS3212 Hi my itunes has stopped working but every time i try to reinstall it it doesn't work properly and asks me if i want to totally remove itunes or replace/repair. I choose replace/repair but it just closes immediately and says it was interrupted...cl

    Hi my itune on my PC  has stopped working and every time i try to reinstall it it doesn't work properly and asks me if i want to totally remove itunes or replace/repair. I choose replace/repair but it just closes immediately and says it was interrupted...does anyone have any clues?

    Hi Shawn and Jason,
    I have the same problem. One workaround is to clean your disk before running LiveCycledesigner. After you have cleaned up your disk LiveCycleDesigner will start a few times and you can work with it.
    It is an Vista problem. LiveCycleDesigner 8.1 which is just released had fixed the problem so you can also download 8.1
    greetings Fons

  • Insertion using objects and update using queries in a single unit of work

    HI All,
    I have a set of objects that i want to insert and then perform some update queries ( direct queries ) on the inserted data in the same transaction. but when i register the objects and execute the update SQL's on the same data in a same unit of work, the update statements are executed first and then the inserts are happening, I've also tried with child unit of work and parent unit of work but the result is the same.
    Can any one suggest a way to do object insertion and sql updates in a single transaction, Thanks in advance
    Regards,
    Sai Krishna

    The UnitOfWork is an abstraction for the physical database query. By default nothing is actually written into the database until the UnitOfWork commits. This means making updates to new objects involves modifying them in-memory and then the updated values will be included in the INSERT during commit.
    If you are having difficulty finding the newly created objects you can enable the query conforming capabilities to have modified and new objects included in query comparisons without requiring them to first be written to the database.
    Doug

  • Having a problem sending email, I have tried all the fixes, but no luck, actually it works at times and most times it does not. What more can I try.

    Issues send email from my macbook Pro, it is a web based email, and I can send it by logging into the webmail site. The odd part is that sometimes it just works and most times it does not. I go through and make some random changes and and then go back and change it back and it wold work for that email, and then a few minutes later I try to send another and does not work, try doing the same and this time it does not work, getting a little frustrated, what else can I do, except chage back to a windows based laptop?

    If you're having trouble sending, but not receiving, mail, it's likely due to your outgoing (SMPT) server settings.
    Which webmail service are you using? Some provide some good guidelines on setting up your account, some not so good.
    Clinton

  • Unit Of work upgrade issue 9.0.3- 10.1.4

    Hi,
    I recently upgraded from Toplink 9.0.3 to Toplink 10.1.3. I changed nothing in my code except the deployment java descriptor to use the new classes implemented instead of the deprecated classes. I also used the new TypeConversions for my CLOBs and BLOBs. Everything worked fine in my unit tests but then once I'd deployed the application into production my users kept on getting an irregular error. I can't reproduce the error myself as its so irregular. I have tracked it down to when my users enter a clob/blob of data into the database. The strange thing is that I close the unit of work and even test if its still active and I get false as an answer but somehow when I execute on the session it uses the UnitOfWork which has expired for some reason. I have checked my code and can't find anything that is changed.
    All my code basically always checks whether a UOW is active and if it is not it uses the session to execute the query. Here is a java code extract:
    if ( isTxActive() ) {
    objectResults = uow.readAllObjects(Class.forName(objectType), expression);
    objectResults = uow.registerAllObjects(objectResults);
    } else
    objectResults = session.readAllObjects(Class.forName(objectType), expression);
    I use the following setup:
    - Oracle 9i database
    - JDK 1.5
    - Oracle JDBC Thin Driver version - 10.1.0.2.0
    I have tried the following:
    - Specified my OraclePlatform i.e. Oracle9Platform
    - Tried playing around with the SQL String binding
    - Double checked my type conversions
    Below is my logfile output and also my login parameters and extract of one of my descriptors.
    Any help would be appreciated.
    I was wondering if there is a timeout on the UnitOfWork or if its multi-threaded hence my application doesn't wait for my CLOB to finish being written?
    Thanks in advance,
    Paula
    2006-05-24 11:32:05,870 (toplink) DEBUG - execute_query
    2006-05-24 11:32:05,871 (toplink) DEBUG - execute_query
    2006-05-24 11:32:05,871 (toplink) DEBUG - DatabaseAccessor(connected)--INSERT INTO chebi.AUTOGEN_STRUCTURES (ID, STRUCTURE_ID) VALUES (12599, 19211)
    2006-05-24 11:32:05,874 (toplink) DEBUG - execute_query
    2006-05-24 11:32:05,875 (toplink) DEBUG - execute_query
    2006-05-24 11:32:05,875 (toplink) DEBUG - DatabaseAccessor(connected)--INSERT INTO chebi.DEFAULT_STRUCTURES (ID, STRUCTURE_ID) VALUES (6968, 19213)
    2006-05-24 11:32:05,885 (toplink) DEBUG - execute_query
    2006-05-24 11:32:05,886 (toplink) DEBUG - execute_query
    2006-05-24 11:32:05,886 (toplink) DEBUG - DatabaseAccessor(connected)--INSERT INTO chebi.IMAGE_PRECOMPUTES (ID, FORMAT, IMAGE, STRUCTURE_ID) VALUES (7208, 'p
    ng', empty_blob(), 19213)
    2006-05-24 11:32:05,898 (toplink) DEBUG - DatabaseAccessor(connected)--SELECT IMAGE FROM chebi.IMAGE_PRECOMPUTES WHERE (ID = 7208) FOR UPDATE
    2006-05-24 11:32:05,905 (toplink) DEBUG - write_BLOB
    2006-05-24 11:32:05,905 (toplink) DEBUG - DatabaseAccessor(connected)--commit_transaction
    2006-05-24 11:32:05,915 (toplink) DEBUG - end_unit_of_work_commit
    2006-05-24 11:32:05,915 (toplink) DEBUG - release_unit_of_work
    2006-05-24 11:32:05,915 (controller.DatabaseAction) DEBUG - ModifyStructureAction_postprocess: empty method
    2006-05-24 11:32:05,915 (controller.DatabaseAction) DEBUG - ModifyStructureAction_findSuccess: start method
    2006-05-24 11:32:05,915 (controller.DatabaseAction) DEBUG - ModifyStructureAction_findSuccess: preparing forward ( set form | release lock | reset token )
    2006-05-24 11:32:05,915 (controller.DatabaseAction) DEBUG - ModifyStructureAction_findSuccess: forward to searchId
    2006-05-24 11:32:05,917 (toplink.ToplinkDAO) DEBUG - find(String objectType, String col, String val): start method
    2006-05-24 11:32:05,917 (toplink.ToplinkDAO) DEBUG - isTxActive: start method
    2006-05-24 11:32:05,917 (toplink.ToplinkDAO) DEBUG - isTxActive: false
    2006-05-24 11:32:05,917 (toplink) DEBUG - execute_query
    2006-05-24 11:32:05,917 (toplink) DEBUG - DatabaseAccessor(connected)--SELECT ID, SOURCE, ASCII_NAME, STATUS, CREATED_ON, DEFINITION, MODIFIED_BY, NAME, MODI
    FIED_ON, CREATED_BY, CHEBI_ACCESSION, MERGE_TYPE, PARENT_ID FROM chebi.COMPOUNDS WHERE (ID LIKE 6126)
    2006-05-24 11:32:05,980 (toplink) DEBUG - execute_query
    2006-05-24 11:32:06,046 (handlers.DefaultExceptionHandler) ERROR - Exception [TOPLINK-6027] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): ora
    cle.toplink.exceptions.QueryException
    Exception Description: Query sent to a unactivated UnitOfWork.
    Query: ReadAllQuery(uk.ac.ebi.chebi.compounds.model.CompoundName)
    uk.ac.ebi.chebi.compounds.application.curator2.exceptions.BeanUtilException: Exception [TOPLINK-6027] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060
    118)): oracle.toplink.exceptions.QueryException
    Exception Description: Query sent to a unactivated UnitOfWork.
    Query: ReadAllQuery(uk.ac.ebi.chebi.compounds.model.CompoundName)
    LOGIN:
    public void applyLogin () {
    DatabaseLogin login = new DatabaseLogin();
    login.usePlatform( ToplinkDeploymentHelper.getPlatform(options) );
    login.setDriverClassName(options.getDriver());
    login.setConnectionString(options.getDbUrl());
    login.setUserName(options.getDbUserName());
    login.setPassword(options.getDbPassword());
    // Configuration properties.
    // login.setUsesNativeSequencing(true);
    // login.setSequencePreallocationSize(100);
    // Replace with
    login.setDefaultSequence(new NativeSequence("", 1));
    login.setShouldBindAllParameters(false);
    login.setShouldCacheAllStatements(false);
    // String binding is used when the SQL string might be too large to
    // incorporate in the Oracle Thin driver. It will give an exception of string literal
    // too long. Hence string binding should be turned on for long strings such
    // as long names
    login.setUsesStringBinding(true);
    login.useStringBinding( );
    // This specifies for large bytes to use binding to prevent the same problem
    // above and improve performance
    login.setUsesByteArrayBinding(true);
    if ( login.shouldUseByteArrayBinding() ) { // Can only be used with binding.
    login.setUsesStreamsForBinding(false);
    login.setShouldForceFieldNamesToUpperCase(false);
    login.setShouldOptimizeDataConversion(true);
    login.setShouldTrimStrings(true);
    login.setUsesBatchWriting(false);
    if ( login.shouldUseBatchWriting() ) { // Can only be used with batch writing.
    login.setUsesJDBCBatchWriting(true);
    login.setUsesExternalConnectionPooling(false);
    login.setUsesExternalTransactionController(false);
    setLogin(login);
    ImagePrecompute descriptor:
    public ClassDescriptor buildImagePrecomputeDescriptor () {
    ClassDescriptor descriptor = new ClassDescriptor();
    descriptor.setJavaClass(uk.ac.ebi.chebi.compounds.model.ImagePrecompute.class);
    descriptor.addTableName( options.getDbSchemaName().concat(".").concat("IMAGE_PRECOMPUTES") );
    descriptor.addPrimaryKeyFieldName("IMAGE_PRECOMPUTES.ID");
    descriptor.useSoftCacheWeakIdentityMap();
    descriptor.setIdentityMapSize(50);
    descriptor.useRemoteNoIdentityMap();
    //descriptor.useRemoteSoftCacheWeakIdentityMap();
    //descriptor.setRemoteIdentityMapSize(100);
    descriptor.setSequenceNumberFieldName("IMAGE_PRECOMPUTES.ID");
    descriptor.setSequenceNumberName("image_precompute_sequence");
    descriptor.setAlias("ImagePrecomputes");
    descriptor.getQueryManager().checkCacheForDoesExist();
    DirectToFieldMapping idMapping = new DirectToFieldMapping();
    idMapping.setAttributeName("id");
    idMapping.setFieldName("IMAGE_PRECOMPUTES.ID");
    descriptor.addMapping(idMapping);
    OneToOneMapping structureMapping = new OneToOneMapping();
    structureMapping.setAttributeName("structure");
    structureMapping.setReferenceClass(uk.ac.ebi.chebi.compounds.model.Structure.class);
    structureMapping.dontUseIndirection();
    structureMapping.addForeignKeyFieldName("IMAGE_PRECOMPUTES.STRUCTURE_ID", "STRUCTURES.ID");
    descriptor.addMapping(structureMapping);
    DirectToFieldMapping imageMapping = new DirectToFieldMapping();
    imageMapping.setAttributeName("image");
    imageMapping.setFieldName("IMAGE_PRECOMPUTES.IMAGE");
    TypeConversionConverter imageMappingConverter = new TypeConversionConverter(imageMapping);
    imageMappingConverter.setObjectClass(byte[].class);
    imageMappingConverter.setDataClass(java.sql.Blob.class);
    imageMapping.setConverter(imageMappingConverter);
    descriptor.addMapping(imageMapping);
    DirectToFieldMapping formatMapping = new DirectToFieldMapping();
    formatMapping.setAttributeName("format");
    formatMapping.setFieldName("IMAGE_PRECOMPUTES.FORMAT");
    descriptor.addMapping(formatMapping);
    return descriptor;
    Message was edited by:
    pmatos

    Hi,
    Thanks for replying.
    I use log4j to log my toplink info so that I can write it to a file so that is why I have no session info. If you think it is will be useful then I will try to include it in my tool so that it can be reproduced.
    In the mean time here is the stacktrace:
    Exception Description: Query sent to a unactivated UnitOfWork.
    Query: ReadAllQuery(uk.ac.ebi.chebi.compounds.model.CompoundName)
    uk.ac.ebi.chebi.compounds.application.curator2.exceptions.BeanUtilException: Exception [TOPLINK-6027] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.QueryException
    Exception Description: Query sent to a unactivated UnitOfWork.
    Query: ReadAllQuery(uk.ac.ebi.chebi.compounds.model.CompoundName)
         at uk.ac.ebi.chebi.compounds.application.curator2.controller.helper.BeanAssembler.populateCompoundBean(Unknown Source)
         at uk.ac.ebi.chebi.compounds.application.curator2.controller.search.SearchIdAction.loadCompound(Unknown Source)
         at uk.ac.ebi.chebi.compounds.application.curator2.controller.search.SearchIdAction.executeLogic(Unknown Source)
         at uk.ac.ebi.chebi.compounds.application.curator2.controller.BaseAction.execute(Unknown Source)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
         at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
         at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261)
         at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
         at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:316)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: Exception [TOPLINK-6027] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.QueryException
    Exception Description: Query sent to a unactivated UnitOfWork.
    Query: ReadAllQuery(uk.ac.ebi.chebi.compounds.model.CompoundName)
         at oracle.toplink.exceptions.QueryException.querySentToInactiveUnitOfWork(QueryException.java:816)
         at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2530)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:981)
         at oracle.toplink.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:62)
         at oracle.toplink.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:55)
         at oracle.toplink.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:61)
         at oracle.toplink.indirection.IndirectList.buildDelegate(IndirectList.java:184)
         at oracle.toplink.indirection.IndirectList.getDelegate(IndirectList.java:307)
         at oracle.toplink.indirection.IndirectList.size(IndirectList.java:632)
         at java.util.ArrayList.<init>(ArrayList.java:133)
         at uk.ac.ebi.chebi.compounds.model.Compound.getAllCompoundNameList(Unknown Source)
         at uk.ac.ebi.chebi.compounds.application.curator2.controller.helper.BeanAssembler.populateAllNames(Unknown Source)
         ... 51 more

  • Getting Unit Of Work without JSP context

    We are developing an application using Toplink and ADF Datacontrols. We have timer (which starts right after deploy) which reads data from magnetic card reader and stores them into database (via Toplink). Our main problem is getting Unit Of Work (server session). If user interacts with application via jsp pages, obtaining uow is done from TopLinkDataControl (getAssociatedUnitOfWork()). But timer lives on its own, it has no jsp pages to get context from.
    We know one solution - getting server session from toplink descriptor (absolute path needed) - XMLProjectReader.read("c:\\...\\toplink-deployment-descriptor.xml"). Is there another way to create Unit Of Work for our timer in order to last whole application existence? Thanks.

    I was wrong, when I thought, that XMLProjectReader.read() with absolute path works. Your solution seems to be similar, with the same result. I'll describe my problem more closely:
    - Our web apllication consists of 2 projects - Model and ViewController. Each has set the classpath pointing to classes of the opposite project.
    - The only way, that I know of starting a Clock (from Model, Runnable) without creating JSP page is instatiating it in some servlet's init() method. (Servlet has set 'Load This Servlet When the Web App is Strted" in WEB.XML).
    - When I try in my clock to create UnitOfWork by XMLProjectReader.read("c:\\...\\toplink-deployment-descriptor.xml"), I get this error:
    EXCEPTION [TOPLINK-3007] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.ConversionException
    EXCEPTION DESCRIPTION: The Object [mypackage.MyClass], of class[class java.lang.String] could not be converted to [class java.lang.Class]. Please ensure that the class [class java.lang.Class] is on the CLASSPATH. You may need to use alternate
    API passing in the appropriate class loader as required, or setting it
    on the default ConversionManager/
    INTERNAL EXCEPTION: java.lang.ClassNotFoundException: mypackage.MyClass
    - mypackage.MyClass is one of many classes from Model, mapped in toplink-deployment-descriptor.xml. It is in classpath of ViewController.
    - For the time being, our application runs in JDeveloper, it will be deployed to OracleAS 10g.
    Either somebody please help me how to solve above error or maybe suggest how to start my clock together with application deployment (no jsp context).
    Thanks.

Maybe you are looking for

  • PDA Coldboot  whit Creme 328

    Hi all, we are trying to do a Coldboot in the device Intermec CN3 using SAP MI 25 SP 18 Client and JVM Creme 'CrEme328 ARM CE50 PPC'. The first step was using the manufacturer jar file 'Device.jar', we instance in the servlet, a object of the class:

  • Keyfigure value by comparing 2 date fields, in the query designer.

    Hi all, Could any one please intimate, how to display the key figure result with the comparison of 2 date fields. We are having "Completed Date" say(CDATE) and "Deadline Date"(DDATE) values in the report as time characteristics, dervied from the CRM

  • No problems to report!

    Because I see people with problems with Aperture, I just want to say, I've been using Aperture for professional wedding, concert, and personal work, editing since it was first introduced. I have had as many as 60,000 images in the library, and had no

  • Why is iTunes music not available in the Philippines anymore?

    I remember back in 2007, iTunes music was available in the Philippines. I mean, I can access it but haven't tried downloading anything. Can anyone shed light on this?

  • Adding Supported Libraries in standalone-derived OS.

    Hi All, I am creating a derived OS package from the standalone BSP. The overall BSP tree is created and builds fine. I get all expected standalone BSP files plus the OS files on top of it. The problem is that in the BSP settings Dialog, I don't get t