It's all about the answers!

Ask a question

Script Based Validation - Resource does not exist - Error Unknown type


Daniel Vaganek (7358) | asked Jul 17 '13, 2:07 p.m.
Creating a new Work Item throws a dialog box with "Error: Unknown type" (not much help).
Even though I get this error, the validator does work as it prevents the save.
Removing the validator from the attribute stops the dialog box.
This is using the web client.  Eclipse client works fine.
RTC 4.0.1, tomcat
ccm log shows error "Resource does not exist" for the javascript file even though it executes.

What would cause this?
How do I stop this from happening?

<attributeDefinition id="com.test.workitem.attribute.application" name="Application" type="com.test.workitem.enumeration.application">
    <validator providerId="com.ibm.team.workitem.valueproviders.VALIDATOR._VIt0AO8AEeKrs4FpWYOzjg"/>
</attributeDefinition>   

<validator id="com.ibm.team.workitem.valueproviders.VALIDATOR._VIt0AO8AEeKrs4FpWYOzjg" name="DBCR Application" providerId="com.ibm.team.workitem.shared.common.internal.valueProviders.ScriptAttributeValueProvider">
    <script class="com.test.workitems.validators.DbcrApplicationValidator" path="/workitem/scripts/common/DbcrApplicationValidator.js"/>
    <parameters message="'Architecture' is not a valid Application for DBCR." severity="ERROR"/>
</validator>

Now the ccm log:

2013-07-17 13:00:09,528 [       http-bio-9443-exec-1744] ERROR net.jazz.ajax.servlets.StyleSheetServlet            - GET https://server05:9443/ccm/web/_style/
?exclude=A~B~E~F~G~H~I~J~K~L~M~N~O~P~Q~R~S~T~U~V~W~X~Y~Z~c&include=com.test.workitems.validators.DbcrApplicationValidator.js&ss=CkCrY&_proxyURL=%2Fccm&locale=en-usHEADER: host = server05:9443
HEADER: user-agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
HEADER: accept = text/css,*/*;q=0.1
HEADER: accept-language = en-US,en;q=0.5
HEADER: accept-encoding = gzip, deflate
HEADER: referer = https://server05:9443/ccm/web/projects/CLM%20Work%20Items%20Suite
HEADER: cookie = SaveStateCookie=undefined%2Ccom.ibm.team.workitem.category%2Ccom.ibm.team.workitem.category~%23_~%23com.ibm.team.workitem.operation.workItemSave%2Ccom.ibm.team.workitem.category~%23_~%23com.ibm.team.workitem.operation.workItemSave~%23_~%23modify%2Ccom.ibm.team.workitem.category~%23_~%23com.ibm.team.workitem.operation.workItemSave~%23_~%23create%2Ccom.ibm.team.workitem.category~%23_~%23com.ibm.team.workitem.operation.workItemSave~%23_~%23create~%23_~%23type%2Ccom.ibm.team.dashboard.category%2Ccom.ibm.team.dashboard.category~%23_~%23com.ibm.team.dashboard.server.savePersonalDashboard; JSESSIONID=E45...198; net-jazz-ajax-cookie-rememberUserId=t01234u; JazzFormAuth=Form; JSESSIONIDSSO=702...EEF
HEADER: connection = keep-alive
Parameter: ss = [CkCrY]
Parameter: _proxyURL = [/ccm]
Parameter: include = [com.test.workitems.validators.DbcrApplicationValidator.js]
Parameter: exclude = [A~B~E~F~G~H~I~J~K~L~M~N~O~P~Q~R~S~T~U~V~W~X~Y~Z~c]
Parameter: locale = [en-us]

java.lang.IllegalArgumentException: Resource does not exist: com.test.workitems.validators.DbcrApplicationValidator.js
    at net.jazz.ajax.model.Resource.resolve(Resource.java:257)
    at net.jazz.ajax.model.Resource.resolveAll(Resource.java:270)
    at net.jazz.ajax.servlets.AbstractResourceServlet.createOperation(AbstractResourceServlet.java:37)
    at net.jazz.ajax.servlets.AbstractResourceServlet.doGet(AbstractResourceServlet.java:53)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at net.jazz.ajax.servlets.LoggingHttpServlet.service(LoggingHttpServlet.java:35)
    at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:126)
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:120)
    at com.ibm.team.repository.server.servletbridge.JazzServlet.service(JazzServlet.java:68)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at com.ibm.team.repository.server.servletbridge.BridgeFilter.processDelegate(BridgeFilter.java:133)
    at com.ibm.team.repository.server.servletbridge.BridgeFilter.doFilter(BridgeFilter.java:154)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:336)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
    at java.lang.Thread.run(Thread.java:738)




Accepted answer


permanent link
Dinesh Kumar B (4.1k413) | answered Jul 17 '13, 2:31 p.m.
JAZZ DEVELOPER
i have seen similar errors when there are multiple .js file in the links > attachments that provide the same class

you may want to check the links tab from the Project Configuration for any multiple script files providing com.test.workitems.validators.DbcrApplicationValidator in your case...

Daniel Vaganek selected this answer as the correct answer

One other answer



permanent link
Daniel Vaganek (7358) | answered Jul 17 '13, 3:35 p.m.
Dinesh,
I checked and there was a different validator that was referencing the same class.
I removed that javascript file and voila!
Thank you!

Comments
Dinesh Kumar B commented Jul 18 '13, 2:15 a.m.
JAZZ DEVELOPER

glad it helped

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.