BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sudden problems in JBuilder2005/2006 but JBuilderX still ok.

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder IDE
View previous topic :: View next topic  
Author Message
John T. Dow
Guest





PostPosted: Tue Feb 07, 2006 1:03 am    Post subject: Sudden problems in JBuilder2005/2006 but JBuilderX still ok. Reply with quote



Recently I've downloaded JBuilder2006 Enterprise Trial and was happily
using it until suddenly I must have broken something because I started
getting a number of errors in the designer. Here are two typical messages.

"Problems encountered while processing the source code. Please check
for possible syntax errors or uninitialized fields and variables."

"Unable to load java.lang.reflect.Field[]. Please check that
java.lang.reflect.Field[] is compiled."

JBuilder gives no details as to what it didn't like, at least not in the
message itself.

JBuilderX has no problem. I downloaded JBuilder2005 Foundation and it
seems to act the same as 2006, though I'm not certain it's always identical.

Any idea what I might have changed? I may have changed some preferences
and then forgotten what I did as I worked on something other than
JBuilder for several days. When I went back, the problems appeared.

According to google I'm the only one experiencing this problem, or the
only one who can't figure it out. Either way, I need help.

Thanks

John
Back to top
Paul Nichols (TeamB)
Guest





PostPosted: Tue Feb 07, 2006 1:03 am    Post subject: Re: Sudden problems in JBuilder2005/2006 but JBuilderX still Reply with quote



Paul Furbacher [TeamB] wrote:

Quote:
John T. Dow wrote:
I have double checked the JDK. JBuilder is using its own JDK and I've
tried that JDK with the projects also.

In addition to the warnings, there had been a red bean problem which I
fixed. There was also a point during this episode when JBuilder2006
would abort with no error messages, but that has stopped.

The problem now is just getting a lot of warnings. They seem harmless.


stumped the compiler: it complained about StringBuilder.
Huh?!

After a bit of flailing, I decided to look in the .jpx
file. That's when I discovered a conflict in JDK settings:
for some reason, JBuilder 2005 wasn't setting or resetting a
particular property which held the JDK version number. I
suspect that is due to some kind of difference between the
two JBuilder versions, but I did not investigated further (I had
to get to work on the project).


I had problems with that one too John. Drove me nuts!!

I found the problem a little more GUI based than you did, but one of the
little gotchas, when moving from one JB version to another, is that the
Project Settings, (under the Project Properties Build/Java section) will
change without your consent.

JB 2006 will assume you want your imported projects in 1.5 dependency form
only. So the Language Features and Target VM settings will oftentimes
default to 1.5 only. Then you will get those great StringBuffer
dependencies for String concatenations (ie "This" +"This").

Of course there is no StringBuilder class in earlier JDKs and JB will
complain (if you are targeting an earlier JVM, like 1.4).

You may want to check these settings John. That may be were the problem
lies.
Back to top
Lori M Olson [TeamB]
Guest





PostPosted: Tue Feb 07, 2006 3:05 am    Post subject: Re: Sudden problems in JBuilder2005/2006 but JBuilderX still Reply with quote



John T. Dow wrote:
Quote:
Recently I've downloaded JBuilder2006 Enterprise Trial and was happily
using it until suddenly I must have broken something because I started
getting a number of errors in the designer. Here are two typical messages.

"Problems encountered while processing the source code. Please check
for possible syntax errors or uninitialized fields and variables."

"Unable to load java.lang.reflect.Field[]. Please check that
java.lang.reflect.Field[] is compiled."

JBuilder gives no details as to what it didn't like, at least not in the
message itself.

JBuilderX has no problem. I downloaded JBuilder2005 Foundation and it
seems to act the same as 2006, though I'm not certain it's always
identical.

Any idea what I might have changed? I may have changed some preferences
and then forgotten what I did as I worked on something other than
JBuilder for several days. When I went back, the problems appeared.

According to google I'm the only one experiencing this problem, or the
only one who can't figure it out. Either way, I need help.

Thanks

John


This is just a shot in the dark, but... Have you changed or updated the
JDK that is being used by JBuilder or your project?

--

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
Paul Nichols[TeamB]
Guest





PostPosted: Tue Feb 07, 2006 5:07 am    Post subject: Re: Sudden problems in JBuilder2005/2006 but JBuilderX still Reply with quote

Quote:
This is just a shot in the dark, but... Have you changed or updated the
JDK that is being used by JBuilder or your project?
Lori Olson [TeamB]

That would be my first guess as well.
Back to top
John T. Dow
Guest





PostPosted: Tue Feb 07, 2006 3:02 pm    Post subject: Re: Sudden problems in JBuilder2005/2006 but JBuilderX still Reply with quote

I have double checked the JDK. JBuilder is using its own JDK and I've
tried that JDK with the projects also.

In addition to the warnings, there had been a red bean problem which I
fixed. There was also a point during this episode when JBuilder2006
would abort with no error messages, but that has stopped.

The problem now is just getting a lot of warnings. They seem harmless.

I wondered if I created a problem by opening a JBuilderX project with
JBuilder2006, then again with X and again with 2006. Can one go back and
forth safely?

John

Paul Nichols[TeamB] wrote:
Quote:
This is just a shot in the dark, but... Have you changed or updated the
JDK that is being used by JBuilder or your project?
Lori Olson [TeamB]


That would be my first guess as well.


Back to top
Paul Furbacher [TeamB]
Guest





PostPosted: Tue Feb 07, 2006 4:03 pm    Post subject: Re: Sudden problems in JBuilder2005/2006 but JBuilderX still Reply with quote

John T. Dow wrote:
Quote:
I have double checked the JDK. JBuilder is using its own JDK and I've
tried that JDK with the projects also.

In addition to the warnings, there had been a red bean problem which I
fixed. There was also a point during this episode when JBuilder2006
would abort with no error messages, but that has stopped.

The problem now is just getting a lot of warnings. They seem harmless.

I wondered if I created a problem by opening a JBuilderX project with
JBuilder2006, then again with X and again with 2006. Can one go back and
forth safely?

Maybe not. Some things may have changed inside the .jpx file,
but as far as I know, they haven't been documented.

I ran into a situation the other day where I had to migrate
a project from a Windows box to this Powerbook. On the
former, the project was being worked in JBuilder 2006,
and I had set the JDK (for no good reason) to 5.0. When
I brought the project over to the Powerbook, which cannot
run JBuilder 2006, I opened it in JBuilder 2005. That set
the JDK for the project to 1.4.x.

That's when some pretty weird problems started. A simple
expression like this in existing code

log.info("ladida " + x + " more ladida.");

stumped the compiler: it complained about StringBuilder.
Huh?!

After a bit of flailing, I decided to look in the .jpx
file. That's when I discovered a conflict in JDK settings:
for some reason, JBuilder 2005 wasn't setting or resetting a
particular property which held the JDK version number. I
suspect that is due to some kind of difference between the
two JBuilder versions, but I did not investigated further (I had
to get to work on the project).

Once I straightened out that problem, changed one other reference
to JDK 1.5 in the .jpx file, and the *manually* deleted the
contents of the "classes" folder, did the project compile.

So, yes, going back and forth *might* cause weird problems.

One way to clear up the issue would be to create a new
project from existing source. Yes, you'd have to add
back the required libraries and maybe set some of the
Build > Resources settings to copy things like XML files
to the output dir, but that may be a small sacrifice.


--


Paul Furbacher (TeamB)

Save time, search the archives:
http://info.borland.com/newsgroups/ngsearch.html

Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html

Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
Back to top
John T. Dow
Guest





PostPosted: Tue Feb 07, 2006 11:03 pm    Post subject: Re: Sudden problems in JBuilder2005/2006 but JBuilderX still Reply with quote

To test whether there's a problem switching between X and 2006, I
removed the jpx (and other files at the project root) and recreated the
project. Same problem, many warnings. I compared the jpx files and found
nothing suspicious.

I'm wondering if I've had all these warnings all along and just didn't
notice. That's possible because some of the source files in some of my
projects do not produce warnings. I've looked at the source files that
generate warnings and don't see what might be doing it. Once I tried to
comment out sections of code to attempt to isolate the problem but had
no luck - perhaps I should try that again.

Question: why doesn't jbuilder give a line number when it complains that
there is a problem?

Paul Furbacher [TeamB] wrote:
Quote:
John T. Dow wrote:

I have double checked the JDK. JBuilder is using its own JDK and I've
tried that JDK with the projects also.

In addition to the warnings, there had been a red bean problem which I
fixed. There was also a point during this episode when JBuilder2006
would abort with no error messages, but that has stopped.

The problem now is just getting a lot of warnings. They seem harmless.

I wondered if I created a problem by opening a JBuilderX project with
JBuilder2006, then again with X and again with 2006. Can one go back
and forth safely?


Maybe not. Some things may have changed inside the .jpx file,
but as far as I know, they haven't been documented.

I ran into a situation the other day where I had to migrate
a project from a Windows box to this Powerbook. On the
former, the project was being worked in JBuilder 2006,
and I had set the JDK (for no good reason) to 5.0. When
I brought the project over to the Powerbook, which cannot
run JBuilder 2006, I opened it in JBuilder 2005. That set
the JDK for the project to 1.4.x.

That's when some pretty weird problems started. A simple
expression like this in existing code

log.info("ladida " + x + " more ladida.");

stumped the compiler: it complained about StringBuilder.
Huh?!

After a bit of flailing, I decided to look in the .jpx
file. That's when I discovered a conflict in JDK settings:
for some reason, JBuilder 2005 wasn't setting or resetting a
particular property which held the JDK version number. I
suspect that is due to some kind of difference between the
two JBuilder versions, but I did not investigated further (I had
to get to work on the project).

Once I straightened out that problem, changed one other reference
to JDK 1.5 in the .jpx file, and the *manually* deleted the
contents of the "classes" folder, did the project compile.

So, yes, going back and forth *might* cause weird problems.

One way to clear up the issue would be to create a new
project from existing source. Yes, you'd have to add
back the required libraries and maybe set some of the
Build > Resources settings to copy things like XML files
to the output dir, but that may be a small sacrifice.

Back to top
Lori M Olson [TeamB]
Guest





PostPosted: Tue Feb 07, 2006 11:03 pm    Post subject: Re: Sudden problems in JBuilder2005/2006 but JBuilderX still Reply with quote

John T. Dow wrote:
Quote:
To test whether there's a problem switching between X and 2006, I
removed the jpx (and other files at the project root) and recreated the
project. Same problem, many warnings. I compared the jpx files and found
nothing suspicious.

I'm wondering if I've had all these warnings all along and just didn't
notice. That's possible because some of the source files in some of my
projects do not produce warnings. I've looked at the source files that
generate warnings and don't see what might be doing it. Once I tried to
comment out sections of code to attempt to isolate the problem but had
no luck - perhaps I should try that again.


WAIT a minute. It's been so long since I did that switch that I forgot.
JBuilder has a WHOLE BUNCH of new warnings (new in 2005). Check your
project properties, Build -> Java section. And look at the extended
options.

Quote:
Question: why doesn't jbuilder give a line number when it complains that
there is a problem?


Example, please?

--

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
Paul Furbacher [TeamB]
Guest





PostPosted: Wed Feb 08, 2006 3:04 am    Post subject: Re: Sudden problems in JBuilder2005/2006 but JBuilderX still Reply with quote

John T. Dow wrote:
Quote:
To test whether there's a problem switching between X and 2006, I
removed the jpx (and other files at the project root) and recreated the
project. Same problem, many warnings. I compared the jpx files and found
nothing suspicious.

But, did you go that extra step and wipe the "classes" (compiled
output) directory clean? That's essential because if you don't
get rid of the dependency cache and already compiled classes, you
aren't starting from scratch.

Quote:
I'm wondering if I've had all these warnings all along and just didn't
notice. That's possible because some of the source files in some of my
projects do not produce warnings.

Wait ... warnings or errors? Earlier, you said "errors". Which
are you dealing with? If it's warnings, what exactly are they?

Quote:
I've looked at the source files that
generate warnings and don't see what might be doing it. Once I tried to
comment out sections of code to attempt to isolate the problem but had
no luck - perhaps I should try that again.

Question: why doesn't jbuilder give a line number when it complains that
there is a problem?

It frequently does. But you are apparently in a situation
where things are messed up, and because of version mis-matches
or something, it's getting suitably confused.


--


Paul Furbacher (TeamB)

Save time, search the archives:
http://info.borland.com/newsgroups/ngsearch.html

Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html

Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
Back to top
John T. Dow
Guest





PostPosted: Fri Feb 10, 2006 6:03 pm    Post subject: Re: Sudden problems in JBuilder2005/2006 but JBuilderX still Reply with quote

Quote:
But, did you go that extra step and wipe the "classes" (compiled
output) directory clean? That's essential because if you don't
get rid of the dependency cache and already compiled classes, you
aren't starting from scratch.

Yes I did.


Quote:
Wait ... warnings or errors? Earlier, you said "errors". Which
are you dealing with? If it's warnings, what exactly are they?

I had a red bean error but I figured that out, it was unrelated. I had
included a small sample of the warnings with my first message, but below
I include the full set.


However, I have located the single statement that causes the problem!!!!!

-----> dm = AppDataModule.getDataModule();

This is in one of some ten modules in the application. This module
defines a dialog. I have a data module and that single statement
generates all the warnings (included in full below).

I discovered this by commented out in stages virtually everything in
this particular source file. Having learned which statement it is, I
reverted to the full file, with everything intact. Even with all other
statements intact, commenting out that one statement makes the designer
happy.

In case there was something wrong with my data module, I zapped it and
recreated one with the wizard. (File, New, Datamodule). Same problem
even with a fresh, untweaked datamodule.

This is JBuilder2006 and the application's jdk is set to the one shipped
with JBuilder.

Below is the full list of warnings generated.

John


Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Unable to load java.lang.annotation.Annotation[]. Please check that
java.lang.annotation.Annotation[] is compiled.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Unable to load java.lang.Class[]. Please check that java.lang.Class[]
is compiled.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Unable to load java.lang.reflect.Constructor[]. Please check that
java.lang.reflect.Constructor[] is compiled.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Unable to load java.lang.reflect.Field[]. Please check that
java.lang.reflect.Field[] is compiled.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Unable to load java.lang.reflect.Method[]. Please check that
java.lang.reflect.Method[] is compiled.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Unable to load java.lang.Object[]. Please check that java.lang.Object[]
is compiled.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Unable to load java.lang.reflect.Type[]. Please check that
java.lang.reflect.Type[] is compiled.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Problems encountered while processing the source code. Please check for
possible syntax errors or uninitialized fields and variables.
Unable to load java.lang.reflect.TypeVariable[]. Please check that
java.lang.reflect.TypeVariable[] is compiled.
Back to top
John T. Dow
Guest





PostPosted: Thu Feb 16, 2006 7:03 am    Post subject: Re: Sudden problems in JBuilder2005/2006 but JBuilderX still Reply with quote

I found the problem. Previously I wrote

Quote:
However, I have located the single statement that causes the problem!!!!!

-----> dm = AppDataModule.getDataModule();

Not quite true. The offending statement was the declaration
"AppDataModule dm;"

JBuilderX was happy with this (followed by a later call to getDM() ) but
JBuilder2006 wants this: "AppDataModule dm = new AppDataModule();"

If you don't "new AppDataModule()" you get a bunch of warning statements
and when in the designer you can't see the query.

Now I'll have to rewrite the datamodule so that the constructor doesn't
connect to the database, as I don't want that to happen until getDM() is
called because I only want one instance of it.

This too me many hours to find. Why wasn't JBuilder more helpful when it
reported those warnings?

John
Back to top
Paul Furbacher [TeamB]
Guest





PostPosted: Thu Feb 16, 2006 4:03 pm    Post subject: Re: Sudden problems in JBuilder2005/2006 but JBuilderX still Reply with quote

John T. Dow wrote:
Quote:
I found the problem. [...] Not quite true. The offending
statement was the declaration

"AppDataModule dm;"

JBuilderX was happy with this (followed by a later call to getDM() ) but
JBuilder2006 wants this: "AppDataModule dm = new AppDataModule();"

If you don't "new AppDataModule()" you get a bunch of warning statements
and when in the designer you can't see the query.

[...]

This took me many hours to find. Why wasn't JBuilder more helpful when it
reported those warnings?

Can you file a request for enhancement at Quality Central on
this issue? Make suggestions on how the warning message may
be improved.

Here's a thought: perhaps the message could be enhanced by
providing a link to a place in a "Troubleshooting" section
of the Help system. That way, the message could be short,
but further help could easily be referenced.


--


Paul Furbacher (TeamB)

Save time, search the archives:
http://info.borland.com/newsgroups/ngsearch.html

Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html

Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder IDE All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.