This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 114293 - AS 8.x: NoClassDefFoundError - cmp from db
Summary: AS 8.x: NoClassDefFoundError - cmp from db
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 8 (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Rochelle Raccah
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2007-08-30 23:23 UTC by Rochelle Raccah
Modified: 2007-10-11 00:03 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stack trace (1.66 KB, text/plain)
2007-08-30 23:25 UTC, Rochelle Raccah
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rochelle Raccah 2007-08-30 23:23:19 UTC
- Register an AS 8.x server
- New EJB module project using it (J2EE 1.4)
- New CMP from DB
- NoClassDefFoundError when mapping is being generated
Comment 1 Rochelle Raccah 2007-08-30 23:25:21 UTC
Created attachment 47842 [details]
stack trace
Comment 2 Rochelle Raccah 2007-08-30 23:31:09 UTC
The problem is that these classes come from the appserver jars and 3 of those classes were not present in the appserver
until AS 9.x.  Supplying those 3 missing classes somewhere else won't work because of the module/package uniqueness
rules in NB classloading.  I have verified that this is really the problem using the system property in
<http://openide.netbeans.org/servlets/ReadMsg?list=dev&msgNo=29179>, but this is not a reasonable approach for the
shipping product.
Comment 3 Rochelle Raccah 2007-08-30 23:41:42 UTC
At the very least we should catch the exception and skip the generation of sun-cmp-mappings.xml and fail more gracefully.
Comment 4 _ pcw 2007-08-31 00:21:44 UTC
I see the with "com.sun.jdo.api.persistence.mapping.ejb.EJBInfoHelper".  I assume you mean that there are 2 more such
classes besides this one that would behave this way.  Please add their fully qualified names to this report.

I'm confused about a few things.  This class is referenced directly by CmpMappingProviderImpl.java in appsrvbridge which
is derived from the old code in EjbJarRoot.java from NB 5.x.  But this class (EJBInfoHelper.java) has been referenced in
that package since the original code in NetBeans 4.1.

So I don't understand the "It's in Glassfish, but not in AS 8.2" reference.  Can you elaborate?
Comment 5 Rochelle Raccah 2007-08-31 00:32:12 UTC
The 3 missing .class files are:
1) com.sun.jdo.api.persistence.mapping.ejb.AbstractNameMapper (abstract class)
2) com.sun.jdo.api.persistence.mapping.ejb.EJBInfoHelper (interface)
3) com.sun.jdo.api.persistence.mapping.ejb.MappingGenerator (class)

In NB 4.1 all these classes lived in the serverplugins/external jar persistence-tool-support and thus were found in a
single jar.

In NB 6, there is no external jar anymore and the classes needed are loaded from the appserver's lib jars.  In AS 8.x
that jar file did not contain the above classes - they were added later in the 9.x timeframe.  They *existed* earlier on
a branch in the appserver, but were not present in the shipped libs of the appserver until 9.x.

Comment 6 _ pcw 2007-08-31 00:39:40 UTC
Got it, thanks for clarifying.