This discussion is archived
3 Replies Latest reply: Jun 19, 2013 5:31 AM by bb44c918-345f-478b-8c2b-23291713cfd6 RSS

Intradoc ClassCastException occurred after an update or a checkin of a doc

user596679 Newbie
Currently Being Moderated
Our website (developed in Java) use the oracle.ucm.irdc-11.1.1.jar sdk in order to connect and retrieve documents from the WebCenter and show it in our web application.

In the webcenter content, I update the meta data (a date) using the Content Action> update menu of the Content Information of a specific document.
In our web application, when we try to retrieve the document (which the metadata are now updated) with the “GET_SEARCH_RESULTS” idc service, our web application crash due to an error occurred in the webcenter server :

++Event generated by user 'ILL-CIS-StepING' at host 'CIS'. Unable to retrieve search results. Unable to execute service method 'getSearchResults'. Runtime error: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String [ Details ]++

++An error has occurred. The stack trace below shows more information.++

+!csUserEventMessage,ILL-CIS-StepING,CIS!$!csUnableToRetrieveSearchResults!csUnableToExecMethod,getSearchResults!syServiceRuntime,java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String+
intradoc.common.ServiceException: !csUnableToRetrieveSearchResults!csUnableToExecMethod,getSearchResults
*ScriptStack GET_SEARCH_RESULTS+
+3:getSearchResults,**no captured values**+
at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplementor.java:2115)
at intradoc.server.Service.buildServiceException(Service.java:2326)
at intradoc.server.Service.createServiceExceptionEx(Service.java:2320)
at intradoc.server.Service.createServiceException(Service.java:2315)
at intradoc.server.Service.doCodeEx(Service.java:654)
at intradoc.server.Service.doCode(Service.java:575)
at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1643)
at intradoc.server.Service.doAction(Service.java:547)
at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1458)
at intradoc.server.Service.doActions(Service.java:542)
at intradoc.server.ServiceRequestImplementor.executeActions(ServiceRequestImplementor.java:1391)
at intradoc.server.Service.executeActions(Service.java:528)
at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:737)
at intradoc.server.Service.doRequest(Service.java:1956)
at intradoc.server.ServiceManager.processCommand(ServiceManager.java:437)
at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)
at intradoc.server.IdcServerThread.run(IdcServerThread.java:160)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
at intradoc.search.SearchCacheUtils.checkRowAgainstQueryElementClause(SearchCacheUtils.java:1772)
at intradoc.search.SearchCacheUtils.checkRowAgainstQueryElement(SearchCacheUtils.java:1578)
at intradoc.search.SearchCacheUtils.checkRowAgainstQueryElement(SearchCacheUtils.java:1572)
at intradoc.search.SearchCacheUtils.checkRowAgainstParsedQuery(SearchCacheUtils.java:1529)
at intradoc.search.SearchCacheUtils.checkSatisfiesQuery(SearchCacheUtils.java:1286)
at intradoc.search.SearchCacheUtils.checkAndCaptureDocListChanges(SearchCacheUtils.java:1028)
at intradoc.search.SearchCache.checkCache(SearchCache.java:533)
at intradoc.server.SearchService.getSearchResults(SearchService.java:507)
at sun.reflect.GeneratedMethodAccessor157.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at intradoc.common.IdcMethodHolder.invokeMethod(IdcMethodHolder.java:86)
at intradoc.common.ClassHelperUtils.executeMethodEx(ClassHelperUtils.java:310)
at intradoc.common.ClassHelperUtils.executeMethod(ClassHelperUtils.java:295)
at intradoc.server.Service.doCodeEx(Service.java:620)
+... 15 more+

Here is the query text used :
xLang <substring> `fr` <AND> (xMarket <contains> `0`) <AND> (xUserCategory <contains> `PUB`) <AND> (xInternetValidityDate <= `11/23/2012` <AND> xInternetExpirationDate > `11/23/2012`) <AND> (dDocType <matches> `ABOUT_US`) <AND> ((xFileType <matches> `pdf` <OR> xFileType <matches> `doc` <OR> xFileType <matches> `xls`)) <AND> (dDocTitle <substring> `` <OR> (xKeywords <substring> ``) <OR> (<ftx>{}</ftx>))

In order to do not have this problem error, I need to ask to the administrator to restart the webcenter server or to rebuild the index and in this case the problem disappear.
This problem occurs each time when we modify a metadata (for example : File type, expiration date,etc.) on any document.
Of course, it is not acceptable to reboot the webcenter application each time a check-in/update is done.


Could you please help us on this issue ?

Thank you in avance.
  • 1. Re: Intradoc ClassCastException occurred after an update or a checkin of a doc
    user596679 Newbie
    Currently Being Moderated
    Maybe to help, I precise the use cases that lead to the ClassCastException.

    As previously sent, the query used is :

    xLang <substring> `fr` <AND> (xMarket <contains> `0`) <AND> (xUserCategory <contains> `PUB`) <AND> (xInternetValidityDate <= `28/11/2012` <AND> xInternetExpirationDate > `28/11/2012`) <AND> (dDocType <matches> `ABOUT_US`) <AND> ((xFileType <matches> `pdf` <OR> xFileType <matches> `doc` <OR> xFileType <matches> `xls`)) <AND> (dDocTitle <substring> `` <OR> (xKeywords <substring> ``) <OR> (<ftx>{}</ftx>))

    In our use case, the query returns two results : result1 and result2

    Use case 1
    I change the “fileType” metadata of the document “result1” in order to be out of the result. In this case, I put “fake” as fileType. The query returns only one result : result2 as expected -> OK

    Use case 2
    I change the “fileType” metadata of the document “result1” and I put the original value (“doc”). So, this item should be back in the result. The query raises the “ClassCastException” -> KO

    To be able to query again, I have to launch the “Collection Rebuild Cycle”.
    I relaunch the query again. It returns the two expected items.

    Use case 3
    I make a new check-in of a document. The metadata of this item are filled in order to have this item as result of the query. I launch the query … and the exception “ClassCastException” is raised. -> KO

    To be able to query again, I have to launch the “Collection Rebuild Cycle”.
    I relaunch the query again. It returns the three expected items (including now the newly created item) : result1, result2 and result3

    Use case 4
    I realize a checkout-checkin of the item “result1”. A new release of the document is done without modifying the metadata. The query returns the three expected results : result1, result2 and result3 -> OK

    Use case 5
    I update a metadata of “result1” but in order to let it in the result of the query. For example, I modify the internet expiration date : From 01/01/2015 to 01/01/2020. The query returns the three expected results : result1, result2 and result3 -> OK

    Use case 6
    I update a metadata of “result1” but in order to put it out of the result of the query. For example, I modify the internet expiration date : From 01/01/2020 to 01/01/2000. The query returns the two expected results : result2 and result3 -> OK

    Use case 7
    I update a metadata of “result1” but in order to put it back in the result of the query. For example, I modify the internet expiration date : From 01/01/2000 to 01/01/2020 (the original value). The query raises the “ClassCastException” -> KO

    I hope it can help.

    It is a real blocking point for us.
  • 2. Re: Intradoc ClassCastException occurred after an update or a checkin of a doc
    954786 Newbie
    Currently Being Moderated
    Hi all,

    We are facing exactly same exception through RIDC in webcenter content 11.1.1.6.
    When we call the "GET_SEARCH_RESULT" in RIDC , we have the class cast exception in UCM Server log.
    We found that part of the QueryText which cause the issue is setting dInDate .
    Whenever we check-in a new content and search for it, in most cases it gives us classCastException and in some cases no. but after 6-7 hrs, the same query run with success.
    It is a wierd bug and no pattern to reproduce it.

    It is really really blocking.

    Thanks
    Nazanin
  • 3. Re: Intradoc ClassCastException occurred after an update or a checkin of a doc
    bb44c918-345f-478b-8c2b-23291713cfd6 Newbie
    Currently Being Moderated

    Hi,

     

    Was this issue resolved, if so could you please let me know what was the problem?

     

    Thanks,

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points