0

I am receiving the following error in my application:

Error Description: Failed to prepare the search result.

Error Message: [DM_API_E_BADATTRNAME]error: "Bad attribute name 'str_en' for document/object."

Technical trace details:

DfTypedObjectException:: THREAD: http-9082-Processor19; MSG: [DM_API_E_BADATTRNAME]error:  
"Bad attribute name 'str_en' for document/object."; ERRORCODE: 100; NEXT: null
    at com.documentum.fc.client.DfTypedObjectException.newBadAttrNameException(DfTypedObjectException.java:39)
    at com.documentum.fc.client.DfType.getTypeAttr(DfType.java:282)
    at com.documentum.fc.client.DfType.getTypeAttrDataType(DfType.java:131) 
    at com.documentum.fc.client.DfType___PROXY.getTypeAttrDataType(DfType___PROXY.java)
    at se.project.osi.util.dfc.OsiType.getTypeAttrDataType(OsiType.java:630)
    at org.apache.jsp.portal.administration.equipment.resultset_jsp._jspService(resultset_jsp.java:342)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at se.filter.LoginFilter.doFilter(LoginFilter.java:55)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at se.filter.EncodingFilter.doFilter(EncodingFilter.java:33)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:595)

The error only started when I recently upgraded dfc to version 6.7 (sp1) from 5.3 (sp6). I am running everything locally. My 5.3 (sp6) version still works fine, but I am wondering what can cause the error even though they run on the same docbase, the same application (except for dfc changes) and against the same server.

Here is a code snippet of result.jsp which should display the search:

<%
java.util.Collection col = null;
se.project.osi.util.dfc.OsiDQL q = new se.project.osi.util.dfc.OsiDQL(org.apache.commons.logging.LogFactory.getLog(this.getClass()));
q.setDQL("select str_en from osi_localized where str_category = 'Title'");

col = q.toCollectionString();
java.util.Iterator it = col.iterator();
while(it.hasNext()){
  out.println((String) it.next()+ "<br>");
}
%>

And also search.jsp:

    <%

try {
  queryBean.parse(request, "");
  queryBean.doAction(request, "");

  // Get the Query Mgr Model
  OsiQueryMgrModel model = (OsiQueryMgrModel) session.getAttribute(IProjectType.MODEL_SEARCH_CONTENT);
  String onSubmit = "";
  if (model == null) {
    // Create new Query Mgr Model
    model = new OsiQueryMgrModel();
  }

  if(request.getParameter("osi_localized.str_en") != null)
    onSubmit = "onLoad=\"parent.resultview.location.href = '" + 
        request.getContextPath() + "/portal/administration/material/resultset.jsp?run=T';\"";

  // Assign the updated QueryMgr
  model.setQueryMgr(queryBean.getQueryMgr());
  session.setAttribute(IProjectType.MODEL_SEARCH_CONTENT, model);
%>

Thank you in advance,

Ed

EdvardG
  • 131
  • 2
  • 10
  • What version is the docbase/content server? Also, `str_en` sounds like it could be related to localization and language, did you make any language choices during the DFC install? – Brendan Hannemann Jul 08 '13 at 17:39
  • Hi. The version is 6.7 sp1 both on the docbase and on the content server. I think it is, yes. What do you mean with language choices? Sorry for the late response. – EdvardG Jul 23 '13 at 14:24
  • I see you also posted over at emc.com with no success. I assume you have written a custom application using DFC? If so, can you share the code that causes this error? – Brendan Hannemann Jul 23 '13 at 15:54
  • Ok, I've added a snippet of what should be displayed. Yes, this is a custom application. – EdvardG Jul 24 '13 at 08:11
  • I have been looking at the issue for a longer time now and have so far found that I am using some deprecated methods, for example: import com.documentum.fc.client.qb.IDfAttrLine; Maybe this is why it isn't working? If so, what should I use instead of the above? Thank you. (Pasted from EMC forums) – EdvardG Jul 25 '13 at 06:56
  • I will take a look at this later today. – Brendan Hannemann Jul 26 '13 at 11:52

2 Answers2

0

Take a look here: https://community.emc.com/message/90845#90845

From the sound of it, the com.documentum.fc.client.qb namespace has been deprecated for many versions now, and replaced by com.documentum.fc.client.search so that could definitely be the issue. It seems like it was deprecated in 5.3 or maybe even earlier, so the upgrade to 6.x could have unexpected results with those classes, if they even exist.

Brendan Hannemann
  • 2,084
  • 1
  • 18
  • 33
  • Yes, I've looked around at EMC Forums too. I have problems with the following namespaces: `com.documentum.fc.client.qb.IDfAttrLine` `com.documentum.fc.client.qb.IDfQueryMgr` `com.documentum.fc.client.qb.IDfQueryResultItem` `com.documentum.fc.client.qb.IDfQueryLocation` `com.documentum.fc.client.qb.IDfQueryFullText` `com.documentum.fc.client.qb.IDfQueryResultListener` I don't really know the equivalent namespaces for the above ones, and I am not sure where I can find them either. There are very little documentation surrounding this subject. Thank you. Cheers. – EdvardG Jul 30 '13 at 09:25
  • You should probably just do `import com.documentum.fc.client.search.*;` and all of the classes listed seem to map to a new class in that namespace. For instance, `IDfQueryMgr` maps to `IDfQueryManager` and `IDfQueryFullText` seems to map to `IDfFullTextExpression`. I am not 100% sure since I don't have access to a dfc.jar earlier than 6.5, but the mappings seem sort of obvious. – Brendan Hannemann Jul 31 '13 at 16:22
  • Tip: Open up the `dfc.jar` in eclipse or just unzip it, and you will see the list of classes. This could help you figure out the mapping. – Brendan Hannemann Jul 31 '13 at 16:25
  • Thank you for your help. These deprecated interfaces do exist in the dfc.jar but not in the API. How is this possible? – EdvardG Aug 05 '13 at 07:39
  • Maybe they are deprecated to the point of unavailability? I'm not sure I understand either. They are still available in my 6.5 dfc.jar but I didn't try to run any code with them, but it did compile. – Brendan Hannemann Aug 05 '13 at 13:37
0

I was getting the same issue when I put the attribute name is in uncase sensitive "dqlCount" or " dql_count". After that, I removed the uncase sensitive and alphanumeric symbols from the attribute "dqlcount" then it is working fine from me.

hariom gupta
  • 31
  • 1
  • 5