Mapserver/PostGIS FILTER Query Error - postgis

I am new using mapsever. I downloaded an example from Internet (http://www.codegeo.com.br/search/label/MapServer). I tested it in my PC, my development environment (mapserver version 6.4.1), and it works.
Now I put it in a "testing enviroment" (mapserver version 7.0.0), but I have a problem with the FILTER directive in the mapfile.
This is the code in the .map file:
DATA "the_geom FROM estados USING UNIQUE id USING SRID=4326"
FILTER "sigla ILIKE '%%state%%'"
When I execute the script, I get an empty png file but there is no errors:
$ mapserv -nh "QUERY_STRING=map=/var/www/codegeo/codegeo.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=states&estado=SP&WIDTH=256&HEIGHT=256&CRS=EPSG%3A900913&STYLES=&BBOX=0%2C0%2C2504688.5428486555%2C2504688.5428486555"
The log file defined into the mapfile file has the following error:
executing query: select "nome","codigo",encode(ST_AsBinary(ST_Force2D("the_geom"),'NDR'),'hex') as geom,"id" from estados where the_geom && ST_GeomFromText('POLYGON((0.0439453124999988 0.0439453081913454,0.0439453124999988 21.9022779666686,22.4560546875 21.9022779666686,22.4560546875 0.0439453081913454,0.0439453124999988 0.0439453081913454))',4326) and ()
[Mon Feb 27 11:39:06 2017].147993 msPostGISLayerWhichShapes(): Query error. Error executing query. Check server logs
[Mon Feb 27 12:05:49 2017].361015 getSymbol(): Symbol definition error. Parsing error near (():(line 123)
[Mon Feb 27 11:39:06 2017].147993 msPostGISLayerWhichShapes(): Query error. Error executing query. Check server logs
[Mon Feb 27 12:05:49 2017].361015 getSymbol(): Symbol definition error. Parsing error near (():(line 123)
I know that is something wrong with the filter instruction. If i comment it , I see the layer in the web page. I didn't find any documentation about ILIKE operator.
Somebody knows which is the problem?

From Mapserver 7, you cannot use "native filters" anymore.
Check the docs here
http://mapserver.org/de/mapfile/layer.html (under FILTER).
You need to rewrite the filter using the expression syntax documented here http://mapserver.org/de/mapfile/expressions.html#expressions

Related

extension 'inboundservices' not found within de.hybris.bootstrap.typesystem.YTypeSystem

I am getting this error even after removing all the orphaned types.
ERROR [hybrisHTTP6] [XMLContentHandler] error in taglistener de.hybris.bootstrap.typesystem.xml.ItemTypeTagListener#6db66316 at line 425 : error parsing system integrationservices at lines [400-425] : extension 'inboundservices' not found within de.hybris.bootstrap.typesystem.YTypeSystem#58732e23
Full error log:
de.hybris.bootstrap.xml.UnknownParseError: error parsing system
integrationservices at lines [400-425] : extension 'inboundservices'
not found within de.hybris.bootstrap.typesystem.YTypeSystem#58732e23
java.lang.IllegalArgumentException: extension 'inboundservices' not
found within de.hybris.bootstrap.typesystem.YTypeSystem#58732e23 at
de.hybris.bootstrap.typesystem.xml.AbstractTypeSystemTagListener.processError(AbstractTypeSystemTagListener.java:44)
at
de.hybris.bootstrap.xml.DefaultTagListener.endElement(DefaultTagListener.java:293)
at
de.hybris.bootstrap.xml.XMLContentHandler.endElement(XMLContentHandler.java:197)
This happens when itemtypes are moved from one extension to another. In your case you hade itemtypes defined in inboundservices-items.xml that are now in integrationservices-items.xml.
To find out which exact itemtypes are causing the issue, go to the lines mentioned in the stacktrace, integrationservices-items.xml lines 400 to 425.
To fix this you will need to manually delete some entries from the database. with the following, SQL, not FlexibleSearch, queries via the HAC.
Delete the attributeDescriptors of the moved attributes
delete
from attributedescriptors
where ownerpkstring in (select pk
from composedtypes
where internalcodelowercase in ('list','of','affected','attributes'));
Delete the composedtypes
delete
from composedtypes
where internalcodelowercase in ('list','of','affected','attributes');
And in case you have moved a deployment table, delete the ydeployments as well
delete
from ydeployments
where ExtensionName = 'inboundservices'
AND TableName = 'affectedItemTypeTable'
Some additional information that might help can be found here

Alfresco - Configure 2 groupSearchBases for Active Directory

How to configure 2 groupSearchBases for Alfresco?
Right now i have this property in my global.properties:
ldap.synchronization.groupSearchBase=CN\=Alfresco users,OU\=Users,OU\=AWE,DC\=main,DC\=awe
But i need to configure second search base with path
CN=Alfresco users,OU=Labs,OU=AWE,DC=main,DC=awe
. What i have tried is to configure the property with OR statement like this:
ldap.synchronization.groupSearchBase=(|(CN\=Alfresco users,OU\=Users,OU\=AWE,DC\=main,DC\=awe)(CN\=Alfresco users,OU\=Labs,OU\=AWE,DC\=main,DC\=awe))
This setting gave me an error:
00:30:07,147 ERROR [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] Synchronization aborted due to error
org.alfresco.error.AlfrescoRuntimeException: 02290000 Error during LDAP Search. Reason: null
...
Caused by: javax.naming.PartialResultException [Root exception is javax.naming.NamingException: LDAP response read timed out, timeout used:5000ms. [Root exception is com.sun.jndi.ldap.LdapReferralException: Continuation Reference; remaining name 'DC\=main,DC\=awe']; remaining name '']
...
Caused by: javax.naming.NamingException: LDAP response read timed out, timeout used:5000ms. [Root exception is com.sun.jndi.ldap.LdapReferralException: Continuation Reference; remaining name 'DC\=main,DC\=awe']; remaining name ''
...
Caused by: com.sun.jndi.ldap.LdapReferralException: Continuation Reference; remaining name 'DC\=main,DC\=awe'
I also minimized the searchBase path to include both of the directories like this:
ldap.synchronization.groupSearchBase=CN\=Alfresco users,OU\=AWE,DC\=main,DC\=awe
But this also gave me an error:
org.alfresco.error.AlfrescoRuntimeException: 02310000 Error during LDAP Search. Reason: [LDAP: error code 32 - 0000208D: NameErr: DSID-03100238, problem 2001 (NO_OBJECT), data 0, best match of: 'OU=AWE,DC=main,DC=awe'
...
Caused by: javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-03100238, problem 2001 (NO_OBJECT), data 0, best match of:'OU=AWE,DC=main,DC=awe'
What i am doing wrong and how to make alfresco search for both groupSearchBases (the easiest way if possible). Thanks in advance.
as mentioned in the comments, the search base is a LDAP (Distinguished Name) path, not a query. This means that you should select the search base for your user and group query to a path for which both organizational units are subordinate: OU=AWE,DC=main,DC=awe.
Then you need to build the users and groups query so that only groups and users are returned as expected. E.g. for the person query can look like this:
(&
(objectCategory\=Person)
(|
(memberOf\:1.2.840.113556.1.4.1941\:\=CN\=Alfresco users,OU\=Users,OU\=AWE,DC\=main,DC\=awe)
(memberOf\:1.2.840.113556.1.4.1941\:\=CN\=Alfresco users,OU\=Labs,OU\=AWE,DC\=main,DC\=awe)
)
(userAccountControl\:1.2.840.113556.1.4.803\:\=512)
)
for the group search you should do the same.
hint: 1.2.840.113556.1.4.1941 is a Active-Directory specific filter to retrieve nested groups (recursive retrieval of all members of that DN). For more info check Active Directory: LDAP Syntax Filters | MS Tecnet

The Microsoft Access Database Engine does not recognize

I use Access at work, I'm mostly self-taught and I know very little code . I've built a data base for handling HR KPI´S. In some of my queries, since 2016 started (2015 still runs), several reports I run now pops the error:
"The Microsoft Access Database Engine does not recognize 'C_Hrs_Permiso_TI_NT.NOTRAB' as a valid field name or expression".
I'm not sure why the report would be giving me an error about it.
Query Code:
TRANSFORM Sum(Hrs_Permiso_TI_NT.MONTOO) AS SumaDeMONTOO
SELECT Hrs_Permiso_TI_NT.EMPRESA,
Hrs_Permiso_TI_NT.CENCOS,
Left([Hrs_Permiso_TI_NT]![AMES],4) AS Año,
Right([Hrs_Permiso_TI_NT]![AMES],2) AS Mes,
Hrs_Permiso_TI_NT.CODIGO,
Fecha_maxmes_Calendario.MáxDeFecha
FROM Hrs_Permiso_TI_NT INNER JOIN Fecha_maxmes_Calendario
ON Hrs_Permiso_TI_NT.AMES=Fecha_maxmes_Calendario.Ames
GROUP BY Hrs_Permiso_TI_NT.EMPRESA,
Hrs_Permiso_TI_NT.CENCOS,
Left([Hrs_Permiso_TI_NT]![AMES],4),
Right([Hrs_Permiso_TI_NT]![AMES],2),
Hrs_Permiso_TI_NT.CODIGO,
Fecha_maxmes_Calendario.MáxDeFecha
PIVOT Hrs_Permiso_TI_NT.COHADE;
As soon as this query doesn't contain C_Hrs_Permiso_TI_NT, it means that the problem is one of queries 'Hrs_Permiso_TI_NT' or Fecha_maxmes_Calendario. Try to open them and locate error

ColdFusion 11 SOLR indexing logging conspicuous errors

I am running a scheduled task to refresh my SOLR collection. The coldfusion-out.log file has quite a few of the following errors:
Jan 12, 2016 10:10:21 AM Warning [ajp-bio-8014-exec-5] - WARNING: Could not index D:\PDFs\9310.PDF in SOLR. Check the exception for more details: An error occurred during GETINFO operation in the cfpdf tag.
Jan 12, 2016 10:10:51 AM Warning [ajp-bio-8014-exec-5] - WARNING: Could not index D:\PDFs\9887.PDF in SOLR. Check the exception for more details: An error occurred during the EXTRACTTEXT operation in the cfpdf tag.
The task code to retrieve the file locations:
<cfsetting requesttimeout="3600" />
<cfquery name="getDocs" datasource="#APPLICATION.DataSource#">
SELECT DISTINCT
SKU,
STATUS,
'D:\PDFs\'
CONCAT TRIM(DOCID)
CONCAT '.PDF' AS document_file
FROM MYTABLE
</cfquery>
<cfindex
query="getDocs"
collection="prudocs3"
action="refresh"
type="file"
key="document_file"
custom1="SKU"
custom2="STATUS" />
Any idea what is causing this?
While googling more about this, I came across this post from the wise Raymond Camden:
http://www.raymondcamden.com/2014/07/11/Issue-with-CFINDEX/
Once I read this, I took a closer look at the PDFs being used, they indeed did not have the Extraction permission turned on. I have contacted the vendor about updating their PDFs, so that they can be properly indexed and included in search results.

Solr Search : SEVERE: java.lang.ArrayIndexOutOfBoundsException: -1

I am getting the following error when I try a search query in my solr, am not sure what might be causing this, but this has bought a halt to all our work.
This query works:
http://10.0.0.13:8080/solr/cmn/select/?q=*:*&fl=searchText&rows=40000
But this:
http://10.0.0.13:8080/solr/cmn/select/?q=solr
doesn't work, and gives the following exception:
SEVERE: java.lang.ArrayIndexOutOfBoundsException: -1
at org.apache.lucene.util.packed.Packed64.get(Packed64.java:186)
at org.apache.lucene.index.TermInfosReaderIndex.seekEnum(TermInfosReaderIndex.java:118)
at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:235)
at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:172)
at org.apache.lucene.index.SegmentReader.docFreq(SegmentReader.java:509)
at org.apache.solr.search.SolrIndexReader.docFreq(SolrIndexReader.java:309)
at org.apache.lucene.search.TermQuery$TermWeight$1.add(TermQuery.java:56)
at org.apache.lucene.util.ReaderUtil$Gather.run(ReaderUtil.java:77)
at org.apache.lucene.util.ReaderUtil$Gather.run(ReaderUtil.java:82)
at org.apache.lucene.util.ReaderUtil$Gather.run(ReaderUtil.java:66)
at org.apache.lucene.search.TermQuery$TermWeight.<init>(TermQuery.java:53)
at org.apache.lucene.search.TermQuery.createWeight(TermQuery.java:199)
at org.apache.lucene.search.Searcher.createNormalizedWeight(Searcher.java:168)
at org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:664)
Regards,
Rohit
The index had crashed due to improper shutdown of tomcat, though the error doesn't reflect the same, fixed the index using the following command,
java -cp ./example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/lucene-core-3.1.0.jar -ea:org.apache.lucene... org.apache.lucene.index.CheckIndex "D:\Brandmanagement\solr\example\simplify360\crss\data\index" -fix
It would have been helpful if solr would have thrown the exact exception of the Index crashing. The index crashing issue has been fixed in solr 3.4 onward i guess.

Resources