IBM Worklight 6.0 - Migration Issue after importing a project - migration

Update to Worklight version 6.0. Even load sample apps from new version 6.0 web site and get this exception like this:
An internal error occurred during: "Upgrade Worklight Projects".
loader constraint violation: when resolving method
"org.apache.commons.io.FileUtils.iterateFiles(Ljava/io/File;Lorg/apache/commons/io/filefilter/IOFileFilter;Lorg/apache/commons/io/filefilter/IOFileFilter;)Ljava/util/Iterator;"
the class loader (instance of
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the
current class, com/worklight/builder/skins/impl/SkinBuilderImpl, and
the class loader (instance of
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved
class, org/apache/commons/io/FileUtils, have different Class objects
for the type org/apache/commons/io/filefilter/IOFileFilter used in the
signature
None of the apps could be built and deployed in new 6.0 (Tried With JDK 1.6/1.7, Eclipse 4.2.2).

Please try to find if you have apache commons IO installed in your Eclipse plugin directory.
That's the source of the conflict.
If you can, please try to:
1. stop the Eclipse
2. move the apache commons IO out of the plugin dir
3. start Eclipse, then close it.
4. move the commons IO back into the plugin dir.
5. Start Eclipse.
Does the problem occur?

Have to use Eclipse is 4.2.2 Java Platform Enterprise Edition version but not Classic

Related

version mismatch in mule application dependencies

I am trying to deploy this application to the Mule server.
It works on Anypoint Studio without a problem.
When I go to deploy it on the standalone server, it fails and in the logs, I find this error
java.lang.IllegalStateException: Incompatible version of plugin 'APIKit' (org.mule.modules:mule-apikit-module) found. Artifact requires version '1.6.0' but context provides version '1.5.5'
What's weird is that the version of APIKit I used on the app is 1.6.0 which I upgraded from 1.5.5.
The app is using a domain, and the dependencies' versions between the domain and the app are the same.
What can be the solution to this problem?
It looks like the domain is really using the dependency for APIKit 1.5.5. Another reason could be some incompatible version of the REST Validator Extension as mentioned in the documentation. Also if the domain or the application is using a jar library to import common Mule configurations it may be referring to a different version of the APIKit module. You can take a look at the logs to see what versions are being deployed.

NoClassDefFoundError: com/ibm/wsspi/uow/UOWException

We are migrating from WebSphere 8.0 to WildFly 10.0.0. after compiling the project in eclipse and removing all the reference of IBM WebSphere jars, on deploying the application, I am getting an error that NoClassDefFoundError: com/ibm/wsspi/uow/UOWException
I have tried to search this exception class in my project, i did not find any.
Can you please help me in fixing this error.
Along with the migration , we are also upgrading Java version to 8 and Spring version to 4.3.0
While working on this, I figured that we were referring to WebSphereUowTransactionManager which is specific for WebSphere in the Springs Transaction Manager. We have to replace it with JtaTransactionManager for removing the exception.

How to launch ScenicView as a Java Agent in an IntelliJ Project?

I have added ScenicView to my JavaFX application in IntelliJ using the following VM Argument-javaagent:/full/path/to/ScenicView.jar as suggested in http://fxexperience.com/scenic-view/help/.
However, when I launch the application, I get an java.lang.IllegalArgumentException: URI is not absolute exception along with a few others and as a result ScenicView is never able to discover my application.
What could be wrong?
I saw in the documentation that ScenicView requires tools.jar from the JDK to be available in the classpath.
It turns out that IntelliJ only loads JRE libraries to classpath even if you point out to a full JDK as the SDK. I have added tools.jar from the JDK to the classpath at Module Settings -> SDKs -> Classpath.
After this small fix, everything works as expected.

Glassfish 3.1.2 and Eclipse

I just downloaded the Glassfish version 3.1.2, this is not yet an official release.
I need this version because my web application is using websockets.
The problem I have now is with the Glassfish plugin for eclipse, he is not recognizing the new Glassfish Version.
With the Glassfish Version 3.1.1 in Eclipse everything works fine.
I am using Oracle Glassfish Server Tools (Eclipse plugin ) version 2.0.0.20111104904 from Oracle(last version I could download).
If I try to add a new Server Runtime Environment in Eclipse for the Glassfish 3.1.2 I get the error:
There is no valid GlassFish installation in the specified directory...
I need everything to be able to debug my web application in Eclipse.
Anyone know what the plugin is checking ?
There is any change to trick the plugin so will run with Glashfish 3.1.2 too ?
Use the plugin from here (for Indigo): http://dlc.sun.com.edgesuite.net/glassfish/eclipse/indigo/
The plugin for Helios does not support 3.1.2.
If you have to live with the bits the are blessed by Oracle or keep using Helios, then you can try the following trick:
create a couple files....
${glassfish.rootdirectory}/modules/jsf-impl.jar and
${glassfish.rootdirectory}/modules/jstl-impl.jar
These files were renamed between 3.1.1 and 3.1.2...
You may be able to get the 3.1.2 to mascarade as 3.1.1 by just
creating empty files with the above names. If that doesn't do it,
make copies of the following files should do it.
The new name for jstl-impl.jar is
gf312/glassfish/modules/javax.servlet.jsp.jstl.jar
The new name for jsf-impl.jar is
gf312/glassfish/modules/javax.faces.jar.
If you are on Helios, you can try the following:
uninstall the Glassfish 3.1.1 plugin (and all associated runtimes and servers).
go to "Install new software" and type in (for the URL): http://download.java.net/glassfish/eclipse/indigo
Though the plugin says indigo, it is also working for me in Helios. And it gives options for both Glassfish 3.1.1 and 3.1.2 servers (pre and post name changes).
Note that it downloads Glassfish itself, and installs an internal server. You can delete that one, and install your own server ("New server...") if you have an existing server you want to work with (as I did).
HTH.

Eclipse - servlet creation error

I am getting the following error when I try to use the Eclipse IDE wizard to create a Servlet:
"java.lang.Eror: Unresolved compilation problems:
The import org.eclipse.jst.j2ee.internal.common cannot be resolved.
CreateServletTemplateModel cannot be resolved to a type
....
"
The settings of the IDE are as follows:
Eclipse Version: 3.4.2
WTP Servlet UI Plug-in: 1.1.203.v20081022000
(org.eclipse.jst.servlet.ui)
I don't have any problems manually creating the Servlets, I just would like the IDE to work as it's supposed to in order to avoid the overhead.
Any help would be greatly appreciated.
As mentioned here, that could be linked to a WTP installation issue.
Try to see if you still have the problem with:
WTP3.0.5 (compatible with your eclipse3.4.2)
or
with the J2EE package (all-in-one distribution, see here for ganymede - 3.4.2 - packages)
Note: in both cases, you can duplicate your eclipse 3.4 installation, points to a fresh workspace and do your tests here (in order to avoid modifying anything from your current setup).