How to resolve java.lang.NoClassDefFoundError: iaik/x509/X509Certificate? - java

I am using Struts 2.0 for one application and getting the class not found exception:
java.lang.NoClassDefFoundError: iaik/x509/X509Certificate
After searching some site i found this class is in iaik_jce.jar.Can anyone help me understanding when this jar is required and if the jar is proper
Cannot paste the entire stacktarce.

The issue is resolved adding enttoolkit.jar .
The jar is available with webmethods client \common\lib\ext\enttoolkit.jar
The java code is calling service of webmethods,so the jar is required in the java app classpath.

Related

Axis Error unable to engage module addressing

I am using axis2 on Apache Tomcat. I am writing client side to consumer SOAP WS. I configured Eclipse to use Tomcat as a server and while executing that line
stub._getServiceClient().engageModule("addressing");
I was getting that error "unable to engage module addressing". To fix that issue I add following line in the VM arguments of run configuration
-Daxis2.repo="E:\axis2\repository"
Now I export my project as a war file and deploy it on the real server. But Now I am again getting the same error(I checked the log file). I don't know how to fix, can every one help me. Thanks
It got resolved on my side in the following way:
I had an outdated WEB-INF/modules/axis2-jaxws-mar*.mar or rather 2 versions of it and the classloader got the older one of it and AxisServlet didn't start altogether
java.lang.NoSuchMethodError: org.apache.axis2.engine.AxisConfiguration.getGlobalModules()Ljava/util/List;
at org.apache.axis2.jaxws.module.JAXWSModule.registerGlobalModule(JAXWSModule.java:51)

WebSphere and Axis 1.4 - NoClassDefFoundError

in my application I have to call a webService using axis-1.4 libraries.
With axis-1.4.jar inside my application I get the following error:
Exception data: java.lang.NoClassDefFoundError: org.apache.axis.message.SOAPEnvelope (initialization failure)
This means (I think) that my jar conflicts with other libs in server (anyway I'm using Parent_Last class loading)
If I try to remove axis-1.4.jar from my ear, I get the following:
java.lang.ClassNotFoundException: org.apache.axis.soap.SOAPConstants
Does anyone knows which library is in conflict with axis-1.4.jar?
Thanks
You can easily find it yourself looking in RAD (if you have it) which JAR contains that classes. You can also try creating a shared library and third option: Extracting the classes you need from the library.

javax.faces.FacesException . It is a exception belongs to Spring Security 3.x

I am developing an application using Struts 2.x. I am using Spring Security to provide security to my application. However, when I am not connect to the internet I always get an exception. If I have internet connect, there will be no exception. The exception is:
javax.faces.FacesException: Can't parse configuration file:
jar:file:/home/dev7/springsource/vfabric-tc-server-developer-2.8.2.RELEASE/base-instance/wtpwebapps/UNHPM_5/WEB-INF/lib/skyway-spring-utils-7.1.3.jar!/META-INF/faces-config.xml:
Error at line 5 column 16: cvc-elt.1: Cannot find the declaration of
element 'faces-config'.
I have also added the jar file skyway-spring-utils-7.1.3.jar to project but the exception remains when I am not connected to the internet. What may be the solution?
Probably this problem belongs to jar version miss-match.because it's create incompatibility between the DTD version.
Another problem may be you have multiple versions of jar in your build-path.
My suggestion is use maven to add the dependency jar

Initial SessionFactory creation failed.java.lang.ClassFormatError

Error in Console:-
Initial SessionFactory creation failed.java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/transaction/SystemException
Hello
I am building a standalone Java Application with Main Method which connects to the database using Hibernate and writes to a file on C drive as well.
I have added all the libraries to the class path using Java Build Path configuration and user libraries. But I keep getting this error ...I have also added the javaee jar from the glassfish server libraries but that has also not solved the problem. I also have the jboss-transaction-api_1.1_spec-1.0.0.Final.Jar added to my class path.
Please advise as I am not using Maven as yet ???
Here are the jars in my build path-
-antlr
-c3p0
-commons-collections
-commons-logging
-commong-logging-api
-dom4j
-hibernate-c3p0
-hibernate-commons-annotation
-hibernate-core
-hibernate-entitymanager
-hibernate-envers
-hibernate-jpa
-javaee-api-6.0jar
-javaassist
-jboss-logging
-jboss-transaction-api
-jms
-log4j
-lucene-core
-MySQL-connector
-slf4j
-javaee.jar
Any help would be truly appreciated .. I am just lost on what is going on ?
I am sure you have 2 different versions for the same class. check your jars.

NoClassDefFoundError: Could not initialize class org.apache.axis2.description.AxisService

While running the application I was getting the following errors.
java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis2.description.AxisService
AxisService class is in axis2-kernel-1.6.2.jar file. Some of the classes from this jar are working fine without any issues, but some classes are throwing NoClassDefFoundError from this jar file at runtime. AxisService class is present in axis2-kernel-1.6.2.jar, even it throws error.
This is working fine in local machine. But error getting in Oracle r12 server.I have already set the class path for the jar file.
I am Using Java version is 1.6 and Apache axis2.1.6.2.
Had the same issue. I had included only jars that I needed to compile the application.
When I included everything from \axis2-1.6.2\lib\ folder, this exception were gone.
I had a similar problem using Tomcat and Axis2 and after a week finding out the error I realized there was a axis configuration problem. especifically my aplication can't instantiate the class which accedded to persistence layer. I include this parameter line:
<parameter name="ServiceTCCL">composite</parameter>
in services.xml file which is used by axis2 to work.
For more information see the comments in http://wso2.com/node/1131

Categories