JMS client tool - any alternative to HermesJMS for Java 8? - java

What alternatives to HermesJMS are available? I need to test against JBoss WildFly 8 and it uses Java 8. HermesJms seems to be built for Java 6 and I could not find a full Java 8 port for it. I tried setting hermes.bat with this configuration option but I get the following error:
org.xml.sax.SAXNotRecognizedException: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
This seems to be due to Xerces JAR version but I am worried if all other libs under %HERMES_HOME%\lib\ext will have similar Java 8 compatibility issues. Best way is to use a Java 8 compatible build of HermesJMS rather than try fixing JARs one by one but that seems not possible given that there is no such branch.
Thanks,
Paddy

To let it work for Java 8 correctly, you need to add the following parameters:
-Dorg.xml.sax.parser=com.sun.org.apache.xerces.internal.parsers.SAXParser -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
Windows
Open bin/hermes.bat and add those parameters after start "HermesJMS" "%JAVA_HOME%\bin\javaw".
Linux / Mac
Open bin/hermes.sh and add those parameters in the last line after "$JAVACMD".

This seems to be related to java 7 vs 8 difference in XMLP
To make it work I updated Hermes lib folder with :
xercesImpl.jar (version 2.11) - I can see latest in SP5 now
xml-apis.jar (1.4.01)
After downloading JARs from MVN repo I renamed to match existing naming in Hermes.
After this change Hermes starts (and works fine when using JMS) and there is no error in logs.

You could give a try to JMSToolBox (on sourceforge)

Remove xerces.jar and xercesImpl.jar from the %HERMES_HOME%\lib directory. With these parsers removed from the lib, Hermes will default to the SAX parser in JDK8 and will work better.
Click here for additional detail.

It worked for me by adding the following jar file to lib directory.
xercesImpl

Related

Eclipselink jaxb-compiler .cmd not working (java.lang.ClassNotFoundException: jakarta.activation.MimeTypeParseException error)

For the app i'm developing is essential that i can generate java classes from xsd.
I'm using eclipselink so jakarta libs and it used to work but after some changing to java path it does not work anymore and i can't go back.
When i run directly the jaxb-compiler file it returns Java major version 19 path not found, so I tried to replicate the command
(that is java -Xmx256m -Djakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory -cp "..\jlib\moxy\jakarta.json.jar";"..\jlib\moxy\jaxb-core.jar";"..\jlib\moxy\jaxb-xjc.jar";"\jlib\moxy\jakarta.activation.jar";"..\jlib\moxy\jakarta.validation-api.jar";"..\jlib\eclipselink.jar";"..\jlib\moxy\jakarta.xml.bind-api.jar" org.eclipse.persistence.jaxb.xjc.MOXyXJC "C:\Users\franc\Desktop\schemas\Compendium version VI")
in the prompt and found that the error is
"java.lang.ClassNotFoundException: jakarta.activation.MimeTypeParseException"
and "java.lang.NoClassDefFoundError: jakarta/activation/MimeTypeParseException".
I tried to change jdk version to 17.5 but that doesn't work either, i don't know what to do and can't go forward without the classes (that could change in time so i must be able to generate them whenever I want). I have installed the jaxb tool for eclipse but that works just for a file at the time, if you know how to convert an entire directory of xsd that would help too. Help me pleasee

Driver update to ojdbc7.jar gives error for oracle/security/pki/OraclePKIProvider

I have been using ojdbc14.jar earlier and now want to upgrade it to ojdbc7.jar for supporting oracle12c.
But while connecting server gives error for "oracle/security/pki/OraclePKIProvider".
If I add oraclepki.jar to the classpath server starts up properly without any error.
I am trying to figure out what special got added in ojdbc7.jar that its asking me to add oraclepki.jar, As with ojdbc14.jar it never asked me to add oraclepki into my classpath.
Does anyone know what changes with ojdbc7 that's causing this error and what can be done to avoid adding oraclepki on classpath?
Check your classpath and make sure you remove the following: (if it exists)
-XX:-UseSplitVerifier
This is an issue recorded in the Oracle Support Database. If you have Oracle Support, you can find out more there. If not...
As Joseph Carroll states, removing the -XX:-UseSplitVerifier from your command line Java arguments might solve your problem. The UseSplitVerifier argument basically tells Java to use an earlier, less stringent, byte code verifier (which was sometimes used to get older byte code instrumentation tools to work when upgrading from Java 6 to Java 7). Unfortunately, it caused some problems when upgrading certain tools from Java 7 to Java 8. Other things you might do include (per Oracle):
Upgrade to a java 7 compatible bytecode instrumentation tool.
Or, as
a workaround, include oraclepki_121020.jar in the classpath. This is
a valid workaround in case upgrading to a java 7 compatible bytecode
instrumentation tool is not possible.
This article talks about why -XX:-UseSplitVerifier was added for using Java 7 with Oracle. This article talks about using the –noverify flag with Java 8 instead of -XX:-UseSplitVerifier.

Java package error in eclipse

I get this error in my project which I imported from my backup. Before I could run the project without issue in eclipse. I formatted my machine and now when I try to run the application I get this error. what could it be..
I am not using maven and I tried to remove the jars and adding them all back....
One thing that differs from my previous setting is that i was using java sdk 1.6.22 version before now i am using java 1.8
You are missing reference to the JAR file after you formatted your PC.
You put your JAR file again in classpath, and error will go off.
You have lost the reference to the jar.
Here you are two possible solutions:
If you are using Maven, check your pom.xml and then if all it's
correct make an Maven > Update Maven Project.
If you are adding directly the jars to the Buildpath, add again and
the error will dissapear.
Two issues:
There is no sun.utils.LocaleServiceProviderPool, at least not in the packages provided directly by the JDK (at least checked on my machine with JDK8 installed).
Maybe you mean sun.util.locale.provider.LocaleServiceProviderPool?
As stated before, the use of sun.* packages is not encouraged since they are internal API.

ClassNotFoundException / org.apache.pivot.wtk.BrowserApplicationContext$HostApplet

Is there any version of JAVA, or an alternative to JAVA, which is compatible with dial-up. I keep getting the following exception even when using Google Chrome or FireFox.
ClassNotFoundException / org.apache.pivot.wtk.BrowserApplicationContext$HostApplet
I have the latest JAVA Version. Are there any older versions still available? JAVA.com does not seem to have it's own customer support centre
Everything else out there is either pay-by-the-minute or "buy our fix-it program"
Not all existing Java libraries are included in the JDK. You seem to have a piece of code which refers to a library called Apache Pivot. You need to make sure that you have the jar file(s) for this library and that they are in your CLASSPATH when you execute your program. I think you need to find a good book or tutorial.
Instead of including your library to the CLASSPATH environment variable you can also copy the external jar-files to your jdk and jre.
On my system thats for example:
C:\Program Files\Java\jdk1.7.0_21\jre\lib\ext\
and
C:\Program Files\Java\jre7\lib\ext\
I have better experiences with that, than setting the CLASSPATH.

How to fix bad version in eclipse plugin?

I am getting this bad version error as shown below. How to fix this. Do I need to have a separate jar file for each version of java?
(source: sourceforge.net)
How to fix this.
Is this a plugin that you created, or did you download it from somewhere?
I've never seen this myself, but I suspect that you are running Eclipse using an older version of Java (e.g. 1.5) and trying to use a plugin that was compiled for Java 1.6. Assuming that is the case you can:
upgrade the JDK used to run Eclipse to 1.6,
try to find a version of the plugin that was compiled for the Java 1.5 platform, or
download the plugin sources and build it for Java 1.5 yourself.
Do I need to have a separate jar file for each version of java?
No. A JAR file built for a Java 1.5 target platform should also work on a Java 1.6 platform. (Just not the other way around ...)
I got similar kind of error once and I was not able to fix it. And I ended up removing the plugin (EMF Plugin) and installing it on a new setup of Eclipse.
Now, I use Yoxos On-demand where you can create/add/remove Eclipse plugins with no effort. This is the best Eclipse customizer I have seen.
You are running on an older version of Java than the code was compiled for.

Categories

Resources