Narrative:

After takeoff from cdw in a southwest direction, my intention was to climb to 2700 ft and fly over mmu class D while staying outside class B to the east. Upon contacting N90, and getting a discrete squawk at 2700 ft, I was advised by approach that I was in class D airspace, and given a climb clearance to 6500 ft. I told controller that I thought I was as previously stated, and apologized if in fact I wasn't.

Google
 

Original NASA ASRS Text

Title: PLT OF AN SMA SEL PENETRATED CLASS D AIRSPACE DURING DEP FROM ANOTHER NEARBY ARPT UNDER CLASS B AIRSPACE. THE RPTR WAS INFORMED OF HIS ERROR WHEN HE CONTACTED ATC APCH FOR A CLRNC THROUGH CLASS B AIRSPACE.

Narrative: AFTER TKOF FROM CDW IN A SW DIRECTION, MY INTENTION WAS TO CLB TO 2700 FT AND FLY OVER MMU CLASS D WHILE STAYING OUTSIDE CLASS B TO THE E. UPON CONTACTING N90, AND GETTING A DISCRETE SQUAWK AT 2700 FT, I WAS ADVISED BY APCH THAT I WAS IN CLASS D AIRSPACE, AND GIVEN A CLB CLRNC TO 6500 FT. I TOLD CTLR THAT I THOUGHT I WAS AS PREVIOUSLY STATED, AND APOLOGIZED IF IN FACT I WASN'T.

Data retrieved from NASA's ASRS site as of July 2007 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.