
388 So.2d 9 (1980)
Lonnie Ruben EADY, Appellant,
v.
STATE of Florida, Appellee.
No. 79-1916.
District Court of Appeal of Florida, Second District.
July 30, 1980.
Jack O. Johnson, Public Defender, and P. Douglas Brinkmeyer, Asst. Public Defender, Bartow, for appellant.
Jim Smith, Atty. Gen., Tallahassee, and James S. Purdy, Asst. Atty. Gen., Tampa, for appellee.
PER CURIAM.
Appellant Lonnie Ruben Eady, a juvenile, was charged with armed robbery and attempted armed robbery, pursuant to Section 39.04(2)(e)4, Florida Statutes (1977), which permits the filing of an information against a child aged sixteen or seventeen at the time of the commission of the offense. Both informations alleged that he "did carry a weapon, to-wit [sic]: a knife." Appellant pled nolo contendere to both charges. The court sentenced him as an adult to forty-five years in prison on the armed robbery offense, retaining jurisdiction over one-third of the sentence, and five years in prison for the attempted armed robbery, to run concurrently.
Appellant contends that the trial court committed reversible error in not sentencing him pursuant to Section 39.111(6)(c)1-6, Florida Statutes (1979). He also contends that his sentence is excessive. We agree on both points.
Section 39.111(6) requires that a trial court, when imposing adult sanctions on a juvenile, make findings of fact and evaluate the juvenile based on the criteria in Section 39.111(6)(c). State v. Cain, 381 So.2d 1361 (Fla. 1980). In Cain, the court noted that because of the protection of Section 39.111(6)(c) the direct filing of an information does not constitute an abandonment of rehabilitative efforts on behalf of the juvenile.
Failure to comply with the safeguards of Section 39.111(6) is harmful error. Proctor v. State, 373 So.2d 450 (Fla. 2d DCA 1979). Appellant was not sentenced in conformance with that statute. Consequently, appellant's sentences are invalid.
Appellant's sentence for robbery with a weapon is, in any event, excessive. Robbery with a weapon is a felony of the first degree punishable by a term in prison not to exceed thirty years. §§ 812.13(2)(b) *10 and 775.082(3)(b), Fla. Stat. (1979). Appellant's sentence of forty-five years in prison exceeds this statutory maximum.
Accordingly, the judgment is AFFIRMED, but the sentences are REVERSED and the cause REMANDED with instructions to resentence appellant pursuant to Section 39.111(6).
SCHEB, C.J., and BOARDMAN and OTT, JJ., concur.
