Unable find a class locally
I try to run a set of Java file in the same location. No package is definited in those Java code. I use the follow command to bring up the entry code:
java -classpath <the path> jms.properties=%J2EE_HOME%\config\jms_client.properties JMSChat
The code is running. But it can't find another file in the same location and throws an exception: java.lang.NoClassDefFoundError
What is the cause and how to resolve it?
Thanks,
v.
>
I try it with some other variations without a luck. I
have add ".", and the path name in the classpath. I
believe your suggestion is right, but don't understand
why it can't find the file.Class not found means that java can't find the class.
The usual reasons.
-Not in the class path.
-Error in the class path. sun jvm stops searching if a dir or file can't be accessed - like permission or non-existent.
-Permission problem with file.
-File doesn't exist.
Other possibilities:
-Name in your code does not match class. Names are case sensitive.
-There is a package and you are not using it.
-There are different packages and the class is not public.
-There is no class file (this is really file doesn't exist.)
-The class file is old, it hasn't been recompiled.
Similar Messages
-
Hello
I am running Windows 2000 and can not launch Jdeveloper. I get two messages:
1. The Oracle Java Virtual Machine is not installed.
2. Unable to find main class, Class specified is: oracle/ideimpl/IdeMain
I have downloaded jdev9i_902.zip and unzipped it to e:\jdeveloper.
I downloaded jdk1.3.1_03 and jre1.3.1_03 annd installed them. Next I set JAVA_HOME to e:\jdk1.3.1_03 and added e:\jdk1.3.1_03\bin to my PATH.
I changed SetHavaHome in jdev.conf to:
SetJavaHome e:/jdk1.3.1_03
If I leave this commented out I do not get error #2 listed above, but nothing else happens.
I also left SetUserHomeVariable JDEV_USER_DIR blank and also tried SetUserHomeVariable JDEV_USER_DIR e:/jdeveloper.
When I run InstallOJVM.bat I get the following
E:\jdeveloper>InstallOJVM.bat e:/jdeveloper
Error: cannot find JDeveloper installation in "E:\"
I notice that the Install.html document makes a reference to <jdeveloper_root>\jdev\bin\jdev.conf. All the files were unzipped in one directory. There is not a directory structure (ie \bin).
Oracle is installed on a network server. I have the Oracle 9i client on my workstation. Does Oracle need to be installed locally?
Can anyone tell me what I am missing?
ThanksThis is the key piece of information:
I notice that the Install.html document makes a reference to <jdeveloper_root>\jdev\bin\jdev.conf. All the files were unzipped in one directory. There is not a directory structure (ie \bin).
If you unzipped jdev9i_902.zip using WinZip, be sure the "Use Folder Names" option is checked at the time you extract the archive, so that the directory structure will be preserved during extraction. You should be able to verify in WinZip that jdev9i_902.zip does have a directory structure. -
When trying to load data into Essbase I get this error dialogue
Object [65313270] is locked by user [admin@Native Directory]
Unable to load database, locales [Arabic_SaudiArabia.ISO-8859-6@Default] and [English_UnitedStates.Latin1@Binary] are not compatible
Object [65313270] unlocked by user [admin@Native Directory]
Unexpected Essbase error 1019057
Have checked essbase.properties files (all 10 of them!) and the 2 references that I could find both point to the default value of [English_UnitedStates.Latin1@Binary]
So is the problem with the CSV file?Have you looked at the Load Rule (yes, I know, developed in Studio, but it generates Load Rules which I believe you can open in EAS)? Is the dimension that contains BON accounted for?
Your second issue(s) seems to be that you have conflicting locales -- are you in SA? Could it be that Studio is installed with English as the language and EAS with Arabic (or vice versa)? Sorry, I have hardly any experience in languages other than English. Maybe one of the non-English language posters can chime in.
I can't say whether that load buffer issue means anything at all or not -- it could be a red herring.
Regards,
Cameron Lackpour -
Unable to compile class for JSP--- help me plz!!!!!
hi friends;
Pease suggest me where i am wrong, i think javabean is not instantiated in jsp file.may be it is related to the classpath of javabean. i have not set any variable for javabean classpath. and i put javabean class file in
TOMCAT_HOME/webapps/test3/WEB-INF/UseDta.class
and all the jsp and html in /test3. my jsp an javabeans are--
1. GetName.html
<HTML>
<BODY>
<FORM METHOD=POST ACTION="SaveName.jsp">
What's your name? <INPUT TYPE=TEXT NAME=username SIZE=20><BR>
What's your e-mail address? <INPUT TYPE=TEXT NAME=email SIZE=20><BR>
What's your age? <INPUT TYPE=TEXT NAME=age SIZE=4>
<P><INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>
2. SaveName.jsp
<jsp:useBean id="user" class="UserData" scope="session">
<jsp:setProperty name="user" property="*"/>
</jsp:useBean>
<HTML>
<BODY>
Continue
</BODY>
</HTML>
3. UserData.java
public class UserData {
String username;
String email;
int age;
public UserData(){}
public void setUsername( String value )
username = value;
public void setEmail( String value )
email = value;
public void setAge( int value )
age = value;
public String getUsername() { return username; }
public String getEmail() { return email; }
public int getAge() { return age; }
4. NextPage.jsp
<jsp:useBean id="user" class="UserData" scope="session"/>
<HTML>
<BODY>
You entered<BR>
Name: <%= user.getUsername() %><BR>
Email: <%= user.getEmail() %><BR>
Age: <%= user.getAge() %><BR>
</BODY>
</HTML>
url: http://localhost:8080/test3/GetName.html
is it related to context path??
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 2 in the jsp file: /SaveName.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\test3\org\apache\jsp\SaveName_jsp.java:44: cannot find symbol
symbol : class UserData
location: class org.apache.jsp.SaveName_jsp
UserData user = null;
^
An error occurred at line: 2 in the jsp file: /SaveName.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\test3\org\apache\jsp\SaveName_jsp.java:46: cannot find symbol
symbol : class UserData
location: class org.apache.jsp.SaveName_jsp
user = (UserData) jspxpage_context.getAttribute("user", PageContext.SESSION_SCOPE);
^
An error occurred at line: 2 in the jsp file: /SaveName.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\test3\org\apache\jsp\SaveName_jsp.java:48: cannot find symbol
symbol : class UserData
location: class org.apache.jsp.SaveName_jsp
user = new UserData();
^
3 errors
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:437)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:497)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.30 logs.
Apache Tomcat/5.0.30
please Reply me ASAP
i'll be glad if you reply. pleaseI am using Tomcat 6.0.
I have put my UserData class in user package and
used in below jsp(SaveName.jsp)
<%@ page import="user.UserData" %>
<jsp:useBean id="user" class="user.UserData" scope="session"/>
<jsp:setProperty name="user" property="*"/>
<HTML>
<BODY>
Continue
</BODY>
</HTML>
I have already set my classpath as C:\Documents and Settings\user\My Documents\Java\apache-tomcat-6.0.16\apache-tomcat-6.0.16\webapps\ROOT\WEB-INF\classes;
UserData class is in C:\Documents and Settings\user\My Documents\Java\apache-tomcat-6.0.16\apache-tomcat-6.0.16\webapps\ROOT\WEB-INF\classes\user
My UserData class is
package user;
public class UserData {
String username;
String email;
int age;
public UserData(){
this("","",0);
System.out.println("najn thanne puli");
public UserData(String username,String email,int age){
this.username=username;
this.email=email;
this.age=age;
public void setUsername( String value )
username = value;
public void setEmail( String value )
email = value;
public void setAge( int value )
age = value;
public String getUsername() { return username; }
public String getEmail() { return email; }
public int getAge() { return age; }
But running SaveName.jsp shows exception
org.apache.jasper.JasperException: /SaveName.jsp(2,0) The value for the useBean class attribute user.UserData is invalid.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1200)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1160)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2393)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2399)
org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
org.apache.jasper.compiler.Generator.generate(Generator.java:3372)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:294)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:281)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
Please help me.thanks in advance. -
JasperException: Unable to compile class for JSP HELP
I added couple of extra class files into the jar file.. and now its not able to find it! I am running JBoss latest version and using eclipse... any help wud be nice
org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error:
Only a type can be imported. org.jfree.chart.servlet.WebHitChart resolves to a package
Generated servlet error:
Only a type can be imported. org.jfree.chart.servlet.WebHitDataSet resolves to a package
An error occurred at line: 10 in the jsp file: /bar_chart.jsp
Generated servlet error:
WebHitChart cannot be resolved
An error occurred at line: 10 in the jsp file: /bar_chart.jsp
Generated servlet error:
WebHitDataSet cannot be resolved
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)just a random guess...
I had a ton of issues with JBoss and jfreechart. JBoss uses a different classloader, and its internal versions of the jfreechart classes will be loaded before yours, causing all sorts of issues. Dig through the jboss directories and you'll find a different, older version of jfreechart of one of its classes. Remove them and you'll be in better shape.
Alternatively, look around the JBoss docs for how to disable/turn off the unified classloader for your app (its a directive in jboss-web.xml IIRC). This should make the classloader for your webapp perform to spec, getting rid of the class colission issues. -
Cannot find JavaBean class?
Created JSP program that calls a javabean but for some reason it cannot find the javabean class. I moved the NonConfBean.class and NonConfBean.java modules to the directory: C:\jakarta-tomcat-4.0.3\webapps\examples\WEB-INF\classes. Also, I modified my CLASSPATH to the following: .;C:\j2sdk1.4.0\lib;C:\jakarta-tomcat-4.0.3\webapps\examples\WEB-INF\classes.
Here is the JSP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<%@ page import="accsp.application.*"%>
<head>
<title>Add ACCSP Application for Non-Confidential Data</title>
</head>
<body>
<jsp:useBean id="accapp"
class="accsp.application.NonConfBean"
scope="request" />
<jsp:setProperty name="accapp" property="*"/>
<BR>
<% accapp.updateDatabase(); %>
<jsp:forward page="NonconfPresentation.jsp" />
</body>
</html>
And here is the error:
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
C:\jakarta-tomcat-4.0.3\work\localhost\webdav\myJSPs\addaccspapp$jsp.java:3: Package accsp.application not found in import.
import accsp.application.*;
^
1 error, 1 warning
If I take out the import I receive the following error:
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
An error occurred between lines: 7 and 9 in the jsp file: /myJSPs/addaccspapp.jsp
Generated servlet error:
C:\jakarta-tomcat-4.0.3\work\localhost\webdav\myJSPs\addaccspapp$jsp.java:60: Class accsp.application.NonConfBean not found.
accsp.application.NonConfBean accapp = null;
Why is this happening?Yes I have put NonConfBean.class in the following directories just to make sure I am covering all bases:
1. C:\accsp\application
2. C:\j2sdk1.4.0\accsp\application
3. C:\jakarta-tomcat-4.0.3\accsp\application
4. C:\jakarta-tomcat-4.0.3\webapps\examples\WEB-INF\classes\accsp\application
Here is my classpath: .;C:\j2sdk1.4.0\lib\tools.jar;C:\accsp\application;C:\j2sdk1.4.0\accsp\application;C:\jakarta-tomcat-4.0.3\accsp\application;C:\jakarta-tomcat-4.0.3\webapps\examples\WEB-INF\classes\accsp\application
And here is the JSP that tries to do the import:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@page import="accsp.application.*" %>
<html>
<head>
<title>Add ACCSP Application for Non-Confidential Data</title>
</head>
<body>
<jsp:useBean id="accapp"
class="accsp.application.NonConfBean"
scope="request" />
<jsp:setProperty name="accapp" property="*"/>
</jsp:useBean>
<BR>
<% accapp.updateDatabase(); %>
<jsp:forward page="NonconfPresentation.jsp" />
</body>
</html>
And here is the error message:
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
C:\jakarta-tomcat-4.0.3\work\localhost\webdav\myJSPs\addaccspapp$jsp.java:3: Class accsp.application.NonConfBean not found in import.
import accsp.application.NonConfBean; -
Debugger unable to connect to local process
I am going thru the JDeveloper Introduction Tutorial and when I try to debug the application I get the following error in the message window:
C:\JDev\jdk\bin\javaw.exe -ojvm -XXdebug,quiet,port1069 -classpath C:\JDev\jdev\mywork\MyFirstApp\MyProject\classes myproject.Dog
Debugger unable to connect to local process.
Process exited.
I am using Windows XP Professional
JDeveloper 10.1.3.4.3673
If I just run the application then it works.
I also have the Sun Java JDK installed, as well as Eclipse and NetBeans installed.
I tried reinstalling JDeveloper but the debug function still does not work.
Any help will be highly appreciated.
Thanks,
RaffyI am trying to debug a JSP application and each time I try to debug I get the error:
[Starting OC4J using the following ports: HTTP=8989, RMI=23893, JMS=9239.]
C:\oracle\jdk\bin\javaw.exe -ojvm -XXdebug,quiet,port2774 -classpath C:\oracle\j2ee\home\oc4j.jar com.evermind.server.OC4JServer -config C:\oracle\jdev\system\oc4j-config\server.xml
Debugger attempting to connect to local process.[waiting for the server to complete its initialization...]
Debugger unable to connect to local process. Go into the Tools > Preferences, and under Debugger, modify the "Connection Retry Setting" and increase the number of attempts.
Hope this helps,
Rob -
First use of jsp and java bean and "Unable to compile class for JSP" error
Hi,
I am trying to create my first jsp + java bean and I get a basic error (but I have no clue what it depends on exactly). Tomcat seems to cannot find my class file in the path. Maybe it is because I did not create a web.xml file. Did I forgot to put a line in my jsp file to import my bean?
Thank you very much for your help.
Here is my error:
An error occurred at line: 2 in the jsp file: /login.jsp
Generated servlet error:
[javac] Compiling 1 source file
/usr/local/tomcat/jakarta-tomcat-5/build/work/Catalina/localhost/test/org/apache/jsp/login_jsp.java:43: cannot resolve symbol
symbol : class CMBConnect
location: class org.apache.jsp.login_jsp
CMBConnect test = null;
I only have this in my directory:
test/login.jsp
test/WEB-INF/classes/CMBConnect.java
test/WEB-INF/classes/CMBConnect.class
Do I need to declare another directory in classes to put my class file in it and package my bean differently?
Here is my login.jsp:
<%@ page errorPage="error.jsp" %>
<jsp:useBean id="test" type="CMBConnect" scope="session" />
<html>
<head>
<title>my test</title>
</head>
<body>
<h3>Login information</h3>
<b><%=session.getValue("customerinfo.message")%></b>
<form> ....... </form>
</body>
</html>
and here is my CMBConnect.java:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class CMBConnect
public CMBConnect () { }
public String openConnection(String id, String password) {
String returnText = "";
try {
Connection con = null;
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
con = DriverManager.getConnection("jdbc:oracle:thin:@myserver.abc.com:1521:TEST", id, password);
if(con.isClosed())
returnText = "Cannot connect to Oracle server using TCP/IP...";
else
returnText = "Connection successful";
} catch (Exception e) { returnText = returnText + e; }
return returnText;
Thanks again!Thanks for you help
I created the package and I get this error this time:
javax.servlet.ServletException: bean test not found within scope
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:822)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:755)
org.apache.jsp.login_jsp._jspService(login_jsp.java:68)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:268)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:277)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:223)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856) -
JAR: - Could not find main class
I'm sorry, I know this issue has been posted before but I am a bit confused with my situation.
After making a jar on my computer, I run it, and the program loads and runs perfectly.
However, when I try the jar on someone else's computer, it doesn't work, and gives the "could not find main class" message. The other computer has JRE but not JDK, so I don't know if that makes a difference.
Anyways, my main class file is located in a package called hw2, and the whole project is located in a folder called HW2. So my class file is located in something like C:\School\HW2\hw2\Main.class.
My Manifest.txt file is located in the \School\HW2 directory and has the following with a new line at the end:
Main-Class: hw2.Main
At the command prompt, I go to my C:\School\HW2 directory and I type the following to create the jar:
jar cvmf Manifest.txt test.jar hw2\*.class
My jar file has the following contents:
META-INF/
META-INF/MANIFEST.MF
hw2/Bank.class
hw2/GUIInterface.class
hw2/Main.class
Did I write the manifest.txt file correctly? Am I in the right directory when creating the jar file? Am I executing the jar command wrong? How come it works on my computer but not on someone else's?Are you certain you're executing the jar in the same way on both machines?
For example, are you sure you're not executing the unjarred class files when you run on your local machine? -
Generated servlet error - unable to compile class for JSP - using NB5.5/SS9
I am using NB5.5 beta2 and Sun server 9.0 with JSF 1.1 - all is OK when I am creating firts JSF application - welcomeJSF.jsp page is rendered normally - but when I am adding one more jsp with JSP view and so on - then - I am getting errors in both JSF pages - both - in original welcomeJSF and the new invoice.jsp page
here is code for typical error
org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error:
[javac] E:\Sun\AppServer\domains\domain1\generated\jsp\j2ee-modules\ERPSolution\org\apache\jsp\welcomeJSF_jsp.java:99: cannot find symbol
[javac] symbol : method setJspId(java.lang.String)
[javac] location: class com.sun.faces.taglib.jsf_core.ViewTag
[javac] jspxth_f_view_0.setJspId("id7");
[javac] ^
Generated servlet error:
[javac] E:\Sun\AppServer\domains\domain1\generated\jsp\j2ee-modules\ERPSolution\org\apache\jsp\welcomeJSF_jsp.java:144: cannot find symbol
[javac] symbol : method setJspId(java.lang.String)
[javac] location: class com.sun.faces.taglib.html_basic.OutputTextTag
[javac] jspxth_h_outputText_0.setJspId("id17");
[javac] ^
Generated servlet error:
[javac] E:\Sun\AppServer\domains\domain1\generated\jsp\j2ee-modules\ERPSolution\org\apache\jsp\welcomeJSF_jsp.java:145: setValue(java.lang.String) in com.sun.faces.taglib.html_basic.OutputTextTag cannot be applied to (javax.el.ValueExpression)
[javac] jspxth_h_outputText_0.setValue(org.apache.jasper.runtime.PageContextImpl.getValueExpression("Java Server Faces", (PageContext)_jspx_page_context, java.lang.Object.class, null));
[javac] ^
[javac] 3 errors
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:94)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:384)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:461)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:528)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:507)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:530)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:409)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:317)
javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:414)
com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:455)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:139)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:159)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
note The full stack trace of the root cause is available in the Sun Java System Application Server Platform Edition 9.0 logs.
and there is output for another error:
Generated servlet error:
[javac] E:\Sun\AppServer\domains\domain1\generated\jsp\j2ee-modules\ERPSolution\org\apache\jsp\welcomeJSF_jsp.java:144: cannot find symbol
[javac] symbol : method setJspId(java.lang.String)
[javac] location: class com.sun.faces.taglib.html_basic.OutputTextTag
[javac] jspxth_h_outputText_0.setJspId("id17");
[javac] ^
Generated servlet error:
[javac] E:\Sun\AppServer\domains\domain1\generated\jsp\j2ee-modules\ERPSolution\org\apache\jsp\welcomeJSF_jsp.java:145: setValue(java.lang.String) in com.sun.faces.taglib.html_basic.OutputTextTag cannot be applied to (javax.el.ValueExpression)
[javac] jspxth_h_outputText_0.setValue(org.apache.jasper.runtime.PageContextImpl.getValueExpression("Java Server Faces", (PageContext)_jspx_page_context, java.lang.Object.class, null));
[javac] ^
[javac] 3 errors
and here is code of my new invoice.jsp page:
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%--
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
--%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<f:view>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1><h:outputText value="Java Server Faces" /></h1>
<h:inputText value="#{managerBean.currentInvoice.id}"/>
<h:inputText value="#{managerBean.currentInvoice.description}"/>
<h:inputText value="#{managerBean.currentInvoice.total}"/>
<h:commandButton value="new_invoice"
type="submit"
actionListener="#{managerBean.createNewInvoice}"/>
</body>
</f:view>and faces-config.xml file:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<!-- =========== FULL CONFIGURATION FILE ================================== -->
<faces-config>
<managed-bean>
<managed-bean-name>managerBean</managed-bean-name>
<managed-bean-class>com.brl.ERPSolution.ui.ManagerBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
</faces-config>managerBean was intended to be backing beans which will call the facaed beans of EJB 3.0 entity beans - but at presnet - almost empty methods are declared there:
package com.brl.ERPSolution.ui;
import javax.faces.event.ActionEvent;
import com.brl.solutions.EJB3.*;
* @author Administrator
public class ManagerBean {
protected int currentInvoiceId;
protected Invoices currentInvoice;
protected InvoicesFacade invoicesFacade;
/** Creates a new instance of ManagerBean */
public ManagerBean() {
/* business methods */
public void createNewInvoice(ActionEvent actionEvent)
invoicesFacade.create(this.currentInvoice);
public Invoices getCurrentInvoice()
return this.currentInvoice;
public void setCurrentInvoice(Invoices currentInvoice)
this.currentInvoice=currentInvoice;
}I read in one blog (actually - the only page which was returned by yahoo - so - this should be very rare error!!!) to try to use Sun server's verifier.bat - and - it reported 0 errors and 0 warning. Build was succesfull as well and also - deployment was without errors - but - above mentioned error appeared during the automatic compilation of jsp pages/servlet when newly deployed jsps are first accessed from remote browser.
So - is it possible, please, to receive some advice - what to do further? I feel that my invoice.jsp page can be with errors, - however - the original welcomeJSF.jsp should be working without errors even the erronwous JFS jsp page is added to web application.
Thans for any adice or hint in advance!!!OK - I have made 'clean and build main project' from NB menu and the deployed the resulting *.war and the error messages have disappeared... So - it seems to be bug...
-
Jakarta-tomcat-4.1.31 unable to compile class in jsp
anyone??solve tis ploblem
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 0 in the jsp file: /DirList/toggle.jsp
Generated servlet error:
[javac] Compiling 1 source file
C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_\DirList\toggle_jsp.java:41: package hansen.playground does not exist
hansen.playground.MyFileStructureExplorer file = null;
^
An error occurred at line: 0 in the jsp file: /DirList/toggle.jsp
Generated servlet error:
C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_\DirList\toggle_jsp.java:43: package hansen.playground does not exist
file = (hansen.playground.MyFileStructureExplorer) pageContext.getAttribute("file", PageContext.SESSION_SCOPE);
^
An error occurred at line: 0 in the jsp file: /DirList/toggle.jsp
Generated servlet error:
C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_\DirList\toggle_jsp.java:46: package hansen.playground does not exist
file = (hansen.playground.MyFileStructureExplorer) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "hansen.playground.MyFileStructureExplorer");
^
3 errors
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:248)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:315)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)it seems the u have not set the classpath properly for the above mentioned package...or else u have not compiled the java file..
by the way where is ur package put up currently (the directory heirarchy)?? find out whether u have included the import package statements in the java files...
do mention the directory structure of the packages...
cheers,
vini -
i have recently downloaded itunes into my windows 8 but i am unable to transfer my local videos and movies into the itunes though i can transfer my music.
please help me to find out the problem. as well as i already have a data into my iphone and what if i will connect it to my laptop so would it be erase the data coz i dont wanna loss it.Click here and follow the instructions.
(80232) -
Cannot Find Servlet class Error
Hello Everybody,
i have written a simple servlet and compiled it using j2sdk1.4 version and jsdk.jar.But when i try to load the servlet on the javawebserver2.0 it says it is unable to find servlet class though i have put the class file in the servlets directory.i even put the class in the classes directory.It works fine when i compile the same class using j2sdk1.3 version and jsdk.jar.
Please guide me as to what should be done to overcome this problem.
Thanks in Advance
Manikantan IyerHi mani2k_in ,
JavaWebserver2.0 --> This web server, by default uses JDK 1.1.8.
If you have compiled your classes using heigher versions, Webserver won't be able to find those classes which were added after JDK1.1.8.
That was the first problem regarding the J2sdk versions you have used.
You can override the default JVM usage of JavaWebServer2.0
Second the servlet problem.
Your environment should able to lookup the classes dyanmically jsdk.jar or servlet.jar.
If you are able to compile the servlet successfully, place it in servlets directory and access the servlet from a browser using the url http://servername:portnumber/servlet/Servletclass
Although you have placed your class file in servlets directory, you should access by using servlet in the URL.
If it doesn't solve your problem, please come back with more details.
Thanks,
Sanath Kumar -
I'm running RH8, but quite new to linux, so it's possible I just don't have something set up right. I downloaded and installed the rpm for J2SE 1.4.1, which I believe is supposed to include Swing, right? Then I typed in the first example out of my book, which happens to use a couple of the Swing classes, and I get the following errors when I try to compile it:
[root@rissa HelloJava]# javac HelloJava1.java
HelloJava1.java:2: Superclass `javax.swing.JComponent' of class `HelloJava1'
found.
public class HelloJava1 extends javax.swing.JComponent
^
HelloJava1.java:6: Type `javax.swing.JFrame' not found in the declaration of
local variable `f'.
javax.swing.JFrame f = new javax.swing.JFrame("HelloJava1");
^
2 errors
Anyone have any ideas what's up with my install?
LisaSo what do I set where to make this work?As you said you need to set your path variable. How
that is done depends on the shell that you are
running.
But if I just add the j2sdk/bin to my paths, it still uses the one in /usr/bin by default. How do I keep it from using that one? Obviously, I can't take /usr/bin out of my path, since I'll need other stuff in that directory.
>>
Also, even if I am running 1.3.1, shouldn't Swingwork
anyway? The book I'm using is actually written for
1.3, so anything in it ought to work no matterwhich
copy I'm actually using, I would think.
That is correct. You can try the following to verify
whether a class is found or not.
java javax.swing.JComponent
If you run the above if it does not find the class
then you will get a class not found exception. If it
finds it then you will get an error that says that
'main' was not found.
Trying this under both versions gives me different exceptions in thread "main". I'm not even sure where it should be looking for the classes, let alone where it is looking for them, or for that matter, if they're even there to find.
Response in 1.3.1:
Exception in thread "main" java.lang.NoClassDefFoundError: javax.swing.JComponen
t
at 0x4028115f: java.lang.Throwable.Throwable(java.lang.String) (/usr/lib/libg
cj.so.3)
at 0x4027408e: java.lang.Error.Error(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x40275b1a: java.lang.LinkageError.LinkageError(java.lang.String) (/usr/li
b/libgcj.so.3)
at 0x40276f76: java.lang.NoClassDefFoundError.NoClassDefFoundError(java.lang.
String) (/usr/lib/libgcj.so.3)
at 0x402c60f9: gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.3)
at 0x40267fdc: JvThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.3)
at 0x4023478c: JvRunMain(java.lang.Class, byte const, int, byte const, bool
ean) (/usr/lib/libgcj.so.3)
at 0x08048900: ?? (??:0)
at 0x420158d4: ?? (??:0)
at 0x080486c1: ?? (??:0)
Response in 1.4.1_02:
Exception in thread "main" java.lang.NoSuchMethodError: main
You are not setting the CLASSPATH correct?Correct, although I did briefly try that as well, out of desparation, but it seemed to have no effect on anything.
Lisa -
IFS-30805 Unable To Free Class -- huh??
So I'm finally fed up with the snafus and bogusity and decide to delete my content type (an extension of DOCUMENT) and start over. Using the Viewer, I delete all the uploaded files of this type and the test folder that contained the uploaded files. Nobody else is using this content type: it is now totally unused.
So from the 9iFS Manager (Mangler?) I highlight the content type and click Object->Delete.
After a short wait I get a dialog box: "The ClassObject has instances...Do you want to delete instances?" Well, I don't agree with the statement, as all the instances are gone, but sure, I'll go along with it, so I click OK.
After another wait I get an "Are you sure..." dialog, and I answer OK. (I'm VERY sure).
Finally after yet another wait I get dialog containing an "IFS-30805 Unable to free class (instances still exist)".
This is, to use as polite a term as I can, HORSEPUCKY. What the heck is going on here? Why can't I delete this content type? Where do these (alleged) instances exist that are preventing the deletion?
All help, speculation, advice and incantations greatly appreciated.
Thank you,
Jeff RiningerJeff,
You are not alone! Things to check are that your extended class bean does not have issues with naming. I had the same problem and it was due to me naming the class AB but when compiled on NT 2000 it was compiled as ab.class
To resolve the issue though run this to find the instances as they are still there!
SELECT id, name
FROM odm_publicobject
WHERE classid IN (
SELECT id FROM odm_classobject
WHERE uniquename IN ('EXTENDED CLASS NAME'));
Use the ID's from this to put in the following JAVA to delete (Substitute ID:
IfsFileSystem ifs = new IfsFileSystem(ifsSession);
Folder f = (Folder)ifs.findPublicObjectById(new Long(ID));
ifs.delete(f, true);
ifsSession.disconnect();
That should help you out.
Regards
Chris Mayhew
Maybe you are looking for
-
hello everybody, I had build a project use OWB,but I dont know how to deploy this object to BIEE. I only select which table or view in build the BIEE and must setup the dimension which had been setup in OWB. Could I get the dimension information to t
-
Can't connect imac to internet through Airport Express
Hello I am trying to connect my new imac (2.4Ghz,OS X 10.5) to the internet through my Airport Express (v6.3) but have encountered some problems. The set up goes like this: Cable Internet <wired> TP-LINK Router <wired> AE <wireless> imac The internet
-
Error in site-to-server mapping
I have a Webcache standalone running in load balancer mode. When I try to change something in Site-to-Server Mapping I'm getting the this error: Error This modification would generate an invalid configuration file, thus it is ignored Does someone kno
-
So first of all this is my first time here and I am very sorry if I forget anything or do anything wrong. I looked for this question and was not able to find it. I would appreciate any help that anyone can offer. Here is some of the information I am
-
Hello Folks, I am new to PeopleSoft. I would like to know what are the scenarios to use Java Script in PeopleSoft (PeopleCode) and why to use java script when we have peoplecode? Thanks!