Monday, April 18, 2011

java.lang.NoClassDefFoundError: oracle/tip/adapter/file/FileLogger

you are getting the following error messages while starting your soa server and when the soa server starts you find that the FTPAdapter is in Failed state

<Apr 19, 2011 10:08:10 AM IST> <Error> <Deployer> <BEA-149231> <Unable to set th
e activation state to true for the application 'FtpAdapter'.
java.lang.NoClassDefFoundError: oracle/tip/adapter/file/FileLogger
at oracle.tip.adapter.ftp.FTPManagedConnectionFactory.createConnectionFa
ctory(FTPManagedConnectionFactory.java:154)
at weblogic.connector.security.layer.AdapterLayer.createConnectionFactor
y(AdapterLayer.java:787)
at weblogic.connector.outbound.ConnectionPool.getConnectionFactory(Conne
ctionPool.java:2013)
at weblogic.connector.outbound.RAOutboundManager.activatePool(RAOutbound
Manager.java:1076)
at weblogic.connector.outbound.RAOutboundManager.activate(RAOutboundMana
ger.java:183)
Truncated. see log file for complete stacktrace
Caused By: java.lang.NoClassDefFoundError: oracle/tip/adapter/file/FileLogger
at oracle.tip.adapter.ftp.FTPManagedConnectionFactory.createConnectionFa
ctory(FTPManagedConnectionFactory.java:154)
at weblogic.connector.security.layer.AdapterLayer.createConnectionFactor
y(AdapterLayer.java:787)
at weblogic.connector.outbound.ConnectionPool.getConnectionFactory(Conne
ctionPool.java:2013)
at weblogic.connector.outbound.RAOutboundManager.activatePool(RAOutbound
Manager.java:1076)
at weblogic.connector.outbound.RAOutboundManager.activate(RAOutboundMana
ger.java:183)
Truncated. see log file for complete stacktrace
>
<Apr 19, 2011 10:08:10 AM IST> <Error> <Deployer> <BEA-149250> <Unable to unprep
are application 'FtpAdapter'.
weblogic.application.ModuleException: Error occurred while trying to rollback th
e module: weblogic.connector.exception.RAException:

There are 1 nested errors:



There are 1 nested errors:

ObjectLifeCycleException: weblogic.common.resourcepool.ObjectLifeCycleException:
Attempted to shutdown the pool eis/Ftp/HAFtpAdapterDB2 when it is currently not
in SUSPENDED state (Running)
at weblogic.common.resourcepool.ResourcePoolImpl.shutdown(ResourcePoolIm
pl.java:299)
at weblogic.connector.outbound.ConnectionPool.shutdown(ConnectionPool.ja
va:355)
at weblogic.connector.outbound.RAOutboundManager.internalShutdownPool(RA
OutboundManager.java:346)
at weblogic.connector.outbound.RAOutboundManager.rollback(RAOutboundMana
ger.java:305)
at weblogic.connector.common.RAInstanceManager.rollbackRAOutboundMgr(RAI
nstanceManager.java:623)
at weblogic.connector.common.RAInstanceManager.rollback(RAInstanceManage
r.java:566)
at weblogic.connector.deploy.ConnectorModule.unprepare(ConnectorModule.j
ava:268)
at weblogic.application.internal.flow.ModuleListenerInvoker.unprepare(Mo
duleListenerInvoker.java:285)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.previous(
DeploymentCallbackFlow.java:523)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:223)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:215)
at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(D
eploymentCallbackFlow.java:211)
at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(D
eploymentCallbackFlow.java:202)
at weblogic.application.internal.BaseDeployment$1.previous(BaseDeploymen
t.java:619)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:223)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:215)
at weblogic.application.internal.BaseDeployment.unprepare(BaseDeployment
.java:248)
at weblogic.application.internal.SingleModuleDeployment.unprepare(Single
ModuleDeployment.java:43)
at weblogic.application.internal.DeploymentStateChecker.unprepare(Deploy
mentStateChecker.java:205)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.unprepare(A
ppContainerInvoker.java:117)
at weblogic.deploy.internal.targetserver.BasicDeployment.unprepare(Basic
Deployment.java:287)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromSer
verLifecycle(BasicDeployment.java:363)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(De
ploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(Deploy
mentAdapter.java:200)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(App
Transition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionA
pps(ConfiguredDeployments.java:240)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(Co
nfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(Conf
iguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(De
ploymentServerService.java:180)
at weblogic.management.deploy.internal.DeploymentServerService.start(Dep
loymentServerService.java:96)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)



at weblogic.connector.deploy.ConnectorModule.unprepare(ConnectorModule.j
ava:273)
at weblogic.application.internal.flow.ModuleListenerInvoker.unprepare(Mo
duleListenerInvoker.java:285)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.previous(
DeploymentCallbackFlow.java:523)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:223)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:215)
Truncated. see log file for complete stacktrace
Caused By: weblogic.connector.exception.RAException:

There are 1 nested errors:



There are 1 nested errors:

ObjectLifeCycleException: weblogic.common.resourcepool.ObjectLifeCycleException:
Attempted to shutdown the pool eis/Ftp/HAFtpAdapterDB2 when it is currently not
in SUSPENDED state (Running)
at weblogic.common.resourcepool.ResourcePoolImpl.shutdown(ResourcePoolIm
pl.java:299)
at weblogic.connector.outbound.ConnectionPool.shutdown(ConnectionPool.ja
va:355)
at weblogic.connector.outbound.RAOutboundManager.internalShutdownPool(RA
OutboundManager.java:346)
at weblogic.connector.outbound.RAOutboundManager.rollback(RAOutboundMana
ger.java:305)
at weblogic.connector.common.RAInstanceManager.rollbackRAOutboundMgr(RAI
nstanceManager.java:623)
at weblogic.connector.common.RAInstanceManager.rollback(RAInstanceManage
r.java:566)
at weblogic.connector.deploy.ConnectorModule.unprepare(ConnectorModule.j
ava:268)
at weblogic.application.internal.flow.ModuleListenerInvoker.unprepare(Mo
duleListenerInvoker.java:285)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.previous(
DeploymentCallbackFlow.java:523)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:223)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:215)
at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(D
eploymentCallbackFlow.java:211)
at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(D
eploymentCallbackFlow.java:202)
at weblogic.application.internal.BaseDeployment$1.previous(BaseDeploymen
t.java:619)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:223)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:215)
at weblogic.application.internal.BaseDeployment.unprepare(BaseDeployment
.java:248)
at weblogic.application.internal.SingleModuleDeployment.unprepare(Single
ModuleDeployment.java:43)
at weblogic.application.internal.DeploymentStateChecker.unprepare(Deploy
mentStateChecker.java:205)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.unprepare(A
ppContainerInvoker.java:117)
at weblogic.deploy.internal.targetserver.BasicDeployment.unprepare(Basic
Deployment.java:287)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromSer
verLifecycle(BasicDeployment.java:363)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(De
ploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(Deploy
mentAdapter.java:200)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(App
Transition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionA
pps(ConfiguredDeployments.java:240)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(Co
nfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(Conf
iguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(De
ploymentServerService.java:180)
at weblogic.management.deploy.internal.DeploymentServerService.start(Dep
loymentServerService.java:96)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)



at weblogic.connector.common.RAInstanceManager.rollback(RAInstanceManage
r.java:552)
at weblogic.connector.deploy.ConnectorModule.unprepare(ConnectorModule.j
ava:268)
at weblogic.application.internal.flow.ModuleListenerInvoker.unprepare(Mo
duleListenerInvoker.java:285)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.previous(
DeploymentCallbackFlow.java:523)
at weblogic.application.utils.StateMachineDriver.previousState(StateMach
ineDriver.java:223)
Truncated. see log file for complete stacktrace
>
<Apr 19, 2011 10:08:16 AM IST> <Warning> <oracle.wsm.resources.policyaccess> <WS
M-06219> <A task scheduler was not available for configuring the oracle.wsm.poli
cymanager.accessor.BeanAccessor repository accessor for the default context.>
Warning: Starting ADF Library jar post-deployment on WebLogic Server. Is "provid
er-lazy-inited" init-param missing from LibraryFilter? Ignore this warning if th
e ADFJspResourceProvider is not being used.
Started: ADF Library non-ADFJspResourceProvider post-deployment
Finished: ADF Library non-ADFJspResourceProvider post-deployment (millis): 578



I will tell you the scenario how we can create this error

By default the File adapter has a deployment order of 321 and FTP adapter has a deployment order of 325.


I logged in to the admin console

http://localhost:port/console

Went to deployment,stopped and deleted FTP adapter from admin console deployment

Then i redeployed it from the FTPAdapter.rar file located in BEA_HOME/Oracle_SOA1/soa/connectors

When redeploying it takes a deployment order of 100 by default.

It completed successfully and i can see that now FTP adapter is in running state in my deployment list.



So everything is working fine but if you will restart the server now you will get an exception as i have pointed above and also FTP server will be in failed state.



This is because FTP adapter needs some class file from FileAdapter so once the deployment order of FTP adapter is 100 it is less than FileAdapter's 321 hence it will try to deploy FTP first rather than FileADapter and hence will cause this error.SO in order to overcome this issue



I changed the order of deployment back to 325

and restarted the server and this time FTP adapter comes fine with new Deployment order of 325 as shown below.



There is an another alternative for this issue also that is

Put the FileAdapter.rar file in the $domain_home/lib and restart the server.

As you will go through the readme.txt located in this folder,it says these rar files will be picked onrun time.

so as soon as you will start the server the F‎ileAdapter will be picked up from this location much before as per the deployment order hence FTP adpater will come up fine.But i prefer to change the deployment order as it is not a good practice to use File ADapter uploaded at run time.Moreover you may come across other issues also when you will restart your server.

No comments: