On Sun, 3 Nov 2002, Peter Donald wrote:
> On Sat, 2 Nov 2002 09:01, Jenny Brown wrote:
> > I am working on setting up Cocoon and Avalon and Excalibur, but having
> > some trouble in my build process for Excalibur. Here is a snippet of
> > what I am getting:
> >
> > Compiling 71 source files to /home/jbrown/Excalibur-4.1/build/classes
> >
> > /home/jbrown/Excalibur-4.1/src/java/org/apache/avalon/excalibur/datasource/
> > Jdbc3Connection.java:243: cannot resolve symbol
> >
> > symbol : variable resultSetType
> > location: class org.apache.avalon.excalibur.datasource.Jdbc3Connection
> > resultSetType, resultSetConcurrency, resultSetHoldability
>
> Thats wierd. I can't explain it - if you add the finals in will it compile?
> What compiler are you using? Have you got any other JDKs installed on your
> machine?
java version "1.4.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)
I believe this is the Sun JDK. I am noting tho that I should upgrade it
to 1.4.1 now that it's out, instead of hanging onto this old beta.
There are no other JDKs on this machine.
Regarding final... here is the section of code (so I can comment
intelligently on it; and slightly reformatted to fit my email client):
1 public final Statement createStatement(int resulSetType,
2 int resultSetConcurrency, int resultSetHoldability)
3 throws SQLException {
4 final Statement temp = m_connection.createStatement(
5 resultSetType, resultSetConcurrency, resultSetHoldability
6 );
7 m_lastUsed = System.currentTimeMillis();
8 return temp;
9 }
It's complaining about the variables in line 5 being undeclared. I'm not
sure how to change this code to make it more satisfied with them, as I
haven't worked with final variables much. I assume that the error it's
giving me is a scoping issue with the special rules around final, but I
have no idea why I'd get it and nobody else would.
> > I'm also getting this error in several different places:
> >
> > /home/jbrown/Excalibur-4.1/src/java/org/apache/avalon/excalibur/logger/
> > Log4JLoggerManager.java:46: cannot resolve symbol
> >
> > symbol : constructor Log4JLoggerManager
> > (org.apache.log4j.spi.LoggerRepository)
> > location: class org.apache.avalon.excalibur.logger.Log4JLoggerManager
> > this( Category.getDefaultHierarchy() );
>
> I can't explain that. It definelty looks like a wierd configuration problem or
> something because I can't reproduce any of these problems.
>
> Do you have any idea what would be causing this?
This one looks like it might be related to Category being deprecated in
favor of Logger - except I still don't know why it would come up
undefined. I'd expect it to show deprecation warnings but still
compile. However, I did run into stuff related to Category vs Logger as
I was messing around with different versions trying to get anything to
compile properly.
For the most part I'm stumped with my current configuration. I wouldn't
be surprised to find that I'm getting bizarre classpath interactions; I
have a good number of Apache projects on this box already. However, I
was pretty careful to try compiling Excalibur 4.1 with only its own jar
files and my log4j in my classpath.... no other avalon anywhere. I
wasn't using avalon until I got excalibur, so I doubt it exists anywhere
else. I am using Velocity and Log4J, and recently added Ant
specifically for Cocoon and Excalibur builds.
Ideas? What should I investigate or try next? I'm pretty comfortable
with the sysadmin side of all this, although my main focus is as a
Java programmer.
Jenny Brown
--
To unsubscribe, e-mail: <mailto:avalon-users-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-users-help@;jakarta.apache.org>