| View previous topic :: View next topic |
| Author |
Message |
Murray Eisenberg Guest
|
Posted: Wed Aug 17, 2005 5:57 pm Post subject: Build Problem |
|
|
I'm having a compile problem which may be a configuration problem, an application design problem or a JB 2005 problem. The application was built using JBuilder 2 so it compiled and built just fine once upon a time.
The design of the application is that it has one large messy class in a separate package which contains a bunch of methods for extracting and modifying data in an SQL database. It has another package which contains business entity classes. The business entity classes need to use the SQL methods in the messy class, and the messy class needs to import class types defined in the business entity package. Many of these classes no longer compile with error messages compaining about not being able to find the referenced classes. I seem to have a catch-22 situation.
I have set up the 'required libraries' necessary to make these classes visible at build time. But apparently the definitions are not sufficiently available at compile time. Please help.
|
|
| Back to top |
|
 |
Kevin Dean [TeamB] Guest
|
Posted: Thu Aug 18, 2005 2:41 am Post subject: Re: Build Problem |
|
|
Murray Eisenberg wrote:
| Quote: |
I'm having a compile problem which may be a configuration problem, an
application design problem or a JB 2005 problem. The application was
built using JBuilder 2 so it compiled and built just fine once upon a
time.
The design of the application is that it has one large messy class in
a separate package which contains a bunch of methods for extracting
and modifying data in an SQL database. It has another package which
contains business entity classes. The business entity classes need
to use the SQL methods in the messy class, and the messy class needs
to import class types defined in the business entity package. Many
of these classes no longer compile with error messages compaining
about not being able to find the referenced classes. I seem to have
a catch-22 situation.
I have set up the 'required libraries' necessary to make these
classes visible at build time. But apparently the definitions are
not sufficiently available at compile time. Please help.
|
There's nothing inherently wrong with that kind of circular reference
(apart from it being a bad design). You can't compile one without the
other, so you should put all the classes into a single project, not
build them separately.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html
Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
|
|
| Back to top |
|
 |
Murray Eisenberg Guest
|
Posted: Mon Aug 22, 2005 5:51 pm Post subject: Re: Build Problem |
|
|
"Kevin Dean [TeamB]" <NkOdSePaAnM (AT) datadevelopment (DOT) com> wrote:
| Quote: | Murray Eisenberg wrote:
Kevin -- I have to agree. But all these source files are in the same project and I'm getting compile errors that I am having difficulty resolving. Can you help me resolve the problems?
I'm having a compile problem which may be a configuration problem, an
application design problem or a JB 2005 problem. The application was
built using JBuilder 2 so it compiled and built just fine once upon a
time.
The design of the application is that it has one large messy class in
a separate package which contains a bunch of methods for extracting
and modifying data in an SQL database. It has another package which
contains business entity classes. The business entity classes need
to use the SQL methods in the messy class, and the messy class needs
to import class types defined in the business entity package. Many
of these classes no longer compile with error messages compaining
about not being able to find the referenced classes. I seem to have
a catch-22 situation.
I have set up the 'required libraries' necessary to make these
classes visible at build time. But apparently the definitions are
not sufficiently available at compile time. Please help.
There's nothing inherently wrong with that kind of circular reference
(apart from it being a bad design). You can't compile one without the
other, so you should put all the classes into a single project, not
build them separately.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html
Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
|
|
|
| Back to top |
|
 |
Kevin Dean [TeamB] Guest
|
Posted: Tue Aug 23, 2005 12:57 am Post subject: Re: Build Problem |
|
|
Murray Eisenberg wrote:
| Quote: | Kevin -- I have to agree. But all these source files are in the
same project and I'm getting compile errors that I am having
difficulty resolving. Can you help me resolve the problems?
|
If you don't see any real intellectual property issues, can you upload
a zipped version of the project to the attachments group?
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html
Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
|
|
| Back to top |
|
 |
Murray Eisenberg Guest
|
Posted: Tue Aug 23, 2005 4:18 am Post subject: Re: Build Problem |
|
|
"Kevin Dean [TeamB]" <NkOdSePaAnM (AT) datadevelopment (DOT) com> wrote:
| Quote: | Murray Eisenberg wrote:
Kevin -- I have to agree. But all these source files are in the
same project and I'm getting compile errors that I am having
difficulty resolving. Can you help me resolve the problems?
If you don't see any real intellectual property issues, can you upload
a zipped version of the project to the attachments group?
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html
Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
|
|
|
| Back to top |
|
 |
Murray Eisenberg Guest
|
Posted: Tue Aug 23, 2005 4:50 am Post subject: Re: Build Problem |
|
|
"Kevin Dean [TeamB]" <NkOdSePaAnM (AT) datadevelopment (DOT) com> wrote:
| Quote: |
If you don't see any real intellectual property issues, can you upload
a zipped version of the project to the attachments group?
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
Kevin -- We have a client who might be sensitive about that approach. I was hoping to provide you access via pcAnywhere to my desktop so we could walk through this together, but now I think I've made progress on my own. |
One of the things I discovered is that JBuilder 2005 seems to enforce the Java recommendation (even on a Windows platform) that package names be all lower case. I'm not quite sure what was happening, but I developed the suspicion that some references made using uppercase characters where not finding their intended imports. We were using uppercase names and mixed case names so I changed them all. This got rid of a bunch of error cases that didn't seem to make any sense. However, it did not get me to a clean build.
I had four cases generating compile errors in which an entity object class passed an instance of itself to an SQL retrieve method in our messy glob class. The method in the glob was declared using the type of the calling class for a parameter. The compile error message said that the class type could not be found.
I don't really know why it mattered, but I noticed that in each case, the only way in which the class type reference was being used in the glob was for some code with comments which effectively said "make sure that the passed object had valid data in a property" before performing the SQL service. This seemed wrong headed to me, so I moved the "make sure code" into the entity object itself before the place where it called the messy glob. Then I changed the class type declaration on the retrieve method to the type of the parent class of the calling entity. This gave me a clean compile, but I don't understand why.
I looked and found other instances in the glob class where a retrieve method was passed a reference to the calling object creating the same sort of circular situation without generating compile errors and I don't understand what is different between the two cases. The only possible difference that I see is that in these cases, the retrieve method invokes actual methods in the entity object which are not present in the parent.
Have I given you enough information to enable you to explain what might be going on here?
|
|
| Back to top |
|
 |
Lori M Olson [TeamB] Guest
|
Posted: Tue Aug 23, 2005 2:38 pm Post subject: Re: Build Problem |
|
|
Murray Eisenberg wrote:
| Quote: | One of the things I discovered is that JBuilder 2005 seems to enforce
the Java recommendation (even on a Windows platform) that package
names be all lower case. I'm not quite sure what was happening, but
I developed the suspicion that some references made using uppercase
characters where not finding their intended imports. We were using
uppercase names and mixed case names so I changed them all. This got
rid of a bunch of error cases that didn't seem to make any sense.
However, it did not get me to a clean build.
|
Ok, there is your problem. And this is not a "JBuilder" issue. This is
a Java issue, which generally only appears on Windows.
NAMES of all kinds are CASE SENSITIVE in Java. File and directory names
on Windows are NOT case sensitive.
If you get careless, and start mixing these, Java can no longer find the
files, even though they appear to be in the proper place, when you go
looking with Windows Explorer.
The "safest" way of dealing with all this, is going to the command-line,
and working through all your directories and files, with "DIR" and
finding the java files or directories where case problems exist. Then,
for each problem file/directory, do this:
ren BADFILE.java foo
ren foo BadFile.java
ren BADDirectory foo
ren foo baddirectory
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
|
|
| Back to top |
|
 |
Murray Eisenberg Guest
|
Posted: Tue Aug 23, 2005 3:36 pm Post subject: Re: Build Problem |
|
|
Lori --
Each time I think I have this problem solved, it pops back up in another form. I think I have been getting the makes to
complete by making individual components by hand.
It would appear that when I do a project build it fails because
abstract classes are not getting built.
Do you have any ideas on this?
|
|
| Back to top |
|
 |
Murray Eisenberg Guest
|
Posted: Tue Aug 23, 2005 6:43 pm Post subject: Re: Build Problem |
|
|
Today, I have reduced the problem to three leaf classes and one abstract class which do not create a class file when I do a project rebuild. Of the three leaf classes only one of them uses the abstract class which does not create a class file. The only errors listed are outside references to the classes which do not compile. There is no obvious reason why these four classes do not create class files.
|
|
| Back to top |
|
 |
Lori M Olson [TeamB] Guest
|
Posted: Tue Aug 23, 2005 6:56 pm Post subject: Re: Build Problem |
|
|
Murray Eisenberg wrote:
| Quote: | Today, I have reduced the problem to three leaf classes and one
abstract class which do not create a class file when I do a project
rebuild. Of the three leaf classes only one of them uses the
abstract class which does not create a class file. The only errors
listed are outside references to the classes which do not compile.
There is no obvious reason why these four classes do not create class
files.
|
Can you individually compile these files? (Bring one of them up in the
IDE and hit Ctrl-F9 to compile)
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
|
|
| Back to top |
|
 |
Murray Eisenberg Guest
|
Posted: Wed Aug 24, 2005 5:43 pm Post subject: Re: Build Problem |
|
|
Am I ever going to actually get any help here?
Is there any way that I can provide you with my source tree
without it becoming part of the public record?
|
|
| Back to top |
|
 |
Kevin Dean [TeamB] Guest
|
Posted: Wed Aug 24, 2005 8:56 pm Post subject: Re: Build Problem |
|
|
Murray Eisenberg wrote:
| Quote: | Am I ever going to actually get any help here?
|
We're doing our best. This is a public forum and TeamB members are not
Borland employees; we're strickly volunteers and do this when our real
jobs (and sometimes our spouses ) permit.
| Quote: | Is there any way that I can provide you with my source tree
without it becoming part of the public record?
|
I would double-check Lori's recommendation; mixed case package and
class names are a problem only when:
a) the case of the directory doesn't match the case of the package
(e.g. Com/MyDomain for package com.mydomain) and
b) the case of the source file doesn't match the case of the class
(e.g. MYCLASS.java for class MyClass).
Delete the class output directory and the backup directory, make 100%
certain that the packages and classes are in sync with the directories
and file names, and recompile.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html
Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
|
|
| Back to top |
|
 |
Murray Eisenberg Guest
|
Posted: Tue Aug 30, 2005 3:08 am Post subject: Re: Build Problem |
|
|
Kevin --
I have a source tree which does not build. There are four
classes which are not constructed during the build process
without any errors being identified. A fifth class does not
build because it cannot find class data types in the four class
which are not present. This error is repeatable using Make or
Borland 8 make.
Of the 4 classes which do not build, 3 are leaf classes and one
is an abstact class extended by one of the other 3 which does
not build. If I try to individually make the two leaf classes
which are not dependent on the missing abstract class, they do
compile individually. The other leaf class fails because the
abstract class does not exit. I can make the abstract class
and it creates an class file, but if I then try to make the
leaf class that uses it, it disappears and I get an error
making the leaf class which comlains that the abstract class
does not exist.
I set parameters on the project properties for BUILD|JAVA to
flag all case fallthroughs and it is not finding any.
I think I have a JBuilder 2005 compile/make bug and I'd like to
figure out how to determine why these compiles are failing
without generating any errors.
|
|
| Back to top |
|
 |
Kevin Dean [TeamB] Guest
|
Posted: Tue Aug 30, 2005 12:21 pm Post subject: Re: Build Problem |
|
|
Murray Eisenberg wrote:
| Quote: | I have a source tree which does not build. There are four
classes which are not constructed during the build process
without any errors being identified. A fifth class does not
build because it cannot find class data types in the four class
which are not present. This error is repeatable using Make or
Borland 8 make.
Of the 4 classes which do not build, 3 are leaf classes and one
is an abstact class extended by one of the other 3 which does
not build. If I try to individually make the two leaf classes
which are not dependent on the missing abstract class, they do
compile individually. The other leaf class fails because the
abstract class does not exit. I can make the abstract class
and it creates an class file, but if I then try to make the
leaf class that uses it, it disappears and I get an error
making the leaf class which comlains that the abstract class
does not exist.
I set parameters on the project properties for BUILD|JAVA to
flag all case fallthroughs and it is not finding any.
I think I have a JBuilder 2005 compile/make bug and I'd like to
figure out how to determine why these compiles are failing
without generating any errors.
|
If you're willing to send me a ZIP file of the project directly, I'll
take a look. Take the NOSPAM woven into my e-mail address out before
sending.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html
Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
|
|
| Back to top |
|
 |
Murray Eisenberg Guest
|
Posted: Tue Aug 30, 2005 5:16 pm Post subject: Re: Build Problem |
|
|
Note to all:
I sent Kevin a copy of my source tree and within minutes he
pointed out that the files which were not compiling were
named .Java not .java. I am chagrined and thankful.
|
|
| Back to top |
|
 |
|