How to work run/implement Benchmark for optaplanner? - java

I need assistance with benchmarking using OptaPlanner. There are two issues I am running into. The first is seeing the results from benchmarking the provided examples. I see that the vehiclerouting example has two apps. One of them is VehicleRoutingBenchmarkApp. I ran this application and thought that the index.html would be generated however it wasn't. So I am not clear on how to do this.
The second issue is implementation. I am just experimenting, so I added the code snippet as instructed by the documentation in the VehicleRoutingApp.main() so that I can see what will happen.
Documentation link here.
System.out.println("-------------- benchmark stuff --------------");
PlannerBenchmarkFactory plannerBenchmarkFactory = PlannerBenchmarkFactory.createFromXmlResource(
"org/optaplanner/examples/vehiclerouting/benchmark/vehicleRoutingBenchmarkConfig.xml");
PlannerBenchmark plannerBenchmark = plannerBenchmarkFactory.buildPlannerBenchmark();
plannerBenchmark.benchmark();
The result of this was a constant stream of outputted logs. It is difficult to follow what it is being conveyed. How do I get all of that translated into a nice GUI as I believe index.html is suppose to do? Thanks in advance.
The tracestack I am getting is the following:
Exception in thread "main" java.lang.IllegalStateException: The directory dataDir (C:\Intellij\Workspace\optaplanner-developer\data\vehiclerouting) does not exist.
Either the working directory should be set to the directory that contains the data directory (which is not the data directory itself), or the system property org.optaplanner.examples.dataDir should be set properly.
The data directory is different in a git clone (optaplanner/optaplanner-examples/data) and in a release zip (examples/sources/data).
In an IDE (IntelliJ, Eclipse, NetBeans), open the "Run configuration" to change "Working directory" (or add the system property in "VM options").
at org.optaplanner.examples.common.persistence.AbstractSolutionDao.<init>(AbstractSolutionDao.java:46)
at org.optaplanner.examples.common.persistence.XStreamSolutionDao.<init>(XStreamSolutionDao.java:32)
at org.optaplanner.examples.vehiclerouting.persistence.VehicleRoutingDao.<init>(VehicleRoutingDao.java:25)
at org.optaplanner.examples.vehiclerouting.persistence.VehicleRoutingImporter.<init>(VehicleRoutingImporter.java:57)
at org.optaplanner.examples.vehiclerouting.persistence.VehicleRoutingFileIO.<init>(VehicleRoutingFileIO.java:28)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.optaplanner.core.config.util.ConfigUtils.newInstance(ConfigUtils.java:46)
at org.optaplanner.benchmark.config.ProblemBenchmarksConfig.buildSolutionFileIO(ProblemBenchmarksConfig.java:149)
at org.optaplanner.benchmark.config.ProblemBenchmarksConfig.buildProblemBenchmarkList(ProblemBenchmarksConfig.java:111)
at org.optaplanner.benchmark.config.SolverBenchmarkConfig.buildSolverBenchmark(SolverBenchmarkConfig.java:88)
at org.optaplanner.benchmark.config.PlannerBenchmarkConfig.buildPlannerBenchmark(PlannerBenchmarkConfig.java:210)
at org.optaplanner.benchmark.impl.XStreamXmlPlannerBenchmarkFactory.buildPlannerBenchmark(XStreamXmlPlannerBenchmarkFactory.java:156)
at org.optaplanner.examples.common.app.CommonBenchmarkApp.buildAndBenchmark(CommonBenchmarkApp.java:68)
at org.optaplanner.examples.vehiclerouting.app.VehicleRoutingBenchmarkApp.main(VehicleRoutingBenchmarkApp.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

For those trying to learn optaplanner and has the same question, the solution is in your referenced benchmarkConfig.xml file. You should create an .xml that has a root <plannerBenchmark> tag. Inside of this you can add another tag called <benchmarkDiretory>. This is where you can specify where you would like your report to be generated. Be sure to set your <inputSolutionFile> to point towards the proper datasets, which can be either .xml or .vrp. The rest works like magic.
Should look something similar to the following:
<plannerBenchmark>
<benchmarkDirectory>local/data/report/vehiclerouting</benchmarkDirectory>
.....
<inputSolutionFile>data/vehiclerouting/unsolved/TestCase_1.xml</inputSolutionFile>
.....
</plannerBenchmark>

Related

Websphere won't start

I keep getting the following error on my IBM Websphere server
[4/22/15 16:20:35:203 EDT] 00000000 AdminTool A ADMU0111E: Program exiting with error: java.lang.NullPointerException
at com.ibm.ws.management.launcher.LaunchCommand.processDefaultJvmOptions(LaunchCommand.java:1246)
at com.ibm.ws.management.launcher.LaunchCommand.setParamsFromJavaProcessDef(LaunchCommand.java:1200)
at com.ibm.ws.management.launcher.LaunchCommand.setParamsFromProcessDef(LaunchCommand.java:617)
at com.ibm.ws.management.launcher.LaunchCommand.init(LaunchCommand.java:362)
at com.ibm.ws.management.launcher.LaunchCommand.<init>(LaunchCommand.java:262)
at com.ibm.ws.management.tools.WsServerLauncher.initializeRepositoryAndLauncher(WsServerLauncher.java:424)
at com.ibm.ws.management.tools.WsServerLauncher.runTool(WsServerLauncher.java:279)
at com.ibm.ws.management.tools.AdminTool.executeUtility(AdminTool.java:269)
at com.ibm.ws.management.tools.WsServerController.executeUtilityOnWindows(WsServerController.java:136)
at com.ibm.ws.management.tools.WsServerLauncher.main(WsServerLauncher.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:274)
I have been to numerous forums and cannot seem to find an up to date answer.
I know I have to run some sort of command. I am on Windows 7 so what is the command I am supposed to run to fix this and can I run this command in the Windows command prompt.
This exception is sometimes caused by corrupt serverindex.xml or server.xml files. Check for any of them that may be 0 bytes and restore from backup. If you don't have a backup creating a new profile will restore them.
If you find the serverindex.xml is having some size for it, check if the serverindex.xml file is corrupted by opening it using Notepad ++ or similar tool. The file you need to refer is: \config\cells\Node01Cell\nodes\Node01.
If there are no backups, it is possible to use one of the temp file from \wstemp\anonymous1493784328013\workspace\cells\Node01Cell\nodes\Node01
Hope it helps anyone having similar issues.

How do I set my EMR Classpath

I am running a job on an AWS EMR cluster, and am having issues with a Jackson library conflict. Based on the article here I tried to add a bootstrap step to set my classpath with the following script:
#!/bin/bash
export HADOOP_USER_CLASSPATH_FIRST=true;
echo "HADOOP_CLASSPATH=s3n://bucket/myjar.jar" > /home/hadoop/conf/hadoop-user-env.sh
I have built my jar so that all its dependencies are included with it. The first problem I have when I do this is that my enable debugging step that I have dies with the following error:
Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: Class com.amazon.ws.emr.hadoop.fs.EmrFileSystem not found
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1895)
at org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:2427)
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2440)
at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:88)
at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2479)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2461)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:372)
at com.amazon.elasticmapreduce.scriptrunner.ScriptRunner.fetchFile(ScriptRunner.java:39)
at com.amazon.elasticmapreduce.scriptrunner.ScriptRunner.main(ScriptRunner.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
Caused by: java.lang.ClassNotFoundException: Class com.amazon.ws.emr.hadoop.fs.EmrFileSystem not found
at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1801)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1893)
... 13 more
So I have two questions, what is wrong with this regards to the enable debugging step also? Is it valid to give my classpath as a s3 location? If not what should the value of:
/path/to/my.jar
be in the example on the page indicated above?
Looking at your bootstrap action, it looks like there might be a mistake in your string. The line should look like the following:
#!/bin/bash
export HADOOP_USER_CLASSPATH_FIRST=true
echo "HADOOP_CLASSPATH=/path/to/my.jar" >> /home/hadoop/conf/hadoop-user-env.sh
Note the '>>' characters. A single '>' means that you're replacing the entire file with the output of the 'echo' command, whereas a double '>>' means you're appending that line at the end of the script. Additionally, a semi-colon isn't needed in a Bash script.
References : http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-hadoop-config_hadoop-user-env.sh.html
PS : Amazon's awesome support found this question and replied to my email; although this question was not asked by me. So this is the attribution to the author - AWS Support Engineer named Rendy O.

JOGL exporting to windows 8 and getting unsatisfied link error

I have been writing a game using JOGL libraries for graphics and when I have been exporting this game it has only been working on my machine. My processor is an AMD Phenom II X4 840 Processor at 3.2 GHz on Windows 7. When I export the game and run using CMD the game works fine and there are no errors.
However, when running on my friends computer I get an unsatisfied link error. His computer has a AMD A6-4400M APU and he is running Windows 8.
The error message seems to be very vague and I havn't been able to adress the problem.
Exception in thread "main" java.lang.UnsatisfiedLinkError:jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress0(Ljava/lang/String;J)J
at jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress0(Native Method)
at jogamp.opengl.windows.wgl.WGL.wglGetProcAddress(WGL.java:276)
at jogamp.opengl.windows.wgl.WindowsWGLDynamicLibraryBundleInfo.toolGetProcAddress(WindowsWGLDynamicLibrar yBundleInfo.java:57)
at com.jogamp.common.os.DynamicLibraryBundle.toolDynamicLookupFunction(DynamicLibraryBundle.java:341)
at com.jogamp.common.os.DynamicLibraryBundle.dynamicLookupFunction(DynamicLibraryBundle.java:369)
at com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver.resolve(GLProcAddressResolver.java:54)
at com.jogamp.gluegen.runtime.ProcAddressTable.setEntry(ProcAddressTable.java:177)
at com.jogamp.gluegen.runtime.ProcAddressTable.reset(ProcAddressTable.java:145)
at jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory$1.run(WindowsWGLDrawableFactory.java:100)
at jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory$1.run(WindowsWGLDrawableFactory.java:93)
at java.security.AccessController.doPrivileged(Native Method)
at jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory.<init>(WindowsWGLDrawableFactory.java:93)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.jogamp.common.util.ReflectionUtil.createInstance(ReflectionUtil.java:171)
at com.jogamp.common.util.ReflectionUtil.createInstance(ReflectionUtil.java:193)
at com.jogamp.common.util.ReflectionUtil.createInstance(ReflectionUtil.java:213)
at com.jogamp.common.util.ReflectionUtil.createInstance(ReflectionUtil.java:235)
at javax.media.opengl.GLDrawableFactory.initSingletonImpl(GLDrawableFactory.java:166)
at javax.media.opengl.GLDrawableFactory.initSingleton(GLDrawableFactory.java:129)
at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1573)
at javax.media.opengl.GLProfile.access$100(GLProfile.java:76)
at javax.media.opengl.GLProfile$1.run(GLProfile.java:155)
at java.security.AccessController.doPrivileged(Native Method)
at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:123)
at javax.media.opengl.GLProfile.getDefaultDevice(GLProfile.java:1837)
at javax.media.opengl.awt.GLJPanel.<init>(GLJPanel.java:337)
at javax.media.opengl.awt.GLJPanel.<init>(GLJPanel.java:291)
at javax.media.opengl.awt.GLJPanel.<init>(GLJPanel.java:282)
at main.Main.<init>(Main.java:73)
at main.Main.main(Main.java:94)
The lines in my code 73 and 94 are:
73: canvas = new GLJPanel();
94: final Main main = new Main(); //When I initialise the main class
My layout when I export it goes like this:
META-INF
Q_lib
Q.jar
run.bat (just java -jar Q.jar to run the jar file).
Inside the jar file Q.jar I have all of the .dll's for all of the types of systems.
If you need more code from my main class, I can post it up, it is too long otherwise to put up here.
Any help would be highly appreciated.
You have to follow this rule to allow GlueGen to find the native libraries when making a fat JAR, otherwise it won't know in which directories to look at them, it won't extract them, they won't be loaded and you'll get an unsatisfied link error. I advise you to post your technical questions about JOGL on its official forum in the future as only a very few JogAmp contributers and maintainers come here.
Edit.: Never put the native libraries or the JARs directly into the JVM in order to avoid conflicts when running applets and applications.

Minecraft Coders Pack Errors when Running in Eclipse

Okay I am trying to make minecraft mods using eclipse. I used this video to set it up. I added both ModLoader and GuiApi to the Jar files before decompiling. It works until I try to test it in Eclipse then I get these errors:
Failed to load mod from "mod_HeroesGuild.class"
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
at net.minecraft.client.Minecraft.startGame(Minecraft.java:140)
at net.minecraft.client.Minecraft.run(Minecraft.java:438)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: input == null!
at javax.imageio.ImageIO.read(Unknown Source)
at net.minecraft.src.CanvasMojangLogo.<init>(CanvasMojangLogo.java:22)
at net.minecraft.src.PanelCrashReport.<init>(PanelCrashReport.java:103)
at net.minecraft.src.MinecraftImpl.displayUnexpectedThrowable(MinecraftImpl.java:26)
at net.minecraft.src.ModLoader.ThrowException(ModLoader.java:1612)
at net.minecraft.src.ModLoader.init(ModLoader.java:714)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:121)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:72)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:168)
... 3 more
I am new to programming and I don't have any idea what to do...
The run system starts minecraft the mojang logo appears but then I get a white screen! Thanks!
I found a forum where someone had the same error:
http://www.minecraftforum.net/topic/236195-crashing-after-mojang-logo-problem-solved/
The answer they give is to reinstall, via instructions at:
http://www.minecraftwiki.net/wiki/Tutorials/Minecraft_Help_FAQ#Reinstalling_Minecraft
...and the poster replies:
didn't think to delete the whole .minecraft.
Problem cured.
Remember to back it up first.
Underlying cause
I'm thinking your SDK is somehow loading from/conflicting with your existing Minecraft install.
This is because .minecraft is the folder under the Application Data folder that contains minecraft user/runtime data. Basically, your save game data, and the program's cached data.

Plugin inside Sametime with Lotus Notes Classess - The Whole Story

It's gonna be a long read so Thanks for being patient :).
I have been trying to develop a plugin to be executed inside Lotus Sametime. The idea of this plugin is to extract the calendar entries for a given date and then display it in sametime. Simple isn't it, i thought so too. Apparently I was wrong and grossly misunderstood the JVM version compatibility issues. I first did an independent test in the default Java 1.6 and it worked fine, I got the entries and got the code ready to move to the Sametime Development environment.
I moved to the plugin development environment to insert my code.My first issue came, when I added the Notes.jar to the External jar list and the import lotus.domino line. The IDE told me this
The type org.omg.CORBA.UserException cannot be resolved. It is indirectly referenced from required .class files
After some googling , i referenced the ibmorbapi.jar in the project and got it running. Unfortunately for me even that didn't work out. The plugin itself failed to load and this is what i got
java.lang.NoClassDefFoundError: lotus.notes.Session
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1244)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:157)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:759)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
at com.ibm.collaboration.realtime.imhub.ImHub.loadMiniAppExtensions(ImHub.java:416)
at com.ibm.collaboration.realtime.imhub.ImHub.getMiniApps(ImHub.java:356)
at com.ibm.collaboration.realtime.imhub.workbench.ImHubWorkbenchWindowAdvisorShelf.transformMiniApps(ImHubWorkbenchWindowAdvisorShelf.java:354)
at com.ibm.collaboration.realtime.imhub.workbench.ImHubWorkbenchWindowAdvisorShelf.createWindowContents(ImHubWorkbenchWindowAdvisorShelf.java:179)
at org.eclipse.ui.internal.WorkbenchWindow.createContents(WorkbenchWindow.java:938)
at org.eclipse.jface.window.Window.create(Window.java:426)
at org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(Workbench.java:805)
at org.eclipse.ui.internal.Workbench.doOpenFirstTimeWindow(Workbench.java:1453)
at org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbench.java:1404)
at org.eclipse.ui.internal.WorkbenchConfigurer.openFirstTimeWindow(WorkbenchConfigurer.java:190)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:708)
at org.eclipse.ui.internal.Workbench.init(Workbench.java:1101)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1863)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.ibm.collaboration.realtime.ui.WorkbenchAdapter.createAndRunWorkbench(WorkbenchAdapter.java:103)
at com.ibm.collaboration.realtime.ui.WorkbenchAdapter.run(WorkbenchAdapter.java:85)
at com.ibm.collaboration.realtime.application.RTCApplication.run(RTCApplication.java:765)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at java.lang.reflect.AccessibleObject.invokeL(AccessibleObject.java:211)
at java.lang.reflect.Method.invoke(Method.java:272)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Since that was not gonna work. I thought why not create the NotesCalendarExtraction part into a separate jar execution file and get a xml file with the calendar entries in it and then give it to the plugin to show the entries. I know it was not the best solution but i was desperate and wanted to get this working. In anycase, the idea kinda worked well when I had hardcoded the jar file and and the path to the generated xml file. Btw I was executing the jar file using the getRuntime.exec module in java. Time came to get it running generically and unfortunately for me the exec module was not accepting spaces in its path so program files was out of question. I was not sure if this was right method but then the jar as such was not executing either for some reason. I tried putting in a bat file with the appropriate command line parameters and it generated the xml when executed in the command line but not when running from the eclipse ide for reasons known only to the IDE. I was out of options at this point and I got my hands on another plugin which did exactly the same thing with regard to getting the calendar entries. I decompiled plugin and checked out the source code and saw the code was using a class loader to do the job. A new hope got into me when i saw this code. After some googling i put together some code which did the job for me. Time came for the acid test, i put the code into the plugin env and this is what I got.
!ENTRY org.eclipse.ui 4 0 2009-09-27 22:05:55.996
!MESSAGE (org/omg/CORBA/UserException) bad major version at offset=6
!STACK 0
java.lang.UnsupportedClassVersionError: (org/omg/CORBA/UserException) bad major version at offset=6
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:246)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:109)
at java.net.URLClassLoader.findClassImpl(URLClassLoader.java:1028)
at java.net.URLClassLoader$4.run(URLClassLoader.java:549)
at java.security.AccessController.doPrivileged(AccessController.java:213)
at java.net.URLClassLoader.findClass(URLClassLoader.java:547)
at java.lang.ClassLoader.loadClass(ClassLoader.java:625)
at java.lang.ClassLoader.loadClass(ClassLoader.java:582)
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:246)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:109)
at java.net.URLClassLoader.findClassImpl(URLClassLoader.java:1028)
at java.net.URLClassLoader$4.run(URLClassLoader.java:549)
at java.security.AccessController.doPrivileged(AccessController.java:213)
at java.net.URLClassLoader.findClass(URLClassLoader.java:547)
at java.lang.ClassLoader.loadClass(ClassLoader.java:625)
at java.lang.ClassLoader.loadClass(ClassLoader.java:582)
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
at java.lang.reflect.AccessibleObject.initializeClass(Native Method)
at java.lang.reflect.Method.invoke(Method.java:248)
at com.ibm.collaboration.realtime.lotusnotes.LotusNotes.getNotesSession(LotusNotes.java:179)
at com.ibm.notes.sametime.calendar.hack.SpeakUpMiniApp.createControl(SpeakUpMiniApp.java:58)
at com.ibm.collaboration.realtime.miniapp.MiniAppViewPart.createPartControl(MiniAppViewPart.java:41)
at com.ibm.rcp.ui.internal.shelf.ShelfViewReference.createPartHelper(ShelfViewReference.java:330)
at com.ibm.rcp.ui.internal.shelf.ShelfViewReference.createPart(ShelfViewReference.java:201)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)
at com.ibm.rcp.ui.shelf.ShelfPage.activatePart(ShelfPage.java:1168)
at com.ibm.rcp.ui.shelf.ShelfPage.access$10(ShelfPage.java:1159)
at com.ibm.rcp.ui.shelf.ShelfPage$7.handleEvent(ShelfPage.java:1312)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:706)
at com.ibm.rcp.swt.swidgets.SViewForm.toggleMaximize(SViewForm.java:1501)
at com.ibm.rcp.swt.swidgets.SViewStack.expand(SViewStack.java:596)
at com.ibm.rcp.swt.swidgets.SViewStack.toggleMaximize(SViewStack.java:526)
at com.ibm.rcp.swt.swidgets.SViewStack$5.handleEvent(SViewStack.java:312)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:706)
at com.ibm.rcp.swt.swidgets.SViewForm.onMouseUpMaximize(SViewForm.java:1437)
at com.ibm.rcp.swt.swidgets.SViewForm.onMouseUp(SViewForm.java:1127)
at com.ibm.rcp.swt.swidgets.SViewForm$4.handleEvent(SViewForm.java:421)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3673)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1930)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.ibm.collaboration.realtime.ui.WorkbenchAdapter.createAndRunWorkbench(WorkbenchAdapter.java:103)
at com.ibm.collaboration.realtime.ui.WorkbenchAdapter.run(WorkbenchAdapter.java:85)
at com.ibm.collaboration.realtime.application.RTCApplication.run(RTCApplication.java:765)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at java.lang.reflect.AccessibleObject.invokeL(AccessibleObject.java:211)
at java.lang.reflect.Method.invoke(Method.java:272)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
It's really frustrating again to the version error. The sametime plugin dev environment runs on J9 JVM and the for some reason that is not enough for notes.jar ibmorbapi.jar i guess. Atleast that is what my assumption is about the error.
I would appreciate any help on this from you guys. "org/omg/CORBA/UserException" seems to be crux of the issue and I am simply not able to get over it. I can get the external jar execution working in some complex way but I don't want to do it as i feel its the best way to get calendar entries from notes. I am sure it has to be reasonably simple and any help on this would be appreciated.
There are two jars that are related to talking to a Notes application.
Notes.jar - This is a JNI wrapper for LSXBE classes. In order for it to work correctly you will need Lotus Notes installed on the machine and the main directory on the system PATH.
NCSO.jar - This is for making DIIOP connections to a Domino server. This does not require Lotus Notes to be installed. It does require a Domino server you can connect to which has DIIOP enabled on it.
It is unclear if you have Notes installed?
The jars are also specific to certain JVM versions.
Java 6 - Notes 8.5.1
Java 5 - Notes 8.x
Java 1.4.2 - Notes 7.x
Java 1.3 - Notes 6.x
"bad major version at offset" means your are running the wrong jar for the JVM (eg. 851 jar on 1.4.2).
To rule out any configuration issues first I recommend creating just a simple java application which makes a connection to Notes/Domino. Once that works then you know your paths/jars are all set up correctly.
Looks like CORBA classes are compiled for a newer JDK. You need to find an older version of the JAR, or, alternatively, get the sources and compile them under your JDK (J9?). From what I see from a brief Google search, J9 is either 1.4 or even 1.3 compatible.
Also, make sure that all the code you compile yourself has the same target Java version, i.e. 1.4 (1.3?) in this case.

Categories