Exception while re-deploying my webapp on tomcat 6 - java

All,
I am having problems redeploying my java webapp packaged as war using maven 3.0 (mvn package) on tomcat 6.0
However if I restart my server completely i donot get this exception and the whole app runs perfectly fine.
Here is the details of catalina log:
WARNING: Error while removing context []
java.lang.NoClassDefFoundError: org/apache/struts2/util/ObjectFactoryDestroyable
at org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:263)
at org.apache.struts2.dispatcher.FilterDispatcher.destroy(FilterDispatcher.java:238)
at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:332)
at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3731)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4493)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1035)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1203)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(Containe rBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.util.ObjectFactoryDestroyable
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 15 more
Pls help..!

Related

"ClassNotFoundException: org.objectweb.asm.ClassVisitor" on WebLogic Version 12.2.1.1 and Later (Doc ID 2526226.1)

I am trying to deploy my legacy application in web-logic 12c but problem is every time its showing exception like > "ClassNotFoundException: org.objectweb.asm.ClassVisitor,Basically this issue comes if application not have asm.jar but in my application asm.jar is there and moreover my application successfully deployed in web-logic 11
After lot of research i found below document in that they are saying WebLogic 12.2.1 infra to WebLogic 12.2.1.3 infra, the class org.objectweb.asm.ClassVisitorbelow can NOT be found when starting the server with customer's application deployed. Please some one guide me how can i resolve this issue
Document
https://support.oracle.com/knowledge/Middleware/2526226_1.html#FIX
Deployment issue
<Dec 6, 2019 5:58:46,064 AM GMT> <Error> <HTTP> <WL-101216> <Servlet: "JerseyRESTService" failed to preload on startup in Web application: "CDMWeb.war".
A MultiException has 1 exceptions. They are:
1. java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
at org.jvnet.hk2.internal.Utilities.justCreate(Utilities.java:1085)
at org.jvnet.hk2.internal.ServiceLocatorImpl.create(ServiceLocatorImpl.java:978)
at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:1082)
at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:1074)
at org.glassfish.jersey.server.ApplicationHandler.createApplication(ApplicationHandler.java:385)
Truncated. see log file for complete stacktrace
Caused By: java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
at com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:79)
at com.sun.jersey.api.core.PackagesResourceConfig.init(PackagesResourceConfig.java:104)
at com.sun.jersey.api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:78)
at com.verizon.application.Application.<init>(Application.java:12)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException: org.objectweb.asm.ClassVisitor
at com.oracle.classloader.PolicyClassLoader.findClass(PolicyClassLoader.java:398)
at com.oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:371)
at com.oracle.classloader.weblogic.LaunchClassLoader.loadClass(LaunchClassLoader.java:55)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:79)
Truncated. see log file for complete stacktrace
>
You can try adding the asm.jar to your Applications's WEB-INF/lib directory. From the error it's clear that JVM not able to locate the class, hence java.lang.ClassNotFoundException

java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.ws.spi.ProviderImpl

)
I've got a small problem today! I'm trying to deploy an application on a Jboss server (AS 7.0)...
When I'm working on my own computer (localhost), no problem, everything is fine. But after deploying my war on the server when I realize one action I've got an horrible error :
java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider com.sun.xml.ws.spi.ProviderImpl could not be instantiated: java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.ws.spi.ProviderImpl
java.util.ServiceLoader.fail(ServiceLoader.java:207)
java.util.ServiceLoader.access$100(ServiceLoader.java:164)
java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:353)
java.util.ServiceLoader$1.next(ServiceLoader.java:421)
javax.xml.ws.spi.Provider.getProviderUsingServiceLoader(Provider.java:146)
javax.xml.ws.spi.Provider.provider(Provider.java:106)
javax.xml.ws.Service.<init>(Service.java:57)
java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.ws.spi.ProviderImpl
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:247)
java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)
java.util.ServiceLoader$1.next(ServiceLoader.java:421)
javax.xml.ws.spi.Provider.getProviderUsingServiceLoader(Provider.java:146)
javax.xml.ws.spi.Provider.provider(Provider.java:106)
javax.xml.ws.Service.<init>(Service.java:57)
I'm using Apache CXF and all my jars are maven dependencies in my build path (jaxws-rt 2.2.8, jaxws-api...)
Do you think it may be a problem on the Jboss ? When I deploy this war on a Tomcat I don't have this problem :(
Thanks to all

nullpointerexception on portlet deployment

My issue si very onclear, as i'm copying and pasting a project which works in liferay (a test portlet), i'm renaming the portlet in the various files needed and i'm trying to deploy it. It Throws a NullPointer and i cannot really see why. Below is the error:
GRAVE: Exception sending context destroyed event to listener instance of class com.liferay.portal.kernel.servlet.SecurePluginContextListener
java.lang.ExceptionInInitializerError
at com.liferay.portal.kernel.deploy.hot.HotDeployEvent.initDependentServletContextNames(HotDeployEvent.java:97)
at com.liferay.portal.kernel.deploy.hot.HotDeployEvent.<init>(HotDeployEvent.java:53)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireUndeployEvent(PluginContextListener.java:170)
at com.liferay.portal.kernel.servlet.SecurePluginContextListener.fireUndeployEvent(SecurePluginContextListener.java:294)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalDestroy(PluginContextListener.java:132)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalDestroy(BasePortalLifecycle.java:31)
at com.liferay.portal.kernel.servlet.PluginContextListener.contextDestroyed(PluginContextListener.java:97)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5063)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5723)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1028)
at org.apache.catalina.startup.HostConfig.undeploy(HostConfig.java:1547)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1453)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1695)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:333)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1374)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1546)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1556)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1524)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.liferay.portal.kernel.util.PropsUtil.get(PropsUtil.java:32)
at com.liferay.portal.kernel.deploy.hot.DependencyManagementThreadLocal.<clinit>(DependencyManagementThreadLocal.java:40)
... 22 more
I'am deploying through the deploy directory of liferay's tomcat.
This is not a question about nullpointer exception but on portlet deployment in liferay.
It's likely a Portlet configuration prolem since you renamed the Portlet files. Can you give us the content of Portlet.xml and Liferay-portlet.xml please ?

Getting issue in tomcat 7 but worked on tomcat 5. (Failed to start component )

My application was running fine on tomcat 5.5 but now i want to use tomcat 7.I am getting issue if i use tomcat 7.
I found on net and saw that people getting this issue. But i am facing this issue on tomcat 7 but on tomcat 5 my application was working fine.
Any clue ?
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEng
ine[Catalina].StandardHost[localhost].StandardContext[/ServiceDefinitionApp]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
ADDITON after comments :
Caused by: java.lang.ClassNotFoundException: com.alc.alcml.jaxb.xjc.Attributetype
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at com.container.AppClassLoader.findClass(AppClassLoader.java:98)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
As a solution i added the jar which contains this file in my application WEB-INF/lib and all worked fine.
NOW Question :
when i was running on tomcat 5.5, same application was running fine without having a jar in WEB-INF/lib.Why ?
Please make a note that JAR is available in class-path from some other directory but this is applicable same for tomcat5.5 and tomcat 7.
I can't give you a definite answer, but one possible explanation is that the JAR file was in the "shared libraries" directory of your Tomcat 5.5 installation.

WebLogic Toplink (its xml parser?) configuration issue

I have a web application (war packaged) with toplink.jar and xmlparserv2.jar files under WEB-INF\lib. The problem is that I get
]] Root cause of ServletException.
java.lang.NoClassDefFoundError: oracle/xml/parser/schema/XSDElement
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at oracle.toplink.internal.security.PrivilegedAccessHelper.newInstanceFromClass(PrivilegedAccessHelper.java:335)
at oracle.toplink.platform.xml.XMLPlatformFactory.getXMLPlatform(XMLPlatformFactory.java:95)
I don't understand it because xmlparserv2.jar contains oracle.xml.parser.schema.XSDElement class - so it should be on classpath.
My WebLogic version is 10.3.2.0, any help would be appreciated.
Add below line in Arguments in Server Start tab in WebLogic admin console
-Dtoplink.xml.platform=oracle.toplink.platform.xml.jaxp.JAXPPlatform
Source: https://community.oracle.com/message/2988932?tstart=44

Categories