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 196402 - ClassCastException: org.netbeans.modules.maven.jaxws.MavenProjectRestSupport cannot be cast to org.netbeans.modules.websvc.rest.projects.WebProjectRestSupport
Summary: ClassCastException: org.netbeans.modules.maven.jaxws.MavenProjectRestSupport ...
Status: RESOLVED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Denis Anisimov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-07 16:45 UTC by imadbougataya
Modified: 2011-04-26 04:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 158661


Attachments
stacktrace (894 bytes, text/plain)
2011-03-07 16:45 UTC, imadbougataya
Details

Note You need to log in before you can comment on or make changes to this bug.
Description imadbougataya 2011-03-07 16:45:12 UTC
Build: NetBeans IDE 6.9.1 (Build 201011082200)
VM: Java HotSpot(TM) Client VM, 19.0-b09, Java(TM) SE Runtime Environment, 1.6.0_23-b05
OS: Windows 7

User Comments:
GUEST: Added a Rest service from entity classes.

GUEST: I was attempting to use the NetBeans project wizard to create restful web services from JPA Entities. The project is a maven project.

My email address is cjsalamon@gmail.com in case you need to contact me.

imadbougataya: creating rest ws from entities

GUEST: generation a RESTful Web Service from entity class.
when clicked finish on the wizard error occured.

i repeated the process many times with the same results.

GUEST: When trying to create a restful web service from an entity class.

GUEST: Creating restful webservice from entities




Stacktrace: 
java.lang.ClassCastException: org.netbeans.modules.maven.jaxws.MavenProjectRestSupport cannot be cast to org.netbeans.modules.websvc.rest.projects.WebProjectRestSupport
   at org.netbeans.modules.websvc.rest.support.SpringHelper.getApplicationContextXml(SpringHelper.java:159)
   at org.netbeans.modules.websvc.rest.support.SpringHelper.configure(SpringHelper.java:110)
   at org.netbeans.modules.websvc.rest.codegen.SpringEntityResourcesGenerator.configurePersistence(SpringEntityResourcesGenerator.java:63)
   at org.netbeans.modules.websvc.rest.codegen.EntityResourcesGenerator.generate(EntityResourcesGenerator.java:280)
   at org.netbeans.modules.websvc.rest.wizard.EntityResourcesIterator$1.run(EntityResourcesIterator.java:100)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
Comment 1 imadbougataya 2011-03-07 16:45:17 UTC
Created attachment 106789 [details]
stacktrace
Comment 2 Denis Anisimov 2011-03-09 07:27:34 UTC
The bug really exists.

It is consequence of presence Spring framework in REST from DB/entities.
Comment 3 Denis Anisimov 2011-04-25 13:14:23 UTC
changeset:   192676:a4843531c58f
Comment 4 Quality Engineering 2011-04-26 04:56:17 UTC
Integrated into 'main-golden', will be available in build *201104260000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a4843531c58f
User: Denis Anisimov <ads@netbeans.org>
Log: Fix for BZ#196402 - ClassCastException: org.netbeans.modules.maven.jaxws.MavenProjectRestSupport cannot be cast to org.netbeans.modules.websvc.rest.projects.WebProjectRestSupport