Class vs. interface casting
This is a long read. But since I wrote test code and think its a ligit question:
After compiling, if I move a *.class file to a different directory, casting with a class (but not an interface) fails. Please look at my test code to understand what I am trying to say:
public class Main {
public static void main(String[] args) {
try {
MyClassLoader mcL = new MyClassLoader();
Class classA = mcL.loadClass("whatever");
I inst = (I) classA.newInstance(); // <-- good
// ClassA inst = (ClassA) classA.newInstance(); <-- bad
inst.foo();
} catch(Exception e) { e.printStackTrace() ; }
public static class MyClassLoader extends ClassLoader {
protected Class<?> findClass(String s) throws ClassNotFoundException, ClassFormatError {
try {
InputStream in = new FileInputStream(new File("/etc/ClassA.class"));
int i = in.available();
byte[] buf = new byte;
in.read(buf, 0, buf.length);
return defineClass(buf, 0, buf.length);
} catch(Exception e) {e.printStackTrace(); }
return null;
public class ClassA implements I {
public void foo() { println("ClassA::foo-->ok"); }
public interface I { public void foo(); }
C:\dev\dir *java
Main.java
ClassA.java
I.java
C:\dev\javac *java
C:\dev\move ClassA.class \etc
C:\dev\java Main
using interface cast = no problem
using a class to cast = _fail_
Exception in thread "main" java.lang.NoClassDefFoundError: ClassA
at Main.main(Main.java:18)
Caused by: java.lang.ClassNotFoundException: ClassA
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 1 more
I will only cast with interfaces, but wondering what is going on with why casting with a class fails.
_note_: to test that casting with classes works at all I wrote this code snippet:
Class c = Thread.class;
Class[] noArg = new Class[0];
Constructor constr = c.getConstructor(noArg);
Thread t = (Thread) constr.newInstance(new Object[0]);
println("-->" + t.getId());
I hope this proves casting with classes is possible.So sometimes casting with a class is ok, sometimes not. I wonder why.
thanks.
ejp wrote:
After compiling, if I move a *.class file to a different directoryYou can't do that. The .class file has to be in whatever directory is indicated by its package statement. Two classes with the same name in different packages are different, and a .class file in the wrong directory will cause NoClassDefFoundErrors.can i ask a follow-up?
To be painfully clear, when I hit this line:
ClassA inst = (ClassA) classA.newInstance();The type-checking tripped me up. I had a valid "ClassA" object. Object creation had been internalized to my class loader. However, when the jvm did a type-check, it needed to load the ClassA.class file, and it had been removed. So, my casting with a class failed only because of type-checking?
Similar Messages
-
Read in a book saying that an interface object cannot be cast to a final class object. See the following:
final class Apple { }
interface Squeezable{ }
class Citrus implements Squeezable{ }In this case then:
Squeezable sq = new Citrus();
Apple apple = (Apple)sq; // compile errorOf course there are two fixes for the compile error.
(1) Make Apple implement Squeezable (this is easy to understand).
(2) Make Apple a non-final class (although there will be a runtime exception).
Can anybody tell me why it won't compile when Apple is a final class? What's going on behind the scene with the compiler here? Thanks!senore100 wrote:
Thanks for all your reply. Well, actually the compiler should know that the actual object is a Citrus. No, it shouldn't. It doesn't become a Citrus obejct until runtime. The compiler only looks at the reference type on the left side of the =, not what's happening on the right side.
What if instead of new, it was Squeezeable sq = squeezableFactory.createSqueezeable(); It could return any class that implements Squeezeable.
Now, you could try to argue that it should at least do it for new, when it knows what the class will be. But there's really no point for that, and it would just complicate the language by adding special cases. -
Can we type cast class into interface?
Hello all,
Can we type cast class into interface?
If it can ,pls explain me in which suituation can we do?You don't need to explicitly typecast a class to an interface, if the class is implementing the interface.
Example: List list = new ArrayList(); // Cast not required.And search on Google first. I'm sure this question would be answered by the lamest of tutorials. -
How to fix 'class' or 'interface' expected for jsp
below is the stack trace
org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error:
/home/sherali/.netbeans/5.5/apache-tomcat-5.5.17_base/work/Catalina/localhost/UVSDataSearch/org/apache/jsp/pager_002ddemo_jsp.java:7: 'class' or 'interface' expected
import java.util.*;
^
Generated servlet error:
/home/sherali/.netbeans/5.5/apache-tomcat-5.5.17_base/work/Catalina/localhost/UVSDataSearch/org/apache/jsp/pager_002ddemo_jsp.java:8: 'class' or 'interface' expected
import java.io.*;
^
2 errors
thanks a lot in advance.
my jsp is
<%@ page session="false" %>
<%@ page import="tauvex.*;" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<html>
<head>
<title>Tauvex Search Results</title>
<%
* Pager Tag Library
* Copyright (C) 2002 James Klicman <[email protected]>
* The latest release of this tag library can be found at
* http://jsptags.com/tags/navigation/pager/
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
%>
<style type="text/css">
A.nodec { text-decoration: none; }
</style>
</head>
<body bgcolor="#ffffff">
<%
String style = getParam(request, "style", "simple");
String position = getParam(request, "position", "top");
String index = getParam(request, "index", "center");
int maxPageItems = getParam(request, "maxPageItems", 3);
int maxIndexPages = getParam(request, "maxIndexPages", 3);
%>
<%
String query1=(String)request.getAttribute("query1");
String query=(String)request.getAttribute("query");
String ShowFile=(String)request.getAttribute("ShowFile");
String ShowRA=(String)request.getAttribute("ShowRA");
String ShowDEC=(String)request.getAttribute("ShowDEC");
String Telescope=(String)request.getAttribute("Telescope");
String ObservationDates=(String)request.getAttribute("ObservationDates");
String Filter=(String)request.getAttribute("Filter");
String RA=(String)request.getAttribute("RA");
String DEC=(String)request.getAttribute("DEC");
String DATE=(String)request.getAttribute("DATE");
String DATE1=(String)request.getAttribute("DATE1");
String Radious=(String)request.getAttribute("Radious");
String FILTER[]=(String[])request.getAttribute("FILTER");
String OrderBy1=(String)request.getAttribute("OrderBy1");
String OrderBy2=(String)request.getAttribute("OrderBy2");
String OrderBy3=(String)request.getAttribute("OrderBy3");
%>
<%
out.println("<form action=\"PlainSQLQuery\" method=POST>");
out.println("<textarea rows = 5 cols = 40 name=query id=\"query\">");
out.println(query);
out.println("</textarea>");
out.println("<input type = submit value = \"Submit\">");
out.println("<input type = reset value = \"Reset\">");
out.println("</form>");
%>
<center>
<table border="0" width="90%" cellpadding="4">
<tr>
<td colspan="2" align="left" valign="top">
<table border="0" cellspacing="2" cellpadding="0">
<tr><td>Max. Page Items </td>
<td><input type="text" size="4" name="maxPageItems" value="<%= maxPageItems %>" onChange="this.form.submit();"></td></tr>
<tr><td>Max. Index Pages </td>
<td><input type="text" size="4" name="maxIndexPages" value="<%= maxIndexPages %>" onChange="this.form.submit();"></td></tr>
</table>
</td>
</tr>
</table>
<pg:pager
index="<%= index %>"
maxPageItems="<%= maxPageItems %>"
maxIndexPages="<%= maxIndexPages %>"
url="TauvexDataServlet"
export="offset,currentPageNumber=pageNumber"
scope="request">
<%-- keep track of preference --%>
<pg:param name="style"/>
<pg:param name="position"/>
<pg:param name="index"/>
<pg:param name="maxPageItems"/>
<pg:param name="maxIndexPages"/>
<pg:param name="RA"/>
<pg:param name="DEC"/>
<pg:param name="DATE"/>
<pg:param name="DATE1"/>
<pg:param name="Radious"/>
<pg:param name="FILTER"/>
<pg:param name="ShowRA"/>
<pg:param name="ShowDEC"/>
<pg:param name="Telescope"/>
<pg:param name="ObservationDates"/>
<pg:param name="Filter"/>
<pg:param name="OrderBy1"/>
<pg:param name="OrderBy2"/>
<pg:param name="OrderBy3"/>
<%-- save pager offset during form changes --%>
<input type="hidden" name="pager.offset" value="<%= offset %>">
<%-- warn if offset is not a multiple of maxPageItems --%>
<% if (offset.intValue() % maxPageItems != 0 &&
("alltheweb".equals(style) || "lycos".equals(style)) )
%>
<p>Warning: The current page offset is not a multiple of Max. Page Items.
<br>Please
<pg:first><a href="<%= pageUrl %>">return to the first page</a></pg:first>
if any displayed range numbers appear incorrect.</p>
<% } %>
<%-- the pg:pager items attribute must be set to the total number of
items for index before items to work properly --%>
<% if ("top".equals(position) || "both".equals(position)) { %>
<br>
<pg:index>
<% if ("texticon".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/texticon.jsp" flush="true"/>
<% } else if ("jsptags".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/jsptags.jsp" flush="true"/>
<% } else if ("google".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/google.jsp" flush="true"/>
<% } else if ("altavista".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/altavista.jsp" flush="true"/>
<% } else if ("lycos".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/lycos.jsp" flush="true"/>
<% } else if ("yahoo".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/yahoo.jsp" flush="true"/>
<% } else if ("alltheweb".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/alltheweb.jsp" flush="true"/>
<% } else { %>
<jsp:include page="/WEB-INF/jsp/simple.jsp" flush="true"/>
<% } %>
</pg:index>
<% } %>
<hr>
<form action="ZipServlet" method="get" name="download" onsubmit="return Form1_Validator(this)">
<table id="output">
<CAPTION><EM>Fits file Search Results</EM></CAPTION><tr>
<%
out.println("<th>Check Box</th>");
out.println("<th>File Name</th>");
if(ShowRA != null && "on".equals(ShowRA))
out.println("<th>RA_START</th>");
if(ShowRA != null && "on".equals(ShowRA))
out.println("<th>RA_END</th>");
if(ShowDEC != null && "on".equals(ShowDEC))
out.println("<th>DEC_START</th>");
if(ShowDEC != null && "on".equals(ShowDEC))
out.println("<th>DEC_END</th>");
if(Telescope!=null && "on".equals(Telescope))
out.println("<th>Telescope</th>");
if(ObservationDates !=null && "on".equals(ObservationDates))
out.println("<th>STARTOBS</th>");
if(ObservationDates !=null && "on".equals(ObservationDates))
out.println("<th>ENDOBS</th>");
if(Filter!=null && "on".equals(Filter))
out.println("<th>FILTER</th>");
out.println("</tr>");
%>
<%--
<table width="90%" cellspacing="4" cellpadding="4">
Since the data source is static, it's easy to offset and limit the
loop for efficiency. If the data set size is not known or cannot
be easily offset, the pager tag library can count the items and display
the correct subset for you.
The following is an example using an enumeration data source of
unknown size. The pg:pager items and isOffset attributes must
not be set for this example:
--%>
<%
Enumeration myDataList1 = (Enumeration)request.getAttribute("myDataList1");
if (myDataList1 == null)
throw new RuntimeException("myDataList1 is null");
%>
<% while (myDataList1.hasMoreElements()) { %>
<% TauvexData elem = (TauvexData)myDataList1.nextElement(); %>
<pg:item> <%
out.println("<tr>");
%>
<td><input type= "checkbox" name="cb" value="<%=elem.getDownload()%>"></td>
<td><a href="<%= elem.getDownload() %>"><%= elem.Fitsfilename %></a></td>
<%
// out.println("<td> "+elem.Fitsfilename+" </td>");
if(ShowRA != null && "on".equals(ShowRA))
out.println("<td> "+elem.RA_START+" </td>");
if(ShowRA != null && "on".equals(ShowRA))
out.println("<td> "+elem.RA_END+"</td>");
if(ShowDEC != null && "on".equals(ShowDEC))
out.println("<td> "+elem.DEC_START+" </td>");
if(ShowDEC != null && "on".equals(ShowDEC))
out.println("<td> "+elem.DEC_END+" </td>");
if(Telescope!=null && "on".equals(Telescope))
out.println("<td> "+elem.telescope+" </td>");
if(ObservationDates !=null && "on".equals(ObservationDates))
out.println("<td> "+elem.STARTOBS+" </td>");
if(ObservationDates !=null && "on".equals(ObservationDates))
out.println(" <td> "+elem.ENDOBS+" </td>");
if(Filter!=null && "on".equals(Filter))
out.println("<td> "+elem.FILTER+" </td>");
out.println("</tr>");
%> </pg:item>
<% } %>
</table>
<input type="button" name="CheckAll" value="Check All Boxes" onclick="modify_boxes(true,3)">
<input type="button" name="UnCheckAll" value="UnCheck All Boxes" onclick="modify_boxes(false,3)">
<input type="submit" value="Download">
</form>
<hr>
<pg:pages>
<a href="<%= pageUrl %>"><%= pageNumber %></a>
</pg:pages>
<pg:last>
<a href="<%= pageUrl %>">[ Last >| (<%= pageNumber %>) ]</a>
</pg:last>
<% if ("bottom".equals(position) || "both".equals(position)) { %>
<pg:index>
<% if ("texticon".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/texticon.jsp" flush="true"/>
<% } else if ("jsptags".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/jsptags.jsp" flush="true"/>
<% } else if ("google".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/google.jsp" flush="true"/>
<% } else if ("altavista".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/altavista.jsp" flush="true"/>
<% } else if ("lycos".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/lycos.jsp" flush="true"/>
<% } else if ("yahoo".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/yahoo.jsp" flush="true"/>
<% } else if ("alltheweb".equals(style)) { %>
<jsp:include page="/WEB-INF/jsp/alltheweb.jsp" flush="true"/>
<% } else { %>
<jsp:include page="/WEB-INF/jsp/simple.jsp" flush="true"/>
<% } %>
</pg:index>
<% } %>
</pg:pager>
</center>
</body>
</html>
<%!
private static int num =1;
private static String getName(){
String str="cb";
str=str+num;
num++;
return str ;
private static final String getParam(ServletRequest request, String name,
String defval)
String param = request.getParameter(name);
return (param != null ? param : defval);
private static final int getParam(ServletRequest request, String name,
int defval)
String param = request.getParameter(name);
int value = defval;
if (param != null) {
try { value = Integer.parseInt(param); }
catch (NumberFormatException ignore) { }
return value;
private static void radio(PageContext pc, String name, String value,
boolean isDefault) throws java.io.IOException
JspWriter out = pc.getOut();
String param = pc.getRequest().getParameter(name);
out.write("<input type=\"radio\" name=\"");
out.write(name);
out.write("\" value=\"");
out.write(value);
out.write("\" onChange=\"this.form.submit();\"");
if (value.equals(param) || (isDefault && param == null))
out.write(" checked");
out.write('>');
%>Well, putting all that Java code into a JSP was a bad idea in the first place, just on general design principles. But you've done it in such a way that the result of compiling the JSP is malformed Java code. Frankly I would just throw it away and put the Java code into a servlet or some other Java class, where it belongs.
But if you're really working in a place where nobody has learned anything since 2003, and you're forced to support that old junk, then I would point out that the error occurs before the place which generates this line:
import java.util.*;You only need to look at two of the thousand lines of code you posted. -
'class' or 'interface' expected_Error while activating mapping
Hi All,
I am getting this error while activating a mapping that has UDF's.
The UDF is a very simple one and there is nothing wrong with the arguments, syntax or anything in the UDF. But it simply won't activate.
<b>usr/sap/XD1/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Map61cac6300a2c11dc88597a0eca04c2f3/source/com/sap/xi/tf/_MM_EMATRIXtoSAP_MaterialMaster_.java:843: 'class' or 'interface' expected public String simplemap$(String firstarg,String secondarg,Container container){ ^
/usr/sap/XD1/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Map61cac6300a2c11dc88597a0eca04c2f3/source/com/sap/xi/tf/_MM_EMATRIXtoSAP_MaterialMaster_.java:879: 'class' or 'interface' expected } ^
/usr/sap/XD1/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Map61cac6300a2c11dc88597a0eca04c2f3/source/com/sap/xi/tf/_MM_EMATRIXtoSAP_MaterialMaster_.java:880: 'class' or 'interface' expected ^</b>
Any ideas?
Thank you,
Regards,
Balaji.Hi Balaji,
Even I got the same problem when i tried to create UDF and I was unable to rectify the error .However It got solved when used the following piece of Code of
SAP XI Lookup API: the Killer
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
just copy paste the RFC look up code in ur UDF,modify the import export parameter and get it executed.
Regards
Ashwin M
Reward if helpful -
Compilation Error: "class or interface expected" for simple EAR???
Dear all,
I have access to the customers NW CE 7.1 SP07 and of course I am using the corresponding NWDS 7.1 SP07 that comes with this CE installation. I am trying to study JEE 5 @ SAP and I have created a very simple Application (from the Book http://www.sap-press.de/katalog/buecher/titel/gp/titelID-1480).
In NWDS I have created the following 4 projects:
1. Dictionary Project
Describes 2 Tables (TMP_EMPLOYEES and TMP_ID_GEN)
2. EJB 5 Project
Contains a stateless EJB + local business interface + Entity class.
The EJB accesses the entity class, which is mapped to a simple table (TMP_EMPLOYEES).
3. Dynamic Web Project
Contains actually only one JSP (index.jsp) which allows to the local business interface for creating a new Entity.
4. Enterprise Application Project (EAR)
Creates a package from 2. and 3.
I have successfully deployed both the Dictionary Project and the EAR (all to the same server).
But If I call the corresponding URL via web browser I get the following error:
500 Internal Server Error
"Error in compiling [/EmployeeWeb/index.jsp] in application [sap.com/EmployeeEar]."
Details: "The WebApplicationException log ID is [005056841108002A00000070000007AC0139C8D8862D3EED]."
In the "Log Viewer" of the "SAP NetWeaver Administrator" (via browser...) I have found the following:
Message: Processing HTTP request to servlet [jsp] finished with error.
The error is: com.sap.engine.services.servlets_jsp.server.jsp.exceptions.CompilingException: Error in executing the compilation process: [ Compilation Failed! Exit Code=1
Command line executed: D:\usr\sap\CED\J00\exe\sapjvm_5\bin\\javac -source 1.5 -target 1.5 -encoding UTF-8 -d "D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work" -sourcepath "D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work\;" -classpath ".;D:\usr\sap\CED\J00\exe\jstartup.jar;D:\usr\sap\CED\J00\exe\sapjvm_5\lib\jvmx.jar;D:\usr\sap\CED\J00\exe\jre\lib\iqlib.jar;D:\usr\sap\CED\J00\exe\sapjvm_5\lib\tools.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\boot\sap.com~tc~bl~jkernel_boot~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\boot\jaas.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~bytecode~library.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\boot\memoryanalyzer.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\jperflib.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\jta.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~bytecode~library.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~cache_api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~frame~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~gui~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~iqlib~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jdsr~jdsr.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_cache~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_classload~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_cluster~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_configuration~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_database~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_licensing~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_locking~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_log~api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_pool~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_service~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_thread~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_util~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~opensqlkernel~implOpenSQLFrame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~exception~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~je~sessionmgmt~api_assembly.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~logging~java~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~logging~java~implPerf.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\vmc_storage_provider.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\timeout\sap.com~tc~je~timeout~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\servlet\servlet.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\cross_api\sap.com~tc~je~cross_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~antlr~runtime.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~bl~config~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~bl~cpt~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~bl~jarm~jarm.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~bl~opensqlkernel~implOpenSQL.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~bl~opensqlkernel~implOpenSQLPort.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~dd~db~dictionarydatabase~implDictionaryDatabase.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~je~bootstrap_core_lib~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~sec~secstorefs~java~core.jar;D:\usr\sap\CED\J00\exe\mssjdbc\sqljdbc.jar;D:\usr\sap\CED\SYS\global\security\lib\engine\iaik_jce.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\log\sap.com~tc~je~log_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\mail.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\sap.com~tc~je~javamail_lib~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\activation.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\iaik_jsse.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\iaik_smime.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\iaik_ssl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\w3c_http.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.security.api.sda\sap.com~tc~sec~ume~api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.security.api.sda\sap.com~tc~sec~ume~perm~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\security_api\sap.com~tc~je~security_api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\shell\sap.com~tc~je~shell_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\cross\sap.com~tc~je~cross~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\visual_administration\sap.com~tc~bl~visual_administration~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\shell\sap.com~tc~je~shell~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\p4\sap.com~tc~je~p4~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sapxmltoolkit\sap.com~tc~sapxmltoolkit~sapxmltoolkit.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jts\jts.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~jmx\sap.com~tc~bl~pj_jmx~Impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~mmodel~lib\sap.com~tc~je~mmodel~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\appcontext_api\sap.com~tc~je~appcontext_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\naming\sap.com~tc~je~naming~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\j2eeca\connector.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\idl\idl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\resourceset_api\sap.com~tc~bl~resourceset~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\resourcecontext_api\sap.com~tc~bl~resourcecontext~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~txmanager~plb\sap.com~tc~bl~txmanagerimpl~plb~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\transactionext_api\sap.com~tc~bl~transactionext~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\ts\sap.com~tc~je~ts~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\csiv2_api\sap.com~tc~bl~csiv2~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\iiop\sap.com~tc~je~iiop~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\file\sap.com~tc~je~file~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.tc.Logging\sap.com~tc~logging~standard~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~bcanalysis\sap.com~tc~je~bcanalysis~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~reference_graph\lib\tc~bl~reference_graph_api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\container_api\sap.com~tc~je~container_api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\webservices\sap.com~tc~je~webservices_api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.util.monitor.jarm\sap.com~tc~bl~jarmsat~jarmsat.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~i18n~verify~intf\sap.com~tc~i18n~verify~intf~jar~IMPL.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~i18n~cp\sap.com~tc~i18n~cp~jar~IMPL.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~i18n~decfloat\sap.com~tc~i18n~decfloat~jar~IMPL.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~com.sap.conn.jco\sap.com~tc~bl~jco_sapj2ee~runtime.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.mw.jco\sap.com~tc~bl~jrfc~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\keystore_api\sap.com~tc~je~keystore_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\tc~sec~certrevoc~interface\sap.com~tc~sec~certrevoc~interface~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~https~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~compat~core.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~ssf~core.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~jaas~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~saml~toolkit~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~csi~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~util0~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~userstore~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~xmlbind~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~destinations~lib~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.guid\sap.com~tc~bl~guidgenerator~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\stax_api\jsr173_1.0_api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\stax_api\sjsxp.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jaxb20\jaxb-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jaxb20\jaxb-xjc.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jaxb20\jaxb-impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\saaj13\saaj-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\saaj13\saaj-impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jaxws_api\jaxws-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jws_api\jsr181-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\javax~annotation~api\annotation-api-1.0.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\compilation_lib\sap.com~tc~bl~compilation~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\sap.com~tc~bl~base_webservices_lib.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\jaxm-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\jaxrpc-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\jaxr-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\jaxws-rt.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\jaxws-tools.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~j2eedescriptors~lib\sap.com~tc~je~j2eedescriptors~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~ejb~metadata~model\lib\sap.com~tc~bl~ejb~metadata~model.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\javax~persistence~api\persistence-api-1.0.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\ejbormapping_api\sap.com~tc~je~ejbormapping_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~orpersistence~metadata~model\sap.com~tc~bl~orpersistence~metadata~model.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~util.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlin~core.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~lib.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~ear.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~connector.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~web.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~ejb.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~appclient.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~orpersistence.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\deploy\sap.com~tc~je~deploy~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\jmx_notification\sap.com~tc~je~jmx_notification~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\runtimeinfo\sap.com~tc~je~runtimeinfo~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\jmx\sap.com~tc~je~jmx~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\jmx\sap.com~tc~je~jmx~impl~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\http\sap.com~tc~je~httpserver~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~exprlang~plb\jee5_el.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jstl\jstl-1_2.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~injection~lib\lib\private\tc~je~injection.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\ec~java~jsf_api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\ec~java~jsf~tld.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\private\com-sun-commons-beanutils.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\private\com-sun-commons-collections.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\private\com-sun-commons-digester.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\private\com-sun-commons-logging-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\private\ec~java~jsf_core.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jacc~plb\jacc-1_1-fr-class.zip;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\classpath_resolver\sap.com~tc~je~classpath_resolver~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.ip.basecomps\sap.com~tc~bl~basecomps~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sdo\lib\sap.com~sdo.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sdo\lib\sap.com~sdo~api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sdo\lib\sap.com~sdo~api~extension.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ejb_api\ejb-3_0-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\webservices_lib\sap.com~tc~je~webservices_lib~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~i18n~saptimezone\sap.com~tc~i18n~saptimezone~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~i18n~cpbase\sap.com~tc~i18n~cpbase~jar~IMPL.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.security.core.sda\sap.com~tc~sec~ume~core~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.security.core.sda\sap.com~tc~sec~ume~tpd~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jms\jms.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jms\jmsclient.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\com.sap~tc~je~jmsapi\sap.com~tc~je~jmsapi~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\userstore\sap.com~tc~je~userstore~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~SL~utility\sap.com~tc~bl~sl~utility~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.exception\sap.com~tc~exception~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~jarsap~sda\sap.com~tc~bl~jarsap~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\tc~bl~deploy_api\sap.com~tc~bl~deploy~api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc.httpclient\sap.com~tc~clients~http~all.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\tc~sec~destinations~interface\sap.com~tc~sec~destinations~interface_api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\endpoint_api\sap.com~tc~bl~endpoint~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\connector\sap.com~tc~je~connector~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\antlr\sap.com~tc~antlr~runtime.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\dbpool\sap.com~tc~je~dbpool~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\tc~sec~destinations~provider\sap.com~tc~sec~destinations~provider~java~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\com.sap.security.core.ume.service\sap.com~tc~sec~ume~service~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sap.com~tc~je~constants~lib\lib\tc~je~constants.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\schemaprocessor~srv\sap.com~tc~je~schemaprocessor.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\tc~je~webcontainer~api\sap.com~tc~je~webcontainer~webcontainer_api_impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\servlet_jsp\sap.com~tc~je~webcontainer~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\objectProfiler\sap.com~tc~bl~objectProfiler~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\tc~je~cachemgmt~srv\sap.com~tc~je~cachemgmt~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\locking\sap.com~tc~je~locking~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\configuration\sap.com~tc~je~configuration~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\basicadmin\sap.com~tc~je~basicadmin~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\basicadmin\jstartupapi.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\basicadmin\jstartupimpl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\adminadapter\sap.com~tc~je~adminadapter~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\security\sap.com~tc~je~security~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\applocking\sap.com~tc~je~applocking~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ejb20\ejb20.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ejbqlparser\sap.com~tc~bl~ejbqlparser~lib.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ejbqlparser\sap.com~tc~bl~ejbqlparser_3_0~lib.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sqlmapper\sap.com~tc~bl~ejbsqlmapper~implCommonSQLMapper.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sqlmapper\sap.com~tc~bl~ejbsqlmapper~implSQLMapperAPI.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\ejbmonitor_api\sap.com~tc~bl~ejbmonitor~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\ejb\sap.com~tc~je~ejb~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\orpersistence_client_lib\lib\orpersistence_client_lib_api.jar;D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\orpersistence\jars\EmployeeEjb.jar;D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\EJBContainer\applicationjars\EmployeeEjb.jar;D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work;;" -nowarn -g ["D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work\JEE_jsp_index_8832250_1231538390011_1231538444324.java"]
Error stream contains:"D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work\JEE_jsp_index_8832250_1231538390011_1231538444324.java:16: 'class' or 'interface' expected
import javax.servlet.*;
^
D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work\JEE_jsp_index_8832250_1231538390011_1231538444324.java:17: 'class' or 'interface' expected
import javax.servlet.http.*;
^
D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work\JEE_jsp_index_8832250_1231538390011_1231538444324.java:18: 'class' or 'interface' expected
import javax.servlet.jsp.*;
^
3 errors
"].005056841108002A00000070000007AC0139C8D8862D3EED Date: 2009-01-09 Time: 23:00:45:042 Category: /System/Server/WebRequests Location: com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl Application: sap.com/EmployeeEar Thread: HTTP Worker [4] Data Source: j2ee\cluster\server0\log\system\server_00.log Correlator ID: 88322500000038637 Argument Objects: Arguments: DSR Component: n.a. DSR Transaction: 10c493a0de9311dd9631005056841108 DSR User: Message Code: Session: 979 Transaction: User: Guest Host: IMGNWCED System: CED Instance: J00 Node: server0
As you can see there is some compilation error, it says 3 times "'class' or 'interface' expected". If i remove all the relevant EJB java code from my index.jsp everything works fine. So I guess there must be some problem with finding the resources. Unfortunately this "logging" is not helpful at all (thank you SAP!). In NWDS everything is fine no problems at all!!!
Who can help me here with this?
Thanks in AdvanceI have found the issue.
in the index.jsp I have the following lines:
<!-- Import Statements -->
<%@ page import="javax.naming.InitialContext" %>
<%@ page import="com.sap.demo.session.EmployeeServicesLocal;" %>
Now check the end of the second import ==> ;
Removing the semicolon solves the issue. But the SAP error message is still not very helpful to me. -
Compiling Nested Classes and Interfaces
I am looking for documentation about compiling nested classes and interfaces. I have found something in the JVM Specification, but there does not explain how a nested class is compiled and what is included in the top level class to mark a "place holder" to the nested class. The JVM Specification in this topic cite the web page http://java.sun.com/products/jdk/1.1/docs/guide/innerclasses/spec/innerclasses.doc.html that does not exists any more.
My root problem is that: I am compiling a class with a private nested class, but in the class file generated TopLevelClass$NestedClass.class the class does not have the private modifier. So I am not understanding why the "private" modifier was removed during compilation.
I performed the same test with a protected nested class and the result was the nested class with the public modifier. So I am not understanding why the "protected" modifier was changed to "public".
Thanks in advance,
Mardoqueu.This should not be happening. What compiler are you using? If it's a reasonably recent Sun compiler, could you post a minimal example?
-
Error like 'class' or 'interface' expected
hi,
I write one simple program :-
enum Apple
a,b,c;
public class AppleDemo
public static void main(String args[])
Apple app;
app=Apple.a;
System.out.println("The Apple is:"+app);
app=Apple.b;
if(app==Apple.b)
System.out.println("Apple is:"+app);
}My qry is- I am trying to compile this program.I am using j2sdk1.5.0 for compilation...but i got error that is
*'class' or 'interface' expected*
Thanks in advance.This forum is for Sun Instant Messaging related questions. For simple java questions I suggest you refer to the following forum:
http://forums.sun.com/forum.jspa?forumID=54
Regards,
Shane. -
Hi,
I have to buid a report in ECM with complete details of the engineering as well as production. This include workflow as well as various fucntionality depends upon the criterion and user's event.
I am implementating in OOPS and I Want to know that when I should use the Abstract class and when interface ?
Because as per me both serve the same purpose. Kindly send me the exact difference so that i can efficiently use the same.
Thanks
PrinceWhen inheriting A Interface We have to inherit all the methods of the Interface there's no other option whereas with abstract classes we can inherit the members that we are in need of.
Just the interface has to have body of the method and the method is to be used by the classes inheriting it. Whereas in the case of Abstract Class it can have declarations (Other than the abstract method) and it can be further extended in the classes inheriting the Abstract Class.
Interface contains all abstract methods,all methods compulsory implemented by particular class, interface does not contain Constructor
abstract classes are designed with implemantion gaps for sub-class to fill in.
interfaces are sintacticlly similar to classes but they lack insance variables & methods.
abstract classes can also have both abstract methods & non-abstract methods. where as in interface methods are abstract only, & variables are implicitly static&final
regards
Preetesh -
I'm playing with a 5644 VST and the VST Streaming template. On the FPGA VI I added some code, then added an indicator to the FPGA VI front panel and compiled. Running the FPGA VI in interactive execution mode, the indicator works well. On the host end, though, I can't seem to access the new indicator with a Read/Write control.
Coming out of the Open FPGA VI Reference I can see the indicator on the wire, but in the Dynamic FPGA Interface Cast function it's getting stripped out of the refnum somehow. If I connect a Read/Write control directly to the output of the Open Reference function I can access the indicator just fine.
Any idea what I'm doing wrong?
Thanks.
Solved!
Go to Solution.Have you re-configured your FPGA VI reference interface with the new bitfile? The dynamic interface cast defines the output wire as having all the methods and indicators described by the type wire connected. You can right-click on the type constant and select "Configure FPGA VI Reference...". In the pop-up that follows, choose "Import from bitfile..." and then select the new bitfile that you've built.
You'll need to update the fpga reference type in the "Device Session.ctl" type def as well. This is the type that you'll be able to access throughout the project. -
I am very new to java and need to do an assignment for my course. I am trying to get a connection to a database and retrieve information but I get the below error when I try to compile my program - any ideas?
D:\javawork\Bike.java:16: 'class' or 'interface' expected
public Bike()
^
Here is the actual code:
//Bike Class
import java.sql.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
import java.util.*;
import java.lang.*;
public class Bike extends JFrame
private Connection Database;
private JTable table;
public Bike()
// Use JDBC to connect to a Microsoft ODBC source
String url = "jdbc:odbc:Mikesdb";
String username = "guest";
String password = "guest";
Statement DataRequest;
ResultSet Results;
//Load the driver to allow connection to the database
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Database = DriverManager.getConnection(url);
System.out.println("Successful Connection" + Database);
catch(ClassNotFoundException cnferr)
System.err.println("Failed to load JDBC/ODBC bridge" + cnferr);
System.exit(1); //exit program
catch(SQLException sqlex)
System.err.println("Unable to connect to the database" + sqlex);
System.exit(2); //exit program
FindBike();
setSize(200,200);
show();
public void FindBike(String type, String gender, String status)
String t = type;
String g = gender;
String s = status;
this.getConnection();
Statement DataRequest;
ResultSet Results;
try
//get user input for three fields in future
String query = "Select * FROM Bike WHERE Status = 'Ready'";
DataRequest = Database.createStatement();
Results = DataRequest.executeQuery (query);
displayResults (Results);
DataRequest.close();
catch(SQLException err)
System.out.println("SQL Error: " + err);
System.exit(3);
public void Disconnect()
try
Database.close();
catch(SQLException err)
System.out.println("Cannot close database connection: " + err);
System.exit(4);
public static void main(String[] arguments) {
Bike b = new Bike();
b.show();
Having moved the { to the end I get lots of new errors!
D:\javawork\Bike.java:49: FindBike(java.lang.String,java.lang.String,java.lang.String) in Bike cannot be applied to ()
FindBike();
^
D:\javawork\Bike.java:60: cannot resolve symbol
symbol : method getConnection ()
location: class Bike
this.getConnection();
^
D:\javawork\Bike.java:71: cannot resolve symbol
symbol : method DisplayResults (java.sql.ResultSet)
location: class Bike
DisplayResults (Results);
^
3 errors
Finished -
Class or interface could not be loaded?
I am very new to coding in general, ini fact this is my fisrt crack at it, and right now I'm just going off a tutorial, but for whatever reason i'm having an issue that the class/interface not being loaded.
My code right now is:
class ship extends MovieClip
var velocity;
function onLoad()
velocity = 10;
function onEnterFrame()
_x = _x + velocity;
Essentailly when I test play this i should see my object going across the screen, but instead it does nothing and i get the error:
"Symbol=Ship, layer=1, frame=1, Line 1 The class or interface 'Ship' could not be loaded."
I do have the .fla and .as saved in the same file, but does it matter where that file is located, or have I come across some basic mistake or..?
I'm using ActionScript2.0 for this.
(Very secondary, but does anybody have any tutorial reccomendations?)You have the .fla and .as saved in the same file? Or the same folder?
Also you will notice that you have
class ship extends MovieClip
But it looks like for your symbol you have given it a defintion of Ship. (Caps matter!)
Your code should be capitalized, as should the name of the Ship.as file. You will notice that the Flash classes all start with a cap and that instances start with lowercase letters. You don't have to do this, but it makes it easier to know what is what.
As a recommendation I would recommend the book by Keith Peters, Making things move. And also unless you have an overwhelming need to learn AS2, I would recommend skipping it and moving right to AS3. -
Urgent: 'Class' or 'interface' expected
Hello,
I am working on a piece of work which has to be in for tomorrow, i have been trying to compile it for so,me time now and everytime i try it says 'Class' or 'interface' expected.
I have not finished writing the program and i am not sure how correct it is. Any help would be much appreciated,
Thank you,
James
Error Message: -
U:\ManXP\My Documents\myjava>javac emailclient2.java
emailclient2.java:181: 'class' or 'interface' expected
private static int readListFromFile(String filename, Message[]
^
messageList, int maxLines)
1 errorI am working on a piece of work which has to be in
for tomorrow, i have been trying to compile it for
so,me time now and everytime That's quite a bit of superfluous information. Please don't mark your questions as urgent. Thanks!
i try it says 'Class' or 'interface' expected.You've got a syntax error in your code on line 181. Look at the lines before that. Are you trying to declare that method inside another method?
Careful adherence to standard Code Conventions for the Java� Programming Language can make this type of problem very easy to spot... -
JDeveloper Error(16,8) 'class' or 'interface' expected
I have just installed JDeveloper for 11.5.10 RUP5 OA Framework and extended the Purchase Requisition Lines EO (PoRequisitionLineEO). Everything seemed to work okay. However, in the first step of deployment, to compile the .java class, when I select Make rnPoRequisitionLineEOImpl.java, I receive the following compiler eror:
Error(16,8): 'class' or 'interface' expected
My sense is that this may be an environment setup issue as this is the first time I'm using JDeveloper and the first time I am extending OA Framework.
Any advice on how to resolve?
Edited by: Kit on Jan 29, 2010 2:42 PMThis was an end-user error. Additional code had been added to the .java source code that was not in a class.
-
Hey ...this is sample program from "java 2 fourth edition by herbert schildt"
Class Box()
double width;
double height;
double depth;
//display volume of the box
void volume() {
System.out.print("Volume is");
System.out.println(width * height * depth);
Class BoxDemo3
public static void main(String args[])
Box mybox1 = new Box();
Box mybox2 = new Box();
//assign values to mybox1 instance variables
mybox1.width = 10;
mybox1.height = 20;
mybox1.depth = 15;
mybox2.width = 3;
mybox2.height = 6;
mybox2.depth = 9;
mybox1.volume();
mybox2.volume();
i have saved it as Box.java and using editplus i have compiled it then i got the error as
Error ::::: Box.java:2: 'class' or 'interface' expected
I think i have to import something in the code ......help me understand java
thanx alotclass, not Class
Maybe you are looking for
-
How to remove channel from DAQmx create Task.vi
Vikas H. Kumthekar ASE Tata Consultancy Services Pune-1
-
With Firefox 7 my computer is slower to boot up and shut down. When typing the website I want in the address bar the old firefox took me straight to the site now it takes me to Google. I'd like to revert to the previous version of Firefox. I have tri
-
DB Connect, BW on MSSQL, Oracle as external system(NON SAP)
Hi, Requirement: I want to connect and Extract data from Oracle database (non-sap). BI System Details: 1. BI 7.0 (EHP 1) server is running on MSSQL 2005. 2. I have WEB AS as ABAP only. 3. Operating system Win 2003 server. Oracle Database (NON SAP) De
-
Passwords to control document access
On Word you can input a password to control access certain documents does Pages have a security setting such as this?
-
Sometimes e-mail address shows instead of name
I have a person's full name and e-mail address in my address book. When I receive a message from that person in the mail.app, their e-mail address shows. What can I do to show the person's full name instead?