Unable to create ejb.jar file.
how do we create an ejb.jar file in j2ee explorer.
I am not able to see the option <i>Build Ejb.jar</i>
in the context menu when i click on my ejb project
Regards
Naresh Garg
hi Naresh,
There is option called EJB Archive this option builds your EJB. if your trying to create Web Module Project you can only create WAR file .
Venkat
Similar Messages
-
Unable to create Executable JAR file
Hi,
I tried to create Executable JAR file for
//JarTest.java
class JarTest
public static void main( String args[] )
System.out.println("i am EXECUTABLE JAR ");
mf is like
Manifest-Version: 1.0
Main-Class: JarTest
used jar cmf JarTest.mf exe.jar *.classIt created a jar file but i can't Execute the file
Help me
Thanks
AEjava is choosy about the actual manifest file format (line ending, trailing empty line, whatever).
This works for me with your example:
posman@proli:~/ivan/aa> cat mf
Manifest-Version: 1.0
Main-Class: JarTest
posman@proli:~/ivan/aa> od -cx mf
0000000 M a n i f e s t - V e r s i o n
614d 696e 6566 7473 562d 7265 6973 6e6f
0000020 : 1 . 0 \n M a i n - C l a s s
203a 2e31 0a30 614d 6e69 432d 616c 7373
0000040 : J a r T e s t \n \n \0
203a 614a 5472 7365 0a74 000a -
OSB Failed to create temporary jar file error
Hi everybody!
Lately we have been experimenting following error with OSB in production environment:
Caused By: com.bea.wli.sb.stages.StageException: com.bea.wli.config.component.NotFoundException: Failed to create temporary jar file
at stages.transform.runtime.JavaCalloutRuntimeStep.<init>(JavaCalloutRuntimeStep.java:122)
at stages.transform.JavaCalloutFactory.getStageRuntime(JavaCalloutFactory.java:80)
at com.bea.wli.sb.stages.StageMetadataImpl$DefaultStageFactory.getStageRuntime(StageMetadataImpl.java:245)
at com.bea.wli.sb.stages.impl.RuntimeBuilderImpl.buildRuntime(RuntimeBuilderImpl.java:92)
at com.bea.wli.sb.stages.impl.RuntimeBuilderImpl.buildRuntime(RuntimeBuilderImpl.java:68)
at com.bea.wli.sb.pipeline.RouterCompiler.getActionsRuntime(RouterCompiler.java:153)
at com.bea.wli.sb.pipeline.PipelineStage.<init>(PipelineStage.java:55)
at com.bea.wli.sb.pipeline.RouterCompiler.compileStage(RouterCompiler.java:104)
at com.bea.wli.sb.pipeline.Pipeline.<init>(Pipeline.java:105)
at com.bea.wli.sb.pipeline.RouterCompiler.compilePipeline(RouterCompiler.java:97)
at com.bea.wli.sb.pipeline.Router.<init>(Router.java:138)
at com.bea.wli.sb.pipeline.RouterCompiler.compileRouter(RouterCompiler.java:90)
at com.bea.wli.sb.pipeline.RouterCompiler.compile(RouterCompiler.java:80)
at com.bea.wli.sb.pipeline.RouterManager.compileRouter(RouterManager.java:667)
at com.bea.wli.sb.pipeline.RouterRuntimeCache$RouterRuntimeDerivedTypeDef.computeData(RouterRuntimeCache.java:83)
at com.bea.wli.sb.pipeline.RouterRuntimeCache$RouterRuntimeDerivedTypeDef.computeData(RouterRuntimeCache.java:50)
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.pipeline.RouterRuntimeCache.getRuntime(RouterRuntimeCache.java:44)
at com.bea.wli.sb.pipeline.RouterManager.getRouterRuntime(RouterManager.java:638)
at com.bea.wli.sb.pipeline.RouterContext.getInstance(RouterContext.java:173)
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:122)
at sun.reflect.GeneratedMethodAccessor2974.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy162.onMessage(Unknown Source)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4659)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:4345)
at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3821)
at weblogic.jms.client.JMSSession.access$000(JMSSession.java:115)
at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5170)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused By: com.bea.wli.config.component.NotFoundException: Failed to create temporary jar file
at com.bea.wli.sb.resources.archive.classloader.ArchiveClassLoaderDerivedTypeDef.computeData(ArchiveClassLoaderDerivedTypeDef.java:160)
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.ArchiveRuntimeManager.getMethod(ArchiveRuntimeManager.java:367)
at stages.transform.runtime.JavaCalloutRuntimeStep.<init>(JavaCalloutRuntimeStep.java:100)
at stages.transform.JavaCalloutFactory.getStageRuntime(JavaCalloutFactory.java:80)
at com.bea.wli.sb.stages.StageMetadataImpl$DefaultStageFactory.getStageRuntime(StageMetadataImpl.java:245)
at com.bea.wli.sb.stages.impl.RuntimeBuilderImpl.buildRuntime(RuntimeBuilderImpl.java:92)
at com.bea.wli.sb.stages.impl.RuntimeBuilderImpl.buildRuntime(RuntimeBuilderImpl.java:68)
at com.bea.wli.sb.pipeline.RouterCompiler.getActionsRuntime(RouterCompiler.java:153)
at com.bea.wli.sb.pipeline.PipelineStage.<init>(PipelineStage.java:55)
at com.bea.wli.sb.pipeline.RouterCompiler.compileStage(RouterCompiler.java:104)
at com.bea.wli.sb.pipeline.Pipeline.<init>(Pipeline.java:105)
at com.bea.wli.sb.pipeline.RouterCompiler.compilePipeline(RouterCompiler.java:97)
at com.bea.wli.sb.pipeline.Router.<init>(Router.java:138)
at com.bea.wli.sb.pipeline.RouterCompiler.compileRouter(RouterCompiler.java:90)
at com.bea.wli.sb.pipeline.RouterCompiler.compile(RouterCompiler.java:80)
at com.bea.wli.sb.pipeline.RouterManager.compileRouter(RouterManager.java:667)
at com.bea.wli.sb.pipeline.RouterRuntimeCache$RouterRuntimeDerivedTypeDef.computeData(RouterRuntimeCache.java:83)
at com.bea.wli.sb.pipeline.RouterRuntimeCache$RouterRuntimeDerivedTypeDef.computeData(RouterRuntimeCache.java:50)
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.pipeline.RouterRuntimeCache.getRuntime(RouterRuntimeCache.java:44)
at com.bea.wli.sb.pipeline.RouterManager.getRouterRuntime(RouterManager.java:638)
at com.bea.wli.sb.pipeline.RouterContext.getInstance(RouterContext.java:173)
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:122)
at sun.reflect.GeneratedMethodAccessor2974.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy162.onMessage(Unknown Source)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4659)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:4345)
at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3821)
at weblogic.jms.client.JMSSession.access$000(JMSSession.java:115)
at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5170)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused By: java.io.IOException: No such file or directory
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.ArchiveRuntimeManager.getMethod(ArchiveRuntimeManager.java:367)
at stages.transform.runtime.JavaCalloutRuntimeStep.<init>(JavaCalloutRuntimeStep.java:100)
at stages.transform.JavaCalloutFactory.getStageRuntime(JavaCalloutFactory.java:80)
at com.bea.wli.sb.stages.StageMetadataImpl$DefaultStageFactory.getStageRuntime(StageMetadataImpl.java:245)
at com.bea.wli.sb.stages.impl.RuntimeBuilderImpl.buildRuntime(RuntimeBuilderImpl.java:92)
at com.bea.wli.sb.stages.impl.RuntimeBuilderImpl.buildRuntime(RuntimeBuilderImpl.java:68)
at com.bea.wli.sb.pipeline.RouterCompiler.getActionsRuntime(RouterCompiler.java:153)
at com.bea.wli.sb.pipeline.PipelineStage.<init>(PipelineStage.java:55)
at com.bea.wli.sb.pipeline.RouterCompiler.compileStage(RouterCompiler.java:104)
at com.bea.wli.sb.pipeline.Pipeline.<init>(Pipeline.java:105)
at com.bea.wli.sb.pipeline.RouterCompiler.compilePipeline(RouterCompiler.java:97)
at com.bea.wli.sb.pipeline.Router.<init>(Router.java:138)
at com.bea.wli.sb.pipeline.RouterCompiler.compileRouter(RouterCompiler.java:90)
at com.bea.wli.sb.pipeline.RouterCompiler.compile(RouterCompiler.java:80)
at com.bea.wli.sb.pipeline.RouterManager.compileRouter(RouterManager.java:667)
at com.bea.wli.sb.pipeline.RouterRuntimeCache$RouterRuntimeDerivedTypeDef.computeData(RouterRuntimeCache.java:83)
at com.bea.wli.sb.pipeline.RouterRuntimeCache$RouterRuntimeDerivedTypeDef.computeData(RouterRuntimeCache.java:50)
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.pipeline.RouterRuntimeCache.getRuntime(RouterRuntimeCache.java:44)
at com.bea.wli.sb.pipeline.RouterManager.getRouterRuntime(RouterManager.java:638)
at com.bea.wli.sb.pipeline.RouterContext.getInstance(RouterContext.java:173)
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:122)
at sun.reflect.GeneratedMethodAccessor2974.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy162.onMessage(Unknown Source)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4659)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:4345)
at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3821)
at weblogic.jms.client.JMSSession.access$000(JMSSession.java:115)
at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5170)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
It seems that error is caused because OSB is unable to create temporary jar file in /tmp/alsbTempJars. I looked for path and actually directory alsbTempJars is not present on disk. I had already created that directory in the past so I can't figure why it has been deleted.
Also I saw some out of disk space error in logs although I checked that it is at least 1Gb free at OSB mount point.
We've realized of this problem when checking logs after we got an error working with OSB web console.
To solve this error I had to create alsbTempJars directory and restart the node. Then error stopped and processing continued normaly. I think node activity was interrupted during error as I only see stack traces in log file.
OSB runs in a Linux machine with user Oracle that is also owner of alsbTempJars directory.
Hope someone could help us with this.
Regards,
Daniel.In case /tmp directory is automatically deleted, is it possible to configure a custom directory for alsbTempJars dir in OSB to assure it is never deleted?Add the -Djava.io.tmpdir=newTempDir parameter in the JAVA_PROPERTIES section of the setDomainEnv.sh script. This new location should be outside of the /tmp dir to avoid being cleared by any process.
I think best soultion would be to have alsbTempJars automatically created whenever /tmp is purged.Doing it on the fly may not be possible however you may anytime raise an enhancement request with support and if prod dev approves it, you may get a fix.
Regards,
Anuj -
Ejbc - creating deployable jar file
Hi ...
I have created the home/remote interface and the bean...I deployed them thru the Webogic 5 GUI and its working fine.
I try to do it from the console ...i create 2 xml files ..keep it in the meta-inf folder...create a jar file with C:>jar cvf ..... command..
When i try to create a deployable jar file with C:> ejbc command it gives the folloing error
"ERROR: Error from ejbc: Unable to load a class required by your EJB: hello.HelloHome
ERROR: ejbc found errors"
My ejb-jar.xml file is as follows ->
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>Hello</ejb-name>
<home>hello.HelloHome</home>
<remote>hello.Hello</remote>
<ejb-class>hello.HelloBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
Also if I remove the package and then try to create the deployable jar file it works perfectly fine...
Any idea..why's the problem coming...
Replies awaited!
Thanks in advance...set classpath for j2ee.jar, jar files that comes with weblogic 5.1
then try it out.. -
Problem in Creating a jar file using java.util.jar and deploying in jboss 4
Dear Techies,
I am facing this peculiar problem. I am creating a jar file programmatically using java.util.jar api. The jar file is created but Jboss AS is unable to deploy this jar file. I have also tested that my created jar file contains the same files. When I create a jar file from the command using jar -cvf command, Jboss is able to deploy. I am sending the code , please review it and let me know the problem. I badly require your help. I am unable to proceeed in this regard. Please help me.
package com.rrs.corona.solutionsacceleratorstudio.solutionadapter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.jar.JarEntry;
import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;
import com.rrs.corona.solutionsacceleratorstudio.SASConstants;
* @author Piku Mishra
public class JarCreation
* File object
File file;
* JarOutputStream object to create a jar file
JarOutputStream jarOutput ;
* File of the generated jar file
String jarFileName = "rrs.jar";
*To create a Manifest.mf file
Manifest manifest = null;
//Attributes atr = null;
* Default Constructor to specify the path and
* name of the jar file
* @param destnPath of type String denoting the path of the generated jar file
public JarCreation(String destnPath)
{//This constructor initializes the destination path and file name of the jar file
try
manifest = new Manifest();
jarOutput = new JarOutputStream(new FileOutputStream(destnPath+"/"+jarFileName),manifest);
catch(Exception e)
e.printStackTrace();
public JarCreation()
* This method is used to obtain the list of files present in a
* directory
* @param path of type String specifying the path of directory containing the files
* @return the list of files from a particular directory
public File[] getFiles(String path)
{//This method is used to obtain the list of files in a directory
try
file = new File(path);
catch(Exception e)
e.printStackTrace();
return file.listFiles();
* This method is used to create a jar file from a directory
* @param path of type String specifying the directory to make jar
public void createJar(String path)
{//This method is used to create a jar file from
// a directory. If the directory contains several nested directory
//it will work.
try
byte[] buff = new byte[2048];
File[] fileList = getFiles(path);
for(int i=0;i<fileList.length;i++)
if(fileList.isDirectory())
createJar(fileList[i].getAbsolutePath());//Recusive method to get the files
else
FileInputStream fin = new FileInputStream(fileList[i]);
String temp = fileList[i].getAbsolutePath();
String subTemp = temp.substring(temp.indexOf("bin")+4,temp.length());
// System.out.println( subTemp+":"+fin.getChannel().size());
jarOutput.putNextEntry(new JarEntry(subTemp));
int len ;
while((len=fin.read(buff))>0)
jarOutput.write(buff,0,len);
fin.close();
catch( Exception e )
e.printStackTrace();
* Method used to close the object for JarOutputStream
public void close()
{//This method is used to close the
//JarOutputStream
try
jarOutput.flush();
jarOutput.close();
catch(Exception e)
e.printStackTrace();
public static void main( String[] args )
JarCreation jarCreate = new JarCreation("destnation path where jar file will be created /");
jarCreate.createJar("put your source directory");
jarCreate.close();Hi,
I have gone through your code and the problem is that when you create jar it takes a complete path address (which is called using getAbsolutePath ) (when you extract you see the path; C:\..\...\..\ )
You need to truncate this complete path and take only the path address where your files are stored and the problem must be solved. -
Hello everybody! :) I really need your help.
I have Tom.class
I want to create a jar file.
I use eclipse, so I created jar file there. I got MarkTven.jar in which:
Tom.class
.project
.classpath
MATA-INF / MANIFEST.MFin MANIFEST.MF:
Manifest-Version: 1.0
Main-Class: Tomclicking at MarkTven.jar I get:
Invalid or corrupted jar file.Help me please.
Message was edited by: ghost:))I have to say, that although this has nothing to do with me, I'd like to pass some comment. This attitude is prevalent throughout the forums and how can people be expected to gain experience if their efforts will be down-played and you try to make them accountable for their ignorance? It's a contradiction in terms. This is a large forum with more than a lifetimes worth of reading for those of us with a life.
America70 has given you all the information you require to develop a resolve. I think he/she was depending on you perhaps being aware of a common issue he/she may have overlooked. I would treat that as misplaced respect personally, however, you could have steered him/her towards passing you further detail of his/her issue so that the issue could be resolved. Instead, this query remains, pointlessly, filling up space and uselessly guiding other new leaners no-where.
You guys may be offering your advice for 'free' but you are also advocates for the language in doing so. Surely you should be making greater efforts to promote the language instead of forcing people to steer clear of attempting to expand their knowledge? It's just an opinion...
*free - I use this term loosely because the cost to the learner is far from free, the expense being the mentors ego.
In reference to the above post, America70 had simply made a typo in his/her query to you, not mis-spelt it in his/her implementation; he/she explained that. If he/she is required to add more detail, then politely ask him/her to. America70 also pointed out that he/she had followed the tutorial. It is obvious he/she has mis-read, mis-understood, or badly-impemented something. He/she has obviously overlooked this and is unable to discover the fault. It's not rocket science. If you people can't positively add to this post then what is your use as a helper/teacher?
Edited by: chewzLife on May 18, 2008 7:50 PM
Edited by: chewzLife on May 18, 2008 7:51 PM -
Problem building EJB jar file using Eclipse
Hi,
Here's my file sturcture.
ejb\x\y\z\test\
ejb\x\y\z\test1\
'ejb' is the root directory.
The java source files under 'test' have a package name x.y.z.test.
The java source files under 'test1' have a package name x.y.z.test1.
I want to build a EJB jar file for 'test' and 'test1' separately. In eclipse when I create an EJB project, I specify the root folder as the source in the java build path settings. So the project explorer in Eclipse shows both the packages since they are under the same root folder. When I try to do 'Export - EJB Jar File', it includes both the 'test' and 'test1' in the .jar. Is there a way to build them separately ?
Thanks,As far as I know, there is no way in Eclipse to specify a package prefix for a source folder. Assuming that you are not using an operating system with support for symbolic links at FS-level, the only way I can think of solving your problem is via linked folders and includes/excludes.
1. Create two ejb projects in your workspace. Specify locations somewhere independent of where the root of your source tree is located.
2. Right click on proj1 and select Properties / Java Build Path / Source.
3. Click Link Source and specify the location to your source root on disk. Click Next.
4. In the inclusion patterns section, add a pattern that captures classes appropriate for that module. Click Finish.
5. Delete the original source directory that was created during project creation before leaving Build Path configuration dialog.
6. Repeat steps 2-5 on the second project, except specify a different inclusion pattern.
This should produce a project structure that Eclipse will be happy with, but you have to be a little bit careful. Even though you filtered out classes from the view of the java compiler for a particular project, you will still see them listed in the various navigational views (such as Package Explorer or Project Explorer). Don't modify these filtered out files. The project that is supposed to be building them will not react to changes in the other project. You will have to manually refresh (right click on project and select refresh) the other project before the java compiler will see changes.
Hope this will help you out.
- Konstantin -
Unable to find ejb-jar with uri X.jar in ear at c:/Y/split_src
Stack trace is below, but the ejb does exist at the location that the FileNotFoundException states. I've checked that application.xml, org.eclipse.wst.common.component both have the correct name for this dependency.
java.lang.Exception: Exception received from deployment driver. See Error Log view for more detail.
at oracle.eclipse.tools.weblogic.server.internal.DeploymentProgressListener.watch(DeploymentProgressListener.java:190)
at oracle.eclipse.tools.weblogic.server.internal.WlsJ2EEDeploymentHelper.deploy(WlsJ2EEDeploymentHelper.java:506)
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishWeblogicModules(WeblogicServerBehaviour.java:1466)
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishToServer(WeblogicServerBehaviour.java:898)
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishOnce(WeblogicServerBehaviour.java:686)
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publish(WeblogicServerBehaviour.java:539)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774)
at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3153)
at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: weblogic.application.ModuleException:
at weblogic.ejb.container.deployer.EJBModule.init(EJBModule.java:334)
at weblogic.application.internal.flow.ModuleListenerInvoker.init(ModuleListenerInvoker.java:167)
at weblogic.application.internal.flow.InitModulesFlow.initModule(InitModulesFlow.java:312)
at weblogic.application.internal.flow.InitModulesFlow.initModules(InitModulesFlow.java:325)
at weblogic.application.internal.flow.InitModulesFlow.prepare(InitModulesFlow.java:378)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:648)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:59)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:208)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: java.io.FileNotFoundException: Unable to find ejb-jar with uri ***.jar in ear at C:\***\split_src
at weblogic.ejb.spi.EJBJar.<init>(EJBJar.java:81)
at weblogic.ejb.container.deployer.EJBModule.buildClassFinder(EJBModule.java:201)
at weblogic.ejb.container.deployer.EJBModule.init(EJBModule.java:313)Hi Ten,
FYI, just by placing the ejb jar inside EAR project it will not be picked up for deployment. The EJB module has to be defined on EAR Module Assembly, and the steps are:
> EAR Project | Properties, Deployment Assembly - Add EJB module
NOTE: To verify the dependency you could try to export the EAR project to an .ear file. If the exported .ear file bundles ejb jar then deployment should work fine.
As far as the deployment mode, OEPE supports WebLogic Split-source (default) and Exploded archive. In the default split-source mode, the .beabuild.txt contains the mapping to the actual files whereas in exploded archive the files are copied over to deployment staging location.
Steps to modify deployment mode:
> In the server view, right click on server configuration | Properties, select WebLogic | Publishing
Please make sure the ejb module is defined appropriately and let me know if this resolves the issue.
Thanks,
Ram -
Unable to publish - Unable to find ejb-jar with uri itr-ejbs.jar in ear
I'm using Weblogic 10.3.4 with Eclipse Juno before i was with Eclipse Galileo. Since the update i'm not able to publish my ear anymore.
I search on the internet the explanation of this stacktrace but i don't find a understandable answer so i ask to you :D
<5 oct. 2012 12 h 30 CEST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1349433008242' for task '0'. Error is: 'weblogic.application.ModuleException: '
weblogic.application.ModuleException:
at weblogic.ejb.container.deployer.EJBModule.init(EJBModule.java:334)
at weblogic.application.internal.flow.ModuleListenerInvoker.init(ModuleListenerInvoker.java:167)
at weblogic.application.internal.flow.InitModulesFlow.initModule(InitModulesFlow.java:285)
at weblogic.application.internal.flow.InitModulesFlow.initModules(InitModulesFlow.java:298)
at weblogic.application.internal.flow.InitModulesFlow.prepare(InitModulesFlow.java:330)
Truncated. see log file for complete stacktrace
Caused By: java.io.FileNotFoundException: Unable to find ejb-jar with uri itr-ejbs.jar in ear at D:\dev\workspaces\.metadata\.plugins\org.eclipse.core.resources\.projects\itr-ear\beadep\citron_domain\itr-ear\split_src
at weblogic.ejb.spi.EJBJar.<init>(EJBJar.java:81)
at weblogic.ejb.container.deployer.EJBModule.buildClassFinder(EJBModule.java:201)
at weblogic.ejb.container.deployer.EJBModule.init(EJBModule.java:313)
at weblogic.application.internal.flow.ModuleListenerInvoker.init(ModuleListenerInvoker.java:167)
at weblogic.application.internal.flow.InitModulesFlow.initModule(InitModulesFlow.java:285)
Truncated. see log file for complete stacktrace
>
<5 oct. 2012 12 h 30 CEST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'itr-ear'.>
<5 oct. 2012 12 h 30 CEST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException:
at weblogic.ejb.container.deployer.EJBModule.init(EJBModule.java:334)
at weblogic.application.internal.flow.ModuleListenerInvoker.init(ModuleListenerInvoker.java:167)
at weblogic.application.internal.flow.InitModulesFlow.initModule(InitModulesFlow.java:285)
at weblogic.application.internal.flow.InitModulesFlow.initModules(InitModulesFlow.java:298)
at weblogic.application.internal.flow.InitModulesFlow.prepare(InitModulesFlow.java:330)
Truncated. see log file for complete stacktrace
Caused By: java.io.FileNotFoundException: Unable to find ejb-jar with uri itr-ejbs.jar in ear at D:\dev\workspaces\.metadata\.plugins\org.eclipse.core.resources\.projects\itr-ear\beadep\citron_domain\itr-ear\split_src
at weblogic.ejb.spi.EJBJar.<init>(EJBJar.java:81)
at weblogic.ejb.container.deployer.EJBModule.buildClassFinder(EJBModule.java:201)
at weblogic.ejb.container.deployer.EJBModule.init(EJBModule.java:313)
at weblogic.application.internal.flow.ModuleListenerInvoker.init(ModuleListenerInvoker.java:167)
at weblogic.application.internal.flow.InitModulesFlow.initModule(InitModulesFlow.java:285)
Truncated. see log file for complete stacktrace
>Thank YouHi,
It seems one of your ejb jar is missing from the current file location.
D:\dev\workspaces\.metadata\.plugins\org.eclipse.core.resources\.projects\itr-ear\beadep\citron_domain\itr-ear\split_src
you can make it manually copied to this location and build the project again so that it can able to deploy propertly.
Now one more thing you can do open a ticket with oracle support for better assistance.
Regards,
Kal -
How to deploy EJB jar file in Weblogic 8.1
Hi,
I have created the EJB jar file, bearing home,remote,ejb and client class aling with the META-INF folder containing ejb-jar.xml and weblogic-ejb-jar.xml.
After all this I am confused where to put this EJB jar file so that the container could deploy it.
I am putting it in application folder of my own created Domain.
Suggest me...Put it anywhere you like. You can always deploy it using the administrator console. There usually is an auto-deployment directory for the domain. You could find all that information in the Weblogic documentation.
-
I have a package called voiceexpert which contains three classes: Disease, DiagnosingEngine and Symptoms which is a JavaBean. Symptoms makes use of Disease and DiagnosingEngine objects.
voiceexpert is stored in the directory: c:\diagapp3
I compiled Symptoms.java as below:
c:\diagapp3> javac -d . Symptoms.java
The class files for Disease.java, DiagnosingEngine.java and Symptoms.java are placed in the directory: voiceexpert.
I created a Manifest.txt file inside c:\diagapp3 containing the following:
Main-Class:voiceexpert.voiceexpert.Symptoms
Name:voiceexpert/Symptoms.class
Java-Bean:True
I later created the jar file with the command:
jar cfm jjj.jar Manifest.txt voiceexpert\*.*
But, I am having the error message: "*invalid header field*".
What can I do to remove this error?
Note: I created the Manifest.txt using utf-8 encoding. My code is to be used in a third-party application and that is why it does not contain a main method.
The link I was referred to could not help me. I need help please!
Edited by: Adeyi on Feb 24, 2010 2:26 AM
Edited by: Adeyi on Feb 24, 2010 2:34 AMAdeyi wrote:
..I created a Manifest.txt file inside c:\diagapp3 containing the following:
Main-Class:voiceexpert.voiceexpert.Symptoms
Note: I created the Manifest.txt using utf-8 encoding. My code is to be used in a third-party application and that is why it does not contain a main method.Why are you specifying a main-class when the API has none?
The link I was referred to..What link? Just imagine for the moment that the Internet is a big place and we are not psychic. -
How to create a .jar file for the BPEL project
hi all,
how can i create a .jar file for my BPEL project, i am trying to deploy the project but getting an error :
"Error: [Error ORABPEL-10902]: compilation failed [Description]: in "C:\OraBPELPM\integration\jdev\jdev\mywork\Workspace_BPELDemo\BPEL_Report\BPEL_Report.bpel", XML parsing failed because "". [Potential fix]: n/a. "
and when doubel cliking on this error Jdev take me to the beginning of the ".bpel" file.
I 'm really stuck in here i am not able to deploy the process!
Thanks,
RanaRana:
If you haven't already, I would post this question in the BPEL forum. I would expect a much better turnaround there.
Johnny Lee -
How to create a .jar file in wlcs3.1
hello friends,
hi friends, im working on weblogic commerce server3.1 . i dont know how to create a .jar file in weblogic commerce server3.1. can any one knows send email to me.
thanks.
hari$JDK_HOME/bin/jar (%JDK_HOME%\bin\jar) shows you the syntax
where JDK_HOME is your jdk installation directory.
Kumar
hari wrote:
hello friends,
hi friends, im working on weblogic commerce server3.1 . i dont know how to create a .jar file in weblogic commerce server3.1. can any one knows send email to me.
thanks.
hari -
How to create a jar file which is in the remote system?
Hi,
I have a set of files that resides in a remote system,which have to be "jar"red. I have a firewall in between. I want to create a jar file out of the files situated in the remote system.How do i go about this process.?Hi,
You can't do that in a simple way. You need to have a port open in the firewall, and you need to have a server process on the remote machine.
Kaj -
How can I create a jar file at a Unix systems?
Hi there,
how what's the command to create a jar file in Unix? I'm creating a zip file and then renaming it to jar, but it's size is smaller than the one when I use the WinZip tool at a Windows system.
Thanks,
AndreOops,
it very easy to do. Just use the jar -cvf command
Andre
Maybe you are looking for
-
I was quite pleased with myself for being able to pull together this great slideshow on iphoto. However, even though I have the box checked for repeat, I can't get the slideshow to repeat. I have music attached to go with the slide show and the son
-
Hi, When someone modify the coding in the notification, a new notification with the same task is created (QM02). How to stop this duplicate notification? Regards, Shiva
-
How to generate Automated Email?
Dear Experts, I am looking to send email to authorizers, when ever a PO is generated. What query should be entered in Alert to get the desired result. Please guide. Faisal
-
AppleScript to create Admin Account
This is what I have but it keep failing. Any help would be great set T_password to text returned of (display dialog "Set Password" default answer "") set longUser_name to text returned of (display dialog "Set Long Username" default answer "") set use
-
How can we change the file name character limit on PSE 7?
When I save for web I need more than 26 characters in the file name. Can you please tell me how to turn this Mac compatibility option off? Thanks.