DOTS Task Generates error on load - xpages

I'm running Domino 9.0.1 and was attempting to load up the DOTS task. Getting an exception when attempting to load it. From the below it seems DOTS isn't installed. Thought it was part of the default installation for XWork/ Domino 9x releases. Do I need to follow the install steps for 8.5.3, another installer to use?
Exception in thread "main" java.lang.NoClassDefFoundError: com.ibm.dots.launcher.OSGiProfile
Caused by: java.lang.ClassNotFoundException: com.ibm.dots.launcher.OSGiProfile
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at java.lang.ClassLoader.loadClass(ClassLoader.java:672)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:638)
Unable to access OSGiProfile class, make sure the launcher.jar is in osgi-dots directory
thanks
-Mark

The DOTS extension started its life as an OpeNTF project by the ingenious David Taieb, because he could and was later adopted for use with the OpenSocial Extensions (the part that renders the Embedded Experiences). So you need to have one of the two installed to get it to work. On a 9.0x server the social extensions are most current DOTS.

Related

How do you import the log4j jar file into an NSF?

I wanted to use the Apache POI classes for Streaming Excel spreadsheets. If I import the log4j-1.2.17.jar file into my Jars in the nsf then no XPages will load.
If I don't I get an error:
java.lang.NoSuchMethodError:
javax/xml/stream/XMLEventFactory.newFactory()Ljavax/xml/stream/XMLEventFactory;
at
org.apache.poi.openxml4j.opc.internal.marshallers.PackagePropertiesMarshaller.<clinit>(PackagePropertiesMarshaller.java:45)
at
java.lang.J9VMInternals.initializeImpl(Native Method)
at
java.lang.J9VMInternals.initialize(J9VMInternals.java:201)
at
Since many third party Java apis seem to use the log4j is there a solution? I think this is the same issue that came up with the web services API in XPages?
Your best course of action is to deploy OpenNTF essentials. It contains the POI classes and quite some ready made wrappers to make your life easier.
Deploy into sever via update site nsf approach and deploy to your designer too
Maybe your error can be from the same reason than in that questions. It's a problem of standard jars which come along with the domino installation.
Using External jar causing Error
Axis 1.4 log4j-1.2.8.jar incompatible with XPages?
Howard, put the jar file on the server as well as your local notes client and open up Java security permissions, I think that should do it. Also check that the version you are importing is compatible with Java version on Domino.

How to add Log4j to Eclipse RCP project

I made a plug-in project from this article.
Then I add this plug-in into my project. However, when I try to use it,
I got the following error:
java.lang.NoClassDefFoundError: org/apache/sel4j/log4j/api/LoggerFactory
Caused by: java.lang.ClassNotFoundException: org.apache.sel4j.log4j.api.LoggerFactory
What should I do?
Do you have the same setup as on this screenshot?:
Note, that you need to add your jars to the classpath as shown on the screenshot and not as you would usually do it for your Java application: Right Click-> Add to build path.
Also, I would like to suggest using this article for setting up logging with Eclipse-RCP for the first time. It is more complete and precise.

OpenJPA 2.1.1 enhancement problem on Glassfish 3.1.1

My problem is this exception:
Caused by: <openjpa-2.1.1-r422266:1148538 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: This configuration disallows runtime optimization, but the following listed types were not enhanced at build time or at class load time with a javaagent: "
I'm trying to get an very simple java application with jsf and jpa running, but there seems to be a problem with the enhancement of my entities. As far as I know, tries OpenJPA to enhance my entities at runtime, which are listet in the persistence.xml, however there is no agent to do this. The keyword for this is: Enhancing at Runtime, right?
I thought the enhancement will automatically done by the application server at deployment? How can I configure this?
My exactly environment:
Glassfish 3.1.1
Derby, which is integrated in Glassfish
OpenJPA 2.1.1
Mojarra JSF 2.1.3
Update #1:
After some comments I've added the following lines to my persistence.xml:
<property name="openjpa.DynamicEnhancementAgent" value="false"/>
<property name="openjpa.RuntimeUnenhancedClasses" value="supported" />
It works now, but OpenJPA throw this warning:
SEVERE: 52 myApp WARN [http-thread-pool-8080(5)] openjpa.Enhance - Creating subclass for "[class myApp.model.entities.AbstractEntity, class myApp.model.entities.Post]".
This means that your application will be less efficient and will consume more memory than it would if you ran the OpenJPA enhancer. Additionally, lazy loading will not be available for one-to-one and many-to-one persistent attributes in types using field access; they will be loaded eagerly instead.
I think this can't be the solution.
Update #2:
Refer to fvu's answer, I've tried to define the -javaagent jvm parameter in the domain.xml and over the web admin console. After a restart appeared the problem again.
Update #3:
Refer to update #2, I've played a bit around. There must be thrown an error, when the -javaagent parameter is used, but the file is missing, right?. Yes, there it is:
Waiting for domain1 to start .Command start-domain failed.
Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:
Error occurred during initialization of VM
agent library failed to init: instrument
Error opening zip file or JAR manifest missing : /tmp/openjpa.jar
If I copying the agent to this location, this error doesn't appear, but openjpa could still not enhance my entities!
If you're still having issues... I'd highly recommend biting the bullet and setting up build time enhancement. You'll be much happier in the long run if you get that going.
A couple of ideas:
add the Java agent for enhancement to GF's JVM option, see this link for an example of how to install a javaagent and OpenJPA's doc 5.2.3, enhancing at runtime. That emulates enhancer activation in desktop apps as closely as possible IMO.
However, when I read chapter 5.2.4 of the OpenJPA docs it might be capable of picking up the correct enhancer automatically. Try copying openjpa.jar to the domain's library directory, and check what happens after a server restart.

WARNING: Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use

I am trying to create an application where I combine jsf2, prettyfaces, jpa and glassfish 3.1. I had some trouble gettings prettyfilter to load properly, which was fixed by following the tutorial here.
However, after completing the steps I got a problem with the Glassfish log being flooded by some really really irritating warnings mesages. It seams they dont have any impact on the functionality of my page, but I would like to know if there is something that will make them go away? The warning is:
WARNING: Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match
In addition I'm having problem undeploying this webapp. Glassfish admin gui will show a text saying "Long lasting process has been detected", before the admin gui is useless and I have to restart the gf server. I get an error in the gf log:
INFO: PrettyFilter shutting down...
INFO: Admin Console: Initializing Session Attributes...
WARNING: java.lang.reflect.InvocationTargetException while attempting to process a 'command' event for 'button1'.
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException while attempting to process a 'command' event for 'button1'.
Not sure if this makes any sense for anyone, but any help is much appreciated!!:)
Both issues are already reported to the Glassfish dev team.
Issue GLASSFISH-15809 - JSF PhaseListener executed for each virtual host
Issue GLASSFISH-16112 - Admin GUI fails with NPE when attempting to undeploy an application
Glassfish 3.2 will be the earliest version where both issues will be fixed.

You must include the platform port before the LWUIT in the classpath runtime exception

I recently started using LWUIT. Great job and great program. I'm using Netbeans 6.9.1, S60 SDK and the webstart version of LCWUIT.
The first problem I faced was that I couldn't preverify Transitions3D.java file , however that was not an issue. I just removed that part of the code and recompiled the library from scratch. So I created a simple form with a "Hello World" Label and tried the "Create Netbeans Project" option of the resource editor. I did a Clean Build at the test_MIDP (where test is the name of my project) and tried to run it on the emulator. However I'm receiving this error message:
TRACE: <at java.lang.RuntimeException: You must include the platform port before the LWUIT in the classpath>, startApp threw an Exception
java.lang.RuntimeException: **You must include the platform port before the LWUIT in the classpath**
at com.sun.lwuit.impl.ImplementationFactory.createImplementation(ImplementationFactory.java:67)
at com.sun.lwuit.Display.init(Display.java:400)
at userclasses.MainMIDlet.startApp(MainMIDlet.java:15)
at javax.microedition.midlet.MIDletTunnelImpl.callStartApp(), bci=1
at com.sun.midp.midlet.MIDletPeer.startApp(), bci=7
at com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=269
at com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=52
at com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=8
at com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=161
at com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26
java.lang.RuntimeException: You must include the platform port before the LWUIT in the classpath
at com.sun.lwuit.impl.ImplementationFactory.createImplementation(ImplementationFactory.java:67)
at com.sun.lwuit.Display.init(Display.java:400)
at userclasses.MainMIDlet.startApp(MainMIDlet.java:15)
at javax.microedition.midlet.MIDletTunnelImpl.callStartApp(), bci=1
at com.sun.midp.midlet.MIDletPeer.startApp(), bci=7
at com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=269
at com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=52
at com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=8
at com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=161
at com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26
"You must include the platform port before the LWUIT in the classpath"
Any ideas on how to fix this error? I tried to run the MIDlet with both S60 and JavaME SDK 3.0 emulator and I received the same error.
StackOverflow warned me that there are similar questions however I couldn't find anything about related to my issue. If not please inform me.
I shall answer my own post:
The problem was that in the UI jar I was including. LWUIT comes with 2 "sets" of UI.jar. The generic one which is in LWUIT\UI folder and the platform specific ones which are in the LWUIT\Ports folder.The generic one is being used as "parent" project containing all the common code,however if you MUST import the .jar file which is for your platform. As readme file says:
While these projects will compile easily they will be useless for any purpose since they don't include the binding glue for the platform, to use the platform one needs to use the appropriate projects underneath the specific ports directory to a given platform.
While I was recompiling the library in order to remove Transitions3D.java file, I recompiled (and then imported ) the generic UI.jar. The correct thing to do is compile, the parent project (the generic UI.jar) THEN compile the port specific library (in my case the LWUIT\ports\MIDP\UI.jar) and then import it in your project and you are done.

Resources