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.
Hi I am using schema2beans and I had a few errors like these one: When the beans writes to the file, the generated XML is wrong: it does not generates "<A />" or "<A></A>" it generates <A>"Many spaces" </A> Everything works if I use BaseBean instead of JavaBeans, but I cannot use BaseBean because of another bug I am currently using an ant script to build the beans, this is the target, and I have attached a sample schema (NB is I enabled the keepElementPositions switch I have got a IndexOutOfBoundException and I other schema it generates code that does not compile) <target name="bugTest" depends="clean-beans"> <schema2beans schema="test/unit/src/com/streamsim/geodatamodel/bugtest/testSchema.xsd" package="com.streamsim.geodatamodel.beans" rootDir="test/unit/src" docroot="root" validate="true" keepElementPositions="false" vetoable="false" dumptostring="true" generatexmlio="true" attributesasproperties="true" setdefaults="true" makedefaults="true" defaultsaccessable="true" checkuptodate="false" useinterfaces="false" removeunreferencednodes="true" logsuspicious="true" respectextension="true" throwerrors="true" standalone="true" extendbasebean="true" useruntime="true" outputtype="javabeans" generatepropertyevents="true" generateparentrefs="true" generatestoreevents="true" comments="true" /> </target>
Created attachment 60146 [details] Sample Schema
Doesn't affect the IDE itself, so adding the NO61 keyword.
I think I found a workaround for this http://schema2beans.netbeans.org/issues/show_bug.cgi?id=132822
Thanks for the patch! I will test it out. I confirmed the problem, another way to workaround this is to skip comment processing (i.e. comments=false) if you don't need that functionality.
Created attachment 60272 [details] patch
I attached an alternative patch that should fix this, I still need to do some further testing before integrating it to the code base; possibly some time next week if no problems are found. I'm also downgrading this to P2 as the issue has a somewhat limited impact. Your patch was useful, it lead me to the root cause of this, so thanks a lot for that and for reporting too.
I pushed the patch to the repository, changeset #77df9dba1765.
You broke compilation of websvc.jaxrpc: /space/src/nb/main/websvc.jaxrpc/src/org/netbeans/modules/websvc/jaxrpc/dev/dd/gen/wscreation/Bean.java:237: cannot find symbol symbol : method sizeComments() location: class org.netbeans.modules.websvc.jaxrpc.dev.dd.gen.wscreation.Bean if (sizeComments() > 0) ^ Are you fixing? If not I will roll back your change as it is breaking javadoc-nbms and the production build.
Rolled back, #8028e758074f.
update no67 keyword
*** Bug 132822 has been marked as a duplicate of this bug. ***
As this bug does not affect the NetBeans IDE and the Oracle NetBeans team is not planning to address it, I am closing this as WONTFIX. Anyone who would like to take this on and contribute the solution, please reopen and reassign to yourself.