Apache-Solr: JSP support not configured - apache

I'm using apache-solr from bitnami I downloaded a week ago. Everything is going fine about indexing and searching, but I can't execute jsp files.
When I try to open main.jsp, the file isn't executed, the browser only shows the codes I wrote on main.jsp. Here's the codes on main.jsp I got from a tutorial website:
<html>
<head>
<title>Using GET and POST Method to Read Form Data</title>
</head>
<body>
<center>
<h1>Using GET Method to Read Form Data</h1>
<ul>
<li><p><b>First Name:</b>
<%= request.getParameter("first_name")%>
</p></li>
<li><p><b>Last Name:</b>
<%= request.getParameter("last_name")%>
</p></li>
</ul>
</body>
</html>
And then, when I try to open /solr/admin/stats.jsp, it says:
>HTTP ERROR 500
>
>Problem accessing /solr/admin/stats.jsp. Reason:
>
> JSP support not configured
>
>Powered by Jetty://
So, then I tried to configure the JSP support by typing:
>$ java -jar jetty.jar OPTIONS=Server,jsp
in Cygwin. But it says:
>Error: Unable to access jarfile jetty.jar
I've tried to add this snippet in jetty.xml:
<Call class="java.lang.System" name="setProperty">
<Arg>org.apache.jasper.compiler.disablejsr199</Arg>
<Arg>true</Arg>
</Call>
And after restarting the apache and solr, it doesn't resolving my problem, either. I want to try adding this snippet to start.ini:
>-Dorg.apache.jasper.compiler.disablejsr199=true
But, I can't find start.ini.
Please help me.

Related

What is wrong with my solr account?

I am trying to get familiar solr to eventually complete a school project that involves indexing a .csv file. I am following the instructions on the following website: https://lucene.apache.org/solr/5_4_1/quickstart.html
and in particular, under the section Indexing CSV (Comma/Column Separated Values). I entered the commands just as specified (except im using solr version 6.3.0) and getting constant errors.
Below is what I entered into terminal:
Tylers-MacBook-Pro:6.3.0 tyler$ solr start
Archiving 1 old GC log files to /usr/local/Cellar/solr/6.3.0/server/logs/archived
Archiving 1 console log files to /usr/local/Cellar/solr/6.3.0/server/logs/archived
Rotating solr logs, keeping a max of 9 generations
Waiting up to 180 seconds to see Solr running on port 8983 [-]
Started Solr server on port 8983 (pid=20594). Happy searching!
Tylers-MacBook-Pro:6.3.0 tyler$ bin/post -c gettingstarted example/exampledocs/books.csv
java -classpath /usr/local/Cellar/solr/6.3.0/libexec/dist/solr-core-6.3.0.jar -Dauto=yes -Dc=gettingstarted -Ddata=files org.apache.solr.util.SimplePostTool example/exampledocs/books.csv
SimplePostTool version 5.0.0
Posting files to [base] url http://localhost:8983/solr/gettingstarted/update...
Entering auto mode. File endings considered are xml,json,jsonl,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt,log
POSTing file books.csv (text/csv) to [base]
SimplePostTool: WARNING: Solr returned an error #404 (Not Found) for url: http://localhost:8983/solr/gettingstarted/update
SimplePostTool: WARNING: Response: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /solr/gettingstarted/update. Reason:
<pre> Not Found</pre></p>
</body>
</html>
SimplePostTool: WARNING: IOException while reading response: java.io.FileNotFoundException: http://localhost:8983/solr/gettingstarted/update
1 files indexed.
COMMITting Solr index changes to http://localhost:8983/solr/gettingstarted/update...
SimplePostTool: WARNING: Solr returned an error #404 (Not Found) for url: http://localhost:8983/solr/gettingstarted/update?commit=true
SimplePostTool: WARNING: Response: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /solr/gettingstarted/update. Reason:
<pre> Not Found</pre></p>
</body>
</html>
Time spent: 0:00:00.199
Tylers-MacBook-Pro:6.3.0 tyler$
What exactly is going on? All I have done is followed exactly what I was supposed to do. Thanks for any help.
Try bin/solr start -e techproducts. And then use techproducts instead of gettingstarted. There is no gettingstarted collection anymore and the techproducts is the nearest one.
What you've done is started a server with no collections in it at all. So you could also create a collection there, but you would need the right configuration to bootstrap it. So, the first method might be a bit easier at this point.

(0x800a138f) Unhandled exception in IE8 after adding BreezeJS to Durandal project

I'm hoping someone with some experience in Breeze/Durandal 2 on .NET 4.0 will be able to assist me with this error, as I'm pretty new to the mix.
I've been working on a Durandal 2/KO/Require SPA project that lately has been compiling fine and running on my IIS7. I need this app to be compatible with IE8, so I imported the shim and sham js libs as such:
<!-- ECMAScript 5 compatibility shims for IE8 -->
<!--[if lt IE 9]>
<script src="lib/ie8/html5shiv.min.js"></script>
<script src="lib/ie8/respond.js"></script>
<script src="lib/ie8/es5-shim.min.js"></script>
<script src="lib/ie8/es5-sham.min.js"></script>
<![endif]-->
<script src="lib/jquery/jquery-1.9.1.min.js"></script>
<script src="lib/knockout/knockout-3.1.0.js"></script>
<script src="/Scripts/q.min.js"></script>
<script src="/Scripts/breeze.debug.js"></script>
<script src="lib/bootstrap/js/bootstrap.js"></script>
I also need to be able to access data from a DB so I tried adding BreezeJS to the mix. According to Breeze's documentation, in order for this to work I had to remake the project in VS as ASP.NET MVC4 Project using the Empty Template. After that I imported the Breeze files using NuGet:
Install-Package Breeze.WebApi
Then I added in my pre-existing views, controllers, libraries, css, etc. to the newly created project. Now when I compile using IE8 I get the following error. This error does not show up for Firefox or Chrome:
Unhandled exception at line 125, column 13 in
http://localhost:64185/lib/durandal/js/composition.js
(Edited for readability)
SourceMap D:\localdev\TestMVC4\TestMVC4\lib\ie8\es5-shim.map read failed:
Could not find file 'D:\localdev\TestMVC4\TestMVC4\lib\ie8\es5-shim.map'.
SourceMap D:\localdev\TestMVC4\TestMVC4\lib\ie8\es5-sham.map read failed:
Could not find file 'D:\localdev\TestMVC4\TestMVC4\lib\ie8\es5-sham.map'.
Unhandled exception at line 125, column 13 in http://localhost:64185/lib/durandal/js/composition.js
0x800a138f - Microsoft JScript runtime error: 'route' is null or not an object
I thought this might be a compatibility issue with JQuery so I attempted different versions there. I've made sure that my DocType is set to:
<!DOCTYPE html>
and that I have the following meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
However I doubt either of those would cause issues with IE8 and Durandal. Has anyone else experienced a similar issue to mine? Am I experiencing this error because I haven't configured something on the MVC4 side?
Any advice would be greatly appreciated.
Thank you
After further digging into the Durandal composition.js I found that the skipActivation parameter in the "tryActivate" function was undefined, which resulted in the error. I'm pretty sure this problem is a result of IE8 support from Durandal, so I went ahead and scrapped IE8 and I am now developing for IE9 and up.
This isn't a fix, but I've had enough headaches with this and I will be moving on ...

"The following sections have been defined but have not been rendered for the layout page" after deployment

I think i have already read all the related questions here, but sadly i couldn't find an answer yet.
My problem is, locally everything runs fine without errors but when i deploy my website to my server, i'm getting there the following error:
The following sections have been defined but have not been rendered for the layout page >"~/Views/Shared/_Layout.cshtml": "styles"
I'm using Asp.Net MVC 4 with the Razor engine and .Net 4.5.
In _Layout.cshtml i have the following block defined:
<head>
....
#Styles.Render("~/Content/Css")
#Scripts.Render("~/bundles/modernizr")
#RenderSection("styles", required: false)
</head>
And in Index.cshtml the following block:
#section styles{
<link rel="stylesheet" href=... />
#Scripts.Render("~/bundles/js/somejs")
}
This is driving me crazy. If this error would also occur on my development machine, i could debug it. But it only happens on my server, locally everything runs fine.
Even other projects with similar code pieces run fine on my server.
Maybe someone has any hints for me?
I suspect that the contents of the _Layout.cshtml or Index.cshtml on your server is not what you think it is. Maybe the deployed version is different than what you have locally. Deployment went wrong?

Undefined variables

I have defined the 2 variables, in contact and shirts. As you can see they are also in the li in header. Still i get the message that both of the variables are undefined.
I get this error message:
( ! ) SCREAM: Error suppression ignored for ( ! )
Notice: Undefined variable: section in
C:\wamp\www\Test\shirts4mike\inc\header.php on line 17
Call Stack #TimeMemoryFunctionLocation 10.0003243592{main}(
)..\index.php:0
20.0006246920 include( 'C:\wamp\www\Test\shirts4mike\inc\header.php' )..\index.php:3 ">
and the same for line 18.
shirts.php:
<?php
$pageTitle = "Mike's Full Catalog of Shirts";
$section = "shirts";
include('inc/header.php'); ?>
<div class="section page">
<h1>Mikes’s Full Catalog of Shirts</h1>
</div>
<?php include ('inc/footer.php'); ?>
contact.php:
<?php
$pageTitle = "Contact Mike";
$section = "contact";
include('inc/header.php'); ?>
<div class="section page">
<h1>Contact</h1>
</div>
<?php include ('inc/footer.php'); ?>
header.php:
<html>
<head>
<title> <?php echo $pageTitle ?></title>
<link rel="stylesheet" href="css/style.css" type="text/css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Oswald:400,700" type="text/css">
<link rel="shortcut icon" href="favicon.ico">
</head>
<body>
<div class="header">
<div class="wrapper">
<h1 class="branding-title">Shirts 4 Mike</h1>
<ul class="nav">
<li class="shirts <?php if ($section == "shirts"){ echo "on"; } ?>">Shirts</li>
<li class="contact <?php if ($section == "contact"){ echo "on"; } ?>">Contact</li>
<li class="cart">Shopping Cart</li>
</ul>
</div>
</div>
<div id="content">
When you see SCREAM in a PHP error message like this, it is due to the following circumstances:
You have PHP's xDebug extension installed.
xDebug is configured to prevent error supression.
Your PHP code is attempting to suppress an error message using the # symbol or other error suppression mechanisms, and xDebug is overriding this.
xDebug is a PHP extension designed to help with debugging PHP programs. It should generally not be installed on a production system; only on a development system.
xDebug has a setting called "Scream" which is designed to prevent errors being suppressed. This is again intended for use in a development system. The developer may want errors to be supressed under normal circumstances, but while debugging it is useful to see those errors. So the scream setting overrides all of PHP's normal ways of hiding error messages. This is useful for debugging, but is a terrible thing to have on a production system.
xDebug should never be installed on a public facing production server, so if that describes your system you should remove it, or ask for it to be removed. This could be as simple as modifying the PHP.ini file to remove the references to xDebug (although that will just disable the extension rather than un-installing it).
If it is installed and you can't do anything about it, then you need to find a better web host that doesn't install development tools on production systems.
Having said all of that, if you're getting the message that $section is undefined, then it does imply a bug in the code that needs to be fixed.
The error is occurring in header.php, when it is included from index.php.
You've shown us shirts.php and contact.php, both of which set $section correctly. You haven't shown us index.php, but I would guess that it includes header.php in the same way as the others, but doesn't set $section like the others do.
You can therefore fix the bug by editing index.php so that it sets $section in the same way a the other pages do. Even if it just sets it to a blank string, that will be enough to fix the bug.
I hope that helps.
You're looking at the wrong files
The stack trace indicates that two files were included to get to this particular error (in reverse order):
inc\header.php
index.php
In the question, index.php isn't shown - but it is most likely that you have:
<?php
$pageTitle = "something";
include('inc/header.php');
i.e. the variables that are missing are not declared before they are used in the code that you are executing.
SCREAM
scream is an extension which makes it ignore use of the # operator - i.e. somewhere in the code that is being executed, it is being used, it's generally held as bad practice to ignore errors. You can however turn scream off - which is appropriate for a production/live app, though of course the errors/warnings/notices should be addressed.

Unable to start basic application using sencha 2. Library files are not loaded

I am a new bee to sencha 2.I wanted to run a basic application using sencha touch but unable to load the application.
Here is what I have done.
I have downloaded the notesApp from miamicoder and i am trying to run the first chapter.
I have attached the folder structure in the screenshot. Please have a look to understand the folder structure.
Here is my index.html
<!DOCTYPE html>
<html>
<head>
<title>My Notes</title>
<link href="sencha-touch.css" rel="stylesheet" type="text/css" />
<script src="sencha-touch-debug.js" type="text/javascript"></script>
<script src="app.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>
I have downloaded sencha sdk 2.1 and took sencha-touch-debug.js and sencha-touch.css and placed in the root of the folder and referred from index.html as mentioned below. I used to to the same thing in sencha 1 and I was getting success but I am getting below error if I am trying to do the same with sencha 2.
I am getting errors as below.
Failed to load resource file:///path/NotesApp-Book-Code-Ch1/src/event/Dispatcher.js?_dc=1354982532236
Failed to load resource file:///path/NotesApp-Book-Code-Ch1/src/event/publisher/Dom.js?_dc=1354982532238
Uncaught Error: [Ext.Loader] Failed loading 'file:///path/ebook-building-a-sencha-touch-2-app%20(1)/NotesApp-Book-Code-Ch1/src/event/Dispatcher.js', please verify that the file exists sencha-touch-debug.js:8324
Uncaught Error: [Ext.Loader] Failed loading 'file:///path/ebook-building-a-sencha-touch-2-app%20(1)/NotesApp-Book-Code-Ch1/src/event/publisher/Dom.js', please verify that the file exists
Is it necessary to use senchatools and generate folder structure? Simply copying the two lib files (sencha-touch-debug.js and sencha-touch.css) and refer them from index.html will not work with sencha 2?
Please help.
Thank you.
I got the answer. Working with Sencha touch 2 needs to include the complete SDK in the project folder not only 2 library files like sencha 1. Including the complete framework will solve the issue.
Thanks