Is there a Java class name limit in Domino Designer? 10 Jul, 2008
It’s no secret that I detest Domino Designer as a Java IDE, so perhaps the poor fellow is picking up on this vibe and refusing to co-operate. My issue is this:
I create a Java agent. I paste in a class (based on
AgentBase of course), and I edit the project to reference a Java script library in the same database. Everything is happy, the code compiles. Run-time however, is a different story. The agent classloader reports that it cannot find my agent class. Why? Well because it’s looking for a non-existent file:
Error loading Agent Class: com.somedomain.project.subproject.FairlyLongAgentClassName.c java.lang.ClassNotFoundException: com.somedomain.project.subproject.FairlyLongAgentClassName.c at lotus.domino.AgentLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(ClassLoader.java:502) at lotus.domino.AgentLoader.runAgent(Unknown Source)
Eh? Since when did Domino Designer start truncating base class references? Sure enough, I go back into the agent, click on “Edit Project” and immediately see that the base class drop-down contains the same truncated text as witnessed in the Java console. So I correct it, and re-save. But the issue won’t go away, even when I re-create the agent from scratch. The only way to resolve it is to shorten the agent class name. That is very annoying, not to mention undocumented. Further investigation reveals that the original class name is precisely 32 characters long, which rings alarm bells. So there you go, looks like there’s a class name limit in Domino Designer!
Look up Table of Notes and Domino known limits in your Domino Designer help database, and you will see that there is a 32 character limit for agent names; I suppose this limitation is related to that. I wonder why Domino Designer doesn’t pick up on this and validate it at save time?