Reputation: 1
We have several .jar Files that we want to deploy to our 8.5.3 Domino servers.
The console command "tell http osgi diag <bundle name>
" works and shows me the bundle is there. But when i start an Notes Java Agent that has import statements from the jar the domino console prints NoClassDefFoundError errors for these classes.
Example from a .jar originally called saxon9he.jar:
[1834:0036-1E84] 24.08.2012 11:21:14 HTTP JVM: Exception in thread "AgentThread:JavaAgent"
[1834:0037-1E84] 24.08.2012 11:21:14 HTTP JVM: java.lang.NoClassDefFoundError:net.sf.saxon.Version
[1834:0039-1E84] 24.08.2012 11:21:14 HTTP JVM: at JavaAgent.NotesMain(Unknown Source)
[1834:003B-1E84] 24.08.2012 11:21:14 HTTP JVM: at lotus.domino.AgentBase.runNotes(Unknown Source)
[1834:003D-1E84] 24.08.2012 11:21:14 HTTP JVM: at lotus.domino.NotesThread.run(Unknown Source)
[1834:003F-1E84] 24.08.2012 11:21:14 HTTP JVM: Caused by:
[1834:0040-1E84] 24.08.2012 11:21:14 HTTP JVM: java.lang.ClassNotFoundException: net.sf.saxon.Version
[1834:0042-1E84] 24.08.2012 11:21:14 HTTP JVM: at lotus.domino.AgentLoader.loadClass(Unknown Source)
[1834:0044-1E84] 24.08.2012 11:21:14 HTTP JVM: at java.lang.ClassLoader.loadClass(ClassLoader.java:619)
[1834:0046-1E84] 24.08.2012 11:21:14 HTTP JVM: ... 3 more
Some of these .jar Files are completly written by ourselfs while others are contributed from open-source-projects. These jar. Files are just used via import-instructions in several Java Agents, XPages and classes created in the Java-Views in Domino Designer in "WebContent". We use these packages in various design-elements and have about 100 domino servers that have to get these files and patches, thats why we don't want to lay them into the local file-system in each of them.
This is what i have done so far to get the jar. Files to my domino server:
I have imported these jar. Files in my Eclipse 4.2 client into a new "Plugin Project from existing Jar" and configured the import and export packages. (I even tried making Bnd-Projects from these jar.Files to have proper OSGI-ready Manifest-files which sadly didn't do it better) After that i created a feature project which contains the plugins. At Last i imported that feature to a new Update-Site project in my Eclipse and build it.
I picked this site.xml in a database i created from the Template "StdEclipseUpdateSite" (Version 8.5.3 (04.03.2011). This database is referenced in the Notes.ini via "OSGI_HTTP_DYNAMIC_BUNDLES" param on my 8.5.3 Domino server x64 running locally on my windows 7 x64 for testing purposes.
I have worked on this problem for several days now, read about osgi and googl'ed a lot about similiar problems but i was not able to get this done myself. Any help is very appreciated.
Upvotes: 0
Views: 1468
Reputation: 2807
I know this is an old question - I just stumbled over it looking for some deployment issues :-)
In short: The agent JVM and the XPages JVM are NOT the same. So "old" agents (and webservices for that matter) will not see anything deployed to OSGi via update sites.
The only option you can use is to copy the jar file(s) to the jvm/lib/ext in the program library of the server. That works. You should not even consider adding the jar files to the agent (or a Java script library) since there is a memory leak in the mechanism that detaches the jar file prior to using it.
So consider it this way. The shift to the "new Java world" is not going to involve the old technologies (primarily agents). You will have to look out for new mechanisms for scheduling tasks in Domino. I personally believe DOTS/Tasklets is going to be the way forward - but there still is a need for solutions to "wrap it in" - and make it easy to set up tasks.
/John
Upvotes: 1
Reputation: 2178
OSGI Bundles are not visible to Classic Agents, I would recommend you use the DOTS plugin service to accomplish those tasks. http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&name=OSGI%20Tasklet%20Service%20for%20IBM%20Lotus%20Domino
Upvotes: 1