1- Estou com um problema e tanto gero o EAR com três módulos, sendo dois módulos com aplicações WEB em WAR e um módulo EJB.
Na hora de fazer o deploy no weblogic console gera o erro:
Compiler class: 'com.sun.tools.javac.Main', not found
java.lang.ClassNotFoundException: com.sun.tools.javac.Main
at java.lang.Class.forName(Ljava.lang.String;I)Ljava.lang.Class;(Unknown Source)
at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Ljava.util.List;)V(CompilerInvoker.java:406)
at weblogic.utils.compiler.CompilerInvoker.compile(Ljava.util.List;)V(CompilerInvoker.java:328)
at weblogic.utils.compiler.CompilerInvoker.compile([Ljava.lang.String;)V(CompilerInvoker.java:336)
at weblogic.ejb20.ejbc.EJBCompiler.doCompile(Ljava.util.Collection;Lweblogic.utils.jars.VirtualJarFile;)V(EJBCompiler.java:270)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(Lweblogic.utils.classloaders.GenericClassLoader;Lweblogic.management.configuration.EJBComponentMBean;Lweblogic.management.descriptors.toplevel.EJBDescriptorMBean;Lweblogic.utils.jars.VirtualJarFile;Lweblogic.j2ee.validation.ModuleValidationInfo;Lweblogic.ejb20.ejbc.VersionHelper;Ljava.util.Collection;)V(EJBCompiler.java:476)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(Lweblogic.utils.classloaders.GenericClassLoader;Lweblogic.management.configuration.EJBComponentMBean;Lweblogic.utils.jars.VirtualJarFile;Lweblogic.ejb20.ejbc.VersionHelper;Ljava.util.Collection;)V(EJBCompiler.java:407)
at weblogic.ejb20.deployer.EJBDeployer.runEJBC(Lweblogic.utils.classloaders.GenericClassLoader;Lweblogic.utils.Getopt2;Lweblogic.management.configuration.EJBComponentMBean;Lweblogic.utils.jars.VirtualJarFile;Ljava.util.Collection;)V(EJBDeployer.java:493)
at weblogic.ejb20.deployer.EJBDeployer.compileJar(Ljava.io.File;Ljava.util.Collection;Lweblogic.utils.classloaders.GenericClassLoader;Lweblogic.utils.jars.VirtualJarFile;)V(EJBDeployer.java:784)
at weblogic.ejb20.deployer.EJBDeployer.compileIfNecessary(Lweblogic.utils.jars.VirtualJarFile;Lweblogic.management.configuration.EJBComponentMBean;Lweblogic.utils.classloaders.GenericClassLoader;)V(EJBDeployer.java:700)
at weblogic.ejb20.deployer.EJBDeployer.prepare(Lweblogic.utils.jars.VirtualJarFile;Ljava.lang.ClassLoader;Lweblogic.management.descriptors.toplevel.EJBDescriptorMBean;Ljavax.naming.Context;Ljava.util.Map;)V(EJBDeployer.java:1339)
at weblogic.ejb20.deployer.EJBModule.prepare(Ljava.lang.ClassLoader;)V(EJBModule.java:498)
at weblogic.j2ee.J2EEApplicationContainer.prepareModule(Lweblogic.utils.classloaders.GenericClassLoader;Lweblogic.j2ee.J2EEApplicationContainer$Component;Z)V(J2EEApplicationContainer.java:3142)
at weblogic.j2ee.J2EEApplicationContainer.prepareModules([Lweblogic.j2ee.J2EEApplicationContainer$Component;Ljava.lang.String;Z)V(J2EEApplicationContainer.java:1583)
at weblogic.j2ee.J2EEApplicationContainer.prepare([Lweblogic.j2ee.J2EEApplicationContainer$Component;[Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)V(J2EEApplicationContainer.java:1227)
at weblogic.j2ee.J2EEApplicationContainer.prepare(Ljava.lang.String;[Lweblogic.management.configuration.ComponentMBean;[Ljava.lang.String;)V(J2EEApplicationContainer.java:1070)
at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer()V(SlaveDeployer.java:2513)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer()Z(SlaveDeployer.java:2463)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare()V(SlaveDeployer.java:2379)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Lweblogic.management.deploy.OamVersion;Lweblogic.management.runtime.DeploymentTaskRuntimeMBean;Z)V(SlaveDeployer.java:866)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(Lweblogic.management.deploy.OamDelta;Lweblogic.management.deploy.OamVersion;ZLjava.lang.StringBuffer;)Z(SlaveDeployer.java:594)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(Ljava.util.ArrayList;Z)V(SlaveDeployer.java:508)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(Lweblogic.kernel.ExecuteThread;)V(SlaveCallbackHandler.java:25)
at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
Lembrando que esse módulo ejb não é acessado pelas aplicações web, serve somente para ser acessado pelo WebService. Por tanto, está em um módulo separado.
2- Um outro problema é:
Fiz um application.xml onde estou mapeando esses módulos (duas aplicacções web com WAR e o modulo ejb).
No módulo ejb eu crio um JAR do ejb e o coloco na dentro da pasta onde encontra-se todas as libs (APP-INF/lib/*.jar). A dúvida é: Qual o caminho que devo colocar no application.xml para mapear o modulo ejb certo? Hoje o application.xml esta assim:
<application>
<display-name></display-name>
<module>
<ejb>APP-INF/lib/XXejb.jar</ejb>
</module>
<module>
<web>
<web-uri>XXXweb.war</web-uri>
<context-root>XXX-web</context-root>
</web>
</module>
<module>
<web>
<web-uri>XXXwebacesso.war</web-uri>
<context-root>XXX-acesso-web</context-root>
</web>
</module>
</application>
Mas ainda gera um error que é:
[code]weblogic.management.ApplicationException:
Exception:weblogic.management.ApplicationException: prepare failed for APP-INF/lib/rnsejb.jar
Module: APP-INF/lib/rnsejb.jar Error: Exception preparing module: EJBModule(APP-INF/lib/rnsejb.jar,status=NEW)
Unable to deploy EJB: APP-INF/lib/rnsejb.jar from APP-INF/lib/rnsejb.jar:[/code]
Se alguém puder me ajudar …
Valew pessoal brigadao!
Abs, tmeireles