Strange building error

View: New views
1 Messages — Rating Filter:   Alert me  

Strange building error

by Grady :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Using NB6.1, I have two projects A and B.

I set project A as an web application which contains web services and a pachage com.example.my containing several java files. I set project B as a swing client that consumes web services provided by project A.

I copy a java file in the package com.example.my from project A and paste it to project B because the swing client needs it as a return type when consuming web services. But here is the strange thing, Netbeans "eats" my codes while compiling my project B.

Originally, the copied java file has 20 methods, but after building project B, the copied file only has 15 methods left. So the complier complains "can not find symbol" error because the methods that the swing client refers to have been disappered. From the members view in Netbeans, I can only see 15 methods of the copied file after building, although the building process has failed.

I deleted the copied java file in project B (also deleted the package), and re-copy it from project A. Although the java file has 20 methods this time, the same error is still thrown by the compiler while building project B.

It works well when running the swing client in Netbeans, but it throws error messages while I try
to build the project B.


Compiling 11 source files to E:\WineClient\build\classes
Compiling 3 source files to E:\WineClient\build\classes
E:\WineClient\src\WineRecognizer.java:313: cannot find symbol
symbol  : method setGrapeList(java.lang.String)
location: class com.example.my.WineData
                wineData.setGrapeList(this.grapeLM.get(i).toString());
E:\WineClient\src\WineRecognizer.java:316: cannot find symbol
symbol  : method setRegionList(java.lang.String)
location: class com.example.my.WineData
                wineData.setRegionList(this.regionLM.get(i).toString());
E:\WineClient\src\WineRecognizer.java:319: cannot find symbol
symbol  : method setProducerList(java.lang.String)
location: class com.example.my.WineData
                wineData.setProducerList(this.producerLM.get(i).toString());
E:\WineClient\src\WineRecognizer.java:322: cannot find symbol
symbol  : method setYearList(java.lang.String)
location: class com.example.my.WineData
                wineData.setYearList(this.yearLM.get(i).toString());
E:\WineClient\src\WineRecognizer.java:325: cannot find symbol
symbol  : method setPriceList(java.lang.String)
location: class com.example.my.WineData
                wineData.setPriceList(this.priceLM.get(i).toString());
5 errors
BUILD FAILED (total time: 3 seconds)