Not a valid identifier 'index,index.html' AEM 6.2 - aem

I get that error after deploying my project. Does anyone know how to fix it?
This appears in http://localhost:4502/ so, the damadmin, crx/de, system/console/* works good.
Complete error:
Not a valid identifier 'index,index.html'
Cannot serve request to / in org.apache.sling.servlets.get.DefaultGetServlet
Exception:
java.lang.IllegalArgumentException: Not a valid identifier 'index,index.html'

This is a typical issue where people have misconfigured the Index Resources section of the Apache Sling GET Servlet.
Visit /system/console/configMgr/org.apache.sling.servlets.get.DefaultGetServlet
Look at the Index Resources field.
If you have it like [ "index","index.html" ] then you've set it up wrong and will get this error in your error log
Instead they should be separate entries one above the other.
So make the first entry "index"
Then hit the plus sign on the right and add "index.html" as the next entry and hit save at the bottom.
People read the text below the configuration element too literally. It says "The default value is [ "index", "index.html" ]". So instead of reading that as a multi-value field with index and index.html as two values. They simply copy and paste it into the field and save. This creates that issue you've described.
Please please please do not do what e-israel suggests and delete your AEM installation by deleting the crx-quickstart folder. This is like formatting your drive or the linux equivalent of an rm -rf on your application directory. Terrifying suggestion and wanted to mention it for any poor person who dared follow it.

Related

"SAPUI5 component ID is potentially invalid" on submitting SAPUI5 Application to ABAP System

When I am trying to upload app to ABAP-Repository using SE38 and /UI5/UI5_REPOSITORY_LOAD I get following error message:
SAPUI5 component ID SAPUI5.BRUTTOUMSATZ2 in SAPUI5 repository ZBRUTTOUMSATZ is potentially invalid.
Submitting the Project via eclipse brings up the same error message.
Does anyone know how to fix this issue or what might cause this ? I didn't find any documentation on this error message.
The application runs fine when hosted on a local Jetty-Server.
A component name should follow these rules, according to the long text of error message /ui5/app_api (019).
Consist only of alphanumerical characters
Contain only lowercase letters in the first except the last segment
May contain camel case in the last segment
Not begin with a number
Not contain special characters
Contain a dot as separator of the namespace
Not be longer than 40 letters for each segment (separated by a dot)
submitting to ABAP-Repository has way more strict naming conventions then mentioned in your answer. I think the application name cannot be longer then 16 signs ... otherwise you cannot submit.

TYPO3 FAL, files are missing, case sensative issue, how can I fix manually?

I have case sensitive problems in TYPO3 v 8.7 LTS. System is sometimes mocking that a file is missing. The error message is
Oops, an error occurred!
File /archiv/ABCD.pdf does not exist.
Allthough the file is there. When I put the file in lowercase to fileadmin "abcd.pdf" than FAL isn't mocking around. But seems after a while it still is mocking.
At least I am not understanding where the problem lies. Because even if ABCD.pdf is there and in the right place I get warnings.
I checked DB integrity several times. But still no luck. Afterwards delete the cache in INSTALL TOOL.
I found DB tables where files are stored. Is there a way, that I manually can update this tables and get rid of these error message?
Make sure the checkbox "case sensitive" on the storage is equal to your file system.
Run the FAL index update scheduler task.
That should align the DB values again

How to map urls?

I would like to map pages such domain/content/myProject/home.html to domain/home.html. /content/myProject/ is not needed. I have the following code:
String newpath = getResourceResolver().map(page.getPath());
this does not change anything. newpath is stay page.getPath()
how to solve this issue?
Answering as this question as it remains unanswered. Here is an example of how the etc mappings should look like:
Trick is you add 2 entries to sling:internalRedirect as / and /content/example/
AEM first tries to resolve resources with first entry '/'. So non page URLs like /etc/designs, /content/dam etc will be addressed by the first entry. If it is unable to resolve using the first one, it uses the second entry to resolve the page.
This is also the adobe recommended way for URL shortening compared to other techniques like apache redirect.
You need to create map in etc.Then Resource Resolver will take care of trimming the path .
CREATING MAPPING DEFINITIONS IN AEM
In a standard installation of AEM you can find the folder:
/etc/map/http
This is the structure used when defining mappings for the HTTP protocol. Other folders (sling:Folder) can be created under /etc/map for any other protocols that you want to map.
Configuring an Internal Redirect to /content
To create the mapping that prefixes any request to http://localhost:4503/ with /content:
Using CRXDE navigate to /etc/map/http.
Create a new node:
Type sling:Mapping
This node type is intended for such mappings, though its use is not mandatory.
Name localhost_any
Click Save All.
Add the following properties to this node:
Name sling:match
Type String
Value localhost.4503/
Name sling:internalRedirect
Type String
Value /content/
Click Save All.
This will handle a request such as:
localhost:4503/geometrixx/en/products.html
as if:
localhost:4503/content/geometrixx/en/products.html
had been requested.
You can refer here for further documentation http://docs.adobe.com/docs/en/cq/5-6-1/deploying/resource_mapping.html

SSRS Deployment complaining about path length when my path is short

I am attempting to deploy my SSRS solution. I have set the "TargetReportFolder" property of my project to "Reports"
When I right-click and select "Deploy", I get the following error:
The path of the item '/Reports' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash.
Obviously my path is less than 260 characters long. I've tried setting my TargetReportFolder property to "/Reports", to the name of my project, and to the name of my project with a slash at the beginning - all give the same error.
I don't understand this deployment process very well. Can someone help me understand?
(I also feel like this may not be on topic, but was encouraged by the presence of an SSRS tag)
My problem was that I didn't understand how Reporting Services works with SharePoint. My comment above is incorrect, I did need to deploy, but I had the wrong parameters for my properties. This page helped me:
http://msdn.microsoft.com/en-us/library/bb283155.aspx
The key takeaways from this article are:
All Target*Folder properties need to be either a URL to a document library, or empty
If they are empty, they take the value of TargetReportFolder, which can't be empty and must be a URL to a document library
TargetServerURL needs to be the URL of the site collection in SharePoint

How to solve validation error on xsi:noNamespaceSchemaLocation in jdoconfig.xml

Since I updated today to GAE 1.7.2.1, I'm having validation errors in eclipse in all my jdoconfig.xml files.
I have the default jdoconfig.xml content :
[...]
<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
[...]
And eclipse validation throws:
Referenced file contains errors (http://java.sun.com/xml/ns/jdo/jdoconfig).
For more information, right click on the message in the Problems View and
select "Show Details..."
When clicking on details I can see a bunch of lines like:
s4s-elt-character: Non-whitespace characters are not allowed in schema elements
other than 'xs:appinfo' and 'xs:documentation'. Saw 'var_U = "undefined";'.
In different lines and different content in "Saw ... "
It occurs in every single project I start using the "New Web Application Project..." from the google plugin.
So does anyone have this problem? Any fix?
Try this:
<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd">
Per the answer here Validating jdoconfig with incorrect url
The xmlns is not a real file/directory, more a namespace, so ought not exist! The version is appended to get the real XSD file, namely http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd
There are a couple problems here.
The syntactic problem is that the URI you are giving as the value of xsi:noNamespaceSchemaLocation is redirected to http://www.oracle.com/technetwork/java/index.html and returns an HTML document. The XSD validator you are using is trying without success to parse
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
<script type="text/javascript">
var _U = "undefined";
var g_HttpRelativeWebRoot = "/ocom/";
var SSContributor = false;
...
as an XSD schema document, and for one reason or another its attempts to explain what went wrong focus on finding the string var_U = "undefined" in a place where it was not expecting to see character data.
Then there are some conceptual problems.
Your document is in a namespace named http://java.sun.com/xml/ns/jdo/jdoconfig. Why on earth are you pointing the schema validator to a schema without a target namespace (which is that noNamespaceSchemaLocation does), if you want to validate your document? Given that (at least some of) your document's elements are namespace-qualified, you will want (as joncalhoun has already suggested) to use xsi:schemaLocation and provide a pair telling the validator where it can find a schema document for each namespace you want it to know about.
It's possible that a schema document used to be served from the location http://java.sun.com/xml/ns/jdo/jdoconfig, but since it's apparently the standard namespace named for your vocabulary, that's not actually very likely. Most systems distinguish fairly reliably between namespaces, which are abstract and poorly defined things, and schema documents, which are typically XML documents that define specific XSD schema components for a given namespace. It's not illegal to use the URI for a schema document as the name of a namespace, but it is unusual.
Note that the URL given by joncalhoun for the schema document (http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd) actually does resolve (after redirection to http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/jdo/jdoconfig_3_0.xsd) to a schema document, which specifies http://java.sun.com/xml/ns/jdo/jdoconfig as its target namespace. (This means that even if you did succeed in retrieving this schema document by giving its URI as the value of xsi:noNamespaceSchemaLocation, you'd then get an error because it's not a schema document for elements and attributes with no namespace.)
This makes me think that you should read joncalhoun's answer again and try it again, carefully. If it didn't work when you tried it, my money says that either you tried something similar but not exactly what he suggested, or it solved this problem but that simply exposed some other problem, which is easy to mistake for failure.
One solution is setting XML Catalog in Eclipse preferences.
Details:
Entry element: URI
Location: http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd
URI: http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd
Key type: Namespace name
Key: http://java.sun.com/xml/ns/jdo/jdoconfig
The syntactic and conceptual issues C.M. mentions are a problem with the plugin and Google's settings where both recommend,
xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig
I don't specifically use jdo but I still get the validation error with this namespace. It was fine with this namespace until just recently.
I used LuboM's method and it worked for me. Neither LuboM's nor joncalhoun's is the answer though since it ties me in to jdo 3.0
Oracle is going to have to provide the fix. Apparently their intent was to resolve the namespace issues themselves across versions of jdo.
This is what I did to fix it:
<?xml version="1.0" encoding="utf-8"?>
<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd">
I am success on this:
Right Click Project -> Properties -> Validation -> XML Syntax
Enable Project Specific Settings (If you need)
Under Validating Files, For No grammar Specified Select "Warning"
Click "Ok"
If you ask for Validating the file, Click "Yes"
You can do the same for all the projects by going to Windows -> Preferences.
Make sure you are validating the file (Step 4).
I had the same issue, and excluded just this jdoconfig.xml file from Eclipse's validation. Even though your Eclipse throws an error for it, it in no way affects being able to deploy the project to GAE correctly.
Here is how to exclude just the jdoconfig.xml file to get rid of that pesky error:
Right click on your Eclipse Project, ->Properties->Validation->XML Validator, click on the "..." button for further options.
You should see Include Group and Exclude Group options. Click Exclude Group->Add Rule...->Folder or file name, and browse to your file.
Clean or rebuild your project. The validation error should be gone.
This worked for me in Eclipse Luna.
You might have try this path to solve your problem:
<?xml version="1.0" encoding="utf-8"?>
<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">