- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to acess controller service from advanced UI
- Labels:
-
Apache NiFi
Created ‎03-28-2018 09:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
with the custom processor i have, i need to get controllerService inside advanced UI, with following code im not able to access it, getting following casting error. also im not sure why its returning "com.sun.proxy.$Proxy78" class.
am i doing it right ? how can i get controller service under advance UI ?
MYDBCPConnectionPool cs = (MYDBCPConnectionPool) nifiWebContext.getControllerService(componentDetails.getProperties().get("MYDBCP-connection-pool"), processorId); logger.info(cs.getClass().getName());
>> com.sun.proxy.$Proxy78 cannot be cast to org.apache.nifi.dbcp.MYDBCPConnectionPool
also what is the dependency requirement for "advanced-UI" when i need to access "ControllerService" . didn't find any source or example.
Created ‎04-03-2018 07:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok. found the issue.
added "<scope>provided</scope>" to maven dependencies of "MYProcessor" project.
before "Myservice" was deployed twice one inside "MYProcessor.Nar" and one alone "Myservice.nar" which was wrong. adding following code to MYProcessor project solved it.
<scope>provided</scope>
Created ‎04-03-2018 07:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok. found the issue.
added "<scope>provided</scope>" to maven dependencies of "MYProcessor" project.
before "Myservice" was deployed twice one inside "MYProcessor.Nar" and one alone "Myservice.nar" which was wrong. adding following code to MYProcessor project solved it.
<scope>provided</scope>
