Ok... I just tried deploying the same EAR in the weblogic console - and it failed there too withteh same NoClassDefFoundError... WHY!?!??!?!? :o(
The required class is packaged in a .jar. The jar is in the EAR's lib folder. The application.xml does not have mention to it tho (I don't see why it should).... Where else am I missing its mention?? -----Original Message----- From: Vaidya, Supriya A (US - Chicago) Sent: Monday, August 06, 2007 11:00 AM To: 'Maven Users List' Subject: RE: Maven-Weblogic: NoClassDefFoundError for JAR in an EAR HI Scott - sorry I took so long to respond, got pulled into a few other things. Here is the stack trace on the maven console - below it is that on the weblogic server console: C:\CreditelseContinuance\creditelseEAR>mvn weblogic:deploy -X + Error stacktraces are turned on. Maven version: 2.0.7 Java version: 1.5.0_04 OS name: "windows xp" version: "5.1" arch: "x86" [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settin gs\ch1svai1\.m2\plugin-registry.xml' [DEBUG] Building Maven global-level plugin registry from: 'C:\Maven\maven-2.0.7\ conf\plugin-registry.xml' [INFO] Scanning for projects... [DEBUG] Searching for parent-POM: com.something.credit:creditelse::2.0 of p roject: com.something.credit.else:creditelseEAR:ear:2.0 in relative pat h: ../pom.xml [DEBUG] Using parent-POM from the project hierarchy at: '../pom.xml' for project : com.something.credit.else:creditelseEAR:ear:2.0 [INFO] Searching repository for plugin with prefix: 'weblogic'. [DEBUG] Loading plugin prefixes from group: org.apache.maven.plugins [DEBUG] Skipping disabled repository Codehaus Snapshots [DEBUG] Skipping disabled repository Maven Snapshots [DEBUG] Loading plugin prefixes from group: org.codehaus.mojo [DEBUG] Skipping disabled repository Codehaus Snapshots [DEBUG] Skipping disabled repository Maven Snapshots [DEBUG] Skipping disabled repository Codehaus Snapshots [DEBUG] Skipping disabled repository Maven Snapshots [DEBUG] maven-compiler-plugin: resolved to version 2.0.2 from repository central [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::8 for pro ject: null:maven-compiler-plugin:maven-plugin:2.0.2 from the repository. [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::5 for project: org .apache.maven.plugins:maven-plugins:pom:8 from the repository. [DEBUG] Retrieving parent-POM: org.apache:apache::3 for project: org.apache.mave n:maven-parent:pom:5 from the repository. [DEBUG] Skipping disabled repository central [DEBUG] Skipping disabled repository central [DEBUG] weblogic-maven-plugin: resolved to version 2.9.0-20070211.224419-10 from repository Maven Snapshots [DEBUG] Retrieving parent-POM: org.codehaus.mojo:mojo::13 for project: null:webl ogic-maven-plugin:maven-plugin:2.9.0-20070211.224419-10 from the repository. [DEBUG] weblogic-maven-plugin: resolved to version 2.9.0-20070211.224419-10 from repository Maven Snapshots [DEBUG] Skipping disabled repository Codehaus Snapshots [DEBUG] Skipping disabled repository Maven Snapshots [DEBUG] maven-ear-plugin: resolved to version 2.3 from repository central [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::7 for pro ject: null:maven-ear-plugin:maven-plugin:2.3 from the repository. [DEBUG] Retrieving parent-POM: org.apache.maven:maven-plugin-surrogate-parent::5 for project: org.apache.maven.plugins:maven-plugins:pom:7 from the repository. [DEBUG] weblogic-maven-plugin: resolved to version 2.9.0-20070211.224419-10 from repository Maven Snapshots [DEBUG] weblogic-maven-plugin: resolved to version 2.9.0-20070211.224419-10 from repository Maven Snapshots [INFO] ------------------------------------------------------------------------ - --- [INFO] Building creditelse [INFO] task-segment: [weblogic:deploy] [INFO] ------------------------------------------------------------------------ - --- [DEBUG] org.codehaus.mojo:weblogic-maven-plugin:maven-plugin:2.9.0-20070211.2244 19-10:runtime (selected for runtime) [DEBUG] Skipping disabled repository Codehaus Snapshots [DEBUG] Skipping disabled repository Maven Snapshots [DEBUG] Skipping disabled repository snapshots [DEBUG] Trying repository codehaus.org Downloading: http://repository.codehaus.org/web-maven/web-maven/1.0/web-maven-1. 0.pom [DEBUG] Unable to get resource 'web-maven:web-maven:pom:1.0' from repository cod ehaus.org (http://repository.codehaus.org) [DEBUG] Trying repository central Downloading: http://repo1.maven.org/maven2/web-maven/web-maven/1.0/web-maven-1.0 .pom [DEBUG] Unable to get resource 'web-maven:web-maven:pom:1.0' from repository cen tral (http://repo1.maven.org/maven2) [DEBUG] Skipping disabled repository Codehaus Snapshots [DEBUG] Skipping disabled repository Maven Snapshots [DEBUG] Trying repository central Downloading: http://repo1.maven.org/maven2/web-maven/web-maven/1.0/web-maven-1.0 .pom [DEBUG] Unable to get resource 'web-maven:web-maven:pom:1.0' from repository cen tral (http://repo1.maven.org/maven2) [DEBUG] Artifact not found - using stub model: Unable to download the artifact f rom any repository web-maven:web-maven:pom:1.0 from the specified remote repositories: codehaus.org (http://repository.codehaus.org), Maven Snapshots (http://snapshots.maven.codehaus.org/maven2/), central (http://repo1.maven.org/maven2), snapshots (http://snapshots.repository.codehaus.org), Codehaus Snapshots (http://snapshots.repository.codehaus.org/) [DEBUG] Using defaults for missing POM web-maven:web-maven:pom:1.0:provided [DEBUG] web-maven:web-maven:jar:1.0:provided (selected for provided) [DEBUG] Skipping disabled repository Codehaus Snapshots [DEBUG] Skipping disabled repository Maven Snapshots [DEBUG] Skipping disabled repository snapshots [DEBUG] Skipping disabled repository Codehaus Snapshots [DEBUG] Skipping disabled repository Maven Snapshots [DEBUG] weblogic:weblogic:jar:9.0:runtime (setting version to: 9.0 from range: [9.0,)) [DEBUG] weblogic:weblogic:jar:9.0:runtime (selected for runtime) [DEBUG] ant:ant:jar:1.6.5:runtime (selected for runtime) [DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus::1.0.4 for project: nu ll:plexus-utils:jar:1.1 from the repository. [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.1:runtime (selected for runtime ) [DEBUG] weblogic:xbean:jar:9.0:provided (selected for provided) [DEBUG] Skipping disabled repository Codehaus Snapshots [DEBUG] Skipping disabled repository Maven Snapshots [DEBUG] Skipping disabled repository snapshots [DEBUG] Skipping disabled repository Codehaus Snapshots [DEBUG] Skipping disabled repository Maven Snapshots [DEBUG] weblogic:webservices:jar:9.0:runtime (setting version to: 9.0 from ran ge: [9.0,)) [DEBUG] weblogic:webservices:jar:9.0:runtime (selected for runtime) [DEBUG] weblogic:bcel:jar:9.0:provided (selected for provided) [DEBUG] weblogic:weblogic-container-binding:jar:9.0:provided (selected for pro vided) [DEBUG] weblogic:javelinx:jar:9.0:provided (selected for provided) [DEBUG] weblogic:wlw-util:jar:9.0:provided (selected for provided) [DEBUG] weblogic:weblogic:jar:9.0:provided (range restricted from: 9.0 and: [9 .0,) to: 9.0 ) [DEBUG] weblogic:wlxbean:jar:9.0:provided (selected for provided) [DEBUG] weblogic:wlw-langx:jar:9.0:provided (selected for provided) [DEBUG] com.sun:tools:jar:1.5.0:system (selected for system) [DEBUG] weblogic:webservices:jar:9.0:provided (range restricted from: 9.0 and: [9.0,) to: 9.0 ) [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apac he.maven:maven-plugin-api:jar:2.0 from the repository. [DEBUG] Adding managed dependencies for org.apache.maven:maven-plugin-api [DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8 [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4 [DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5 [DEBUG] org.apache.maven.wagon:wagon-ssh:jar:1.0-alpha-5 [DEBUG] org.apache.maven.wagon:wagon-file:jar:1.0-alpha-5 [DEBUG] org.apache.maven.wagon:wagon-http-lightweight:jar:1.0-alpha-5 [DEBUG] org.apache.maven:maven-plugin-api:jar:2.0:runtime (selected for runtim e) [DEBUG] Adding managed dependencies for org.apache.maven:maven-artifact [DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8 [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4 [DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5 [DEBUG] org.apache.maven.wagon:wagon-ssh:jar:1.0-alpha-5 [DEBUG] org.apache.maven.wagon:wagon-file:jar:1.0-alpha-5 [DEBUG] org.apache.maven.wagon:wagon-http-lightweight:jar:1.0-alpha-5 [DEBUG] org.apache.maven:maven-artifact:jar:2.0:runtime (selected for runtime) [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1) [DEBUG] Configuring mojo 'org.codehaus.mojo:weblogic-maven-plugin:2.9.0-SNAPSHOT :deploy' --> [DEBUG] (s) adminServerHostName = localhost [DEBUG] (s) adminServerPort = 7001 [DEBUG] (s) adminServerProtocol = t3 [DEBUG] (s) artifactPath = C:\CreditelseContinuance\creditelseEAR\targ et/creditelseEAR-2.0 [DEBUG] (s) name = creditelseEAR [DEBUG] (s) password = weblogic [DEBUG] (s) projectPackaging = ear [DEBUG] (s) remote = false [DEBUG] (s) targetNames = AdminServer [DEBUG] (s) userId = admin [DEBUG] -- end configuration -- [INFO] [weblogic:deploy] [INFO] Weblogic Deployment beginning with parameters DeployMojoBase[adminServerH ostName = localhost, adminServerProtocol = t3, adminServerPort = 7001, userId = admin, password = weblogic, artifactPath = C:\CreditelseContinuance\creditDe cisionEAR\target/creditelseEAR-2.0, projectPackaging = ear, name = creditDec isionEAR, targetNames = AdminServer, remote = false] [INFO] Weblogic Deployment parameters [-adminurl, t3://localhost:7001, -username , admin, -password, weblogic, -name, creditelseEAR, -targets, AdminServer, - source, C:\CreditelseContinuance\creditelseEAR\target/creditelseEAR- 2.0.ear, -deploy] weblogic.Deployer invoked with options: -adminurl t3://localhost:7001 -username admin -name creditelseEAR -targets AdminServer -source C:\CreditelseCon tinuance\creditelseEAR\target/creditelseEAR-2.0.ear -deploy <Aug 6, 2007 10:44:29 AM CDT> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiat ing deploy operation for application, creditelseEAR [archive: C:\CreditDecis ionContinuance\creditelseEAR\target\creditelseEAR-2.0.ear], to AdminServ er .> Task 1 initiated: [Deployer:149026]deploy application creditelseEAR on Admin Server. Task 1 failed: [Deployer:149026]deploy application creditelseEAR on AdminSer ver. Target state: deploy failed on Server AdminServer com/something/credit/else/application/CreditelseException Weblogic console: <Aug 6, 2007 10:43:24 AM CDT> <Error> <Deployer> <BEA-149265> <Failure occured i n the execution of deployment request with ID '1186414987037' for task '0'. Erro r is: 'java.lang.NoClassDefFoundError: com/uscellular/credit/decision/applicatio n/CreditDecisionException' java.lang.NoClassDefFoundError: com/uscellular/credit/decision/application/Credi tDecisionException at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2365) at java.lang.Class.getMethod0(Class.java:2611) at java.lang.Class.getMethod(Class.java:1579) at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.initializeO nMessageMethodInfo(MessageDrivenBeanInfoImpl.java:610) Truncated. see log file for complete stacktrace java.lang.NoClassDefFoundError: com/uscellular/credit/decision/application/Credi tDecisionException at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2365) at java.lang.Class.getMethod0(Class.java:2611) at java.lang.Class.getMethod(Class.java:1579) at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.initializeO nMessageMethodInfo(MessageDrivenBeanInfoImpl.java:610) Truncated. see log file for complete stacktrace > -----Original Message----- From: Scott Ryan [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 01, 2007 6:21 PM To: Maven Users List Subject: Re: Maven-Weblogic: NoClassDefFoundError for JAR in an EAR Does the same ear deploy using the console manually? Please send me the detailed log from the mvn -X weblogic:deploy so I can debug with you. It is not clear what the error is indicating. It looks like the ear is looking for one of your classes and not finding it but help me understand. Scott On Aug 1, 2007, at 1:27 PM, Vaidya, Supriya A ((US - Chicago)) wrote: > Hi: > > I have been able to successfully run a mvn weblogic:appc on my EAR > file > which contains: > > 1. the EJB-JAR.jar > 2. the web .war file > 3. and a lib/genericPOJO.jar file - that is used by boththe EJB-JAR > and > the Web files. > > However, on executing the mvn weblogic:deploy command, I > immediately get > a NoClassDefFoundError: > com/something/credit/else/application/MyException. This class is > contained in the POJO.jar, and I can clearly see the POJO being > included > in teh lib/ directory of the EAR, and I can see that the class file is > contained in this jar. > > What am I doing wrong? Shoudl I be setting the path somewhere? > > > > > Supriya A Vaidya > Technology Integration > Deloitte Consulting LLP > Tel: +1 312 486 4835 > Fax: +1 312 247 4835 > Mobile: + 1 414 736 8157 > www.deloitte.com <http://www.deloitte.com/> > > > This message (including any attachments) contains confidential > information intended for a specific individual and purpose, and is > protected by law. If you are not the intended recipient, you > should delete this message. > > > Any disclosure, copying, or distribution of this message, or the > taking of any action based on it, is strictly prohibited. [v.E.1] Scott Ryan CTO Soaring Eagle L.L.C. Denver, Co. 80129 www.soaringeagleco.com www.theryansplace.com (303) 263-3044 [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]