AgenPro - Mib to java file convert

Hi Team,
I am Ramaprabu from Tambora System Pvt Ltd, Bangalore.
In our company, we are using the AgenPro tool. I am new to the tool. I try to utilize this tool for generating the mib file java file conversion. I have created 2 mib files and compiled those files successfully in the AgenPro tool. But I could not able to generate the java code for the same. I got the error as follows,

1 error occurred during code generation. Please check the Log panel for the additional details
ERROR Generator D:\Ramaprabu\snmp\agenpro4\generated\D:\Ramaprabu\snmp\sample\test5_output\com\tambora\snmp\SawridgeMib.java (The filename, directory name, or volume label syntax is incorrect)

Request to do the needful to solve this issue.

Thanks & Regards,

Ramaprabu L.S.

In the project definition, you specified a root path and an output directory as absolute path. That’s why the combined path

D:\Ramaprabu\snmp\agenpro4\generated\D:\Ramaprabu\snmp\sample\test5_output\

is incorrect. This is because the drive D: appears twice. Either remove the root path specification completely (i.e. remove D:\Ramaprabu\snmp\agenpro4\generated\ from the first wizard step of the project config or specify the output dir relatively to that root path.

Then it will work :slight_smile:

Hi Team,
Thanks for your valuable suggestion.
I have tried with absolute path for input and output directory in the job file of the AgenPro Tool as you suggested. I got the respective 2 java files(NotificationServiceMib.java and SawridgeMib.java).
Thanks & Regards,
Ramaprabu L.S.

Hi Ramaprabu,

In my company we are also using agenpro, and I am after achieving the same thing that you have done. can you please guide me how to load .mib file to .java and read it.

  1. please guide me to any documentation that you might have followed to achieve this?

  2. any help would be much appriciated sir

cheers

happy coding

Hi, have you checked the AgenPro online documentation yet?
See https://agentpp.com/help/agp/5.0.0/index.html#t=AgenProManual%2FAgenProManual%2FProjects.htm

Thank you Sir for pointing me to the right direction.

best regards

Hello,
While trying to generate the code I am getting following error

Unable to find resource ‘E:\AgenPro_Test\agenpro4\templates\agent++v4_0_x\includes_fn.vm’
Unable to find resource ‘E:\AgenPro_Test\agenpro4\templates\agent++v4_0_x\makefile_fn.vm’
Unable to find resource ‘E:\AgenPro_Test\agenpro4\templates\agent++v4_0_x\module_init_fn.vm’
Unable to find resource ‘E:\AgenPro_Test\agenpro4\templates\agent++v4_0_x\h_filename.vm’
Unable to find resource ‘E:\AgenPro_Test\agenpro4\templates\agent++v4_0_x\cpp_filename.vm’

In the Project Setup Step 1:Job Definition, I have given correct Templates Root Directory and In-/Output Root Directory.
Can you suggest what could be the root cause for this and how to fix it?
Thanks.

Do the template files exist at the locations in the error messages?

Yes, I checked the files are present.

Is the user running AgenPro able to read those files?
Otherwise I would double check the file directory names again.

Yes, The user is able to read those files from file explorer.

Ok, then I cannot help anymore. I am pretty sure that the error is related to some of the previous points, but we discussed those already.

Hello,
While trying to generate the code I am getting an error related to the output directory.

I have the in/output root directory as ‘/home/goncalo/agenpro5/generated’ and in each job i have output directory as ‘src’ which is a directory I’ve created inside the root directory.
When I’m trying to generate the code this error appears: ’ /home/goncalo/agenpro5/generated/src (Is a directory)’ .
Can you suggest what I’m doing wrong? As I seen in the manuals I think I’m doing what is supposed to be done to generate the code.
Thanks.

I think the paths are not the problem. The problem seems to be that the file name of the generated MIB module needs to be computed. This is done by a file name generator template. Here either that specified file name template is missing or not working properly.

Another common error is compiling MIB modules with lenient error checking but severe syntax errors in it. Then the MIB data that could be loaded might be so reduced, that a generation fails for even simple MIB constructs.
But I guess in this case, it is the first issue with the file name template. You can find working examples in the template directory and complete projects in the projects directory installed by AgenPro.