Postgresql qurey: string.matchs  exception

Hi,
I had follwing query:
String filter = "lastName.matches('z.*')";
Query query = pm.newQuery(UserImpl.class, filter);
Collection result = (Collection) query.execute();
but when execute, it throws Exception:
[http-8080-Processor16] ERROR struts.action.AbstractModelAction -
ERROR: Invalid UNICODE character sequence found (0xc000) {prepstmnt
31782389 SELECT t0.JDOIDX, t0.JDOCLASSX, t0.JDOLOCKX, t0.email,
t0.user_enabled, t0.externalId, t0.firstName, t0.KOBJECTX, t0.lastName,
t0.loginName, t0.middleName, t0.password, t0.uri FROM TUser t0 WHERE
(t0.lastName LIKE ?) [params=(String) z%] [reused=0]} [code=0, state=null]
kodo.util.DataStoreException: ERROR: Invalid UNICODE character sequence
found (0xc000) {prepstmnt 31782389 SELECT t0.JDOIDX, t0.JDOCLASSX,
t0.JDOLOCKX, t0.email, t0.user_enabled, t0.externalId, t0.firstName,
t0.KOBJECTX, t0.lastName, t0.loginName, t0.middleName, t0.password, t0.uri
FROM TUser t0 WHERE (t0.lastName LIKE ?) [params=(String) z%] [reused=0]}
[code=0, state=null]
     at
kodo.jdbc.sql.DBDictionary.newDataStoreException(DBDictionary.java:3004)
     at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:77)
     at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:63)
     at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:43)
     at
kodo.jdbc.runtime.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:180)
     at com.solarmetric.rop.EagerResultList.<init>(EagerResultList.java:32)
     at kodo.query.AbstractQuery.execute(AbstractQuery.java:1052)
     at kodo.query.AbstractQuery.executeWithArray(AbstractQuery.java:836)
     at kodo.query.AbstractQuery.execute(AbstractQuery.java:793)
     at kodo.datacache.CacheAwareQuery.execute(CacheAwareQuery.java:314)
     at
com.cloverworxs.impl.as.security.RoleBasedSecurityManagerImpl.queryUser(RoleBasedSecurityManagerImpl.java:1409)
     at
com.cloverworxs.impl.as.security.RoleBasedSecurityManagerImpl.queryUser(RoleBasedSecurityManagerImpl.java:1399)
     at
com.cloverworxs.impl.as.security.RoleBasedSecurityManagerImpl.queryUserByLastName(RoleBasedSecurityManagerImpl.java:1435)
     at
com.cloverworxs.impl.as.security.RoleBasedSecurityManagerImpl.queryUser(RoleBasedSecurityManagerImpl.java:1372)
     at
com.cloverworxs.uma.helper.UserSearchHelper.searchUser(UserSearchHelper.java:26)
     at
com.cloverworxs.uma.render.UserSearchRender.prepareData(UserSearchRender.java:61)
     at
com.cloverworxs.uma.fwork.UMAControllerBase.umaViewProcess(UMAControllerBase.java:423)
     at
com.cloverworxs.uma.fwork.UMAControllerBase.umaStandardProcess(UMAControllerBase.java:373)
     at
com.cloverworxs.app.struts.action.PortalViewController.detail(PortalViewController.java:117)
     at
com.cloverworxs.app.struts.action.AbstractModelAction.execute(AbstractModelAction.java:201)
     at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
     at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
     at
com.cloverworxs.app.struts.RequestProcessor.process(RequestProcessor.java:113)
     at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
     at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     at
com.cloverworxs.app.web.filter.EncodingFilter.doFilter(EncodingFilter.java:83)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
     at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
     at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
     at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
     at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
     at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
     at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
     at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
     at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
     at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
     at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
     at java.lang.Thread.run(Unknown Source)
and my kodo.properties :
kodo.ConnectionFactoryProperties: MaxActive=80, MaxWait=5000, \
TestOnBorrow=true, ValidationSQL="SELECT NOW()"
kodo.jdbc.DBDictionary: postgres(StoreCharsAsNumbers=false)
kodo.jdbc.SequenceFactory: PrimaryKeyColumn=PKX, SequenceColumn=SEQUENCEX,
TableName=JDO_SEQUENCEX
and if the filter is:lastName.matches('.*z.*'), it works well.
Thanks a lot.

Thanks a lot.
We will upgrade PostgreSQL server and test it.
Marc Prud'hommeaux wrote:
It looks like this is actually a bug with PostgreSQL, according to the
following bug reports:
http://archives.postgresql.org/pgsql-bugs/2002-07/msg00030.php
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=113231
I read at http://archives.postgresql.org/pgsql-sql/2004-03/msg00259.php
that this is fixed in PostgreSQL server version 7.3.6. You may need to
upgrade to fix the problem.
flamingo wrote:
Hi,
I had follwing query:
String filter = "lastName.matches('z.*')";
Query query = pm.newQuery(UserImpl.class, filter);
Collection result = (Collection) query.execute();
but when execute, it throws Exception:
[http-8080-Processor16] ERROR struts.action.AbstractModelAction -
ERROR: Invalid UNICODE character sequence found (0xc000) {prepstmnt
31782389 SELECT t0.JDOIDX, t0.JDOCLASSX, t0.JDOLOCKX, t0.email,
t0.user_enabled, t0.externalId, t0.firstName, t0.KOBJECTX, t0.lastName,
t0.loginName, t0.middleName, t0.password, t0.uri FROM TUser t0 WHERE
(t0.lastName LIKE ?) [params=(String) z%] [reused=0]} [code=0, state=null]
kodo.util.DataStoreException: ERROR: Invalid UNICODE character sequence
found (0xc000) {prepstmnt 31782389 SELECT t0.JDOIDX, t0.JDOCLASSX,
t0.JDOLOCKX, t0.email, t0.user_enabled, t0.externalId, t0.firstName,
t0.KOBJECTX, t0.lastName, t0.loginName, t0.middleName, t0.password, t0.uri
FROM TUser t0 WHERE (t0.lastName LIKE ?) [params=(String) z%] [reused=0]}
[code=0, state=null]
     at
kodo.jdbc.sql.DBDictionary.newDataStoreException(DBDictionary.java:3004)
     at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:77)
     at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:63)
     at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:43)
     at
kodo.jdbc.runtime.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:180)
     at com.solarmetric.rop.EagerResultList.<init>(EagerResultList.java:32)
     at kodo.query.AbstractQuery.execute(AbstractQuery.java:1052)
     at kodo.query.AbstractQuery.executeWithArray(AbstractQuery.java:836)
     at kodo.query.AbstractQuery.execute(AbstractQuery.java:793)
     at kodo.datacache.CacheAwareQuery.execute(CacheAwareQuery.java:314)
     at
com.cloverworxs.impl.as.security.RoleBasedSecurityManagerImpl.queryUser(RoleBasedSecurityManagerImpl.java:1409)
     at
com.cloverworxs.impl.as.security.RoleBasedSecurityManagerImpl.queryUser(RoleBasedSecurityManagerImpl.java:1399)
     at
com.cloverworxs.impl.as.security.RoleBasedSecurityManagerImpl.queryUserByLastName(RoleBasedSecurityManagerImpl.java:1435)
     at
com.cloverworxs.impl.as.security.RoleBasedSecurityManagerImpl.queryUser(RoleBasedSecurityManagerImpl.java:1372)
     at
com.cloverworxs.uma.helper.UserSearchHelper.searchUser(UserSearchHelper.java:26)
     at
com.cloverworxs.uma.render.UserSearchRender.prepareData(UserSearchRender.java:61)
     at
com.cloverworxs.uma.fwork.UMAControllerBase.umaViewProcess(UMAControllerBase.java:423)
     at
com.cloverworxs.uma.fwork.UMAControllerBase.umaStandardProcess(UMAControllerBase.java:373)
     at
com.cloverworxs.app.struts.action.PortalViewController.detail(PortalViewController.java:117)
     at
com.cloverworxs.app.struts.action.AbstractModelAction.execute(AbstractModelAction.java:201)
     at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
     at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
     at
com.cloverworxs.app.struts.RequestProcessor.process(RequestProcessor.java:113)
     at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
     at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     at
com.cloverworxs.app.web.filter.EncodingFilter.doFilter(EncodingFilter.java:83)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
     at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
     at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
     at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
     at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
     at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
     at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
     at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
     at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
     at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
     at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
     at java.lang.Thread.run(Unknown Source)
and my kodo.properties :
kodo.ConnectionFactoryProperties: MaxActive=80, MaxWait=5000,
TestOnBorrow=true, ValidationSQL="SELECT NOW()"
kodo.jdbc.DBDictionary: postgres(StoreCharsAsNumbers=false)
kodo.jdbc.SequenceFactory: PrimaryKeyColumn=PKX, SequenceColumn=SEQUENCEX,
TableName=JDO_SEQUENCEX
and if the filter is:lastName.matches('.*z.*'), it works well.
Thanks a lot.
Marc Prud'hommeaux
SolarMetric Inc.

Similar Messages

  • The case structure is not working well on comaring two strings using true or false string matching VI

    I need an execution of commands after the reply from the instrument matches with the string I provided for that i used true or false string match VI on which the true string the matching command and the string is the reply from the instrument. And I put the further executionable commands in frame after frame of sequence loop in the true of the case structure. Amd finally I given all the output strings to the concatenate string to get all the replies as one loop. But when I execute the program the desired result is not available. So kindly please help me to overcome this problem.  
    Attachments:
    basic serial with changes.vi ‏24 KB

    You VI makes absolutely no sense and I would recommend you start with a few simple LabVIEW tutorials before trying to tackle this.
    What is the point of the FOR loop with 1 iteration, it might as well not even be there, same difference.
    Why is there an abort primitive in the FOR loop, this mean the program will unconditionally stop abort before any downstream code will ever go into action. The program will never get past the FOR loop.
    You created a circular data dependency and LabVIEW inserted a feedback node automatically, making things even worse. (see also)
    You need to learn about dataflow, execution order, and data dependency.
    You need to learn about the various types of tunnels (plain, autoindexing, etc.)
    There is a tremendous amount of duplicate code. Large code sections are the same, differeing only by a string. You should only have one copy of that code inside a proper state machine. Have a look at the design templates and examples that ship with LabVIEW.
    LabVIEW Champion . Do more with less code and in less time .

  • An additional question about regular expressions with String.matches

    does the String.matches() method match expressions when some substring of the String matches, or does it have to match the entire String? So, if i have the String "123ABC", and i ask to match "1 or more letters" will it fail because there are non-letters in the String, but then pass if i add "1 or more letters AND 1 or more digits"? so, in the latter every character in the String is accounted for in the search, as opposed to the first. Is that correct, or are there ways to JUST match some substring in the String instead of the whole thing? i WILL make some examples too... but does that make sense?

    It has to match the whole String. Use Matcher.find() to match on just a sub-string()

  • String.matches vs Pattern and Matcher object

    Hi,
    I was trying to match some regex using String.matches but for me it is not working (probably I am not using it the way it should be used).
    Here is a simple example:
    /* This does not work */
    String patternStr = "a";
    String inputStr = "abc";
    if(inputStr.matches( "a" ))
    System.out.println("String matched");
    /* This works */
    Pattern p = Pattern.compile( "a" );
    Matcher m = p.matcher( "abc" );
    boolean found = false;
    while(m.find())
    System.out.println("Matched using Pattern and Matcher");
    found = true;
    if(!found)
    System.out.println("Not matching with Pattern and Matcher");
    Am I not matches method of String class properly?
    Please throw some lights on this.
    Thank you.

    String.matches looks at the whole string.
    bsh % "abc".matches("a");
    <false>
    bsh % "abc".matches("a.*");
    <true>

  • String.matches() faulty?

    I wondered why my regExp didn't work when I called it with
    myString.matches(searchString);So I wrote this test code:
            System.out.println("Test: if substring exists:");
            String text = "Using org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser as SAX2 Parser";
            String search = "as SAX2 Parser";
            String regExp = "\\S*("+search.toUpperCase()+"\\S*)";
            Pattern pat = Pattern.compile(regExp);
            Matcher m = pat.matcher(text.toUpperCase());
            while (m.find()) {
                System.out.println("found2: "+text.substring(m.start(), m.end()));
            System.out.println("Same with String.matches:");
            System.out.println("found2: "+text.matches(regExp));and the first custom code matches the regExp and the String.matches() doesn't match. What's the catch?

    "abc" -> find ("b") -> finds "b"
    "abc".matches("b") -> returns false
    "b".matches("b") -> returns false
    "abc".matches(".b.") > returns trueIf you'd like you could say that matches assumes an
    implicit "^" at the beginning and an "$" at the end
    of your regex. It tries to match the entire
    string and if it doesn't capture it all it returns
    false.Why is
    "b".matches("b") -> returns false?

  • Contains return all the records when the query string matches the columns

    I used the multi_column_datastore preference and created an index on three columns (item_name, description,owner_part_number). Now if I do a search:
    select * from items where contains(description, 'description') > 0;It returns all the rows in items table, but not all the rows have "description" as a word. I guess Oracle text assumes the query intends to get all the rows as the query string matches one of the column names. My question is whether Oracle Text has any preference settings to alter this behavior?
    execute ctx_ddl.create_preference('item_multi_preference', 'MULTI_COLUMN_DATASTORE');
    execute ctx_ddl.set_attribute('item_multi_preference', 'columns', 'item_name, description,owner_part_number');
    create index item_text_index on items(description) indextype is ctxsys.context filter by owner parameters('LEXER ENG_LEXER WORDLIST ENG_WORDLIST STOPLIST CTXSYS.EMPTY_STOPLIST datastore item_multi_preference MEMORY 1024M');Thanks.
    Jun Gao

    It looks like a basic_section_group fixes the problem as well, as demonstrated below and I believe a basic_section_group may be more efficient than auto_section_group.
    SCOTT@orcl_11gR2> -- recreation of problem:
    SCOTT@orcl_11gR2> drop table items
      2  /
    Table dropped.
    SCOTT@orcl_11gR2> create table items (
      2       "ITEM_NAME"             varchar2(100 byte),
      3        "ITEM_NUMBER"              varchar2(100 byte),
      4        "DESCRIPTION"              varchar2(4000 byte),
      5        "OWNER" number
      6  )
      7  /
    Table created.
    SCOTT@orcl_11gR2> begin
      2    FOR Lcntr IN 1..100
      3    loop
      4         insert into items (item_name, item_number, description, owner)
      5         values (dbms_random.string('A', 10),
      6              dbms_random.string('A', 10),
      7              dbms_random.string('L', 8) || ' '
      8              || dbms_random.string('A', 4)
      9              || dbms_random.string('A', 5)  || ' '
    10              || dbms_random.string('A', 10),
    11              dbms_random.value(1,10) );
    12    end loop;
    13  end;
    14  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> begin
      2    FOR Lcntr IN 1..100
      3    loop
      4         insert into items (item_name, item_number, description, owner)
      5         values (dbms_random.string('A', 10),
      6              dbms_random.string('A', 10),
      7              dbms_random.string('L', 8) || ' '
      8              || dbms_random.string('A', 4) || '111'
      9              || dbms_random.string('A', 5)  || ' '
    10              || dbms_random.string('A', 10), 1234 );
    11    end loop;
    12  end;
    13  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> exec ctx_ddl.drop_preference('ENG_WORDLIST');
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> begin
      2    ctx_ddl.create_preference('ENG_WORDLIST', 'BASIC_WORDLIST');
      3    ctx_ddl.set_attribute('ENG_WORDLIST','PREFIX_INDEX','TRUE');
      4    ctx_ddl.set_attribute('ENG_WORDLIST','PREFIX_MIN_LENGTH',1);
      5    ctx_ddl.set_attribute('ENG_WORDLIST','PREFIX_MAX_LENGTH',10);
      6    ctx_ddl.set_attribute('ENG_WORDLIST','SUBSTRING_INDEX','TRUE');
      7    ctx_ddl.set_attribute('ENG_WORDLIST','WILDCARD_MAXTERMS', 0);
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> execute ctx_ddl.drop_preference('ENG_LEXER');
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> begin
      2    CTX_DDL.CREATE_PREFERENCE ('ENG_LEXER', 'BASIC_LEXER');
      3    CTX_DDL.SET_ATTRIBUTE ('ENG_LEXER', 'PRINTJOINS', '@-_');
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> execute ctx_ddl.drop_preference('items_multi_preference');
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> begin
      2    ctx_ddl.create_preference('items_multi_preference', 'MULTI_COLUMN_DATASTORE');
      3    ctx_ddl.set_attribute('items_multi_preference', 'columns', 'item_name, description,item_number');
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> create index items_text_index
      2  on items(description)
      3  indextype is ctxsys.context
      4  parameters
      5    ('LEXER         ENG_LEXER
      6        WORDLIST   ENG_WORDLIST
      7        STOPLIST   CTXSYS.EMPTY_STOPLIST
      8        datastore  items_multi_preference
      9        MEMORY     1024M')
    10  /
    Index created.
    SCOTT@orcl_11gR2> create index owner_idx on items (owner)
      2  /
    Index created.
    SCOTT@orcl_11gR2> exec dbms_stats.gather_table_stats (user, 'ITEMS')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> select count(*)
      2  from   items
      3  where  contains (description, 'description') > 0
      4  /
      COUNT(*)
           200
    1 row selected.
    SCOTT@orcl_11gR2> -- correction of problem:
    SCOTT@orcl_11gR2> exec ctx_ddl.drop_section_group ('items_sec')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> begin
      2    ctx_ddl.create_section_group ('items_sec', 'basic_section_group');
      3    ctx_ddl.add_field_section ('items_sec', 'item_name', 'item_name', true);
      4    ctx_ddl.add_field_section ('items_sec', 'description', 'description', true);
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> drop index items_text_index
      2  /
    Index dropped.
    SCOTT@orcl_11gR2> create index items_text_index
      2  on items(description)
      3  indextype is ctxsys.context
      4  parameters
      5    ('LEXER         ENG_LEXER
      6        WORDLIST   ENG_WORDLIST
      7        STOPLIST   CTXSYS.EMPTY_STOPLIST
      8        datastore  items_multi_preference
      9        MEMORY     1024M
    10        section group items_sec')
    11  /
    Index created.
    SCOTT@orcl_11gR2> select count(*)
      2  from   items
      3  where  contains (description, 'description') > 0
      4  /
      COUNT(*)
             0
    1 row selected.

  • Email Regular Expression with a String.Match()

    I'm currently using a RichTextEditor for a user to build HTML
    for a site. However, I want the application to scan for emails and
    encode them so they are protected from spam bots when they go to
    the live site. I've written a regular expression to find an email
    and it seems to work, but it only returns one email at a time from
    the string. I have had to revert to a while loop to traverse the
    string until I'm satisfied. I don't particularly like that method
    and would like to just do one String.match() query to retrieve all
    of the emails. Can anyone see something here that I'm missing?

    Try adding the global flag (g):
    var emailPattern:RegExp =
    /[a-z][\w.-]+@\w[\w.-]+\.[\w.-]*[a-z][a-z]+/g;
    TS

  • Cannot get regular expression to return true in String.matches()

    Hi,
    My String that I'm attempting to match a regular expression against is: value=='ORIG')
    My regular expression is: value=='ORIG'\\) The double backslashes are included as a delimiter for ')' which is a regular expression special character
    However, when I call the String.matches() method for this regular expression it returns false. Where am I going wrong?
    Thanks.

    The string doesn't contain what you think it contains, or you made a mistake in your implementation.
    public class Bar {
       public static void main(final String... args) {
          final String s = "value=='ORIG')";
          System.out.println(s.matches("value=='ORIG'\\)")); // Prints "true"
    }

  • String.matches() question - regular expression help

    How come the following code's if condition returns false?
    String someFile="Dr. Phil.pdf";
    if (someFile.matches("[.][Pp][Dd][Ff]$")) {
      System.out.println("File is a pdf file.");
    }When I change the the matches method to matches(".*[Pp][Dd][Ff]$") it works, so does that mean it has to match the entire string to return true? If so, how can I determine if a partial match occured?
    If partial matching isn't feasible, then can someone help me look determine if this is the best matching pattern to use:
    matches(".*[.][Pp][Dd][Ff]$")Thanks.

    The documentation is your friend.
    [String.matches(regex)|http://java.sun.com/javase/6/docs/api/java/lang/String.html#matches(java.lang.String)] says:
    An invocation of this method of the form str.matches(regex) yields exactly the same result as the expression
    Pattern.matches(regex, str)And [Pattern.matches(regex, str)|http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html#matches(java.lang.String, java.lang.CharSequence)] says
    behaves in exactly the same way as the expression
    Pattern.compile(regex).matcher(input).matches()And [Matcher.matches()|http://java.sun.com/javase/6/docs/api/java/util/regex/Matcher.html#matches()] says
    Attempts to match the entire region against the pattern.

  • String.matches error

    Hi,
    this is my code:
    if((bib.author.matches("*" + request.bib.author + "*")){
    with bib.author and request.bib.author 2 strings which may be similar.
    And i use regex to compare themp but i've got this kind of exception:
    java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0
    Teddy
    ^
    when request.bib.author = "Teddy"
    I don't know what it means, if someone gets an idea, i take it!
    thx
    SHiSo

    * means "take the group before it, I'll match THAT 0 or more times".
    so " <space>*" means 0 or more spaces. "<nothing>*" is an error.
    dot (.) in regex means "anything", so .* is "match anything
    more info
    Tutorial

  • How can I search for an exact string match in my emails?

    I was looking for an old email that I had about Re-Animator The Musical. So, in the search bar in the upper right corner of the Thunderbird window, I typed "re-animator". I got 59 hits, and the message that actually contained the string "re-animator" was 27th, when sorted by relevance. All of the other hits were emails which contained the word "animal" or "animals", which to me has nothing to do with "re-animator". I'm surprised that those were considered hits at all, much less that they were considered more relevant than the one message which actually contained the desired string.
    I actually tried three different searches:
    reanimator
    re-animator
    "re-animator"
    (i. e. the first two were without quotes and the third was with quotes). All three of these variations had the same problem, though, that messages containing "animal" were ranked before the message containing "re-animator".
    The desired message contained the word "Re-Animator" (with that capitalization and hyphenation), and also contained "reanimatorthemusical" as part of a URL that was mentioned in the message. So, I would have expected both the search with the hyphen and the search without the hyphen to have been good hits for this message.
    My question is: How can I tell Thunderbird to search for messages that literally contain the string I ask for, and not get "creative" with the matches, as it seems to be doing for some reason?
    (I'm using Thunderbird 31.3.0 on Mac OS X 10.9.5.)

    No, searching for:
    "Animator" musical
    still has the exact same problem: it still wants to find "animal" instead of "animator". Why?
    Yes, I had already read the support article you linked to, but I hadn't found anything in it about why Thunderbird would prefer "animal" over "animator", or how to disable this misfeature. Is there no better documentation for the search bar than that?
    (And the search for "Animator The Musical" didn't find my message, simply because my message didn't contain that exact string. It contained "I am on a waiting list for some musical tickets for Sunday, but I haven't heard back yet. It is a preview of The Re-Animator. ( http://www.reanimatorthemusical.com/ )." The search for "Animator The Musical" only had a single hit, your message in which you suggest searching for that.)

  • [Oracle to PostgreSQL]connction string lacks some options

    Hi guys,
    I want to connect from oracle 11g to PostgreSQL 9.3 . l get this error message:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [unixODBC]connction string lacks some options {08001,NativeErr = 202}
    ORA-02063: preceding 2 lines from k
    but I can connected to PostgreSQL using isql.
    Oracle CharacterSet :AL32UTF8
    PostgreSQL server_encoding:UTF8
    PostgreSQL client_encoding:UTF8
    Here are my configuration files:
    odbc.ini:
    [PostgreSQL]
    Driver = /usr/local/pgsqlodbc/lib/psqlodbcw.so
    Description = Test2PG
    Servername = 192.168.0.1
    PORT = 5432
    Protocol = 9.3
    UserName = postgres
    Password = postgres
    Database = testdb
    TRACE =Yes
    TaceFile = /tmp/sql.log
    tnsnames.ora:
    PostgreSQL =
    (DESCRIPTION =
       (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.10)(PORT = 1521))
       (CONNECT_DATA =(SID = PostgreSQL)
      (HS =OK)
    listener.ora:
    SID_LIST_LISTENER=
      (SID_LIST=
        (SID_DESC=
          (SID_NAME=PostgreSQL)
          (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
          (EVNS=LD_LIBRARY_PATH=/usr/local/unixodbc/lib:/usr/local/pgsqlodbc/lib:/u01/app/oracle/product/11.2.0/dbhome_1/bin)
          (PROGRAM=dg4odbc)
    initiPostgreSQL.ora:
    HS_FDS_CONNECT_INFO = PostgreSQL
    HS_FDS_TRACE_LEVEL = 255
    HS_FDS_SHAREABLE_NAME = /usr/local/unixodbc/lib/libodbc.so
    HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1
    set ODBCINI=/etc/odbc.ini
    Trace:
    Oracle Corporation --- THURSDAY  MAY 15 2014 15:59:19.875
    Heterogeneous Agent Release
    11.2.0.3.0
    Oracle Corporation --- THURSDAY  MAY 15 2014 15:59:19.874
        Version 11.2.0.3.0
    Entered hgogprd
    HOSGIP for "HS_FDS_TRACE_LEVEL" returned "255"
    Entered hgosdip
    setting HS_OPEN_CURSORS to default of 50
    setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
    setting HS_FDS_RECOVERY_PWD to default value
    setting HS_FDS_TRANSACTION_LOG to default of HS_TRANSACTION_LOG
    setting HS_IDLE_TIMEOUT to default of 0
    setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
    setting HS_NLS_NCHAR to default of "AL32UTF8"
    setting HS_FDS_TIMESTAMP_MAPPING to default of "DATE"
    setting HS_FDS_DATE_MAPPING to default of "DATE"
    setting HS_RPC_FETCH_REBLOCKING to default of "ON"
    setting HS_FDS_FETCH_ROWS to default of "100"
    setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
    setting HS_FDS_RSET_RETURN_ROWCOUNT to default of "FALSE"
    setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
    setting HS_FDS_MAP_NCHAR to default of "TRUE"
    setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
    setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
    setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
    setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
    setting HS_FDS_QUERY_DRIVER to default of "TRUE"
    setting HS_FDS_SUPPORT_STATISTICS to default of "FALSE"
    setting HS_FDS_QUOTE_IDENTIFIER to default of "TRUE"
    setting HS_KEEP_REMOTE_COLUMN_SIZE to default of "OFF"
    setting HS_FDS_GRAPHIC_TO_MBCS to default of "FALSE"
    setting HS_FDS_MBCS_TO_GRAPHIC to default of "FALSE"
    Default value of 32 assumed for HS_FDS_SQLLEN_INTERPRETATION
    setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics;gtw$:SQLGetInfo"
    setting HS_FDS_DELAYED_OPEN to default of "TRUE"
    setting HS_FDS_WORKAROUNDS to default of "0"
    Exiting hgosdip, rc=0
    ORACLE_SID is "PostgreSQL"
    Product-Info:
      Port Rls/Upd:3/0 PrdStat:0
      Agent:Oracle Database Gateway for ODBC
      Facility:hsa
      Class:ODBC, ClassVsn:11.2.0.3.0_0011, Instance:PostgreSQL
    Exiting hgogprd, rc=0
    hostmstr:          0: HOA After hoagprd
    hostmstr:          0: HOA Before hoainit
    Entered hgoinit
    HOCXU_COMP_CSET=1
    HOCXU_DRV_CSET=31
    HOCXU_DRV_NCHAR=873
    HOCXU_DB_CSET=873
    HS_LANGUAGE is AMERICAN_AMERICA.WE8ISO8859P1
    LANG=en_US.UTF-8
    HOCXU_SEM_VER=112000
    Entered hgolofn at 2014/05/15-15:59:19
    HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/local/unixodbc/lib/libodbc.so"
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLAllocHandle
    symbol_peflctx=0x522520
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLBindCol
    symbol_peflctx=0x5226c0
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLBindParameter
    symbol_peflctx=0x523110
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLCancel
    symbol_peflctx=0x524930
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLDescribeParam
    symbol_peflctx=0x52e120
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLDisconnect
    symbol_peflctx=0x52e670
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLEndTran
    symbol_peflctx=0x531b50
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLExecute
    symbol_peflctx=0x5336b0
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLFetch
    symbol_peflctx=0x534070
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLFreeHandle
    symbol_peflctx=0x5361e0
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLFreeStmt
    symbol_peflctx=0x536210
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLGetData
    symbol_peflctx=0x537fd0
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLGetEnvAttr
    symbol_peflctx=0x53bc40
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLGetFunctions
    symbol_peflctx=0x53c040
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLMoreResults
    symbol_peflctx=0x53e0d0
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLNumResultCols
    symbol_peflctx=0x53f030
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLParamData
    symbol_peflctx=0x53f3f0
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLPutData
    symbol_peflctx=0x541a40
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLRowCount
    symbol_peflctx=0x541f30
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLSetEnvAttr
    symbol_peflctx=0x5447f0
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLSetDescRec
    symbol_peflctx=0x544570
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLColAttribute
    symbol_peflctx=0x5254a0
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLColumns
    symbol_peflctx=0x527280
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLConnect
    symbol_peflctx=0x52b600
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLDescribeCol
    symbol_peflctx=0x52d8c0
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLDriverConnect
    symbol_peflctx=0x52f420
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLExecDirect
    symbol_peflctx=0x532ff0
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLForeignKeys
    symbol_peflctx=0x534bc0
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLGetConnectAttr
    symbol_peflctx=0x536670
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLGetDescField
    symbol_peflctx=0x538800
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLGetDescRec
    symbol_peflctx=0x538ea0
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLGetDiagField
    symbol_peflctx=0x53a350
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLGetDiagRec
    symbol_peflctx=0x53b220
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLGetInfo
    symbol_peflctx=0x53cbd0
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLGetStmtAttr
    symbol_peflctx=0x53cf60
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLGetTypeInfo
    symbol_peflctx=0x53dc40
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLPrepare
    symbol_peflctx=0x53fce0
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLPrimaryKeys
    symbol_peflctx=0x540340
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLProcedureColumns
    symbol_peflctx=0x540ae0
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLProcedures
    symbol_peflctx=0x541300
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLSetConnectAttr
    symbol_peflctx=0x542270
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLSetStmtAttr
    symbol_peflctx=0x546050
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLSetDescField
    symbol_peflctx=0x5440d0
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLStatistics
    symbol_peflctx=0x548140
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Entered hgolofns at 2014/05/15-15:59:19
    libname=/usr/local/unixodbc/lib/libodbc.so, funcname=SQLTables
    symbol_peflctx=0x5491b0
    hoaerr:0
    Exiting hgolofns at 2014/05/15-15:59:19
    Exiting hgolofn, rc=0 at 2014/05/15-15:59:19
    HOSGIP for "HS_OPEN_CURSORS" returned "50"
    HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
    HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
    HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
    HOSGIP for "HS_KEEP_REMOTE_COLUMN_SIZE" returned "OFF"
    HOSGIP for "HS_FDS_DELAYED_OPEN" returned "TRUE"
    HOSGIP for "HS_FDS_WORKAROUNDS" returned "0"
    HOSGIP for "HS_FDS_MBCS_TO_GRAPHIC" returned "FALSE"
    HOSGIP for "HS_FDS_GRAPHIC_TO_MBCS" returned "FALSE"
    Invalid value of 32 given for HS_FDS_SQLLEN_INTERPRETATION
    treat_SQLLEN_as_compiled = 1
    Exiting hgoinit, rc=0 at 2014/05/15-15:59:19
    hostmstr:          0: HOA After hoainit
    hostmstr:          0: HOA Before hoalgon
    Entered hgolgon at 2014/05/15-15:59:19
    reco:0, name:postgres, tflag:0
    Entered hgosuec at 2014/05/15-15:59:19
    Exiting hgosuec, rc=0 at 2014/05/15-15:59:19
    HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
    HOSGIP for "HS_FDS_TRANSACTION_LOG" returned "HS_TRANSACTION_LOG"
    HOSGIP for "HS_FDS_TIMESTAMP_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_DATE_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
    HOSGIP for "HS_FDS_RESULTSET_SUPPORT" returned "FALSE"
    HOSGIP for "HS_FDS_RSET_RETURN_ROWCOUNT" returned "FALSE"
    HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
    HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
    using postgres as default value for "HS_FDS_DEFAULT_OWNER"
    HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
    Entered hgocont at 2014/05/15-15:59:19
    HS_FDS_CONNECT_INFO = "PostgreSQL"
    RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
    Entered hgogenconstr at 2014/05/15-15:59:19
    dsn:PostgreSQL, name:postgres
    optn:
    Entered hgocip at 2014/05/15-15:59:19
    dsn:PostgreSQL
    Exiting hgocip, rc=0 at 2014/05/15-15:59:19
    ##>Connect Parameters (len=40)<##
    ## DSN=PostgreSQL;
    #! UID=postgres;
    #! PWD=*
    Exiting hgogenconstr, rc=0 at 2014/05/15-15:59:19
    Entered hgopoer at 2014/05/15-15:59:19
    hgopoer, line 231: got native error 202 and sqlstate 08001; message follows...
    [unixODBC]connction string lacks some options {08001,NativeErr = 202}
    Exiting hgopoer, rc=0 at 2014/05/15-15:59:19
    hgocont, line 2754: calling SqlDriverConnect got sqlstate 08001
    Exiting hgocont, rc=28500 at 2014/05/15-15:59:19 with error ptr FILE:hgocont.c LINE:2774 FUNCTION:hgocont() ID:Something other than invalid authorization
    Exiting hgolgon, rc=28500 at 2014/05/15-15:59:19 with error ptr FILE:hgolgon.c LINE:801 FUNCTION:hgolgon() ID:Calling hgocont
    hostmstr:          0: HOA After hoalgon
    RPC Calling nscontrol(0), rc=0
    hostmstr:          0: RPC Before Exit Agent
    hostmstr:          0: HOA Before hoaexit
    Entered hgoexit at 2014/05/15-15:59:19
    Exiting hgoexit, rc=0
    hostmstr:          0: HOA After hoaexit
    hostmstr:          0: RPC After Exit Agent
    ODBC Trace:
    [ODBC][6580][1400140759.882270][SQLSetConnectAttr.c][396]
      Entry:
      Connection = 0x90bd960
      Attribute = SQL_ATTR_AUTOCOMMIT
      Value = (nil)
      StrLen = -5
    [ODBC][6580][1400140759.882326][SQLSetConnectAttr.c][671]
      Exit:[SQL_SUCCESS]
    [ODBC][6580][1400140759.882642][SQLDriverConnect.c][728]
      Entry:
      Connection = 0x90bd960
      Window Hdl = (nil)
      Str In = [DSN=PostgreSQL;UID=postgres;PWD=********][length = 40]
      Str Out = 0x90bd200
      Str Out Max = 1024
      Str Out Ptr = 0xbfd1e25c
      Completion = 0
      UNICODE Using encoding ASCII 'ANSI_X3.4-1968' and UNICODE 'UCS-2LE'
      DIAG [08001] connction string lacks some options
    [ODBC][6580][1400140759.887954][SQLDriverConnect.c][1454]
      Exit:[SQL_ERROR]
    [ODBC][6580][1400140759.888032][SQLGetDiagRec.c][680]
      Entry:
      Connection = 0x90bd960
      Rec Number = 1
      SQLState = 0xbfd1df58
      Native = 0xbfd1df7c
      Message Text = 0xbfd1dd20
      Buffer Length = 510
      Text Len Ptr = 0xbfd1df94
    [ODBC][6580][1400140759.888065][SQLGetDiagRec.c][717]
      Exit:[SQL_SUCCESS]
      SQLState = 08001
      Native = 0xbfd1df7c -> 202
      Message Text = [[unixODBC]connction string lacks some options]
    [ODBC][6580][1400140759.888108][SQLGetDiagRec.c][680]
      Entry:
      Connection = 0x90bd960
      Rec Number = 2
      SQLState = 0xbfd1df58
      Native = 0xbfd1df7c
      Message Text = 0xbfd1dd20
      Buffer Length = 510
      Text Len Ptr = 0xbfd1df94
    [ODBC][6580][1400140759.888136][SQLGetDiagRec.c][717]
      Exit:[SQL_NO_DATA]
    [ODBC][6580][1400140759.888222][SQLDisconnect.c][208]
      Entry:
      Connection = 0x90bd960
    [ODBC][6580][1400140759.888250][SQLDisconnect.c][237]Error: 08003
    [ODBC][6580][1400140759.888319][SQLFreeHandle.c][284]
      Entry:
      Handle Type = 2
      Input Handle = 0x90bd960
    [ODBC][6580][1400140759.888352][SQLFreeHandle.c][333]
      Exit:[SQL_SUCCESS]
    [ODBC][6580][1400140759.889499][SQLFreeHandle.c][219]
      Entry:
      Handle Type = 1
      Input Handle = 0x90abf70
    Thank you.

    When looking at the strace file the Driver Manager tries to load the odbc.ini you specified in your gateway init file: set ODBCINI=/etc/odbc.ini
    but that fails as the oracle user can not access it - instead it tries to load a different file:
    17811 open("/etc/odbc.ini", O_WRONLY|O_CREAT|O_APPEND, 0666) = -1 EACCES (Permission denied)
    17811 open("/usr/local/unixodbc/etc/odbc.ini", O_RDONLY) = 8
    Could you please make sure that the oracle user can access that file?
    You also mentioned at the beginning that you could connect to the Postgres database using isql - did you do the test as "oracle" user and what ENV parameters have you set before opening isql?
    Just a minor issue which has no impact as your LD_LIBRARY_PATH in the environment is set correctly - the listener.ora file contains the line
    (EVNS=LD_LIBRARY_PATH=/usr/local/unixodbc/lib:/usr/local/pgsqlodbc/lib:/u01/app/oracle/product/11.2.0/dbhome_1/bin)
    but EVNS should be ENVS or even better ENV. So please correct:
    (EVNS=LD_LIBRARY_PATH=/usr/local/unixodbc/lib:/usr/local/pgsqlodbc/lib:/u01/app/oracle/product/11.2.0/dbhome_1/bin)
    to
    (ENV="LD_LIBRARY_PATH=/usr/local/unixodbc/lib:/usr/local/pgsqlodbc/lib:/u01/app/oracle/product/11.2.0/dbhome_1/bin")
    Then stop and start the listener.
    - Klaus

  • String Truncation Exception in SQL Server

    I get an error when issuing an updateRow() after updateString("String Field", "Test"). My exception is:
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]String data
    , right truncation
    at sun.jdbc.odbc.JdbcOdbcResultSet.setPos(JdbcOdbcResultSet.java:5068)
    at sun.jdbc.odbc.JdbcOdbcResultSet.updateRow(JdbcOdbcResultSet.java:4053
    at exuberance.remote.JDBCClient.setFieldValue(JDBCClient.java:446)
    I believe this occurs because Java stores strings in Unicode (2 bytes), but I'm not positive. Any help would be much appreciated.

    You are passing a string that is too big.
    Possibilities:
    -String you are passing is bigger than field it is being inserted into.
    -Total length of SQL call exceeds the max len limit (8000?, 2174?)
    -The string is a actually a 'blob' type of string (greater than 8000 on MS SQL?) and you need to use the same sort of handling for blobs to pass it.

  • Exact String match when calling a recordset

    I have a CategoryID column, and a Cats column.
    The main catefory for that products is on CategortID, but the in the Cats column is a string of other categories that the item is listed in.
    The problem is that if the search is for category id 94, and the Cats column includes 194 the item gets shown.
    How so I create a recordset that only returns items that match exactly out of the sting.
    I am currently using
    WHERE (Categoryid = colname or (INSTR(Cats, colname) >= 1))
    Here is an example
    Item CategoryID = 139
    Cats = 187, 136, 194
    But searching for category id displays this item!
    Any help appreciated

    Instead of INSTR(), try using FIND_IN_SET()
    WHERE (Categoryid = colname or (FIND_IN_SET(Cats, colname) >= 1))
    FIND_IN_SET() is meant to be for strings, so it might not work. But it does look for a complete match in a comma-separated list. Make sure there is no space between the comma and number when stored.

  • Forcing an exact string match in searches

    Is there a way of using the Case Exact String and Case Ignore String plugins so I can ensure that the iPlanet directory server only returns exact matches to an LDAP client.
    e.g.the difference in
    ldapsearch "cn=Abc"
    ldapsearch "cn=ABC"
    I want to find only "ABC" and NOT Abc or abc or aBc and so on..

    You can accomplish this using extensible matching rules.
    By default, the cn attribute is not case-sensitive. You can search for a case-sensitive cn value with a search filter like:
    cn:2.5.3.15:=ABC
    This will use the 2.5.3.15 (Case Exact Match) matching rule on the cn attribute. Note that this search will not be indexed, however, and will take longer than a normal cn search for an exact value.
    You can find more information on extensible matching in RFC 2254 (http://www.ietf.org/rfc/rfc2254.txt).

Maybe you are looking for

  • Posting of rejected qty thru QM

    Hi, I have a issue were i need to post 8 out of 10 qty to unrestricted stock and remaining 2 to be done rework how should i post it and how the rework will be done is not clear. I have a tried to do it by posting 8 in unres and remaining 2 to return

  • Windows 8.1: Explorer - Visual C++ Runtime error "Terminate in an usual way"

    After updating form Win 8 Pro to Win 8.1 Pro, sometime Explorer.exe crashes by itself, here is the detail from Event Viewer: Faulting application name: Explorer.EXE, version: 6.3.9600.16408, time stamp: 0x523d251b Faulting module name: msvcrt.dll, ve

  • Songs out of Album Order on iPod

    All my songs appear in the correct album order in iTunes. But for a few albums they are all jumbled up on my iPod Touch. So for example, one particular album will have all the tracks appearing in ascending order from 1 to 10 in iTunes. However, on th

  • WMA to MP3 Help

    Hey All + Apple,                          I have in excess of 1000 songs still in .wma format from my Windows days. I crossed over to the dark side and now realize that my Mac wont automatically convert my wma songs like the Windows version of iTunes

  • BEx Variable Key/Name swap when used as Prompt in WebI report

    Hi, We are using Bex Variables in a Query used as a base for a BOBJ Universe and Query. When refreshing the report the Prompt box displays the Name and Key of the infoobject (Dimension), but when selecting one of those values - moving it to the right