jsp compilation fails at load time...

Hi,

We have just moved from jdk1.4.1 to jdk1.4.2. also with this we have jwsdp 1.6, webserver 6.1sp6

I am getting followong error. Please can anyone tell me what is wrong.

In older version the import of a servlet "import servelt1" is working but for the same statemenbt is gives the compiler error and says "." is needed. Mysaxparser and PVC are servlets.

error:

[04/Nov/2006:22:52:46] info (24140): CORE5073: Web server shutdown in progress

[04/Nov/2006:22:52:46] info (24888): CORE1116: Sun ONE Web Server 6.1SP6 B05/07/

2006 12:33

[04/Nov/2006:22:52:46] info (24889): CORE5076: Using [Java HotSpot(TM) Server VM

, Version 1.4.2_05] from [Sun Microsystems Inc.]

[04/Nov/2006:22:52:46] info (24889): WEB0100: Loading web module in virtual serv

er [https-NetScope-2007.1Int] at [/search]

[04/Nov/2006:22:52:49] info (24889): HTTP3072: [LS ls1] http://icorebld00:35101

ready to accept requests

[04/Nov/2006:22:52:49] info (24889): CORE3274: successful server startup

[04/Nov/2006:22:59:47] info (24889): CORE5073: Web server shutdown in progress

[04/Nov/2006:22:59:47] info (25383): CORE1116: Sun ONE Web Server 6.1SP6 B05/07/

2006 12:33

@

:$

import MySaxParser;

^

/usr/iplanet/servers6.1sp6/https-NetScope-2007.1Int/ClassCache/https-NetScope-20

07.1Int/default-webapp/_jsps/_StatsLite_jsp.java:7: '.' expected

import PVC;

^

2 errors

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)

at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.loadJSP(JspServl

et.java:778)

at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.access$000(JspSe

rvlet.java:636)

at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:413

)

at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:375)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)

at org.apache.catalina.core.StandardWrapperValve.invokeServletService(St

andardWrapperValve.java:771)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV

alve.java:322)

@

^

2 errors

[2245 byte] By [869851indian_511a] at [2007-11-26 12:18:55]
# 1

here is the correct error server log...

[12/Dec/2006:10:24:44] failure (15574): for host 135.16.148.40 trying to GET /StatsLite.jsp, service-j2ee reports: StandardWr

apperValve[jsp]: WEB2792: Servlet.service() for servlet jsp threw exception

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

/usr/iplanet/servers6.1sp6/https-NetScope-2007.1Int/ClassCache/https-NetScope-2007.1Int/default-webapp/_jsps/_StatsLite_jsp.j

ava:6: '.' expected

import MySaxParser;

^

/usr/iplanet/servers6.1sp6/https-NetScope-2007.1Int/ClassCache/https-NetScope-2007.1Int/default-webapp/_jsps/_StatsLite_jsp.j

ava:7: '.' expected

import PVC;

^

2 errors

869851indian_511a at 2007-7-7 14:59:16 > top of Java-index,Archived Forums,Socket Programming...
# 2
Put everything into packages. You can no longer import classes in the default package into other classes that are not in the default package.
282956stevejlukea at 2007-7-7 14:59:17 > top of Java-index,Archived Forums,Socket Programming...
# 3

Hi,

Sorry, I mistakenly said the MysaxParser and PVC are the servlets. No they are not servlet. They are independant Java classes, which are in servlets directory wwhich is the root directory wheren all servlets are. And the these classes are not in any package. They are imported as it is in jsp.

In jdk1.4.1 this is working. IN old environment we have server Web Server, Enterprise Edition 6.0 sp6 with vbroker 5.2/., jwsdp-1.2 + jaxb

New environment has jdk1.4.2 and server 6.1 with vbroker 6.5. jwsdp-1.6 + jaxb.

We do not have whole package bought from SUN, so the support says the forum is the best place to get answer.

We still have the import Class error also we have error when we add the jaxb.xjc.jar to the classpath. Any ideas?

869851indian_511a at 2007-7-7 14:59:17 > top of Java-index,Archived Forums,Socket Programming...
# 4

>And the these classes are not in any package. They are imported as it is in jsp.

Exactly. And there is your problem. These independant java classes need to be in packages.

So you need to refactor them into a package, recompile them, and change all the references to them to import correctly.

Either that or refactor your code to use something other than these classes.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4361575

345151evnafetsa at 2007-7-7 14:59:17 > top of Java-index,Archived Forums,Socket Programming...
# 5
Thank you very much!!it worked.Shri
869851indian_511a at 2007-7-7 14:59:17 > top of Java-index,Archived Forums,Socket Programming...