Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source code search result JSP error #203

Closed
chirkovmail opened this issue Dec 4, 2013 · 2 comments
Closed

Source code search result JSP error #203

chirkovmail opened this issue Dec 4, 2013 · 2 comments

Comments

@chirkovmail
Copy link
Contributor

There is compilation error on source code search result form (/system/workplace/admin/searchindex/sourcesearch/fileslist.jsp):

Unable to compile class for JSP:

An error occurred at line: 4 in the jsp file: /WEB-INF/jsp/offline/system/workplace/admin/searchindex/sourcesearch/fileslist.jsp
org.opencms.search.replace.CmsSearchReplaceSettings.ATTRIBUTE_NAME_SOURCESEARCH_RESULT_LIST cannot be resolved to a type
1: <%@ page pageEncoding="UTF-8" %><%@ page import="org.opencms.workplace.tools.searchindex.sourcesearch., java.util., org.opencms.main.*"%>
2: <% CmsSourceSearchFilesDialog wp = new CmsSourceSearchFilesDialog (pageContext, request, response);
3:
4: ArrayList resultList = (ArrayList)session.getAttribute(org.opencms.search.replace.CmsSearchReplaceSettings.ATTRIBUTE_NAME_SOURCESEARCH_RESULT_LIST);
5: wp.setList(resultList);
6: wp.displayDialog();
7: %>

The most probable reason is incorrect class name org.opencms.search.replace.CmsSearchReplaceSettings. In this case CmsSearchReplaceSettings class can be used (necessary import is already in page import section).

@ruKurz
Copy link

ruKurz commented Dec 4, 2013

Thank you very much for reporting this issue. You are right, the package org.opencms.search.replace.* does not exsist. Using:

org.opencms.workplace.tools.searchindex.sourcesearch.CmsSearchReplaceSettings.ATTRIBUTE_NAME_SOURCESEARCH_RESULT_LIST

will work.

This issue will be fixed within the next version.

@chirkovmail
Copy link
Contributor Author

I think its enough to remove package name:

ArrayList resultList = (ArrayList)session.getAttribute(CmsSearchReplaceSettings.ATTRIBUTE_NAME_SOURCESEARCH_RESULT_LIST);

All classes of package org.opencms.workplace.tools.searchindex.sourcesearch are already imported on the page.

This fix works on local test system.

@chirkovmail chirkovmail reopened this Dec 4, 2013
tHerrmann pushed a commit that referenced this issue Jan 20, 2014
Conflicts:
	modules/org.opencms.workplace.tools.searchindex/resources/system/workplace/admin/searchindex/sourcesearch/fileslist.jsp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants