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
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.