SolrPhpClient not working - solr

I have a question. SolrphpClient is not working with multicore.
I have two cores in my solr say core1 and core2.
While creating object of SolrPhpClient I am using the following syntax.
$solr = new Apache_Solr_Service('192.168.12.226', '8983', 'solr/core1/' );
It's giving a fatal error...
Fatal error: Uncaught exception 'Exception' with message '"500" Status: null_javalangNullPointerException_at_javaioStringReaderinitStringReaderjava50__at_orgapachelucenequeryParserQue' in C:\xampp\htdocs\solrsite\SolrPhpClient\Apache\Solr\Service.php:334 Stack trace: #0 C:\xampp\htdocs\solrsite\SolrPhpClient\Apache\Solr\Service.php(964): Apache_Solr_Service->_sendRawGet('http://192.168....') #1 C:\xampp\htdocs\solrsite\script\productlist.php(403): Apache_Solr_Service->search(NULL, 0, 15, Array) #2 C:\xampp\htdocs\solrsite\index.php(510): include_once('C:\xampp\htdocs...') #3 {main} thrown in C:\xampp\htdocs\solrsite\SolrPhpClient\Apache\Solr\Service.php on line 334
Solr is working fine in admin part.
Any help will be appreciated.

Based on your url that you provided:
http://192.168.12.226:8983/solr/core1/select?fl=ST_StockCode%2CST_ItemCategory%2CST_Stone1%2CST_Stone2%2CST_LowPrice%2CST_WebPrice
%2CST_Name%2CST_ArticleType%2CST_MetalType%2CST_HighPrice%2CST_ImageFileName%2Cis_clearance%2CGroupName
%2CFreePnp%2CST_ItemSize%2CST_MarketPrice&sort=ST_Name+desc&version=1.2&wt=json&json.nl=map&start=0&rows=1
It does not look like you are providing an actual query q= value in your request. I would guess that is the reason for the error... I would suggest that you start with setting the SolrPhpClient so that is passes q=*:* to start with.

Related

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42601]:

I am new to postgresql/postgis and am unable to solve this problem. I have lat long values which I retrieve by the click event and split using
lonlat.split(",");
But when I pass them into the following query, I receive a syntax error.
$sql1=$conn->prepare("select id,ST_Contains(geom,GeomFromText(4326,'POINT(".$lon." ".$lat.")')) as yes_within from public.".$layername);
$sql1->execute();
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at end of input LINE 1: ...om,GeomFromText('POINT( )',4326)) as yes_within from public. ^' in C:\xampp\htdocs... Stack trace: #0 PDOStatement->execute() #1 {main} thrown in C:\xampp\htdocs... on line 22
From the error
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at end of input LINE 1: ...om,GeomFromText('POINT( )',4326)) as yes_within from public. ^' in C:\xampp\htdocs... Stack trace: #0 PDOStatement->execute() #1 {main} thrown in C:\xampp\htdocs... on line 22
That means that even though you think you're getting them from split, you're not getting them from split. You're concatenating an empty string. The problem isn't in PostgreSQL.
Aside from that, don't construct a point that way. Instead use,
ST_MakePoint(long,lat)::geography
Which creates a geography not a geometry and it does it without text-parsing.

Zeppelin 0.7.2 org.apache.thrift.transport.TTransportException with Spark and HighCharts

If I add this artifact to Zeppelin com.knockdata:spark-highcharts:0.6.4 it gives the error org.apache.thrift.transport.TTransportException
Even a simple example like this causes the error:
val x = Array(1,2,3,4)
val rdd = sc.parallelize(x)
The problem is definitely related to %spark as %md and %sh work. I have Spark version spark-2.1.0-bin-hadoop2.6.
There are no messages in the Spark logs. In zeppelin-interpreter-spark-root-(hostname).log it says:
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was
BEGIN_OBJECT at line 1 column 2
at com.google.gson.Gson.fromJson(Gson.java:802)
at com.google.gson.Gson.fromJson(Gson.java:757)
at com.google.gson.Gson.fromJson(Gson.java:706)
at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer.convert(RemoteInterprete
rServer.java:425)
org.apache.zeppelin.interpreter.InterpreterException: Exception in thread "main" java.lang.NoSuchMethodError: scala.Predef$.wrapRefArray([Ljava/lang/Object;)Lscala/collection/mutable/WrappedArray;
spark-highcharts:0.6.4 does not support zeppelin:0.7.2. There is a dependency from spark-highcharts which clearly state which zeppelin version to use and it is not binary compatible. That is why the error reported.
The version has been bumped to spark-highcharts:0.6.5 to support zeppelin:0.7.2(spark:2.1).

cakephp - error when trying to use Cake Console

i'm trying to use Twitter Bootstrap in my Cakephp. Thus i follow the tutorial given here>>https://github.com/slywalker/TwitterBootstrap.
When i try to run the command
Console/cake TwitterBootstrap.copy
this is what turns out:
kostas#ubuntu-laptop:~/Desktop/Projects/mailer/app$ Console/cake TwitterBootstrap.copy
Error: Shell class CopyShell could not be found.
#0 /home/kostas/Desktop/Projects/mailer/lib/Cake/Console/ShellDispatcher.php(190): ShellDispatcher->_getShell('TwitterBootstra...')
#1 /home/kostas/Desktop/Projects/mailer/lib/Cake/Console/ShellDispatcher.php(68): ShellDispatcher->dispatch()
#2 /home/kostas/Desktop/Projects/mailer/app/Console/cake.php(37): ShellDispatcher::run(Array)
#3 {main}
kostas#ubuntu-laptop:~/Desktop/Projects/mailer/app$
Do you know what's happening? :/ I have been trying to bypass this problem for a while without having found any solution yet.
Thank you in advance

Is there a list of applicationError codes & descriptions for the Google AppEngine ApplicationException?

Hello everyone and thanks up front for your time,
I am working on a java-based GAE web application and now and then I get ApiProxy.ApplicationExceptions.
In the current case they appear randomly and come with the applicationError 108 when I open a write channel to a blob using the (yes I know, still experimental) FileStore API. Although the API is still in an experimental state, I'd like to handle the thrown exception correctly. Thus my question:
Where can I find a list of possible application errors including their descriptions?
As of right now it is not possible for me to figure out where the problem resides since the thrown exception does not contain something like a message, hint or reason phrase but only the error ID 108:
Caused by: com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 108:
at java.lang.Thread.getStackTrace(Thread.java:1495)
at com.google.apphosting.runtime.ApiProxyImpl.doSyncCall(ApiProxyImpl.java:240)
at com.google.apphosting.runtime.ApiProxyImpl.access$000(ApiProxyImpl.java:66)
at com.google.apphosting.runtime.ApiProxyImpl$1.run(ApiProxyImpl.java:183)
at com.google.apphosting.runtime.ApiProxyImpl$1.run(ApiProxyImpl.java:180)
at java.security.AccessController.doPrivileged(Native Method)
at com.google.apphosting.runtime.ApiProxyImpl.makeSyncCall(ApiProxyImpl.java:180)
at com.google.apphosting.runtime.ApiProxyImpl.makeSyncCall(ApiProxyImpl.java:66)
at com.googlecode.objectify.cache.TriggerFutureHook.makeSyncCall(TriggerFutureHook.java:154)
at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:107)
at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:56)
at com.google.appengine.api.files.FileServiceImpl.makeSyncCall(FileServiceImpl.java:584)
... 65 more
Also, the corresponding javadoc is quite conservative with giving information: https://developers.google.com/appengine/docs/java/javadoc/com/google/apphosting/api/ApiProxy.ApplicationException
Currently I bluntly cancel these requests with a 500, but since I am not sure what has happened I should probably do something else/more.
Thanksalot!
the best information I could get is from the Python source code :
http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/api/files/file_service_pb.py

Relational SOQL in Salesforce PatronManager

I'm attempting to build an application using the Salesforce API (with custom PatronManager objects) and when I run the following "parent-to-child" query I get an error message stating that the relationship is not understood:
SELECT Name, (SELECT PatronTicket__InstanceDate__c FROM PatronTicket__EventInstance__r) FROM PatronTicket__TicketableEvent__c
However, when I reverse this and run a "child-to-parent" query, it works perfectly:
SELECT PatronTicket__InstanceDate__c, PatronTicket__TicketableEvent__r.Name FROM PatronTicket__EventInstance__c
Can anyone shed any light on why the parent-to-child query is giving me an error message?
Thanks!
Scott
Additional Info
I'm using the PHP Toolkit with the Enterprise WSDL and I'm getting the following error message:
Fatal error: Uncaught SoapFault exception: [sf:INVALID_TYPE] INVALID_TYPE: PatronTicket__InstanceDate__c FROM PatronTicket__EventInstance__r) ^ ERROR at Row:1:Column:57 Didn't understand relationship 'PatronTicket__EventInstance__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. in /home/scott/public_html/salesforce-test/salesforce/soapclient/SforceBaseClient.php:782 Stack trace: #0 [internal function]: SoapClient->__call('query', Array) #1 /home/scott/public_html/salesforce-test/salesforce/soapclient/SforceBaseClient.php(782): SoapClient->query(Array) #2 /home/scott/public_html/salesforce-test/aupac-enterprise.php(16): SforceBaseClient->query('SELECT Name, (S...') #3 {main} thrown in /home/scott/public_html/salesforce-test/salesforce/soapclient/SforceBaseClient.php on line 782
This is Michelle from Patron Technology. Can you contact our client services department directly? Use the "support" link in the PatronManager CRM Help tab. It's awesome that you're trying to do this and I'd love to discuss it further.
I have a simple "for now" answer for you (you need to use PatronTicket_EventInstances_r plural, instead of Instance), but I also want to talk about this in more detail because technically the Salesforce API doesn't fully support accessing custom objects (and therefore our custom objects don't necessarily fully work with the API)...

Resources