Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / September 2005

Tip: Looking for answers? Try searching our database.

cannot resolve symbol error

Thread view: 
s_m_b - 21 Sep 2005 14:19 GMT
I'm running a web app via tomcat, that the original coder has managed to
build using 1.4, but added a bundle of extra jar files to enable JDBC
with rowset.
I've copied all the extra files into a folder under the classpath, which
has partly resolved various issues, but I'm now staring at :

org.apache.jasper.JasperException: Unable to compile class for JSP

Generated servlet error:
H:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina
\localhost\raid\org\apache\jsp\registration\newclient_jsp.java:7: cannot
resolve symbol
symbol  : class rowset
location: package sql
import javax.sql.rowset;
                ^
1 error

I know rowset is in rt.jar, as I can see it via winzip.

this is the classpath (in tomcat) I'm using (rt.jar is under \j2sdk1.4.2_
09\jre)
.;h:\Program Files\Apache Software Foundation\Tomcat 5.0\bin
\bootstrap.jar;H:\Program Files\Apache Software Foundation\Tomcat 5.0
\webapps\raid\WEB-INF\classes\raid;h:\Program Files\Apache Software
Foundation\Tomcat 5.0\common\lib;C:\Program Files\Java\j2sdk1.4.2_09\jre
\lib

the server classpath just points at the Microsoft jdbc jars

is there any significance in the import being all lowercase, and the
RowSet class file being #not# lowercase?
Tor Iver Wilhelmsen - 21 Sep 2005 16:41 GMT
> import javax.sql.rowset;

You want the package's contents, so use

import javax.sql.rowset.*;
s_m_b - 21 Sep 2005 21:01 GMT
>> import javax.sql.rowset;
>
> You want the package's contents, so use
>
> import javax.sql.rowset.*;

that it were so easy!

The class file(s) were written by someone else, and I have no access (as
far as I know) to the original source code.

The app works just fine on the test machine, so it must be a case of a
missing jar file, or a duff path?
Oliver Wong - 21 Sep 2005 21:38 GMT
>>> import javax.sql.rowset;
>>
[quoted text clipped - 9 lines]
> The app works just fine on the test machine, so it must be a case of a
> missing jar file, or a duff path?

The line:

<code>
import javax.sql.rowset;
</code>

should NOT work. It should cause a compile time error (specially, it should
give the error message: "Only a type can be imported. javax.sql.rowset
resolves to a package"). Either you are mistaken in thinking that the code
compiled on the test machine, or your test machine has code written by
someone very malicious and is trying to screw with your mind (i.e. if it
compiled, it implies that someone actually wrote a class called "rowset",
with a lowercase r, and put it in the package "javax.sql" which is owned by
Sun and shouldn't be touched).

   - Oliver
s_m_b - 22 Sep 2005 09:36 GMT
>>>> import javax.sql.rowset;
>>>
[quoted text clipped - 27 lines]
>
>     - Oliver

well, I'll take you word on that! I'm not a Java developer, just the guy
who's trying to get this app to work on the kit we've got.

The page that has the 'import' statement is a .jsp so I've edited and it
seems to be working now.

The only difference between the two servers is that the test one runs
1.4.2_05 + tomcat 5.0.18 and the live runs 1.4.2_09

anyway, thanks for the pointer!
Roedy Green - 22 Sep 2005 02:49 GMT
>The class file(s) were written by someone else, and I have no access (as
>far as I know) to the original source code.

You must have the JSP source code that gets compiled into Java.  That
error message is complaining about source code.  Further, it should
NEVER have worked.  Something does not add up.  Have you or anyone
else changed any import statements?

What has changed?

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Roedy Green - 21 Sep 2005 17:43 GMT
>import javax.sql.rowset;
>                 ^
>1 error
>
>I know rowset is in rt.jar, as I can see it via winzip.

you meant

import javax.sql.rowset.BaseRowSet;
or
import javax.sql.rowset.*;
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.