Monday, July 5, 2010

OSB: The import failed with exception: com.bea.wli.config.component.NotFoundException: Failed to create temporary jar file

The import failed with exception: com.bea.wli.config.component.NotFoundException: Failed to create temporary jar file

 
This happens in Linux.

This thread http://forums.oracle.com/forums/message.jspa?messageID=4390710#4390710 covers the issue, with no solution.

Here same thing:
http://forums.oracle.com/forums/thread.jspa?threadID=1092747&tstart=30

The full stacktrace is:

Caused By: java.io.IOException: Permission denied
 at java.io.UnixFileSystem.createFileExclusively(Native Method)
 at java.io.File.checkAndCreate(File.java:1704)
 at java.io.File.createTempFile(File.java:1792)
 at com.bea.wli.sb.util.IOUtils.storeToTempFile(IOUtils.java:245)
 at com.bea.wli.sb.resources.archive.classloader.ArchiveClassLoaderDerivedTypeDef.computeData(ArchiveClassLoaderDerivedTypeDef.java:120)
 at com.bea.wli.sb.resources.archive.classloader.ArchiveClassLoaderDerivedTypeDef.computeData(ArchiveClassLoaderDerivedTypeDef.java:34)
 at com.bea.wli.config.derivedcache.DerivedCache.deriveTheValue(DerivedCache.java:453)
 at com.bea.wli.config.derivedcache.DerivedCache.get(DerivedCache.java:273)
 at com.bea.wli.config.derivedcache.DerivedResourceManager.getDerivedValueInfo(DerivedResourceManager.java:341)
 at com.bea.wli.config.derivedcache.DerivedResourceManager.get(DerivedResourceManager.java:386)
 at com.bea.wli.sb.resources.cache.DefaultDerivedTypeDef.getDerivedValue(DefaultDerivedTypeDef.java:106)
 at com.bea.wli.sb.resources.archive.classloader.ArchiveClassLoaderCache.get(ArchiveClassLoaderCache.java:38)
 at com.bea.wli.sb.resources.archive.summary.ArchiveSummaryDerivedTypeDef.computeData(ArchiveSummaryDerivedTypeDef.java:46)
 at com.bea.wli.sb.resources.archive.summary.ArchiveSummaryDerivedTypeDef.computeData(ArchiveSummaryDerivedTypeDef.java:23)
 at com.bea.wli.config.derivedcache.DerivedCache.deriveTheValue(DerivedCache.java:453)
 at com.bea.wli.config.derivedcache.DerivedCache.get(DerivedCache.java:273)
 at com.bea.wli.config.derivedcache.DerivedResourceManager.getDerivedValueInfo(DerivedResourceManager.java:341)
 at com.bea.wli.config.derivedcache.DerivedResourceManager.get(DerivedResourceManager.java:386)
 at com.bea.wli.sb.resources.cache.DefaultDerivedTypeDef.getDerivedValue(DefaultDerivedTypeDef.java:106)
 at com.bea.wli.sb.resources.archive.summary.ArchiveSummaryCache.getArchiveSummary(ArchiveSummaryCache.java:31)
 at com.bea.wli.sb.resources.archive.ArchiveResourceTypeDef.validate(ArchiveResourceTypeDef.java:85)
 at com.bea.wli.config.validation.ResourceValidator.validateContents(ResourceValidator.java:118)
 at com.bea.wli.config.validation.ResourceValidator.call(ResourceValidator.java:64)
 at com.bea.wli.config.validation.SequentialValidator.validate(SequentialValidator.java:34)
 at com.bea.wli.config.validation.ValidationService.validate(ValidationService.java:171)
 at com.bea.wli.config.impl.CoreToSessionPropagator.doValidation(CoreToSessionPropagator.java:239)
 at com.bea.wli.config.impl.CoreToSessionPropagator.handleBeforePrepare(CoreToSessionPropagator.java:118)
 at com.bea.wli.config.impl.CoreToSessionPropagator.beforePrepare(CoreToSessionPropagator.java:77)
 at com.bea.wli.config.transaction.TransactionListenerWrapper.beforePrepare(TransactionListenerWrapper.java:64)
 at com.bea.wli.config.transaction.TransactionManager.notifyBeforePrepare(TransactionManager.java:1094)
 at com.bea.wli.config.transaction.TransactionManager._prepareForCommit(TransactionManager.java:654)
 at com.bea.wli.config.transaction.TransactionManager.endTransaction(TransactionManager.java:782)
 at com.bea.wli.config.transaction.TransactionalTask._doExecute(TransactionalTask.java:226)
 at com.bea.wli.config.transaction.TransactionalTask._doExecuteWithRetry(TransactionalTask.java:162)
 at com.bea.wli.config.transaction.TransactionalTask.doExecute(TransactionalTask.java:142)
 at com.bea.wli.config.task.impl.SessionedTask.doExecute(SessionedTask.java:236)
 at com.bea.wli.config.task.impl.SessionedTask.doExecute(SessionedTask.java:191)
 at com.bea.wli.config.task.impl.ImportTask.doImport(ImportTask.java:114)
 at com.bea.wli.config.mbeans.Config.importUploaded(Config.java:467)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at com.bea.alsb.console.support.ConsoleSideMBeanInvocationHandler.__invoke(ConsoleSideMBeanInvocationHandler.java:113)
 at com.bea.alsb.console.support.ConsoleSideMBeanInvocationHandler.invoke(ConsoleSideMBeanInvocationHandler.java:71)
 at $Proxy183.importUploaded(Unknown Source)
 at com.bea.alsb.console.deployment.actions.UpdateImportRepositoryAction.execute(UpdateImportRepositoryAction.java:181)
 at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)




This http://java.sun.com/javase/6/docs/api/java/io/File.html#createTempFile%28java.lang.String,%20java.lang.String%29

tells me that we are trying to write to the "default temporary directory"...

http://www.idevelopment.info/data/Programming/java/io/Files/CreateTemporaryFile.java

The default temporary-file directory is specified by the system property java.io.tmpdir. On UNIX systems the default value of this property is typically "/tmp" or "/var/tmp"; on Win32 systems it is typically "c:\\temp".


Most likely your /tmp/alsbTempJars has a owner different from the user that starts WebLogic.


See here http://download.oracle.com/docs/cd/E14148_02/wlcp/ocsg41_otn/installguide/soa-install.html

After installing Oracle Service Bus on a UNIX or Linux system, make sure that the directory /tmp/alsbTempJars has the same access privileges as the BEA Home directory. Alternatively, remove the directory /tmp/alsbTempJars after the installation if the directory exists.

3 comments:

Anonymous said...
This comment has been removed by the author.
Unknown said...

We recently encountered a similar problem in PRODUCTION environment. Below is a snippet of the stack trace. This happened in an otherwise perfectly working Production server which was running fine since couple of years. As per the comments on forum

https://community.oracle.com/thread/2247472?start=0&tstart=0

suspecting that the /alsbTempJars directory got deleted, we tried to reproduce the issue in our TEST environment by manually deleting the directory /alsbTempJars but there was no error and the application was running fine.
If the absence of directory /alsbTempJars had caused this issue, then the same error should have occurred in our Test environment also. We are not getting any clue as to what might have caused this error in Production ?

com.bea.wli.sb.management.BrokerManagementException: java.lang.RuntimeException: com.bea.wli.sb.management.BrokerManagementException: com.bea.wli.sb.stages.StageException: com.bea.wli.config.component.NotFoundException: Failed to create temporary jar file
com.bea.wli.sb.management.BrokerManagementException: java.lang.RuntimeException: com.bea.wli.sb.management.BrokerManagementException: com.bea.wli.sb.stages.StageException: com.bea.wli.config.component.NotFoundException: Failed to create temporary jar file
at com.bea.wli.sb.pipeline.RouterManager.getRouterRuntime(RouterManager.java:642)
at com.bea.wli.sb.pipeline.RouterContext.getInstance(RouterContext.java:172)
at com.bea.wli.sb.pipeline.RouterManager.processMessage(RouterManager.java:579)
at com.bea.wli.sb.transports.TransportManagerImpl.receiveMessage(TransportManagerImpl.java:375)
at com.bea.wli.sb.transports.jms.JmsInboundMDB.onMessage(JmsInboundMDB.java:132)
at sun.reflect.GeneratedMethodAccessor3475.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
Caused By: java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)

vernetto said...

well the error occurs only in presence of Java classes deployed in some OSB project, if I remember correctly.... and of course only while you are actually importing a new project.... so to reproduce the issue you should import a project with a Java archive in it... and maybe even update the archive to make sure OSB actually deploys a new version of it...