I use jnca library to collect netflow udp packets sent from the router.
When it is imported into a new project in IntellijIDea, it works.

The bid, if used in the maven project, does not work and gives this exception.

An exception:
java.util.MissingResourceException: Can't find bundle for base name org.wso2.event.adaptor.udp.jnca.etc.NetFlow, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1499)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1322)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:795)
at org.wso2.event.adaptor.udp.jnca.cai.utils.Resources.<init>(Resources.java:24)
at org.wso2.event.adaptor.udp.jnca.cai.flow.collector.Collector.<clinit>(Collector.java:51)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at org.wso2.event.adaptor.udp.jnca.cai.flow.collector.Run.<clinit>(Run.java:14)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:113)
NetFlow.properties: Can't find bundle for base name org.wso2.event.adaptor.udp.jnca.etc.NetFlow, locale en_US
No problem with package names.
Problem with this code segment
try {
resources = ResourceBundle.getBundle("org.wso2.event.adaptor.udp.jnca.etc." + myName, Locale
.getDefault());
} catch (MissingResourceException exc) {
exc.printStackTrace();
error(SuperString.exceptionMsg(exc.toString()));
}
myName = Netflow
I tried to change the path to the resource, but it did not work. And tried to include this netflow.properties file in the maven project resources folder, it also didn't work.
How to fix it
thanks
source
share