File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes BEA/Weblogic and the fly likes Reg : Problem with .war deploytment in weblogic 10.3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Reg : Problem with .war deploytment in weblogic 10.3" Watch "Reg : Problem with .war deploytment in weblogic 10.3" New topic

Reg : Problem with .war deploytment in weblogic 10.3

Arunan Ramanathan

Joined: Jul 31, 2007
Posts: 24
Hi All,

When i deploy my application in Exploded format, i can able to deploy and run the application in weblogic.

Now i wrote a build script and created a myapp.war file but i am not able to deploy the .war file. I got the below exception,

weblogic.application.ModuleException: [HTTP:101216]Servlet: "LogConfigServlet" failed to preload on startup in Web application: "app.war".
at javax.servlet.GenericServlet.init(
at weblogic.servlet.internal.StubSecurityHelper$
at weblogic.servlet.internal.StubSecurityHelper.createServlet(
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(
at weblogic.servlet.internal.StubLifecycleHelper.<init>(
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(
at weblogic.servlet.internal.WebAppServletContext.preloadResources(
at weblogic.servlet.internal.WebAppServletContext.start(
at weblogic.servlet.internal.WebAppModule.startContexts(
at weblogic.servlet.internal.WebAppModule.start(
at weblogic.application.internal.flow.ModuleStateDriver$
at weblogic.application.utils.StateMachineDriver.nextState(
at weblogic.application.internal.flow.ModuleStateDriver.start(
at weblogic.application.internal.flow.ScopedModuleDriver.start(
at weblogic.application.internal.flow.ModuleListenerInvoker.start(
at weblogic.application.internal.flow.ModuleStateDriver$
at weblogic.application.utils.StateMachineDriver.nextState(
at weblogic.application.internal.flow.ModuleStateDriver.start(
at weblogic.application.internal.flow.StartModulesFlow.activate(
at weblogic.application.internal.BaseDeployment$
at weblogic.application.utils.StateMachineDriver.nextState(
at weblogic.application.internal.BaseDeployment.activate(
at weblogic.application.internal.SingleModuleDeployment.activate(
at weblogic.application.internal.DeploymentStateChecker.activate(
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(
at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$

Even when i unzip the war file, i can able to deploy it (So i think it is not the problem with the war file)

I am using the following lines in the web.xml to load the LogConfigServlet in startup.



I decompiled the class LogConfigServlet and below is the source code where the null pointer exception thrown.


protected String getLogRoot()
String logRoot = getServletConfig().getInitParameter("logRoot"); // This is not configured in web.xml so logroot will be null here.
if(logRoot == null)
logRoot = getServletContext().getRealPath("/WEB-INF/lib");
logRoot = logRoot.substring(0, logRoot.lastIndexOf(File.separatorChar)); // This is where the i guess null exception will be thrown
return logRoot;


Can anybody guess the problem. I am struggling with this issue for past 1 week. It would be great if someone help me on this.

Scjp 1.4 - 80%
Arunan Ramanathan

Joined: Jul 31, 2007
Posts: 24
OOps sorry i found the solution,

public java.lang.String getRealPath(java.lang.String path)

Returns a String containing the real path for a given virtual path. For example, the path "/index.html" returns the absolute file path on the server's filesystem would be served by a request for "http://host/contextPath/index.html", where contextPath is the context path of this ServletContext..

The real path returned will be in a form appropriate to the computer and operating system on which the servlet container is running, including the proper path separators. This method returns null if the servlet container cannot translate the virtual path to a real path for any reason (such as when the content is being made available from a .war archive).

path - a String specifying a virtual path
a String specifying the real path, or null if the translation cannot be performed

I am sticking in this issue for a long time Hope this helps someone else

I agree. Here's the link:
subject: Reg : Problem with .war deploytment in weblogic 10.3
It's not a secret anymore!