Showing posts with label WebLogic Server. Show all posts
Showing posts with label WebLogic Server. Show all posts

Monday, September 7, 2026

WebLogic Error: Unable to Get File Lock, Will Retry

Unable to get file lock, will retry ...

This is a common issue for web logic user/developer. Developers are always facing this issue with file lock.Something went wrong.

Weblogic Console Error Log -

<31/01/2017 2:25:12 PM EST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
<31/01/2017 2:25:12 PM EST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 17.0-b17 from Sun Microsystems Inc.>

<31/01/2017 2:25:23 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>

<31/01/2017 2:25:33 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>
<31/01/2017 2:25:43 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>

<31/01/2017 2:25:53 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>

<31/01/2017 2:26:03 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>

<31/01/2017 2:26:13 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>

<31/01/2017 2:26:23 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>

<31/01/2017 2:26:33 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>

<31/01/2017 2:26:43 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>

<31/01/2017 2:26:53 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>

<31/01/2017 2:27:03 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>

<31/01/2017 2:27:13 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>

<31/01/2017 2:27:23 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>

<31/01/2017 2:27:33 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>

<31/01/2017 2:27:43 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>

<31/01/2017 2:27:53 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>

<31/01/2017 2:28:03 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>

<31/01/2017 2:28:13 PM EST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>

<31/01/2017 2:28:18 PM EST> <Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason:

There are 1 nested errors:

weblogic.management.ManagementException: Unable to obtain lock on /usr/java/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/tmp/AdminServer.lok. Server may already be running
    at weblogic.management.internal.ServerLocks.getServerLock(ServerLocks.java:206)
    at weblogic.management.internal.ServerLocks.getServerLock(ServerLocks.java:67)
    at weblogic.management.internal.DomainDirectoryService.start(DomainDirectoryService.java:74)
    at weblogic.t3.srvr.ServerServicesManager.startService(ServerServicesManager.java:461)
    at weblogic.t3.srvr.ServerServicesManager.startInStandbyState(ServerServicesManager.java:166)
    at weblogic.t3.srvr.T3Srvr.initializeStandby(T3Srvr.java:881)
    at weblogic.t3.srvr.T3Srvr.startup(T3Srvr.java:568)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:469)
    at weblogic.Server.main(Server.java:71)

>
<31/01/2017 2:28:18 PM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>
<31/01/2017 2:28:18 PM EST> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down>
<31/01/2017 2:28:18 PM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>


Solutions :-

You can fix the by simple one step. Just delete the AdminServer.lok file from  your domain.

I have deleted below , check the below commands ..

Go to the /tmp directory inside your weblogic domain.

cd  /usr/java/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/tmp

Checking the existing files inside /tmp directory.


dev@jdg-desktop /usr/java/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/tmp $ ls
AdminServer.lok  WebServiceUtils.ser  _WL_internal  _WL_user
Now delete the AdminServer.lok file from this /tmp directory. 
dev@jdg-desktop /usr/java/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/tmp $ rm -rf AdminServer.lok

Monday, October 10, 2016

JUnit Error: Unresolved Compilation Problems Due to Missing WebLogic JAR

java.lang.Error: Unresolved compilation problems:

Facing issue is often hurdle for developer :) :) As you all know, Java Developers Guide always posted the real time issues. This issue I have faced while writing Junit test cases, but its not so easy to fix your development desktop. The below issue normally happens when the class path is missed the related weblogic jar.

I am using weblogic for jaxrpc client calls, and its failing to find the weblogic jar. Below error logs :
  

java.lang.Error: Unresolved compilation problems:
    The type weblogic.wsee.jaxrpc.ServiceImpl cannot be resolved. It is indirectly referenced from required .class files
    The type weblogic.wsee.jaxrpc.StubImpl cannot be resolved. It is indirectly referenced from required .class files
    The import weblogic.wsee.security cannot be resolved
    The import weblogic.xml cannot be resolved
    The import weblogic.xml cannot be resolved
    The method addCredentialsToSecurityHeader(Stub, HandlerInfo) in the type JdcNotificationHandler is not applicable for the arguments (JdcEnablerService_PortType_Stub, HandlerInfo)
    The method addCredentialsToSecurityHeader(Stub, HandlerInfo) in the type JdcNotificationHandler is not applicable for the arguments (JdcEnablerService_PortType_Stub, HandlerInfo)
    The method addCredentialsToSecurityHeader(Stub, HandlerInfo) in the type JdcNotificationHandler is not applicable for the arguments (JdcEnablerService_PortType_Stub, HandlerInfo)
    CredentialProvider cannot be resolved to a type
    CredentialProvider cannot be resolved to a type
    CredentialProvider cannot be resolved to a type
    ClientUNTCredentialProvider cannot be resolved to a type
    WSSecurityContext cannot be resolved to a variable

    at au.com.mycompany.mcas.sdp.bizservice.user.domain.util.notification.JdcNotificationHandler.<init>(JdcNotificationHandler.java:1)
    at au.com.mycompany.mcas.sdp.bizservice.user.application.facade.spring.handler.JdcNotificationHandlerTest.<init>(JdcNotificationHandlerTest.java:31)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.junit.internal.runners.JUnit4ClassRunner.createTest(JUnit4ClassRunner.java:72)
    at org.mockito.internal.runners.JUnit44RunnerImpl$1.createTest(JUnit44RunnerImpl.java:26)
    at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:79)
    at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
    at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
    at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
    at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
    at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
    at org.mockito.internal.runners.JUnit44RunnerImpl.run(JUnit44RunnerImpl.java:37)
    at org.mockito.runners.MockitoJUnitRunner.run(MockitoJUnitRunner.java:62)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)



How to fix  :- This is very simple, just add the weblogic.jar library jar into your class path. Steps as below,


Right Click on Project => Build Path => Libraries and then add the required jar (In my case I have added weblogic.jar).

The screenshot attached for reference. 


java.lang.Error