ClassCastException with Collection.contains query?

Did I do something wrong? I am getting this ClassCastException but no
indication of which class it is
Member has collection of Position - positions
Position has a not null OrgUnit - orgUnit, which has string property
compositeKey
Extent ext = pm.getExtent(Member.class, true);
Query q = pm.newQuery(ext, "positions.contains(pPos) and
(pPos.orgUnit.compositeKey >= \"1.2\" && pPos.orgUnit.compositeKey <
\"1.2A\")"
q.declareVariables(Position.class.getName() + " pPos");
return new ArrayList((Collection)q.execute());
com.solarmetric.kodo.runtime.UserException: The given filter string
"positions.contains(pPos) and (pPos.orgUnit.compositeKey >= "1.2" &&
pPos.orgUnit.compositeKey < "1.2A")" is not valid. Make sure all
parentheses are properly matched and that the filter uses proper Java
syntax.
NestedThrowables:
java.lang.ClassCastException
     at com.solarmetric.kodo.query.FilterParser.parse(FilterParser.java:206)
     at
com.solarmetric.kodo.query.QueryImpl$DatastoreQueryExecutor.(QueryImpl.java:
1527)
     at
com.solarmetric.kodo.query.QueryImpl$QueryExecutionManager.getQueryExecutor(
QueryImpl.java:1358)
     at com.solarmetric.kodo.query.QueryImpl.internalCompile(QueryImpl.java:469)
     at
com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:672)
     at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:540)
     at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:490)

nested exception is
NestedThrowablesStackTrace:
java.lang.ClassCastException
     at com.solarmetric.kodo.query.FilterParser.getValue(FilterParser.java:829)
     at com.solarmetric.kodo.query.FilterParser.eval(FilterParser.java:721)
     at
com.solarmetric.kodo.query.FilterParser.getExpression(FilterParser.java:841)
     at com.solarmetric.kodo.query.FilterParser.parse(FilterParser.java:198)
     at
com.solarmetric.kodo.query.QueryImpl$DatastoreQueryExecutor.(QueryImpl.java:
1527)
     at
com.solarmetric.kodo.query.QueryImpl$QueryExecutionManager.getQueryExecutor(
QueryImpl.java:1358)
     at com.solarmetric.kodo.query.QueryImpl.internalCompile(QueryImpl.java:469)
     at
com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:672)
     at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:540)
     at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:490)
     at
peacetech.gao.usorg.web.USOrgController.searchMembers(USOrgController.java:2
71)
     at
"Alex Roytman" <[email protected]> wrote in message
news:[email protected]...
Did I do something wrong? I am getting this ClassCastException but no
indication of which class it is
Member has collection of Position - positions
Position has a not null OrgUnit - orgUnit, which has string property
compositeKey
Extent ext = pm.getExtent(Member.class, true);
Query q = pm.newQuery(ext, "positions.contains(pPos) and
(pPos.orgUnit.compositeKey >= \"1.2\" && pPos.orgUnit.compositeKey <
\"1.2A\")"
q.declareVariables(Position.class.getName() + " pPos");
return new ArrayList((Collection)q.execute());
com.solarmetric.kodo.runtime.UserException: The given filter string
"positions.contains(pPos) and (pPos.orgUnit.compositeKey >= "1.2" &&
pPos.orgUnit.compositeKey < "1.2A")" is not valid. Make sure all
parentheses are properly matched and that the filter uses proper Java
syntax.
NestedThrowables:
java.lang.ClassCastException
at com.solarmetric.kodo.query.FilterParser.parse(FilterParser.java:206)
at
com.solarmetric.kodo.query.QueryImpl$DatastoreQueryExecutor.(QueryImpl.java:
1527)
at
com.solarmetric.kodo.query.QueryImpl$QueryExecutionManager.getQueryExecutor(
QueryImpl.java:1358)
atcom.solarmetric.kodo.query.QueryImpl.internalCompile(QueryImpl.java:469)
at
com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:672)
at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:540)
at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:490)

Similar Messages

  • Oracle Text contain query limit with 9i

    The Oracle Text contain query is defined as this:
    CONTAINS(
    [schema.]column,
    text_query VARCHAR2
    [,label NUMBER])
    RETURN NUMBER;
    Is the size limit of text_query 4000 bytes with 9i? Is it increased with 10g or is it accepting CLOB in 10g?
    I always got the error: "ORA-01460: unimplemented or unreasonable conversion requested" when I do the following where p_var was dynamically passed with size of more than 4000 bytes:
    p_statement varchar2(20000);
    p_var varchar2(8000);
    p_statement := select count(*) from dewey_table where contains(concat, :x)>0;
    open m_cursor for p_statement using p_var;
    Thanks very much,
    Kevin

    The limit is definitely 4000 characters in 9i and the 10g documentation shows no change in the calling spec for that parameter.

  • Problems with OLE Container in QUERY

    Hi all,
    I have problem with OLE Container when I am trying to retrieve data from the database. Inserting is no problem and commit is done. I am doing it with
    initialize_container('block.ole_object','C:\test.doc');
    I have only one column of BLOB type and it is last in the block as it was suggested somewhere on the forum.
    When I am trying to retrieve the already inserted data I get error with the following
    Description:
    FRM-40505: Oracle ERROR: unable to perform query and CTRL+F1 says the following:
    ORA-00932: inconsistent data types: expected got
    The forms and the database are as follow:
    Forms [32 Bit] Version 6.0.8.24.1 (Production)
    Oracle Database 10g Enterprise Edition Release 10.1.0.4.2 - Production
    I need immediate help!!!

    This may be related to the 10g database, I'm not sure as there is no way for me to test it. I know that it works with a 9i database.
    One thing to check is to make sure that you don't have the FORMS60_DISABLE_DESCRIBE set to 1 within the Oracle registry.
    If this doesn't work, your only option might be to use a LONG RAW instead of a BLOB column type in the database.

  • Refresh problem with collection

    Hello, apologize my English, I have got problem with refresh collections. Follow:
    1) I have got two classes which have got dependency together.
    2) First class has got collection of objects from second class.
    3) I call query "findXXX" which fill collection first class.
    4) I create new object second class and again call query "findXXX" to get actual collection. But collection contain old values a I have to close and open web browser to get actual data.
    I think It is problem with TopLink cache, but I do not know how solve this.
    Can you help me, please?

    The cached data is probably stale.
    There are many ways to solve this. (see the caching section of the docs)
    - there is a refresh option on the query
    - you can set a descriptor to be isolated (Cache.shared=false)
    - you can set a descriptor to always refresh
    - there is a cache invalidation option on descriptor
    - there is a cache synchronization option on session
    If the cache is stale, but the database was not accessed outside the application, it may be that your application is not maintaining relationships correctly. You must ensure you set both sides of a bi-directional relationship.
    -- James : http://www.eclipselink.org

  • Issue in executing contains Query(Oracle 11g Enterprise E on Linux RHEL 4

    Oracle Version: 11.1.0.6.0
    We are facing problem in executing contains Query :
    1.When length of string inside contains clause goes beyond 4000 it gives error ORA-01704: string literal too long
    2.We try to modify query by breaking it into multiple contains clause but it was not giving good performance (performance degrades as number of contains clauses increases.)It seems accessing same index multiple times becoming costly and taking more time. (We can see same domain Index has been accessed 3 times for 3 contains clause ()
    3.We used multiple varchar(4000) type bind variable in single contains clause but giving error
         ORA-29902: error in executing ODCIIndexStart() routine
         ORA-01489: result of string concatenation is too long
    4.We used bind variable of type clob but giving error
    Error:
    ORA-29902: error in executing ODCIIndexStart() routine
         ORA-20000: Oracle Text error:
         DRG-50857: oracle error in drexrstart_clob
    I read from article
    http://www.oracle.com/technology/products/text/pdf/ot11g_new_features.pdf
    That we don’t need to modified query as we had to do with SDATA(as we are doing in above examples) and optimizer will realize that query can be satisfied by the text index and will “push down” the filtering of rows into the text index processor rather than doing table access for filtering on sdata column but when I tried to write that query it was doing table access to filter for filter by column.
    My Questions:
    a.     Is it possible as mentioned in above point(point number 5) that we don’t need to write SDATA query in contains clause and optimizer will use composite index automatically.
    b.     Is there any workaround for using string literal > 4000 char in contains clause.
    c.     Why performance degrades lineally when using multiple contains clause.
    d.     Can we use in clause in SDATA and write query like this:
    i.     SDATA(queryid in ( 'q1',’q2’))
    /* Table */
    create table ContentStore (ResourceID raw(16), QueryID VARCHAR2(38),IFID VARCHAR2(38),ISTimeStamp number,ISProtocolName VARCHAR2(100),ismimecontenttype varchar2(100),ISToBeDisplayed number(1),IndexedMetaText CLOB)
    /* Index */
    create index idxMeta on ContentStore (IndexedMetaText) indextype is ctxsys.context filter by queryid,IFID,istimestamp,isprotocolname,ismimecontenttype,resourceid,istobedisplayed order by istimestamp desc parameters('filter ctxsys.null_filter section group GRP_system2 sync(every "sysdate+1/(24*4)" MEMORY 209715200 PARALLEL 2) storage my_text_storage memory 209715200')parallel 2
    /* GRP_system2*/
    begin
    ctx_ddl.create_section_group('GRP_system2', 'BASIC_SECTION_GROUP');
    ctx_ddl.add_field_section('GRP_system2', 'FILENAME', 'FILENAME');
    ctx_ddl.add_field_section('GRP_system2', 'ISIPSrcIP', 'ISIPSrcIP');
    ctx_ddl.add_field_section('GRP_system2', 'ISProxyUserIP', 'ISProxyUserIP');
    ctx_ddl.add_field_section('GRP_system2', 'isipdestip', 'isipdestip');
    end;
    /* 1.When length of string inside contains clause goes beyond 4000 it gives
         error ORA-01704: string literal too long */
    select indexedmetatext from ContentStore where rowid in ( select oraclerowid from ( select rowid as oraclerowid from ContentStore where contains(indexedmetatext,'((68.142.91.152 within isipsrcip) or (68.142.91.152 within isproxyuserip) or (68.142.91.152 within isipdestip)) and ((sdata(queryid = ''a51f216a-b211-4b59-89d4-6fcce58a8517'')) or (sdata(queryid = ''c7d7fdb3-e532-42f1-a8b4-450771fc763f'')) or (sdata(queryid = ''7746f95a-01ba-4318-991a-35c2a8a0c73d'')) or (sdata(queryid = ''b0d339d2-ada9-485b-b752-79920a589340'')) or (sdata(queryid = ''33083cc8-7ed0-4a67-81f0-de1f3d673db2'')) or (sdata(queryid = ''0475dea9-288b-4be6-815e-751c98c25f2b'')) or (sdata(queryid = ''8cfb62f4-2bac-4da6-a2c2-84e409f5a810'')) or (sdata(queryid = ''afbf17a7-4170-45f4-9b66-de3860de93d7'')) or (sdata(queryid = ''750a7b1c-db61-4f87-b78f-505bc73aa5df'')) or (sdata(queryid = ''debc06f3-51a8-4278-9d38-f316dfb6340c'')) or (sdata(queryid = ''d2d8d8a8-b691-439f-b6de-618825aad152'')) or (sdata(queryid = ''f6a3515a-4c7b-48d0-8d46-f62541525cd0'')) or (sdata(queryid = ''bef5c527-5e78-494f-832c-12b3967f22cc'')) or (sdata(queryid = ''638a4029-c4bf-42ef-87bc-2cd4a3977dd1'')) or (sdata(queryid = ''1ce38c22-fd80-4d0f-b9ab-1a09941c5809'')) or (sdata(queryid = ''7bbbcc66-f19d-4758-bdd8-2796da1e26fe'')) or (sdata(queryid = ''d3e96050-ab5e-48b7-9445-d884167c8ae9'')) or (sdata(queryid = ''eaf93ce1-fbd8-4bb6-9fb1-12c337878c72'')) or (sdata(queryid = ''ef1ce7ce-9b4a-4f10-9c91-7256f513c709'')) or (sdata(queryid = ''46bf5cda-ada3-41f2-92b0-174ac29c5808'')) or (sdata(queryid = ''59136e92-147f-41c4-ac75-79d921268714'')) or (sdata(queryid = ''fb2382b2-6496-4c9f-a427-2f6db3b9fd16'')) or (sdata(queryid = ''531b3790-ed50-4b83-a0d0-eabfed2b6701'')) or (sdata(queryid = ''4908b148-2432-4041-947c-31ff8e10646c'')) or (sdata(queryid = ''82007d26-d526-42c9-a8d0-5b75e7f08b90'')) or (sdata(queryid = ''002735e8-6886-4bb4-a732-8a9d04165837'')) or (sdata(queryid = ''43f25cba-1d90-4cc2-84d1-a8719c5b1c9f'')) or (sdata(queryid = ''99d9027f-948b-4bc7-9a44-3092d6b29580'')) or (sdata(queryid = ''24221285-ea64-4e14-8c08-a173ec1b7fd9'')) or (sdata(queryid = ''47ad81d7-75cb-4787-91ab-c2bc5c5e1aaa'')) or (sdata(queryid = ''4ff2846f-6d70-4f9b-a5bf-317263c0ccc5'')) or (sdata(queryid = ''c1f5fbe7-72d1-499d-8d72-4aa21a79c97e'')) or (sdata(queryid = ''356f12c5-a769-478d-b57b-8a063be8ee8e'')) or (sdata(queryid = ''f6181853-2e16-4bce-88c0-6602bc853935'')) or (sdata(queryid = ''890f80e9-f3dd-4862-a55c-4f76569df360'')) or (sdata(queryid = ''5e9df138-8377-4841-92de-49bf6ed378a5'')) or (sdata(queryid = ''600b4dfd-e379-4754-8d06-873b593dbd14'')) or (sdata(queryid = ''af1476ac-3742-4272-bc97-584b1bbe3e2b'')) or (sdata(queryid = ''c2eb4e4c-2d09-4be8-b6ba-f1440349ed5a'')) or (sdata(queryid = ''2b819cdb-0941-48fd-8b93-dd1f661933b3'')) or (sdata(queryid = ''dfa094c9-c48c-4ca1-ad06-ead4f1a9d146'')) or (sdata(queryid = ''b1222061-acaf-4e85-80e1-00af07df962c'')) or (sdata(queryid = ''219b0c7b-266e-455b-b7ca-4f760976253c'')) or (sdata(queryid = ''2396f1e3-28f8-451b-a114-29390cec0cf3'')) or (sdata(queryid = ''c7d7fdb3-e532-42f1-a8b4-450771fc763f'')) or (sdata(queryid = ''7746f95a-01ba-4318-991a-35c2a8a0c73d'')) or (sdata(queryid = ''b0d339d2-ada9-485b-b752-79920a589340'')) or (sdata(queryid = ''33083cc8-7ed0-4a67-81f0-de1f3d673db2'')) or (sdata(queryid = ''0475dea9-288b-4be6-815e-751c98c25f2b'')) or (sdata(queryid = ''8cfb62f4-2bac-4da6-a2c2-84e409f5a810'')) or (sdata(queryid = ''afbf17a7-4170-45f4-9b66-de3860de93d7'')) or (sdata(queryid = ''750a7b1c-db61-4f87-b78f-505bc73aa5df'')) or (sdata(queryid = ''debc06f3-51a8-4278-9d38-f316dfb6340c'')) or (sdata(queryid = ''d2d8d8a8-b691-439f-b6de-618825aad152'')) or (sdata(queryid = ''f6a3515a-4c7b-48d0-8d46-f62541525cd0'')) or (sdata(queryid = ''bef5c527-5e78-494f-832c-12b3967f22cc'')) or (sdata(queryid = ''638a4029-c4bf-42ef-87bc-2cd4a3977dd1'')) or (sdata(queryid = ''1ce38c22-fd80-4d0f-b9ab-1a09941c5809'')) or (sdata(queryid = ''7bbbcc66-f19d-4758-bdd8-2796da1e26fe'')) or (sdata(queryid = ''d3e96050-ab5e-48b7-9445-d884167c8ae9'')) or (sdata(queryid = ''eaf93ce1-fbd8-4bb6-9fb1-12c337878c72'')) or (sdata(queryid = ''ef1ce7ce-9b4a-4f10-9c91-7256f513c709'')) or (sdata(queryid = ''46bf5cda-ada3-41f2-92b0-174ac29c5808'')) or (sdata(queryid = ''59136e92-147f-41c4-ac75-79d921268714'')) or (sdata(queryid = ''fb2382b2-6496-4c9f-a427-2f6db3b9fd16'')) or (sdata(queryid = ''531b3790-ed50-4b83-a0d0-eabfed2b6701'')) or (sdata(queryid = ''2396f1e3-28f8-451b-a114-29390cec0cf3''))) and (sdata(istobedisplayed = 1)) and (sdata(istimestamp >= 1245283200)) and (sdata(istimestamp < 1245369600)) and ((sdata(IFID = ''1eeb7036-cd84-4e4d-be90-e720c7db4470'')))') > 0
    order by istimestamp desc ) where rownum <= 250)
    /* 2.We try to modify query by breaking it into multiple contains clause but it was not giving good performance (performance degrades as number of contains clauses increases.)
    Problem: - Performance of below query degrades linearly as number of contains clause for same column increases.
    Execution plan :
    It seems accessing same index multiple times becoming costly and taking more time. (We can see same domain Index has been accessed 3 times for 3 contains clause ()
    select indexedmetatext from ContentStore where rowid in ( select oraclerowid from ( select rowid as oraclerowid from ContentStore where
    contains(indexedmetatext,'((68.142.91.152 within isipsrcip) or (68.142.91.152 within isproxyuserip) or (68.142.91.152 within isipdestip)) and ((sdata(queryid = ''a51f216a-b211-4b59-89d4-6fcce58a8517'')) or (sdata(queryid = ''c7d7fdb3-e532-42f1-a8b4-450771fc763f'')) or (sdata(queryid = ''7746f95a-01ba-4318-991a-35c2a8a0c73d'')) or (sdata(queryid = ''b0d339d2-ada9-485b-b752-79920a589340'')) or (sdata(queryid = ''33083cc8-7ed0-4a67-81f0-de1f3d673db2'')) or (sdata(queryid = ''0475dea9-288b-4be6-815e-751c98c25f2b'')) or (sdata(queryid = ''8cfb62f4-2bac-4da6-a2c2-84e409f5a810'')) or (sdata(queryid = ''afbf17a7-4170-45f4-9b66-de3860de93d7'')) or (sdata(queryid = ''750a7b1c-db61-4f87-b78f-505bc73aa5df'')) or (sdata(queryid = ''debc06f3-51a8-4278-9d38-f316dfb6340c'')) or (sdata(queryid = ''d2d8d8a8-b691-439f-b6de-618825aad152'')) or (sdata(queryid = ''f6a3515a-4c7b-48d0-8d46-f62541525cd0'')) or (sdata(queryid = ''bef5c527-5e78-494f-832c-12b3967f22cc'')) or (sdata(queryid = ''638a4029-c4bf-42ef-87bc-2cd4a3977dd1'')) or (sdata(queryid = ''1ce38c22-fd80-4d0f-b9ab-1a09941c5809'')) or (sdata(queryid = ''7bbbcc66-f19d-4758-bdd8-2796da1e26fe'')) or (sdata(queryid = ''d3e96050-ab5e-48b7-9445-d884167c8ae9'')) or (sdata(queryid = ''eaf93ce1-fbd8-4bb6-9fb1-12c337878c72'')) or (sdata(queryid = ''ef1ce7ce-9b4a-4f10-9c91-7256f513c709'')) or (sdata(queryid = ''46bf5cda-ada3-41f2-92b0-174ac29c5808'')) or (sdata(queryid = ''59136e92-147f-41c4-ac75-79d921268714'')) or (sdata(queryid = ''fb2382b2-6496-4c9f-a427-2f6db3b9fd16'')) or (sdata(queryid = ''531b3790-ed50-4b83-a0d0-eabfed2b6701'')) or (sdata(queryid = ''4908b148-2432-4041-947c-31ff8e10646c'')) or (sdata(queryid = ''82007d26-d526-42c9-a8d0-5b75e7f08b90'')) or (sdata(queryid = ''002735e8-6886-4bb4-a732-8a9d04165837'')) or (sdata(queryid = ''43f25cba-1d90-4cc2-84d1-a8719c5b1c9f'')) or (sdata(queryid = ''99d9027f-948b-4bc7-9a44-3092d6b29580'')) or (sdata(queryid = ''24221285-ea64-4e14-8c08-a173ec1b7fd9'')) or (sdata(queryid = ''47ad81d7-75cb-4787-91ab-c2bc5c5e1aaa'')) or (sdata(queryid = ''4ff2846f-6d70-4f9b-a5bf-317263c0ccc5'')) or (sdata(queryid = ''c1f5fbe7-72d1-499d-8d72-4aa21a79c97e'')) or (sdata(queryid = ''356f12c5-a769-478d-b57b-8a063be8ee8e'')) or (sdata(queryid = ''f6181853-2e16-4bce-88c0-6602bc853935'')) or (sdata(queryid = ''890f80e9-f3dd-4862-a55c-4f76569df360'')) or (sdata(queryid = ''5e9df138-8377-4841-92de-49bf6ed378a5'')) or (sdata(queryid = ''600b4dfd-e379-4754-8d06-873b593dbd14'')) or (sdata(queryid = ''af1476ac-3742-4272-bc97-584b1bbe3e2b'')) or (sdata(queryid = ''c2eb4e4c-2d09-4be8-b6ba-f1440349ed5a'')) or (sdata(queryid = ''2b819cdb-0941-48fd-8b93-dd1f661933b3'')) or (sdata(queryid = ''dfa094c9-c48c-4ca1-ad06-ead4f1a9d146'')) or (sdata(queryid = ''b1222061-acaf-4e85-80e1-00af07df962c'')) or (sdata(queryid = ''219b0c7b-266e-455b-b7ca-4f760976253c'')) or (sdata(queryid = ''2396f1e3-28f8-451b-a114-29390cec0cf3''))) and (sdata(istobedisplayed = 1)) and (sdata(istimestamp >= 1245283200)) and (sdata(istimestamp < 1245369600)) and ((sdata(IFID = ''1eeb7036-cd84-4e4d-be90-e720c7db4470'')))') > 0
    or
    contains(indexedmetatext,'((68.142.91.152 within isipsrcip) or (68.142.91.152 within isproxyuserip) or (68.142.91.152 within isipdestip)) and ((sdata(queryid = ''f22c0b85-2e72-4450-92b7-8f9864c2517a'')) or (sdata(queryid = ''dbc6111b-5fef-4925-93f0-ecf94aa2305b'')) or (sdata(queryid = ''5d737150-3c55-4582-8b2e-8039615b8e69'')) or (sdata(queryid = ''fc8bf42c-2c7a-4506-aa3a-89266ef09ceb'')) or (sdata(queryid = ''7d3f7561-ba99-49fd-9492-214d9f571831'')) or (sdata(queryid = ''73110ce8-6930-4044-90f7-9c5d27bc0b10'')) or (sdata(queryid = ''d1c975a6-607d-4334-a84c-cc63f68bda3a'')) or (sdata(queryid = ''11fd0d2a-540d-4de0-852a-75f1b841b262'')) or (sdata(queryid = ''0dbfd826-497e-4283-8fc6-210c631c4a3e'')) or (sdata(queryid = ''eb2fd3d3-3b14-4092-a373-edd5448802c2'')) or (sdata(queryid = ''a3b69f62-560b-4883-8bd8-d8225af075b4'')) or (sdata(queryid = ''8596dc3e-c062-4527-9df6-e2c6aa10187d'')) or (sdata(queryid = ''5ce0dea4-b005-4185-9a05-7e91f14c7a8a'')) or (sdata(queryid = ''27eb925f-6f0c-4e27-9b57-91d78de703df'')) or (sdata(queryid = ''53b63124-caf4-4e71-ac5b-0e323d2805cb'')) or (sdata(queryid = ''f3dea938-a547-4510-8c24-25e04fa11ec4'')) or (sdata(queryid = ''5d8ebe7d-224b-4731-a1f2-ef1e3b409579'')) or (sdata(queryid = ''69c8dc53-031a-4069-a9e5-89f28cb7a7e0'')) or (sdata(queryid = ''2f65dc5e-63f6-4904-95f8-94c8983931a9'')) or (sdata(queryid = ''9ce16005-5b3b-4691-a624-5a7835e9e982'')) or (sdata(queryid = ''e5f133c5-f8d3-4905-b4db-ceba89476e7d'')) or (sdata(queryid = ''27dd1a53-a158-46ea-b38d-31a57bd7154e'')) or (sdata(queryid = ''cc335826-5e5e-4d4c-9406-2050717bea5d'')) or (sdata(queryid = ''e1ca6d4d-0005-43ec-a121-5574b37231ec'')) or (sdata(queryid = ''4be550f1-8e0a-4748-8186-50228531751d'')) or (sdata(queryid = ''8637ff63-3d0d-4451-9e40-b890d197f6cd'')) or (sdata(queryid = ''5f664e9e-b72f-4ae7-b69d-081ab7873146'')) or (sdata(queryid = ''baecc6fb-e9cf-41df-9fa4-1793b510d474'')) or (sdata(queryid = ''fa27ba4c-4ab8-4bd0-8725-a03c4666dcde'')) or (sdata(queryid = ''918bfb52-7323-4046-b96a-4ef905687dbb'')) or (sdata(queryid = ''3faad930-81c6-421b-84aa-81a9cfdc2c8b'')) or (sdata(queryid = ''7dc5033d-3a27-4058-885a-d103e73328f2'')) or (sdata(queryid = ''8eb4a0ce-654b-42f0-a868-7f7fdb483a13'')) or (sdata(queryid = ''1b44713f-6cbf-4b49-b851-5a500b221c27'')) or (sdata(queryid = ''11febb09-9106-4b92-a43d-cb71696adc90'')) or (sdata(queryid = ''1d84ca10-375e-4e17-a1c0-03515e1cfe5b'')) or (sdata(queryid = ''9cf1f3fd-136c-4abb-8319-6f6c6ddc514c'')) or (sdata(queryid = ''24f5347a-ff20-4245-a4dc-eb2f8c918c91'')) or (sdata(queryid = ''2640ef3c-8a20-4f28-92df-0bc19b058d91'')) or (sdata(queryid = ''af3d0817-0d40-4adb-9655-a5460805a7eb'')) or (sdata(queryid = ''77b86c41-3afc-4c9c-9432-d7a1ee979af2'')) or (sdata(queryid = ''2a26f0d8-1162-4f34-be48-65b409abef28'')) or (sdata(queryid = ''649810b8-0d7b-47ab-8433-8e9bba88583d'')) or (sdata(queryid = ''c4f853ef-cd7c-436d-a16d-03d49681bee6'')) or (sdata(queryid = ''5c1896ce-06af-406c-bfbd-40d2349171bd'')) or (sdata(queryid = ''8d9fe822-f720-4ee5-a80d-552edd778f82'')) or (sdata(queryid = ''f30220c6-5638-47ec-ad98-4768ee299232'')) or (sdata(queryid = ''3faf5d0b-e3c0-4b68-8244-e07334c17326''))) and (sdata(istobedisplayed = 1)) and (sdata(istimestamp >= 1245283200)) and (sdata(istimestamp < 1245369600)) and ((sdata(IFID = ''1eeb7036-cd84-4e4d-be90-e720c7db4470'')))') > 0
    or
    contains(indexedmetatext,'((68.142.91.152 within isipsrcip) or (68.142.91.152 within isproxyuserip) or (68.142.91.152 within isipdestip)) and ((sdata(queryid = ''c3662b10-98fc-453d-86e1-0c81fe3bb038'')) or (sdata(queryid = ''2b4e7f6e-7871-45eb-b046-bfd4f5d2d84c'')) or (sdata(queryid = ''5af44897-0bc9-4307-bcb1-7f07750e1e25'')) or (sdata(queryid = ''2b57feb3-1681-48db-9856-5d23d69de605'')) or (sdata(queryid = ''47c3939e-d46d-4c7f-9a42-305634642a72'')) or (sdata(queryid = ''476a04ad-6be3-459b-8ab1-6e270416add6'')) or (sdata(queryid = ''61be42b4-11d6-4ff9-a06d-e896690d7fd4'')) or (sdata(queryid = ''97a00e72-2e7d-4c02-b41b-d9d1601bc08c'')) or (sdata(queryid = ''8739fefa-c015-4912-999e-cd9524dffedb'')) or (sdata(queryid = ''61054068-5892-4aaf-ab31-9e6301de9808'')) or (sdata(queryid = ''741a5302-aadc-4bf2-bdcf-b41e95b49d05'')) or (sdata(queryid = ''c13d9ec0-2b18-4838-9bdb-ddb0686fd1d5'')) or (sdata(queryid = ''b02a2176-0ba5-47f4-843d-3d54e3faad77'')) or (sdata(queryid = ''451b906e-3a5c-4ed2-9d94-0a603e6ad94d'')) or (sdata(queryid = ''d1c767d7-cd0a-44c5-a8ff-ce5fa4522ece'')) or (sdata(queryid = ''ca71a03e-26c6-43f3-9755-a248ebaf35b5'')) or (sdata(queryid = ''d93777b8-f03b-49b0-94fc-8019b52c0637'')) or (sdata(queryid = ''e05ebc73-51cb-4112-b685-5104c4884020'')) or (sdata(queryid = ''a1b342c7-9ce0-4aa1-96e8-74621b34d411'')) or (sdata(queryid = ''bde5de4a-b1d4-4edd-9033-6bcba45fcfc2'')) or (sdata(queryid = ''1e345627-c639-4349-95d0-fdfe348935df'')) or (sdata(queryid = ''bd33b778-83c1-4610-a767-f8ce2ade5339'')) or (sdata(queryid = ''54eaa539-e50a-4e95-8d94-f7e95cf0f57b'')) or (sdata(queryid = ''3181ef7a-77cd-405f-9dfa-1c13444efb82'')) or (sdata(queryid = ''0a72bf53-c8ca-405f-9098-9383ed02815a'')) or (sdata(queryid = ''2fb2fff2-b240-46a6-99b8-00521b4325e4'')) or (sdata(queryid = ''5321fa18-a88d-45cb-b8d6-383180cb308b'')) or (sdata(queryid = ''f13bcfdf-d61f-4871-9c74-23ea58204cbb'')) or (sdata(queryid = ''eb5188da-3659-4e7a-b9e4-6985624c3867'')) or (sdata(queryid = ''1679a0ee-6fa7-4c5b-9e0f-09512bc6a74b'')) or (sdata(queryid = ''fd05f61b-5c63-4f99-975e-573ca0f68e8e'')) or (sdata(queryid = ''10802bc7-28bd-43d4-aa24-cf5f9cf6d19f'')) or (sdata(queryid = ''302dbebf-4edd-43a8-93e9-dd6faec8ff14'')) or (sdata(queryid = ''573020da-b5c1-489a-a7d9-eae363e535ef'')) or (sdata(queryid = ''ca514f9e-f4b9-42eb-a8b3-57a384e65540''))) and (sdata(istobedisplayed = 1)) and (sdata(istimestamp >= 1245283200)) and (sdata(istimestamp < 1245369600)) and ((sdata(IFID = ''1eeb7036-cd84-4e4d-be90-e720c7db4470'')))') > 0
    order by istimestamp desc ) where rownum <= 250)
    /* 3.We used multiple varchar(4000) type bind variable in single contains clause but giving error
         ORA-29902: error in executing ODCIIndexStart() routine
         ORA-01489: result of string concatenation is too long
         variable querystring1 varchar2(4000);
    exec :querystring1 := '((sdata(queryid = ''a51f216a-b211-4b59-89d4-6fcce58a8517'')) or (sdata(queryid = ''d1c975a6-607d-4334-a84c-cc63f68bda3a'')) or(sdata(queryid = ''11fd0d2a-540d-4de0-852a-75f1b841b262'')) or(sdata(queryid = ''0dbfd826-497e-4283-8fc6-210c631c4a3e'')) or(sdata(queryid = ''eb2fd3d3-3b14-4092-a373-edd5448802c2'')) or(sdata(queryid = ''a3b69f62-560b-4883-8bd8-d8225af075b4'')) or(sdata(queryid = ''8596dc3e-c062-4527-9df6-e2c6aa10187d'')) or(sdata(queryid = ''5ce0dea4-b005-4185-9a05-7e91f14c7a8a'')) or(sdata(queryid = ''27eb925f-6f0c-4e27-9b57-91d78de703df'')) or(sdata(queryid = ''53b63124-caf4-4e71-ac5b-0e323d2805cb'')) or(sdata(queryid = ''f3dea938-a547-4510-8c24-25e04fa11ec4'')) or(sdata(queryid = ''5d8ebe7d-224b-4731-a1f2-ef1e3b409579'')) or(sdata(queryid = ''69c8dc53-031a-4069-a9e5-89f28cb7a7e0'')) or(sdata(queryid = ''2f65dc5e-63f6-4904-95f8-94c8983931a9'')) or(sdata(queryid = ''9ce16005-5b3b-4691-a624-5a7835e9e982''))) ';
    variable querystring2 varchar2(4000);
    exec :querystring2 := '((sdata(queryid = ''a51f216a-b211-4b59-89d4-6fcce58a8517'')) or (sdata(queryid = ''d1c975a6-607d-4334-a84c-cc63f68bda3a'')) or(sdata(queryid = ''11fd0d2a-540d-4de0-852a-75f1b841b262'')) or(sdata(queryid = ''0dbfd826-497e-4283-8fc6-210c631c4a3e'')) or(sdata(queryid = ''eb2fd3d3-3b14-4092-a373-edd5448802c2'')) or(sdata(queryid = ''a3b69f62-560b-4883-8bd8-d8225af075b4'')) or(sdata(queryid = ''8596dc3e-c062-4527-9df6-e2c6aa10187d'')) or(sdata(queryid = ''5ce0dea4-b005-4185-9a05-7e91f14c7a8a'')) or(sdata(queryid = ''27eb925f-6f0c-4e27-9b57-91d78de703df'')) or(sdata(queryid = ''53b63124-caf4-4e71-ac5b-0e323d2805cb'')) or(sdata(queryid = ''f3dea938-a547-4510-8c24-25e04fa11ec4'')) or(sdata(queryid = ''5d8ebe7d-224b-4731-a1f2-ef1e3b409579'')) or(sdata(queryid = ''69c8dc53-031a-4069-a9e5-89f28cb7a7e0'')) or(sdata(queryid = ''2f65dc5e-63f6-4904-95f8-94c8983931a9'')) or(sdata(queryid = ''9ce16005-5b3b-4691-a624-5a7835e9e982''))) ';
    variable querystring3 varchar2(4000);
    exec :querystring3 := '((sdata(queryid = ''a51f216a-b211-4b59-89d4-6fcce58a8517'')) or (sdata(queryid = ''d1c975a6-607d-4334-a84c-cc63f68bda3a'')) or(sdata(queryid = ''11fd0d2a-540d-4de0-852a-75f1b841b262'')) or(sdata(queryid = ''0dbfd826-497e-4283-8fc6-210c631c4a3e'')) or(sdata(queryid = ''eb2fd3d3-3b14-4092-a373-edd5448802c2'')) or(sdata(queryid = ''a3b69f62-560b-4883-8bd8-d8225af075b4'')) or(sdata(queryid = ''8596dc3e-c062-4527-9df6-e2c6aa10187d'')) or(sdata(queryid = ''5ce0dea4-b005-4185-9a05-7e91f14c7a8a'')) or(sdata(queryid = ''27eb925f-6f0c-4e27-9b57-91d78de703df'')) or(sdata(queryid = ''53b63124-caf4-4e71-ac5b-0e323d2805cb'')) or(sdata(queryid = ''f3dea938-a547-4510-8c24-25e04fa11ec4'')) or(sdata(queryid = ''5d8ebe7d-224b-4731-a1f2-ef1e3b409579'')) or(sdata(queryid = ''69c8dc53-031a-4069-a9e5-89f28cb7a7e0'')) or(sdata(queryid = ''2f65dc5e-63f6-4904-95f8-94c8983931a9'')) or(sdata(queryid = ''9ce16005-5b3b-4691-a624-5a7835e9e982''))) ';
         select indexedmetatext from ContentStore where rowid in ( select oraclerowid from ( select rowid as oraclerowid from ContentStore where contains(indexedmetatext,:querystring1|| ' or ' ||:querystring2|| ' or ' ||:querystring3) > 0 order by istimestamp desc ) where rownum <= 250);
    /* 4.We used bind variable of type clob but giving error
    Error:
    ORA-29902: error in executing ODCIIndexStart() routine
         ORA-20000: Oracle Text error:
         DRG-50857: oracle error in drexrstart_clob
    variable querystring CLOB;
    exec :querystring := '((sdata(queryid = ''a51f216a-b211-4b59-89d4-6fcce58a8517'')) or (sdata(queryid = ''d1c975a6-607d-4334-a84c-cc63f68bda3a'')) or(sdata(queryid = ''11fd0d2a-540d-4de0-852a-75f1b841b262'')) or(sdata(queryid = ''0dbfd826-497e-4283-8fc6-210c631c4a3e'')) or(sdata(queryid = ''eb2fd3d3-3b14-4092-a373-edd5448802c2'')) or(sdata(queryid = ''a3b69f62-560b-4883-8bd8-d8225af075b4'')) or(sdata(queryid = ''8596dc3e-c062-4527-9df6-e2c6aa10187d'')) or(sdata(queryid = ''5ce0dea4-b005-4185-9a05-7e91f14c7a8a'')) or(sdata(queryid = ''27eb925f-6f0c-4e27-9b57-91d78de703df'')) or(sdata(queryid = ''53b63124-caf4-4e71-ac5b-0e323d2805cb'')) or(sdata(queryid = ''f3dea938-a547-4510-8c24-25e04fa11ec4'')) or(sdata(queryid = ''5d8ebe7d-224b-4731-a1f2-ef1e3b409579'')) or(sdata(queryid = ''69c8dc53-031a-4069-a9e5-89f28cb7a7e0'')) or(sdata(queryid = ''2f65dc5e-63f6-4904-95f8-94c8983931a9'')) or(sdata(queryid = ''9ce16005-5b3b-4691-a624-5a7835e9e982''))) ';
    select indexedmetatext from ContentStore where rowid in ( select oraclerowid from ( select rowid as oraclerowid from ContentStore where contains(indexedmetatext,:querystring) > 0 order by istimestamp desc ) where rownum <= 250);
    /* 5.I read from article
    http://www.oracle.com/technology/products/text/pdf/ot11g_new_features.pdf
    That we don’t need to modified query as we had to do with SDATA(as we are doing in above examples) and optimizer will realize that query can be satisfied by the text index and will “push down” the filtering of rows into the text index processor rather than doing table access for filtering on sdata column but when I tried to write that query it was doing table access to filter for filter by column.
    /* 6.My Questions:
    a.     Is it possible as mentioned in above point(point number 5) that we don’t need to write SDATA query in contains clause and optimizer will use composite index automatically.
    b.     Is there any workaround for using string literal > 4000 char in contains clause.
    c.     Why performance degrades lineally when using multiple contains clause.
    d.     Can we use in clause in SDATA and write query like this:
    i.     SDATA(queryid in ( 'q1',’q2’))
    */

    SQE is really breakthrough for me but I dont know why it is not working in my case.I tried it onOracle 11g installaion with window and Linux both but did not get success.
    Please suggest me what I need to check when Installing if it is installation problem?
    My attempt:
    [oracle@oracle2 ~]$ sqlplus / as sysdba
    SQL*Plus: Release 11.1.0.6.0 - Production on Mon Jul 6 12:21:32 2009
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> create user test identified by test;
    User created.
    SQL> grant connect,dba,resource,ctxapp to test;
    Grant succeeded.
    SQL> connect test/test@content;
    Connected.
    SQL> create table test (text varchar2(2000));
    Table created.
    SQL> insert into test values ('hello world');
    1 row created.
    SQL> create index testindex on test(text) indextype is ctxsys.context;
    Index created.
    SQL> exec ctx_query.store_sqe('testsqe', 'hello')
    PL/SQL procedure successfully completed.
    SQL> select * from test where contains (text, 'sqe(testsqe)') > 0;
    select * from test where contains (text, 'sqe(testsqe)') > 0
    ERROR at line 1:
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-20000: Oracle Text error:
    DRG-00100: internal error, arguments : [50935],[drpn.c],[1051],[],[]
    ORA-01403: no data found
    SQL> select * from test where contains (text, 'ctx_query.sqe(testsqe)') > 0;
    no rows selected
    SQL>

  • Problem when using About Operator in Contains Query

    Hi,
    I'm new to Oracle and this forums too. I have a problem when using about operator in contains query.
    I create a table with some records and then create a context index on 'name' column.
    CREATE TABLE my_items (
      id           NUMBER(10)      NOT NULL,
      name         VARCHAR2(200)   NOT NULL,
      description  VARCHAR2(4000)  NOT NULL,
      price        NUMBER(7,2)     NOT NULL
    ALTER TABLE my_items ADD (
      CONSTRAINT my_items_pk PRIMARY KEY (id)
    CREATE SEQUENCE my_items_seq;
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Car', 'Car description', 1);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Train', 'Train description', 2);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Japan', 'Japan description', 3);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'China', 'China description', 4);
    COMMIT;
    EXEC ctx_ddl.create_preference('english_lexer','basic_lexer');
    EXEC ctx_ddl.set_attribute('english_lexer','index_themes','yes');
    EXEC ctx_ddl.set_attribute('english_lexer','theme_language','english');
    CREATE INDEX my_items_name_idx ON my_items(name) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS('lexer english_lexer');
    EXEC ctx_ddl.sync_index('my_items_name_idx');Then I perform contains query to retrieve record :
    SELECT count(*) FROM my_items WHERE contains(name, 'Japan', 1) > 0;
    COUNT(*)
          1
    SELECT count(*) FROM my_items WHERE contains(name, 'about(Japan)', 1) > 0;
    COUNT(*)
          1But the problem is when I using ABOUT operator like in Oracle's English Knowledge Base Category Hierarchy it return 0
    SELECT count(*) FROM my_items WHERE contains(name, 'about(Asia)', 1) > 0;
    COUNT(*)
          0
    SELECT count(*) FROM my_items WHERE contains(name, 'about(transportation)', 1) > 0;
    COUNT(*)
          0I can't figure out what 's wrong in my query or in my index.
    Any help will be appreciated.
    Thanks,
    Hieu Nguyen
    Edited by: user2944391 on Jul 10, 2009 3:25 AM

    Hello (and welcome),
    You'd be best asking this question in the Oracle Text forum, here:
    Text
    And by the way, it will help others to analyse if you put {noformat}{noformat} (lowercase code in curly brackets) before and after your code snippets.
    Good luck!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problems Creating Mappings with Collections with tools or workbench

    Hi -
    I am a new kodo user for my company. And am having a few problems in genereal with mapping objects with collections
    in them.
    I followed the tutorial on how to use the kodo workbench
    using the Passenger example. Build the java code and then
    tried to creat a new set of metadata. After going through
    this process I expected to see TWO tables. Something like
    'PAssenger' and something like 'Luggage' where luggage
    would be joined to passenger. However what I am getting
    is ONE table passenger with a BLOB field 'Luggage'. This
    has been a contant problem with me with any composite
    java class containing collection. Obviously I am configuring something wrong. Any help would be great.
    Thanks
    Matt

    Answered by one of my fellow and unknown colleagues that suddenly entered the room

  • ClassCastException with javax.jms.ObjectMessage

    Hello
              I have the following problem:
              I filled a JMS queue with ObjectMessages containing a so called container class (self written, plain old java class implementing serializable).
              I have also written a Servlet that runs in the same EAR like the EJB that fills the JMS queue. This servlet uses a JMS QueueBrowser to show the messages. It casts the Message to ObjectMessage, calls getObject() and casts again in my container class.
              Now when I shutdown the server, regenerate my source and restart the server, the last cast to my container class doesn't work anymore (ClassCastException). When I print out the hash value of the class (containerFromObjectMessage.getClass().hashCode() and Container.class.hashCode() those two hashcodes are different!
              Does anybody have an idea? Is there a switch that I have to set to my WLS 8.1 be a little less secure?
              Regards,
              Stephan

    Correction:
              This only happens when I don't restart my server. So when I hot deploy the EAR with the new compiled classes it doesn't work (ClassCastException). But when I restart the server the servlet runs fine.
              So there must be a cache in the server or something like that.
              Does anybody know any hints or tips to help me?
              Stephan

  • Quering database with word containing apostrophe

    hi all,
    hopefully someone can help me with this, i am trying to query an sql database with a word containing an apostrophe from within my .jsp file. How do i go about replacing the " ' " with " '' " for all query's made?
    any help would be great,
    thanks,
    KJ
    **

    There's quite a few threads on this issue...go to the Forums home page, search the JDBC forum on "escape characters" and read the results. Here's a sample:
    http://forum.java.sun.com/thread.jsp?forum=48&thread=147408

  • Unable to create collection form query

    Hi all,
    I am trying to create a collection from query. The code is under on load - before header process and is as follows:
    declare
    x varchar2(4000);
    begin
    x:= 'select mecnum from C_MECS where MECNUM = ';
    x := x||v('P13_X');
    if apex_collection.collection_exists(p_collection_name=>'COLLECTIONVIEWMEC') then
    apex_collection.delete_collection(p_collection_name=>'COLLECTIONVIEWMEC');
    end if;
    APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY(
    p_collection_name => 'COLLECTIONVIEWMEC',
    p_query => x);
    end;
    P13_X is a text item populated from the previous page. But I am having trouble and am getting an error: Ora-00904"P36006" invalid identifier. Any help is greatly appreciated. Thanks in advance, regards,
    Suma.

    Must confess to not actually using collections yet (don't burn me for that!)
    What I would be tempted to do it to replace your two lines of defining x with
    x:= 'select mecnum from C_MECS where MECNUM = &P13_X.';
    And then possibly setting this into another page item and verifying the query is syntatically correct
    :P13_TEMP_ITEM_SQL_QUERY := x;
    Phil

  • Page not cached because "URL contains query string"

    I have used JDeveloper to produce a search/display page using ADF where the user enters search criteria and then presses a Search command button. The parameters are POSTed to the webserver, and I need to devise a cache rule to cache pages using the entered search criteria so that another seach for the same values can be served from the cache.
    I have created a rule that will cache GET, GET with Query String and POST.
    I have put .* in the POST body. When I do this, the first query page is retrieved from the origin server and cached and resulting queries with different search criteria are returned the data for that first search (ie. it's not taking into account the search parameters).
    If I switch off that rule and look at what's being received, I see the following:
    /158.234.27.10:8889/BM/faces/physical.jsp POST;;;event=&form1:selectOneChoice1=0&form1:selectOneChoice2=&form1:selectedDate=2004-08-10&form1:table1:rangeStart=0&form1:table2:rangeStart=0&form1:table3:rangeStart=0&form1:table4:rangeStart=0&form1:table5:rangeStart=0&form1:table6:rangeStart=0&oracle.adf.faces.FORM=form1&oracle.adf.faces.STATE_TOKEN=3&source=form1:commandButton1;;
    Now, there are 3 search parameter fields that need to be considered - the others should be ignored:
    form1:selectOneChoice1
    form1:selectOneChoice
    form1:selectedDate
    It's not clear to me where (and how - in what format) I specify parameters to ignore and parameters to consider. I have tried listing these 3 parameters in the URL parameters table for the Rule (I did not specify a value - should I have done?) but when I do this, the page is not cached and shows the reason for this is that "URL Contains Query String".
    Can someone explain how to specify important POST body parameters and unimportant POST body parameters?
    Thanks,
    Andy

    Hi,
    Please go through this:
    http://download-west.oracle.com/docs/cd/B14099_02/caching.1012/b14046/cache.htm#sthref1530
    Hope it helps you. I think you should be able to configure the intended rule in Web Cache.
    Regards,
    Priyanka GES

  • REF in a CONTAINS query

    Is it not possible to combine REF and CONTAINS query?
    In my database, I have two tables, tblImage and tblDocument. tblImage contains a reference to tblDocument, called document_ref.
    I want to select image_id from tblImage where the documents in tblDocument contains the word "whale". The documents in tblDocument (column: document) are of type ORDSYS.ORDdoc, and are indexed with CONTEXT index. I thought that the query should be written like:
    SELECT i.image_id
    FROM tblImage i
    WHERE CONTAINS(i.document_ref.document.source.localdata, 'whale', 1)>0;
    But this gives me the error message:
    SELECT i.image_id
    ERROR on line 1:
    ORA-20000: Oracle Text error:
    DRG-10599: column is not indexed
    When i select the document_id instead I get a correct answer. That query is written as follows:
    SELECT d.document_id
    FROM tblDocument d
    WHERE CONTAINS(d.document.source.localdata, 'whale', 1)>0;
    Ragnhild

    excellent article. However there is one thing which is slightly erroneous. You don't need a type to be declared in the database to fetch the data, but you do need to declare a type;
    here is one of my unit test scripts that does just that.
    DECLARE
    PN_CARDAPPL_ID NUMBER;
    v_Return Cci_Standard.ref_cursor;
    type getcardapplattrval_recordtype
    Is record
    (cardappl_id ci_cardapplattrvalue.cardappl_ID%TYPE,
    tag ci_cardapplattrvalue.tag%TYPE,
    value ci_cardapplattrvalue.value%TYPE
    getcardapplattrvalue_record getcardapplattrval_recordtype;
    BEGIN
    PN_CARDAPPL_ID := 1; --value must be supplied
    v_Return := CCI_GETCUSTCARD.GETCARDAPPLATTRVALUE(
    PN_CARDAPPL_ID => PN_CARDAPPL_ID
    loop
    fetch v_return
    into getcardapplattrvalue_record;
    dbms_output.put_line('Cardappl_id=>'||getcardapplattrvalue_record.cardappl_id);
    dbms_output.put_line('Tag =>'||getcardapplattrvalue_record.tag);
    dbms_output.put_line('Value =>'||getcardapplattrvalue_record.value);
    exit when v_Return%NOTFOUND;
    end loop;
    END;

  • Contains query fails for extended ascii characters

    I have an Oracle 9.2 instance whose characterset is WE8MSWIN1252. I'm using the same characterset on my client. If I have a LONG column that contains extended-ascii characters (the example I'm using has the Euro character '€', but I've seen the same problem with other characters), and I'm using the Intermedia service to index that column, then this select statement returns no records even though it should find several:
    select id from table1 where (contains(long_col,'€',1) > 0);
    However, the same select statement looking for something else, like 'e', works just fine.
    What am I doing wrong? I can do a "like" query against a VARCHAR2 column with a Euro character, and it works correctly. I can do a "dbms_lob.instr" query against a CLOB column with a Euro character, and it also works. It's just the "contains" query against a LONG column that fails.

    There are a number of limitations in using Long datatypes. If you check the SQL Reference you will see: "Oracle Corporation strongly recommends that you convert LONG columns to LOB columns as soon as possible. Creation of new LONG columns is scheduled for desupport.
    LOB columns are subject to far fewer restrictions than LONG columns. Further, LOB functionality is enhanced in every release, whereas LONG functionality has been static for several releases."

  • Cannot create collection or query assets...

    I'm trying to create Collection and Query assets but having no luck. I've gone in as site admin and enabled both assets...giving them "New" and "Find" in the start menu...but nothing. Is this a bug or is there another step required? Thanks! (This works fine with other assets)

    As a small update...I can create a collection and query in the Contributor interface...but the documentation states being in the Admin interface. Perhaps this is just outdated documentation? The form for creating a new collection looks different in the documentation than the actual form I'm seeing. If anyone can confirm this I'd appreciate it!

  • PowerShell - to search recycle bin - for any document with title containing "disaster" in it?

    Hi there,
    I am looking for PowerShell - to search recycle bin - for any document with title containing "disaster" in it? 
    E.g. it should search for any documents with title "SharePoint Disaster Recover.doc" or whatever title contains this word?
    Thank you so much.

    This should do it:
    Get-SPSite http://yourServer/sites/yourSite |
    Select -ExpandProperty RecycleBin |
    Where { $_.Title -Like "*disaster*" } |
    Select DirName, Title
    or for all Site Collections in the farm:
    Get-SPSite -Limit All |
    Select -ExpandProperty RecycleBin |
    Where { $_.Title -Like "*disaster*" } |
    Select DirName, Title
    Mike Smith TechTrainingNotes.blogspot.com
    Books:
    SharePoint 2007 2010 Customization for the Site Owner,
    SharePoint 2010 Security for the Site Owner

Maybe you are looking for

  • Performance and usability problems with Illustrator imports

    I am usually an enthusiast advocate for Adobe Software. As a UI/Interaction designer I regularly showcase your products as a shining example. That's why I am somewhat frustrated about the Flash Catalyst Beta. I trust you guys to come out with SOMETHI

  • Vendorwise Rejection Report

    hi all,   My client want to see rejection report vendor wise so that next time order placed to vendor with least rejection.   Is this report is present in SAP. thanks rahul

  • How can I make a query by date with several TDMS files?

    Hi, I have a project that can write and read TDMS files everyday (a file for each day with date and time). There, I can import those files to excel (I choose a file and load it). But, I have a question: How can I make a query by date with those TDMS

  • Is it possible to get a copy of all purchased music from itunes?

    Hi, My copy of itunes reinstalled itself, so all of my purchased music is now only in the music file. From multiple imports, there are two, three or four copies of most songs in the itunes music library, except for the purchased music, which is only

  • Exasperated after 3 days

    How do you get tunes from  itunes to my iphone - and don't talk technically.I have been thru every apple help line- and there is no where that it is spelt out in simple terms On itunes it says it is sync-ed and is safe to disconnect But where is ther