CFsearch as datasource

Is there a way to turn CFsearch results into a dynamic
datasource that can be easily used with Spry datasets? I would like
to return a CFsearch result into a Spry table, but am having a
mental block on the possible solution. I've thought of creating a
static XML page from search results, but that sounds clunky. Any
ideas out there?
Thanks,

From the documentation it seems like you should be able to
use <cfcollection action="list"> in conjunction with some
code that converts a CF recordset into XML (I've seen some custom
tags floating around that do that). You'll just have to make sure
you format the XML in a way that will work with Spry (Spry doesn't
play well with too many nested elements).

Similar Messages

  • CFSEARCH Error

    Hey all,
    I am using cfindex and cfsearch to build a simple database searching tool. Most of the time it works, but more often than I'd like my search method fails stating
    "There was a problem executing the cfSearch tag with the following collections.
    Collection (status code): psasmart (-1705)"
    There doesn't seem to be much information on this error, so any help is appreciated.
    It doesn't seem to happen super often, and is normally resolved by simply searching again. It also happens
    most commonly if it is an empty search string.
    Here is my indexing function
         <cffunction name="IndexListings" hint="I update the ColdFusion Verity search index with new listings" returntype="struct">
              <cfset var returnStruct  = structnew()>
              <cfset returnStruct.success = true>
              <cfset returnStruct.message = "Index recreated successfully">
              <cftry>
                   <!--- Select the entire table --->
                   <CFQUERY NAME="Listings" DATASOURCE="#application.dsn#">
                        SELECT  listingType,
                                  listingLocation,
                                  ListingPrice,
                                  listingCreatedDate,
                                  ID,
                                  listingBody,
                                  listingName,
                                  listingMajorType
                        FROM listings
                        where Listingvisible = 1
                        Order By listingCreatedDate desc
                   </CFQUERY>
                   <!--- Index the results --->
                   <CFINDEX COLLECTION="psasmart" category="listingType,listingMajorType" CUSTOM1="listingLocation" custom2="ListingPrice" custom3="listingCreatedDate" custom4="Id" ACTION="refresh" TYPE="CUSTOM" BODY="listingBody" KEY="ID" TITLE="listingName" QUERY="Listings">      
                   <cfset application.lastIndexTime = dateformat(now()) & " " & timeformat(now())>
                   <cfset returnStruct.totalListings = listings.recordCount>
                   <cfcatch type="any">
                        <cfset returnStruct.success = false>
                        <cfset returnStruct.message = cfcatch.message & " " & cfcatch.detail>
                        <cfset sendMessage = SendErrorReport(returnStruct)> 
                   </cfcatch>
              </cftry>
              <cfreturn returnStruct>          
         </cffunction>
    And here is my search function (I just use verity to find matching records and thier ID's, then I query the database
    for further information about those records)
         <cffunction name="Search" hint="I perform a verity search">
              <cfargument name="searchTerm" default="" required="yes" hint="what to search for">
              <cfargument name="orderBy" default="" required="no" hint="How to order the search results">
              <cfargument name="sortOrder" default="asc" required="no" hint="If ordering is requred, accending (asc) or decending (desc)">
              <cfargument name="majorcategory" default="" required="no" hint="Which major category should we limit this search to?">
            <cfargument name="category" default="" required="no" hint="Which category should we limit this search to?">
              <cfset var returnStruct  = structnew()>
              <cfset returnStruct.success = true>
              <cfset returnStruct.message = "Search Executed Successfully">
              <cfset returnStruct.arguments = arguments>
            <cfset arguments.searchTerm = REReplace(arguments.searchTerm,'<[^>]*>','','all')>
              <cftry>          
                   <cfsearch collection="psasmart" name="searchResults" criteria="#arguments.searchTerm#" contextPassages = "1" contextBytes = "300" maxrows = "500" type="internet">
                   <cfset searchResultIDs = valuelist(searchResults.custom4)>
                   <cfquery name="getSearchResultData" datasource="#application.dsn#" cachedwithin="#createtimespan(0,1,0,0)#">
                        Select l.*, i.imageName as thumbNailImage
                        From listings l
                        LEFT OUTER join listingThumbnails i
                        ON l.id = i.ImageListingId
                        Where l.id in (<cfqueryparam list="yes" value="#searchResultIDs#">)
                    <cfif len(arguments.majorcategory) gt 0>
                         and l.listingMajorType = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.majorCategory#">
                    </cfif>
                    <cfif len(arguments.category) gt 0>
                         and l.listingType = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.category#">
                    </cfif>               
                    <cfif len(arguments.orderBy) gt 0>
                         Order By l.#arguments.orderBy# #arguments.sortOrder#
                        <cfelse>
                        Order by l.ListingCreatedDate desc
                    </cfif>   
                   </cfquery>
                   <cfset returnStruct.data = getSearchResultData>
                   <cfset returnStruct.wasSorted = false>
                   <cfcatch type="any">
                        <cfset returnStruct.success = false>
                        <cfset returnStruct.message = cfcatch.message & " " & cfcatch.detail>
                        <cfset sendMessage = SendErrorReport(returnStruct)> 
                   </cfcatch>
              </cftry>
              <cfreturn returnStruct>          
         </cffunction>

    Sure:
    1) Create a batch file (using Notepad but save file as
    "restartCFsearch.bat") to restart the Windows service and make sure
    the CF service account has execute permissions for it (if it's
    running as local system then it will have)
    NET STOP "ColdFusion MX 7 Search Server"
    NET START "ColdFusion MX 7 Search Server"
    2) Optionally create a function which executes the batch file
    (or you could just put the cfexecute directly in the exception
    handler, but creating a function will make it more re-usable):
    <cffunction name="restartCFSearchService"
    returntype="void" access="public" output="false">
    <cfexecute name="[path to your batch file, eg:
    D:\batch\restartCFsearch.bat]" timeout="30"></cfexecute>
    </cffunction>
    3) Wrap your cfsearch tag/function in a try/catch and test
    for the error:
    <cftry>
    <cfsearch... >
    <cfcatch type="SearchEngine">
    <cfif findNoCase("There was a problem executing the
    CFSearch tag",cfcatch.message)>
    <cfset restartCFSearchService()>
    <cfset sleep(3000)><!--- wait 3 seconds for the
    service to come back up --->
    <cfsearch...><!--- re-issue search --->
    <cfelse>
    <cfrethrow>
    </cfif>
    </cfcatch>
    </cftry>
    To pause before re-issuing the search I'm using
    http://www.cflib.org/udf.cfm/sleep
    Hope that helps.

  • cfsearch doubt

    Hello,
    I'm having some trouble with the <cfsearch> tag. I managed to index my database query to my collection, and I can search the data. However, I want to get the field names for the values returned from the search.  Here's an example:
    I have a table called media that has the following columns: name, id, postdate, url, type, user, extension
    After search using cfsearch, how do I get the values of name, id, postdate, url, type, user and extension. Since there are more than 4 fields, I cannot use custom1-custom4 in my cfindex. What can I do to retrieve this data?
    Thanks.

    you need to create advanced search form, you can do that  without cfsearch. Could you please provide your code?
    Hold on! Do you want to search thru all fields in a table or you want to display them? If you only want to display them search for name(of whatever) and
    them use something like this to display your results:
    <cfquery name="test" datasource"yourdatasource">
    SELECT *
    FROM  yourtable
    WHERE NAME = "#URL.NAME#"
    ORDER BY NAME DESC
    </cfquery>
    <cfoutput>#test.field1#</cfoutput>
    <cfoutput>#test.field2#</cfoutput>
    <cfoutput>#test.field3#</cfoutput>
    <cfoutput>#test.field4#</cfoutput>
    <cfoutput>#test.field5#</cfoutput>
    This is simple code, if you need something advanced please let me know.

  • Database connection timeouts and datasource errors

    Connections in the pool randomly die overnight. Stack traces show that for some reason, the evermind driver is being used even though the MySql connection pool is specified.
    Also, the evermind connection pool is saying connections aren't being closed, and the stack trace shows they're being allocated by entity beans that are definitely not left hanging around.
    Sometimes we get non-serializable errors when trying to retrieve the datasource (this is only after the other errors start). Some connections returned from the pool are still good, so the application limps along.
    EJBs and DAOs both use jdbc/SQLServerDSCore.
    Has anyone seen this problem?
    <data-sources>
         <data-source
              class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"
              name="SQLServerDSCore"
              location="jdbc/SQLServerDSCore"
              xa-location="jdbc/xa/SQLServerXACore"
              ejb-location="jdbc/SQLServerDSCore"
              connection-driver="com.mysql.jdbc.Driver"
              min-connections="5"
              username="xxx"
              password="xxx"
              staleness-timeout="3600"
              alive-poll-query="SELECT 1 FROM medispan"
              url="jdbc:mysql://1.2.3.4:3306/dbo?autoReconnect=true&autoReconnectForPools=true&cachePrepStmts=true&is-connection-validation-required=true"
              inactivity-timeout="30"
         >
              <property name="autoReconnect" value="true"/>
              <property name="autoReconnectForPools" value="true"/>
              <property name="is-connection-validation-required" value="true"/>
              <property name="cachePrepStmts" value="true"/>
         </data-source>
    </data-sources>

    Rick,
    OC4J 9.0.4.0.0 - BTW, do you know of any patches?As far as I know, there are no patches for the 9.0.4
    production version of OC4J stand-alone.
    I'm using container managed persistence,It was not clear to me, from your previous post, that you
    are using CMP entity beans.
    I found staleness-timeout and alive-poll-query
    somewhere on a website when trying to track this
    down. Here's four sources:Those sources refer to OrionServer -- and an older version, too, it seems.
    Like all other Oracle products that start out as somebody
    else's -- including, for example, JBuilder (that became "JDeveloper"), Apache Web Server (that became "Oracle HTTP Server") and TopLink -- their development paths diverge, until, eventually, there is absolutely no similarity between them at all. Hence, the latest versions of OC4J and "OrionServer" are so different, that you cannot be sure that something that works for "OrionServer" will work for OC4J.
    I recall reading something, somewhere, sometime about configuring OC4J to use different databases (other than Oracle), but I really don't remember any details (since it was not relevant to me, because we only use Oracle database). In any case, it is possible to use a non-Oracle database with OC4J.
    Good Luck,
    Avi.

  • Possible to change the datasource from a business-view to a Sql Command ?

    Hello,
    When a business view contains a lot of elements it takes a while just to open the report.
    We'd like to keep the BV as the dictionnary, but,
    once the report design completed,
    we'd like to disconnect the business view and replace it by the Sql command which can be seen in the menu option 'show SQL query'.
    Is it possible via the RAS sdk ?
    Did somebody experience this ?
    How to proceed ?
    Thanks a lot
    Alain

    Hi Ted,
    I'm thinking opening a Case for this problem of opening reports based on a big BV.
    We can't really reduce the BV, since it is the dictionnary and we need the whole thing...
    I'm wondering why it is impossible to change the Datasource if the tables and fields underneath are identical.
    Is it impossible to change the fields' mapping ?
    The other solution, as you suggest, is to create a report from scratch, create a new Datasource with the Sql command format, and rebuild the report... I agree it looks like a big job...
    Do you know if it is possible to export the report in XML for instance, change the XML, and then re-import ?
    Thanks for your Help.
    Alain

  • Getting following error while creating a datasource connection with oracle database.

    I have 32 bit oracle server installed in remote server.
    and 64 bit sql server 2008 r2 report server installed, and 64 bit oracle client installed on my report server  while create a new datasource
    in the report server i am getting this error
    Error 
    Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle
    client components installed
    How can i fix this and let me know the reason

    This link will help you out.
    http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/0a38fa00-31de-49de-b68f-4c5a4565e5b1?prof=required
    Milan Das

  • Error while creating datasource

    I am getting this error while creating the datasource on console of html page.
    java.lang.NullPointerException
         at weblogic.management.console.utils.MBeans.getMBeanClassNameFor(MBeans.java:1153)
         at weblogic.management.console.actions.mbean.EditMBeanAction.getMBeanClass(EditMBeanAction.java:210)
         at weblogic.management.console.actions.mbean.EditMBeanAction.getDialogTypeKey(EditMBeanAction.java:188)
         at weblogic.management.console.actions.internal.InternalActionContext.setAction(InternalActionContext.java:158)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:170)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:945)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:332)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5360)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:721)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3043)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2468)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)

    well thankx for the inputs. well but te screen dosent move from tht point. as we enter a datasource name, it gives this error. and we havent logged into anywhr to give the access credentials.
    am wondering how then whts the point in knowing the username and pwd if i give edit datasource .
    thankx

  • Error while adding a datasource to an index

    Hi,
    I am creating an index with a file system repository. I have to create a taxonomy on that index to classify all the documents inside the repository. When i am trying to assign a datasource to the index i am getting the following error
    "The repository needs the properties service to be attached to a classification index"
    Can anybody help me?
    Thanks in Advance
    Prakash

    Hi Prakash,
    what you have to do is to edit the file system repository you want to assign as datasource to the index.
    (Content Management -> Repository Mangers -> File System Repository -> Mark "Your FS Repository" ->  Edit)
    Go through the list of Repository Services (click on Next Page) and activate (mark) the "properties" Repository Service.
    After saving and restarting! the J2EE Engine you should be able to add the datasource to the classification index.
    Hope this helps,
    Robert

  • Error while creating a datasource in planning 9.3.1 on oracle 11.2 database

    I am unable to create datasource in planning 9.3.1 on oracle 11.2 database. I have configure sharedservices and registered planning with shared servers. I am unable to create data source after application deployment and instance creation.
    I am getting the following error,
    Launching Hyperion Configuration Utility Program
    HYPERION_HOME: C:\Hyperion
    In HspDBPropertiesLocationPanel constructor
    In HspDBPropertiesLocationPanel queryEnter
    Resource Bundle is java.util.PropertyResourceBundle@322394
    Product Name in file is PLANNING
    Availability Date is 20051231
    Creating rebind thread to RMI
    Resource Bundle is java.util.PropertyResourceBundle@322394
    Product Name in file is PLANNING
    Availability Date is 20051231
    $$$$$$$$$$$$$ dname is
    Resource Bundle is java.util.PropertyResourceBundle@322394
    Product Name in file is PLANNING
    Availability Date is 20051231
    Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no HspEss
    baseEnv in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at com.hyperion.planning.olap.HspEssbaseEnv.<clinit>(Unknown Source)
    at com.hyperion.planning.olap.HspEssbaseJniOlap.<clinit>(Unknown Source)
    at com.hyperion.planning.HspJSHomeImpl.TestEssConnection(Unknown Source)
    at com.hyperion.planning.HspDSEssbasePanelManager.TestEssConnection(HspD
    SEssbasePanelManager.java:156)
    at com.hyperion.planning.HspDSEssbasePanelManager.queryExit(HspDSEssbase
    PanelManager.java:132)
    at com.hyperion.cis.config.wizard.ProductCustomInputPanel.queryExit(Prod
    uctCustomInputPanel.java:114)
    at com.installshield.wizard.awt.AWTWizardUI.doNext(Unknown Source)
    at com.installshield.wizard.awt.AWTWizardUI.actionPerformed(Unknown Sour
    ce)
    at com.installshield.wizard.swing.SwingWizardUI.actionPerformed(Unknown
    Source)
    at com.installshield.wizard.swing.SwingWizardUI$SwingNavigationControlle
    r.notifyListeners(Unknown Source)
    at com.installshield.wizard.swing.SwingWizardUI$SwingNavigationControlle
    r.actionPerformed(Unknown Source)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
    ce)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    But, My essbase server is up and running. I am able to connect it through EAS.

    It looks like more of an issue with connecting to essbase, usually "java.lang.UnsatisfiedLinkError: no HspEssbaseEnv in java.library.path" means planning has not been installed or deployed correctly, what OS is it running on?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Error while transporting webservice datasources

    Hi all,
    I have created webservice datasources to fetch EP data to BW. and now i am transporting that Datasources from DEV to QA. I have colllected datasources alone in one req. (source system i have created in QA manually and i mapped that with DEV)
    But while transporting i am getting the folllowing error,
    3S3T   Start of the after-import method RS_RSDS_AFTER_IMPORT for object type(s) RSDS (Activation Mode)  
    Error  Screen output without connection to user .                                                                               
    Error when activating DataSource ZANS_MASTER BI7001                                                                               
    Please through some light is there any predefined settings i need to do in QA system?.
    Thanks in advance,
    V.Sen

    Dear All,
    Thanks for your kind reply.
    There are no R/3 Datasources involved. Our BI Cockpit landscape is based upon only BI system. No data transfer to take place between R/3 and BI.
    Secondly, you mean to say that I need to replicate my Source system in Production and then proceed with the transporting of the requests from Dev to Prod.
    But I never did the same in Quality while transporting from Dev. Is it that it might have been done in Quality beforehand by someone ?
    Also, when the Datasources have not been transported to Production (resulting in error) then how can i replicate these datasources in Production ???
    Let me know if I have not understood correctly.
    Many thanks again for your efforts.
    /Shalabh

  • Error while transporting Datasources in Production

    Dear All,
    I have facing a problem while transporting objects pertaining to BI Cockpit in Production.
    Earlier I had transported all the obects (in more than one transports) in Quality (from Development). After testing the objects, I had imported the same number of transports (and in the same order) to Production and now some of the requests have ended in errors like:
    DataSource 0TCTWHMTFM_TEXT does not exist in source system PW1CLNT003 of version A
    Such errors have occured for most of the Datasources.
    Can anyone let me know
    1) Why the transports have failed while importing in Production when similar requests have been transported successfully to Quality.
    2) The possible solution to correct the error.
    Request your kind help to overcome this problem.
    Regards
    Shalabh

    Dear All,
    Thanks for your kind reply.
    There are no R/3 Datasources involved. Our BI Cockpit landscape is based upon only BI system. No data transfer to take place between R/3 and BI.
    Secondly, you mean to say that I need to replicate my Source system in Production and then proceed with the transporting of the requests from Dev to Prod.
    But I never did the same in Quality while transporting from Dev. Is it that it might have been done in Quality beforehand by someone ?
    Also, when the Datasources have not been transported to Production (resulting in error) then how can i replicate these datasources in Production ???
    Let me know if I have not understood correctly.
    Many thanks again for your efforts.
    /Shalabh

  • Error while transporting custom datasource

    Hi All,
    Below is the scenario that was carried out in my project.
    1. Created OHD to load data from a CUBE to Data base Table /BIC/ABC.
    2. Created a custom Datasource ZABC_TEST with the above table.
    3. Activated the DataSource and loaded the data. (Data load successfull. It works fine).
    4. Tried transporting the above. But trows error while transporting the data source.
    Error -- InfoSource ZABC_TEST is not available in source system BITST.
    Let me know what can be done to solve the above error. Please suggest if i have missed out something.
    Thanks in advance.
    Maddy

    HI,
    The problem seems to be occuring since you are transporting both OHD and DS in the same TR request.
    Transport first the DS in a request, then in another request transport the OHD.
    This should resolve the issue.
    hope this helps.
    thanks,
    rahul

  • Error while transporting a WEBservice Datasource

    Hi all,
    I am trying to transport a web service datasource(PI data to BW)  in testing system . But while transporting ,I get the following error  in the logs of my transport request.
    Error generating the Web service /BIC/CQZPI_KPI00002000
    This is not an authorization issue as I have got the required authorizations from the basis team .
    Can anyone please give me some solution to this error.
    Many Thanks in Advance

    Hi.
    Did you checked the following notes to solve this issue?
    1177867  Error while deleting Web service in BI After Import
    1177005  Error while activating/deleting Web service in BI
    1170688  DataSource: Missing replication in transport
    Please check also if Myself connection was correctly set in your system.
    538052     Maintenance of Myself destination in BW.
    Please check if enough authorizations were assigned to user who is
    transporting this request.
    913944-Error RSDS 301 when you activate a Web Service Data
    Please try to check the data format. Check if some fields are mentioned in
    logs and set them to EXTERNAL before the transport.
    Please try also to activate the DataSource in the source system and
    then create a new transport request and transport it.
    I hope I can be helpful.
    Thanks,
    Walter Oliveira.

  • Error while transporting Generic Datasource in R/3

    Hi All,
    I have created a generic datasource(R/3) on a view. As it was in $TMP, I have assigned the datasource, ZABCD, and the view, ZVIEW to a devlopment package and also to a transport request. I released the Transport request and when I tried to import it into Q, it throwed me an error with below messages:
    Extract structure ZOX**** is not active
    The extract structure ZOX**** of the DataSource ZABCD is invalid
    Errors occurred during post-handling RSA2_DSOURCE_AFTER_IMPORT for OSOA L
    The errors affect the following components:
    BC-BW (SAP Business Information Warehouse Extractors)
    The extract structure ZOX**** is the structure used by the datsource. I forgot to assign that to the earlier TR and I think the error is because the structure is missing in the TR. Am I correct?
    How should I deal with it now? DO I need to create a new TR with this structure alone as the earlier TR is already released?
    Thanks,
    RPK.

    As you comment it is possible error was not include the structure in earlier TR.
    You can create, in se09 or se10, an empty TR. In these transactions you have a buttoun with a box drawed. Set focus on your new empty TR and push button.
    Add object from TR transported with error and the missed structure.

  • Error while configuring kodo to lookup a datasource

    We had a working application using EEPersistenceManagerFactory
    I changed the kodo.properties to lookup a non XA JDBC datasource.
    After that the application is working fine (it creates
    ,updates,deletes,finds record in the DB)
    but SystemOut.log has the following error for every operation
    We are using Kodo 2.5.0, Websphere 5.0 and Oracle 8
    How can we avoid getting this error ?.
    We tried to find any property on the Websphere datasource which can be
    altered to avoid this error but no luck.
    Thanks
    Paresh
    [10/7/03 15:30:45:467 IST] 3d8b2d1a MCWrapper E J2CA0081E: Method
    destroy failed while trying to execute method destroy on ManagedConnection
    com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@437f6d23 from resource
    <null>. Caught exception: com.ibm.ws.exception.WsException: DSRA0080E: An
    exception was received by the Data Store Adapter. See original exception
    message: Cannot call 'cleanup' on a ManagedConnection while it is still in
    a transaction..
         at
    com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:222)
         at
    com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:172)
         at
    com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java:182)
         at
    com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.cleanupTransactions(WSRdbManagedConnectionImpl.java:1826)
         at
    com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.destroy(WSRdbManagedConnectionImpl.java:1389)
         at com.ibm.ejs.j2c.MCWrapper.destroy(MCWrapper.java:1032)
         at
    com.ibm.ejs.j2c.poolmanager.FreePool.returnToFreePool(FreePool.java:259)
         at com.ibm.ejs.j2c.poolmanager.PoolManager.release(PoolManager.java:777)
         at com.ibm.ejs.j2c.MCWrapper.releaseToPoolManager(MCWrapper.java:1304)
         at
    com.ibm.ejs.j2c.ConnectionEventListener.connectionClosed(ConnectionEventListener.java:195)
         at
    com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.processConnectionClosedEvent(WSRdbManagedConnectionImpl.java:843)
         at
    com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.closeWrapper(WSJdbcConnection.java:569)
         at com.ibm.ws.rsadapter.jdbc.WSJdbcObject.close(WSJdbcObject.java:132)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.close(SQLExecutionManagerImpl.java:814)
         at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.release(JDBCStoreManager.java(Inlined
    Compiled Code))
         at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java(Compiled
    Code))
         at
    com.solarmetric.kodo.runtime.StateManagerImpl.loadFields(StateManagerImpl.java(Compiled
    Code))
         at
    com.solarmetric.kodo.runtime.StateManagerImpl.preSerialize(StateManagerImpl.java:784)
         at com.paresh.core.vo.Release.jdoPreSerialize(Release.java)
         at com.paresh.core.vo.Release.writeObject(Release.java)
         at java.lang.reflect.Method.invoke(Native Method)
         at
    com.ibm.rmi.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:703)
         at com.ibm.rmi.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:671)
         at
    com.ibm.rmi.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:146)
         at
    com.ibm.rmi.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:217)
         at com.ibm.rmi.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:144)
         at com.ibm.rmi.iiop.CDROutputStream.write_value(CDROutputStream.java:1590)
         at com.ibm.rmi.iiop.CDROutputStream.write_value(CDROutputStream.java:1107)
         at
    com.paresh.core.interfaces._EJSRemoteStatelessValidation_da16513c_Tie.findCorrectionAction(_EJSRemoteStatelessValidation_da16513c_Tie.java:309)
         at
    com.paresh.core.interfaces._EJSRemoteStatelessValidation_da16513c_Tie._invoke(_EJSRemoteStatelessValidation_da16513c_Tie.java:104)
         at
    com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:582)
         at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:437)
         at com.ibm.rmi.iiop.ORB.process(ORB.java:320)
         at com.ibm.CORBA.iiop.ORB.process(ORB.java:1544)
         at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2063)
         at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63)
         at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)
    kodo.properties
    com.solarmetric.kodo.LicenseKey=
    #com.solarmetric.kodo.ee.ManagedRuntimeProperties=TransactionManagerName=java:/TransactionManager
    com.solarmetric.kodo.ee.ManagedRuntimeProperties=TransactionManagerName=TransactionFactory
    TransactionManagerMethod=com.ibm.ejs.jts.jta.TransactionManagerFactory.getTransactionManager
    #com.solarmetric.kodo.ee.ManagedRuntimeClass=com.solarmetric.kodo.ee.InvocationManagedRuntime
    com.solarmetric.kodo.ee.ManagedRuntimeClass=com.solarmetric.kodo.ee.AutomaticManagedRuntime
    #javax.jdo.PersistenceManagerFactoryClass=com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory
    javax.jdo.PersistenceManagerFactoryClass=com.solarmetric.kodo.impl.jdbc.ee.EEPersistenceManagerFactory
    javax.jdo.option.ConnectionFactoryName=ds/kodo/DataSource1
    javax.jdo.option.Optimistic=true
    javax.jdo.option.RetainValues=true
    javax.jdo.option.NontransactionalRead=true
    #com.solarmetric.kodo.DataCacheClass=com.solarmetric.kodo.runtime.datacache.plugins.CacheImpl
    # Changing these to a non-zero value will dramatically increase
    # performance, but will cause in-memory databases such as Hypersonic
    # SQL to never exit when your main() method exits, as the pooled
    # connections in the in-memory database will cause a daemon thread to
    # remain running.
    javax.jdo.option.MinPool=5
    javax.jdo.option.MaxPool=10

    We do have a makeTransientAll() before the object returns from Session
    Bean.
    We also tried the JCA path
    After installing the JCA RAR and doing a lookup for
    PersistenceManagetFactory the same code is not throwing any exception.
    The exception is thrown only if datasource is used.
    Thanks
    Paresh
    Marc Prud'hommeaux wrote:
    Paresh-
    It looks like you are returning a collection of instances from an EJB,
    which will cause them to be serialized. The serialization is happening
    outside the context of a transaction, and Kodo needs to obtain a
    connection. Websphere seems to not like that.
    You have a few options:
    1. Call makeTransientAll() on all the instances before you return them
    from your bean methods
    2. Manually instantiate all the fields yourself before sending them
    back. You could use a bogus ObjectOutputStream to do this.
    3. In 3.0, you can use the new detach() API to detach the instances
    before sending them back to the client.
    In article <[email protected]>, Paresh wrote:
    We had a working application using EEPersistenceManagerFactory
    I changed the kodo.properties to lookup a non XA JDBC datasource.
    After that the application is working fine (it creates
    ,updates,deletes,finds record in the DB)
    but SystemOut.log has the following error for every operation
    We are using Kodo 2.5.0, Websphere 5.0 and Oracle 8
    How can we avoid getting this error ?.
    We tried to find any property on the Websphere datasource which can be
    altered to avoid this error but no luck.
    Thanks
    Paresh
    [10/7/03 15:30:45:467 IST] 3d8b2d1a MCWrapper E J2CA0081E: Method
    destroy failed while trying to execute method destroy on ManagedConnection
    com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@437f6d23 from resource
    <null>. Caught exception: com.ibm.ws.exception.WsException: DSRA0080E: An
    exception was received by the Data Store Adapter. See original exception
    message: Cannot call 'cleanup' on a ManagedConnection while it is still in
    a transaction..
         at
    com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:222)
         at
    com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:172)
         at
    com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java:182)
         at
    com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.cleanupTransactions(WSRdbManagedConnectionImpl.java:1826)
         at
    com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.destroy(WSRdbManagedConnectionImpl.java:1389)
         at com.ibm.ejs.j2c.MCWrapper.destroy(MCWrapper.java:1032)
         at
    com.ibm.ejs.j2c.poolmanager.FreePool.returnToFreePool(FreePool.java:259)
         at com.ibm.ejs.j2c.poolmanager.PoolManager.release(PoolManager.java:777)
         at com.ibm.ejs.j2c.MCWrapper.releaseToPoolManager(MCWrapper.java:1304)
         at
    com.ibm.ejs.j2c.ConnectionEventListener.connectionClosed(ConnectionEventListener.java:195)
         at
    com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.processConnectionClosedEvent(WSRdbManagedConnectionImpl.java:843)
         at
    com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.closeWrapper(WSJdbcConnection.java:569)
         at com.ibm.ws.rsadapter.jdbc.WSJdbcObject.close(WSJdbcObject.java:132)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.close(SQLExecutionManagerImpl.java:814)
         at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.release(JDBCStoreManager.java(Inlined
    Compiled Code))
         at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java(Compiled
    Code))
         at
    com.solarmetric.kodo.runtime.StateManagerImpl.loadFields(StateManagerImpl.java(Compiled
    Code))
         at
    com.solarmetric.kodo.runtime.StateManagerImpl.preSerialize(StateManagerImpl.java:784)
         at com.paresh.core.vo.Release.jdoPreSerialize(Release.java)
         at com.paresh.core.vo.Release.writeObject(Release.java)
         at java.lang.reflect.Method.invoke(Native Method)
         at
    com.ibm.rmi.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:703)
         at com.ibm.rmi.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:671)
         at
    com.ibm.rmi.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:146)
         at
    com.ibm.rmi.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:217)
         at com.ibm.rmi.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:144)
         at com.ibm.rmi.iiop.CDROutputStream.write_value(CDROutputStream.java:1590)
         at com.ibm.rmi.iiop.CDROutputStream.write_value(CDROutputStream.java:1107)
         at
    com.paresh.core.interfaces._EJSRemoteStatelessValidation_da16513c_Tie.findCorrectionAction(_EJSRemoteStatelessValidation_da16513c_Tie.java:309)
         at
    com.paresh.core.interfaces._EJSRemoteStatelessValidation_da16513c_Tie._invoke(_EJSRemoteStatelessValidation_da16513c_Tie.java:104)
         at
    com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:582)
         at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:437)
         at com.ibm.rmi.iiop.ORB.process(ORB.java:320)
         at com.ibm.CORBA.iiop.ORB.process(ORB.java:1544)
         at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2063)
         at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63)
         at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)
    kodo.properties
    com.solarmetric.kodo.LicenseKey=
    #com.solarmetric.kodo.ee.ManagedRuntimeProperties=TransactionManagerName=java:/TransactionManager
    >>
    >
    com.solarmetric.kodo.ee.ManagedRuntimeProperties=TransactionManagerName=TransactionFactory
    >>
    >
    TransactionManagerMethod=com.ibm.ejs.jts.jta.TransactionManagerFactory.getTransactionManager
    >>
    >>
    >
    #com.solarmetric.kodo.ee.ManagedRuntimeClass=com.solarmetric.kodo.ee.InvocationManagedRuntime
    >>
    >
    com.solarmetric.kodo.ee.ManagedRuntimeClass=com.solarmetric.kodo.ee.AutomaticManagedRuntime
    >>
    >>
    >
    #javax.jdo.PersistenceManagerFactoryClass=com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory
    >>
    >
    javax.jdo.PersistenceManagerFactoryClass=com.solarmetric.kodo.impl.jdbc.ee.EEPersistenceManagerFactory
    >>
    javax.jdo.option.ConnectionFactoryName=ds/kodo/DataSource1
    javax.jdo.option.Optimistic=true
    javax.jdo.option.RetainValues=true
    javax.jdo.option.NontransactionalRead=true
    #com.solarmetric.kodo.DataCacheClass=com.solarmetric.kodo.runtime.datacache.plugins.CacheImpl
    >>
    >>
    # Changing these to a non-zero value will dramatically increase
    # performance, but will cause in-memory databases such as Hypersonic
    # SQL to never exit when your main() method exits, as the pooled
    # connections in the in-memory database will cause a daemon thread to
    # remain running.
    javax.jdo.option.MinPool=5
    javax.jdo.option.MaxPool=10
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

Maybe you are looking for

  • Desk top ikon won't open

    I have been given a 12ins Power book which I'm trying to set up for my daughter. the Hard Disck Ikon on the desk top won't open nor will another item I copied over from a memory stick. Unfortunately I copied all the Applications into the HD disc ikon

  • How can I sort two columns?

    I've got two columns of text (names of people, actually) in a Numbers spreadsheet. I've selected all the cells and made sure they are "text" format. I cannot figure out how to sort (alphabetically) the two columns independent of one another. I just w

  • Intangible item management & SAP best practice

    All, I am wondering what is the best way to handle intangible flow within SAP. As a definition, intangible Items are any kind of assets or products that cannot be touched. As an exemple, it can be software / License / License keys. In this question,

  • Batch selection at the time of 543 movement

    Hi All, This is regarding subcontracting process. Whiles preparing 57f4 challan, we made a 543 movement with specific batch, now while taking GRN for same PO we need to select batch for 543 movement which system shows as FIFO defined in batch search

  • Exporting Quark to Acrobat. Acrobat enlarges page size, how do I export to Adobe Acrobat so that it keeps the page size the same?

    Exporting Quark to Acrobat. Acrobat enlarges page size, how do I export to Adobe Acrobat so that it keeps the page size the same?