"cannot find this class" erro while creating Background Callable Object.
Hi All,
I am facing "cannot find this class" while creating Background Callable Object.
I followed the following document for Creating Background Callable Object.
[Creating Callable Objects for Background Execution|http://help.sap.com/saphelp_nwce10/helpdata/en/53/cde385301f4aa3b8e77a92cd46bff3/frameset.htm]
After giving the fully qualified java class name in the Implementation Class Name when i press next i am getting the error.
Please suggets me in solving this issue.
Regards,
S.V.Satish Kumar
Edited by: Sathish Kumar SV on Apr 4, 2009 10:34 AM
Hi, kavita.
First, make sure you choosed the correct container when you created the background CO.
Second, make sure your package name was "com.examples.bckgco" and class name was "UserDetailsCallableObject". The exception which you got just means you entered incorrect name.
It doesn`t relate to your program.
Best Regards.
Louis Huang.
Similar Messages
-
Error while creating a callable object - User Interface
Hello,
When i'm trying to create a callable object - User Interface in the guided procedure design time. i'm getting an error. An internal server error. This is happening while i'm trying to create a guided procedure with webdynpro's.
Is there any body who allready had somthing like this.
Greetings
KurtHi Raja Akella,
I allready had the roles and my portal version is upgraded until SP8 and all the possible patches.
I get an internal server error when i want to create a callable object. specially when i want to create a webdynpro ( ABAP / JAVA).
In the visual administrator i get the following errors.
<b>Error 1</b>
Exception occured during processing of a Web Dynpro application: "com.sap.tc.webdynpro.repository.RepositoryRuntimeException: Failed to get Related Model Object for the object com.sap.caf.eu.gp.dt.comp.semanticbrowser.SemanticBrowserApp, relation Component.".
[EXCEPTION]
com.sap.tc.webdynpro.repository.RepositoryRuntimeException: Failed to get Related Model Object for the object com.sap.caf.eu.gp.dt.comp.semanticbrowser.SemanticBrowserApp, relation Component.
at com.sap.tc.webdynpro.repository.model.DelegatorRepositoryModelClass.getRelatedModelObject(DelegatorRepositoryModelClass.java:640)
at com.sap.tc.webdynpro.progmodel.repository.IWDApplicationInfo$Implementation.getComponentInternal(IWDApplicationInfo.java:286)
at com.sap.tc.webdynpro.progmodel.repository.IWDApplicationInfo$Implementation.getComponent(IWDApplicationInfo.java:270)
at com.sap.caf.eu.gp.ui.co.config.wdapp.COConfigWDApp.addWdappsElement(COConfigWDApp.java:646)
at com.sap.caf.eu.gp.ui.co.config.wdapp.COConfigWDApp.readWebDynproApps(COConfigWDApp.java:631)
at com.sap.caf.eu.gp.ui.co.config.wdapp.COConfigWDApp.readApplications(COConfigWDApp.java:308)
at com.sap.caf.eu.gp.ui.co.config.wdapp.wdp.InternalCOConfigWDApp.readApplications(InternalCOConfigWDApp.java:190)
at com.sap.caf.eu.gp.ui.co.config.wdapp.VSelect.initCreate(VSelect.java:306)
at com.sap.caf.eu.gp.ui.co.config.wdapp.VSelect.onPlugFromDispatch(VSelect.java:174)
at com.sap.caf.eu.gp.ui.co.config.wdapp.wdp.InternalVSelect.wdInvokeEventHandler(InternalVSelect.java:168)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.navigate(ClientApplication.java:826)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.navigate(ClientComponent.java:873)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doNavigation(WindowPhaseModel.java:498)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:144)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:330)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:299)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:711)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:665)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:232)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:152)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: com.sap.tc.webdynpro.repository.RepositoryRuntimeException: XMLParser: Bad attribute list. Expected WhiteSpace, / or >: (:main:, row:1, col:491)
at com.sap.tc.webdynpro.repository.persistence.xml.XMLConfigurationParserWriter.startParsing(XMLConfigurationParserWriter.java:178)
at com.sap.tc.webdynpro.repository.persistence.xml.XMLPersistence.doReadVMO(XMLPersistence.java:126)
at com.sap.tc.webdynpro.repository.persistence.RepositoryPersistence.readVMO(RepositoryPersistence.java:356)
at com.sap.tc.webdynpro.repository.persistence.RepositoryPersistence.doFindRepositoryObject(RepositoryPersistence.java:598)
at com.sap.tc.webdynpro.repository.persistence.RepositoryPersistence.findRepositoryObject(RepositoryPersistence.java:170)
at com.sap.tc.webdynpro.repository.model.Repository.findRepositoryObjectInternal(Repository.java:590)
at com.sap.tc.webdynpro.repository.model.RepositoryObjectRelation$XMLGuidWrapper.getModelObject(RepositoryObjectRelation.java:462)
at com.sap.tc.webdynpro.repository.persistence.RepositoryPersistence.getCurrentLayerObject(RepositoryPersistence.java:702)
at com.sap.tc.webdynpro.repository.model.Repository.getCurrentLayerObject(Repository.java:1483)
at com.sap.tc.webdynpro.repository.model.NonSharedRelationToOne.doMergeInheritedTarget(NonSharedRelationToOne.java:85)
at com.sap.tc.webdynpro.repository.model.NonSharedRelationToOne.mergeInheritedTargets(NonSharedRelationToOne.java:49)
at com.sap.tc.webdynpro.repository.model.RelationToOne.getTarget(RelationToOne.java:93)
at com.sap.tc.webdynpro.repository.model.AbstractRepositoryModelClass.getRelatedModelObject(AbstractRepositoryModelClass.java:234)
at com.sap.tc.webdynpro.repository.model.DelegatorRepositoryModelClass.getRelatedModelObject(DelegatorRepositoryModelClass.java:636)
... 39 more
Caused by: com.sap.engine.lib.xml.parser.NestedSAXParserException: XMLParser: Bad attribute list. Expected WhiteSpace, / or >: (:main:, row:1, col:491)(:main:, row=1, col=491) -> com.sap.engine.lib.xml.parser.ParserException: XMLParser: Bad attribute list. Expected WhiteSpace, / or >:(:main:, row:1, col:491)
at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:148)
at com.sap.tc.webdynpro.repository.persistence.xml.XMLConfigurationParserWriter.startParsing(XMLConfigurationParserWriter.java:166)
... 52 more
Caused by: com.sap.engine.lib.xml.parser.ParserException: XMLParser: Bad attribute list. Expected WhiteSpace, / or >:(:main:, row:1, col:491)
at com.sap.engine.lib.xml.parser.XMLParser.scanAttList(XMLParser.java:1566)
at com.sap.engine.lib.xml.parser.XMLParser.scanElement(XMLParser.java:1687)
at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2792)
at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:227)
at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:141)
at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:156)
at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:259)
at com.sap.engine.lib.xml.parser.Parser.parseWithoutSchemaValidationProcessing(Parser.java:278)
at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:340)
at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:125)
... 53 more
<b>error 2</b>
Processing HTTP request to servlet [dispatcher] finished with error. The error is: com.sap.tc.webdynpro.repository.RepositoryRuntimeException: Failed to get Related Model Object for the object com.sap.caf.eu.gp.dt.comp.semanticbrowser.SemanticBrowserApp, relation Component.
at com.sap.tc.webdynpro.repository.model.DelegatorRepositoryModelClass.getRelatedModelObject(DelegatorRepositoryModelClass.java:640)
at com.sap.tc.webdynpro.progmodel.repository.IWDApplicationInfo$Implementation.getComponentInternal(IWDApplicationInfo.java:286)
at com.sap.tc.webdynpro.progmodel.repository.IWDApplicationInfo$Implementation.getComponent(IWDApplicationInfo.java:270)
at com.sap.caf.eu.gp.ui.co.config.wdapp.COConfigWDApp.addWdappsElement(COConfigWDApp.java:646)
at com.sap.caf.eu.gp.ui.co.config.wdapp.COConfigWDApp.readWebDynproApps(COConfigWDApp.java:631)
at com.sap.caf.eu.gp.ui.co.config.wdapp.COConfigWDApp.readApplications(COConfigWDApp.java:308)
at com.sap.caf.eu.gp.ui.co.config.wdapp.wdp.InternalCOConfigWDApp.readApplications(InternalCOConfigWDApp.java:190)
at com.sap.caf.eu.gp.ui.co.config.wdapp.VSelect.initCreate(VSelect.java:306)
at com.sap.caf.eu.gp.ui.co.config.wdapp.VSelect.onPlugFromDispatch(VSelect.java:174)
at com.sap.caf.eu.gp.ui.co.config.wdapp.wdp.InternalVSelect.wdInvokeEventHandler(InternalVSelect.java:168)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.navigate(ClientApplication.java:826)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.navigate(ClientComponent.java:873)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doNavigation(WindowPhaseModel.java:498)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:144)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:330)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:299)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:711)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:665)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:232)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:152)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: com.sap.tc.webdynpro.repository.RepositoryRuntimeException: XMLParser: Bad attribute list. Expected WhiteSpace, / or >: (:main:, row:1, col:491)
at com.sap.tc.webdynpro.repository.persistence.xml.XMLConfigurationParserWriter.startParsing(XMLConfigurationParserWriter.java:178)
at com.sap.tc.webdynpro.repository.persistence.xml.XMLPersistence.doReadVMO(XMLPersistence.java:126)
at com.sap.tc.webdynpro.repository.persistence.RepositoryPersistence.readVMO(RepositoryPersistence.java:356)
at com.sap.tc.webdynpro.repository.persistence.RepositoryPersistence.doFindRepositoryObject(RepositoryPersistence.java:598)
at com.sap.tc.webdynpro.repository.persistence.RepositoryPersistence.findRepositoryObject(RepositoryPersistence.java:170)
at com.sap.tc.webdynpro.repository.model.Repository.findRepositoryObjectInternal(Repository.java:590)
at com.sap.tc.webdynpro.repository.model.RepositoryObjectRelation$XMLGuidWrapper.getModelObject(RepositoryObjectRelation.java:462)
at com.sap.tc.webdynpro.repository.persistence.RepositoryPersistence.getCurrentLayerObject(RepositoryPersistence.java:702)
at com.sap.tc.webdynpro.repository.model.Repository.getCurrentLayerObject(Repository.java:1483)
at com.sap.tc.webdynpro.repository.model.NonSharedRelationToOne.doMergeInheritedTarget(NonSharedRelationToOne.java:85)
at com.sap.tc.webdynpro.repository.model.NonSharedRelationToOne.mergeInheritedTargets(NonSharedRelationToOne.java:49)
at com.sap.tc.webdynpro.repository.model.RelationToOne.getTarget(RelationToOne.java:93)
at com.sap.tc.webdynpro.repository.model.AbstractRepositoryModelClass.getRelatedModelObject(AbstractRepositoryModelClass.java:234)
at com.sap.tc.webdynpro.repository.model.DelegatorRepositoryModelClass.getRelatedModelObject(DelegatorRepositoryModelClass.java:636)
... 39 more
Caused by: com.sap.engine.lib.xml.parser.NestedSAXParserException: XMLParser: Bad attribute list. Expected WhiteSpace, / or >: (:main:, row:1, col:491)(:main:, row=1, col=491) -> com.sap.engine.lib.xml.parser.ParserException: XMLParser: Bad attribute list. Expected WhiteSpace, / or >:(:main:, row:1, col:491)
at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:148)
at com.sap.tc.webdynpro.repository.persistence.xml.XMLConfigurationParserWriter.startParsing(XMLConfigurationParserWriter.java:166)
... 52 more
Caused by: com.sap.engine.lib.xml.parser.ParserException: XMLParser: Bad attribute list. Expected WhiteSpace, / or >:(:main:, row:1, col:491)
at com.sap.engine.lib.xml.parser.XMLParser.scanAttList(XMLParser.java:1566)
at com.sap.engine.lib.xml.parser.XMLParser.scanElement(XMLParser.java:1687)
at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2792)
at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:227)
at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:141)
at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:156)
at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:259)
at com.sap.engine.lib.xml.parser.Parser.parseWithoutSchemaValidationProcessing(Parser.java:278)
at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:340)
at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:125)
... 53 more
<b>error 3</b>
Processing HTTP request to servlet [dispatcher] finished with error.
The error is: com.sap.tc.webdynpro.repository.RepositoryRuntimeException: Failed to get Related Model Object for the object com.sap.caf.eu.gp.dt.comp.semanticbrowser.SemanticBrowserApp, relation Component.
Exception id: [00505691431B006F0000003E00000FE800041B45B87F7617]
thanks in advance
Kurt -
Background callable object : can not find this class name
Hi All ,
I am following this tutorial link for creating background callable object
http://help.sap.com/saphelp_nwce10/helpdata/en/9a/e8934258a5ca6ae10000000a155106/frameset.htm
I have created java and enterprise application DC and deployed successfully. But while creating CO in design time when i am selecting application and entering class as com.examples.bckgco.UserDetailsCallableObject for Implementation Class Name , and on click next i m getting exception as "can not find this class name". package and class name are correct still getting this excetpion message. Plz help me to resolve this solution.
Regards
KavitaHi, kavita.
First, make sure you choosed the correct container when you created the background CO.
Second, make sure your package name was "com.examples.bckgco" and class name was "UserDetailsCallableObject". The exception which you got just means you entered incorrect name.
It doesn`t relate to your program.
Best Regards.
Louis Huang. -
Background callable object :Error
Hi,
I created one background callable object in webdynpro,
to be called from GP design time.
I have done this using the tutorial :
"Implementing Background callable object"
Deployement finished successfully.
But from GP design time, while creating callable object
of type backround execution, I selected,
container type : library
container : apibckg(deployed DC of type J2ee server
library)
implementation class name : the java class which implemented background callable object.
But error in gp: is
"Cannot find this class name"
In webdynpro after building the project I got the warnings:
Nov 3, 2006 11:57:13 AM /userOut/Development Component (com.sap.ide.eclipse.component.provider.listener.DevConfListener) [Thread[ModalContext,5,main]] WARNING: apibckg: built with warnings sap.com/apibckg(MyComponents) in variant "default" (1.406 sec)
can any bdy help me
thanks
smithaHi Smitha,
You just need to repeat the steps described in the tutorial, i.e. define the references and create a class that implements the GP Background callable object interface.
Don't forget to define the sub-type of the library in the .dcdef file.
<component-type>
<vendor>Your vendor</vendor>
<type>Java</type>
<sub-type>Library</sub-type>
</component-type>
Then add a new empty file named "build.vm" under the folder "cfg". Add the line "#BuildSecondaryLibrary()".
Then build and deploy. It should be there.
Regards,
David -
Implementing and Exposing a Background Callable Object
Hi,
I am following tutorial "Implementing and Exposing a Background Callable Object" of NWDS 7.1. I created implemented Java Enterprise Application and deployed. When i try to create Callable object in GP i am getting error saying "Cannot find this class name". Any solution for this please?
Thanks,
SongaHi,
I Have same problem, can anyone help me ?
I tried the tutorial example for creating "Implementing and Exposing a Background Callable Object". In NW portal, i received message, "Cannot find this class name", when i try create callable objekt.
Thanks,
Nicholas -
"cannot find symbol class studentList" error
Hi I get this error
"cannot find symbol class studentList", but this class is at the same file and also it is in the same folder. so what's wrong .. and I checked the spelling it's the same.
I should create an object named myList of type studentList
and second, I call method menu() and pass it myList as actual parameter.
so I called the function menu which is should be in the main too
like this
myList.menu();
and menu method accepts as parameter an object of type studentList. and display the menu for the user to choose..
here is part my program:
public class ListTest
{ public void menu(Student L) // accepts parameter
System.out.println("");
System.out.println("Choose a number between 1 to 4");
System.out.println("1-Print Info of A Student ");
System.out.println("2-Print Info of All Students ");
System.out.println("3-Display grade of A Specific student");
System.out.println("4-Exit");
System.out.println("");
int choice = Stdin.readInteger();
while (choice != 5)
switch (choice) {
case 1:
L.PrintAStudent(int L);
break;
case 2:
L.PrintAll();
break;
case 3:
L.DisplayGPA();
break;
case 3:
System.exit(0);
break;
default:
System.out.println("wrong Number");
System.out.println("Enter a number between 1 to 4 ");
System.out.println("Enter 4 to Exit");
break;
System.out.println("");
System.out.println("Choose a number between 1 to 4");
System.out.println("1-Print Info of A Student ");
System.out.println("2-Print Info of All Students ");
System.out.println("3-Display grade of A Specific student");
System.out.println("4-Exit");
System.out.println("");
choice = Stdin.readInteger();
}// end method menu
public static void main(String args[ ])
{ studentList myList = new studentList();//myList object is created
myList.menu();
}//end main
}// end of class ListTest
you have mentioned about the class "studentList" but that class is not to be found in the code you have pasted. its instead "ListTest". And the "menu" function seems to b a part of "ListTest" class. Can you provide the structure of the classes "studentList" and "Student" so that the problem can be more clearly understood?
also you are using the variable "Stdin" in the line int choice = Stdin.readInteger(); where as you have not declared this variable.
in the "switch" statement you are calling two different functions for the same case "3" where as it should be "case 3" and "case 4" respectively.
in the "main" you are calling the "menu" function without any parameter while you actually want to pass argument of type "studentList". -
Hi All,
Can any one help me regarding the issue?
Error:
package com.support.misc.feedback
I am getting the following error for the above line. But I have created the Hierarchy in folder structure. But still it is throwing the error.
1. Cannot find the class file for com.sapportals.htmlb.page.DynPage
2. This compilation unit indirectly references the missing type com.sapportals.htmlb.page.DynPage (typically some required class file is referencing a type outside the class path) FeedbackBean.java
Thanks in Advance.
Message was edited by: Gowsika KannanHi Gowsika,
the class needed is located in htmlb.jar which can be found under <irj-root>/WEB-INF/portal/portalapps/com.sap.portal.htmlb/lib
You need to integrate this jar in your .classpath
Hope this helps,
Robert
PS: Please do not post the same question 3 times -
Wrapper cannot find servlet class error
Hi all!
I'm receiving a mysterious error when I try to run my web ap. "Wrapper cannot find servlet class com.ruffalocody.report.ReportServlet or a class it depends on"
I'm running it on JBoss 3.2.7, and I have another web ap, made almost identical to this one which does not display the same error/exception.
If anyone could give me advice on what I should do to fix this, I'd very much appreciate it. :)
Full exception message:
javax.servlet.ServletException: Wrapper cannot find servlet class com.ruffalocody.report.ReportServlet or a class it depends on
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:162)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:534)
root cause
java.lang.ClassNotFoundException: com.ruffalocody.report.ReportServlet
java.net.URLClassLoader$1.run(URLClassLoader.java:199)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:187)
java.lang.ClassLoader.loadClass(ClassLoader.java:289)
java.lang.ClassLoader.loadClass(ClassLoader.java:235)
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:162)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:534)the servlet class file ReportServlet.class is located in:
WEB-INF\classes\com\ruffalocody\report
web.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>RprtSrvlt</servlet-name>
<servlet-class>com.ruffalocody.report.ReportServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>RprtSrvlt</servlet-name>
<url-pattern>/reports</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>
index.jsp
</welcome-file>
</welcome-file-list>
<!-- Context Param -->
<context-param>
<param-name>crystal_image_uri</param-name>
<param-value>crystalreportviewers10</param-value>
</context-param>
<!-- Context Param End -->
</web-app>It's called from the index.jsp page w/ ulr: "reports?goTo=view"
Servlet code (not sure if it's useful, but including just in case):
* ReportServlet.java
* Created on February 1, 2007, 11:04 AM
package com.ruffalocody.report;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory;
import com.crystaldecisions.sdk.occa.report.reportsource.IReportSourceFactory2;
import com.crystaldecisions.sdk.occa.report.reportsource.IReportSource;
import com.crystaldecisions.report.web.viewer.CrystalReportViewer;
import com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase;
* @author aerohner
* @version
public class ReportServlet extends HttpServlet
String rptLoc = "CR10_JRC_BeginHere.rpt";
/** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
* @param request servlet request
* @param response servlet response
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
response.setContentType("text/html;charset=UTF-8");
String goTo = request.getParameter("goTo");
if(goTo != null && goTo.equals("view"))
viewReport(request, response);
}// end goTo view
else if(goTo != null && goTo.equals("export"))
exportReport(request, response);
}// end go to export
else
RequestDispatcher view = request.getRequestDispatcher("index.jsp");
view.forward(request,response);
private void viewReport(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException
IReportSource rptSrc = setUpReportSource(request);
if (rptSrc != null)
// create viewer
CrystalReportViewer viewer = new CrystalReportViewer();
try
viewer.setReportSource(rptSrc);
forward(request, response, viewer);
catch(ReportSDKExceptionBase e)
e.printStackTrace();
}// if rptsrc not null
else
log("rptSrc is null");
}// end else not null
}// end viewReport(.)
private void exportReport(HttpServletRequest request, HttpServletResponse response)
}// end exportReport(.)
private IReportSource setUpReportSource(HttpServletRequest request)
IReportSourceFactory2 rptFact = new JPEReportSourceFactory();
IReportSource rptSrc = null;
try
rptSrc = (IReportSource)
rptFact.createReportSource(rptLoc, request.getLocale());
}// end try
catch (Exception e)
return rptSrc;
}// end setUpReportSource()
private void forward(HttpServletRequest request,
HttpServletResponse response, Object viewer)
throws ServletException, IOException
request.setAttribute("viewer", viewer);
RequestDispatcher view = request.getRequestDispatcher("viewer.jsp");
view.forward(request,response);
}// end forward(...)
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/** Handles the HTTP <code>GET</code> method.
* @param request servlet request
* @param response servlet response
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
processRequest(request, response);
/** Handles the HTTP <code>POST</code> method.
* @param request servlet request
* @param response servlet response
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
processRequest(request, response);
/** Returns a short description of the servlet.
public String getServletInfo()
return "Short description";
// </editor-fold>
}Thanks :)I'm curious. Could you strip off the "java." part of the package, so both in your sourcefile as in the directory structure? It may be that the java package is not allowed, but then I wouldn't know why you didn't get a compile error...
-
I have a new computer and I have installed the latest version of Tomcat but kept the old free version of the Sun One Studio which I still had a setup file for (as I couldn't find it on this site anywhere for free anymore). The new version of Tomcat puts my webapps in a different area now being s1studio\tomcat401\webapps but there is another area for the server: C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\tomcat-docs. I use the first directory and that shows my jsp's etc but it doesn't find my servlets.
My problem I am having is that my log file is showing this:
2005-10-24 10:27:48 StandardHost[localhost]: Removing web application at context path /webdav
2005-10-24 10:27:52 StandardHost[localhost]: Removing web application at context path /examples
2005-10-24 10:27:52 StandardHost[localhost]: Removing web application at context path /tomcat-docs
2005-10-24 10:27:52 StandardHost[localhost]: Removing web application at context path
2005-10-24 10:27:52 StandardHost[localhost]: Removing web application at context path /manager
2005-10-24 10:28:11 WebappLoader[manager]: Deploying class repositories to work directory C:\Program Files\s1studio_jdk\s1studio\tomcat401\work\localhost\manager
2005-10-24 10:28:11 StandardManager[manager]: Seeding random number generator class java.security.SecureRandom
2005-10-24 10:28:11 StandardManager[manager]: Seeding of random number generator has been completed
2005-10-24 10:28:11 ContextConfig[manager]: Added certificates -> request attribute Valve
2005-10-24 10:28:11 ContextConfig[manager]: Configured an authenticator for method BASIC
2005-10-24 10:28:11 StandardWrapper[manager:default]: Loading container servlet default
2005-10-24 10:28:11 default: init
2005-10-24 10:28:11 StandardWrapper[manager:invoker]: Loading container servlet invoker
2005-10-24 10:28:11 invoker: init
2005-10-24 10:28:11 jsp: init
2005-10-24 10:28:11 StandardHost[localhost]: Installing web application at context path from URL file:C:\Program Files\s1studio_jdk\s1studio\tomcat401\webapps\ROOT
2005-10-24 10:28:11 WebappLoader[]: Deploying class repositories to work directory C:\Program Files\s1studio_jdk\s1studio\tomcat401\work\localhost\_
2005-10-24 10:28:11 StandardManager[]: Seeding random number generator class java.security.SecureRandom
2005-10-24 10:28:11 StandardManager[]: Seeding of random number generator has been completed
2005-10-24 10:28:11 ContextConfig[]: Added certificates -> request attribute Valve
2005-10-24 10:28:11 StandardWrapper[:default]: Loading container servlet default
2005-10-24 10:28:11 default: init
2005-10-24 10:28:11 StandardWrapper[:invoker]: Loading container servlet invoker
2005-10-24 10:28:11 invoker: init
2005-10-24 10:28:11 jsp: init
2005-10-24 10:28:11 StandardHost[localhost]: Installing web application at context path /tomcat-docs from URL file:C:\Program Files\s1studio_jdk\s1studio\tomcat401\webapps\tomcat-docs
2005-10-24 10:28:11 WebappLoader[tomcat-docs]: Deploying class repositories to work directory C:\Program Files\s1studio_jdk\s1studio\tomcat401\work\localhost\tomcat-docs
2005-10-24 10:28:11 StandardManager[tomcat-docs]: Seeding random number generator class java.security.SecureRandom
2005-10-24 10:28:11 StandardManager[tomcat-docs]: Seeding of random number generator has been completed
2005-10-24 10:28:12 ContextConfig[tomcat-docs]: Added certificates -> request attribute Valve
2005-10-24 10:28:12 StandardWrapper[tomcat-docs:default]: Loading container servlet default
2005-10-24 10:28:12 default: init
2005-10-24 10:28:12 StandardWrapper[tomcat-docs:invoker]: Loading container servlet invoker
2005-10-24 10:28:12 invoker: init
2005-10-24 10:28:12 jsp: init
2005-10-24 10:28:12 StandardHost[localhost]: Installing web application at context path /webdav from URL file:C:\Program Files\s1studio_jdk\s1studio\tomcat401\webapps\webdav
2005-10-24 10:28:12 WebappLoader[webdav]: Deploying class repositories to work directory C:\Program Files\s1studio_jdk\s1studio\tomcat401\work\localhost\webdav
2005-10-24 10:28:12 StandardManager[webdav]: Seeding random number generator class java.security.SecureRandom
2005-10-24 10:28:12 StandardManager[webdav]: Seeding of random number generator has been completed
2005-10-24 10:28:12 ContextConfig[webdav]: Added certificates -> request attribute Valve
2005-10-24 10:28:12 StandardWrapper[webdav:default]: Loading container servlet default
2005-10-24 10:28:12 default: init
2005-10-24 10:28:12 StandardWrapper[webdav:invoker]: Loading container servlet invoker
2005-10-24 10:28:12 invoker: init
2005-10-24 10:28:12 jsp: init
2005-10-24 10:29:55 StandardWrapper[:org.apache.catalina.INVOKER.CourseList]: Marking servlet org.apache.catalina.INVOKER.CourseList as unavailable
2005-10-24 10:29:55 invoker: Cannot allocate servlet instance for path /servlet/CourseList
javax.servlet.ServletException: Wrapper cannot find servlet class CourseList or a class it depends on
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:807)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:396)
at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
at java.lang.Thread.run(Thread.java:536)
----- Root Cause -----
java.lang.ClassNotFoundException: CourseList
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1156)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:801)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:396)
at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
at java.lang.Thread.run(Thread.java:536)
2005-10-24 10:54:35 StandardWrapper[:org.apache.catalina.INVOKER.CourseList]: Marking servlet org.apache.catalina.INVOKER.CourseList as unavailable
2005-10-24 10:54:35 invoker: Cannot allocate servlet instance for path /servlet/CourseList
javax.servlet.ServletException: Wrapper cannot find servlet class CourseList or a class it depends on
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:807)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:396)
at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
at java.lang.Thread.run(Thread.java:536)
----- Root Cause -----
and so it goes on.
My classes are in the directory as:
C:\Program Files\s1studio_jdk\s1studio\tomcat401\webapps\ROOT\servervirtualward\WEB-INF\classes\virtualward\java
and my web.xml is here: C:\Program Files\s1studio_jdk\s1studio\tomcat401\webapps\ROOT\servervirtualward\WEB-INF
and the code for the CourseList servlet is:
<servlet>
<servlet-name>virtualward.java.CourseList</servlet-name>
<servlet-class>virtualward.java.CourseList</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>virtualward.java.CourseList</servlet-name>
<url-pattern>/servlet/CourseList</url-pattern>
</servlet-mapping>The example servlets work fine and all .jsp's work within my project.
Can anyone spot what's wrong?
Thanks!!!I did a basic .jsp page and that worked so at least that's something. Here is my code for the .jsp that won't work. It worked perfectly on my old computer on the configuration with Tomcat4
<%@page import="virtualward.java.Student"%>
<jsp:useBean id="student" class="virtualward.java.Student" scope="session"/>
<%
String error = null; // set the error message to null for the initial visit
//to the page
if (request.getParameter("SUBMITTED") != null)
Student s = Student.findStudent(request.getParameter("userid"));
if (s == null)
error = "Login ID not found, please try again.";
else
//if the input password = the stored password
if (request.getParameter("userpword").equals(s.getPWord()))
//if login priviledges are 1 give them student access
if (s.getPrivilegeLevel()==1)
//store the details of that students details in a session from the object.
session.setAttribute("student", s);
//go to the page to display the details
response.sendRedirect("stuProfile.jsp");
} //if login priviledges are 2 or 3 direct them to a page that
//gives them Lecturer priviledges
else if (s.getPrivilegeLevel()==2 || s.getPrivilegeLevel()==3)
//store the details of that students details in a session from the object.
session.setAttribute("student", s);
//go to the page to display the details
//response.sendRedirect("selectProfile.jsp"); //old link
response.sendRedirect("maintenance/courseIdenti.jsp");
else
error = "Invalid Password";
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Student Profile</title>
<link href="VWStyle.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-color: #515151;
-->
</style>
</head>
<body>
<table width="450" height="125" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="8" colspan="3"><img src="images/tit_studentProf.gif" width="200" height="27"></td>
<td height="8"> </td>
</tr>
<tr>
<td width="8" height="8" background="images/corner01.gif"><img src="images/spacer.gif" width="8" height="8"></td>
<td height="8" colspan="2" background="images/top_tbl.gif"><img src="images/spacer.gif" width="8" height="8"></td>
<td width="8" height="8" background="images/corner02.gif"><img src="images/spacer.gif" width="8" height="8"></td>
</tr>
<tr>
<td background="images/left_tble.gif"> </td>
<td width="8" align="left" valign="top" class="bodyText"> </td>
<td align="left" valign="top" class="bodyText"><form method = POST ACTION="profileLogin.jsp">
<Input type="HIDDEN" name="SUBMITTED" VALUE="T">
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<% if (error != null){%>
<strong> <FONT COLOR = "#FF0000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><%= error %></FONT></strong><br>
<% } %>
<td valign="top" class="bodyText">Login ID:</td>
<td valign="top" class="bodyText">Password:</td>
<td> </td>
</tr>
<tr>
<td width="155" valign="top" class="bodyText"><input name="userid" type="text" width="25">
</td>
<td width="136" valign="top" class="bodyText"><input name="userpword" type="password" size=25>
</td>
<td width="126" align="right" valign="top"><div align="left">
<input name="Submit" type="image" id="Submit" src="images/but_go.gif" alt="Click to login" width="36" height="26" border="0">
</div></td>
</tr>
<tr>
<td colspan="3" valign="top" class="bodyText"><strong>Login to view your profile<br>
</strong><font color="#FF0000" size="1" face="Verdana, Arial, Helvetica, sans-serif">In the case of forgetting your login details, contact your module co-ordinator.</font></td>
</tr>
</table>
</form></td>
<td background="images/right_tbl.gif"> </td>
</tr>
<tr>
<td width="8" height="8" background="images/corner03.gif"><img src="images/spacer.gif" width="8" height="8"></td>
<td height="8" colspan="2" background="images/bot_tbl.gif"><img src="images/spacer.gif" width="8" height="8"></td>
<td width="8" height="8" background="images/corner04.gif"><img src="images/spacer.gif" width="8" height="8"></td>
</tr>
</table>
</body>
</html> -
Cannot find package/class symbol
hello. i'm using netveans for the first time. i have a java application with 2 classes... pb.java with public class pb int package svr and cl.java with public class cl in package cli
that is..
file class package
pb pb svr
cl cl cli
pb.java compiles properly cl.java gioves error.
the error is in the following lines of code...
pb obj1 = new pb();
pb obj2 = new pb();i'm trying to make an object fo type pb from cl.java. the error i get is...
cannot find symbol
class pb
location cli.cl
i alse tried puttin svr.pb instead of pb but no use.
the entire cose is as follows...
pb.java
* pb.java
* Created on December 4, 2006, 8:56 AM
package svr;
public class pb
private double balance;
private double []lt = new double [10];
private int i=9;
public void deposit(double amt)
if(amt<=0)
System.out.println("Enter amount greater than 0");
else
balance=balance+amt;
if(i>=0)
lt=amt;
else
for(int j=9;j>=0;j--)
lt[i]=lt[i-1];
lt[0]=amt;
public void withdraw(double amt)
if(amt<=0)
System.out.println("Enter amount greater than 0");
else
if(amt>balance)
System.out.println("Balance lower than amount entered");
else
balance=balance-amt;
if(i>=0)
lt[i]=-amt;
else
for(int j=9;j>=0;j--)
lt[i]=lt[i-1];
lt[0]=-amt;
public void bal()
System.out.println("Balance: "+balance);
public void lts()
System.out.println("Last 10 Transactions");
for(int j=i;j>10;j++)
System.out.println(lt[j]);
public void statement()
lts();
bal();
cl.java
* cl.java
* Created on December 4, 2006, 8:58 AM
package cli;
class cl
public static void main(String[] args)
pb obj1 = new pb();
pb obj2 = new pb();
obj1.deposit(100.50);
obj1.statement();
obj2.deposit(200.75);
obj2.statement();
obj1.withdraw(25.50);
obj1.statement();
obj2.withdraw(100.25);
obj2.statement();For a beginner these tools are worst, because they
hide all the stuff a programmer needs to know to find
his way around Java. They should spend a few weeks
with the command line and a good text editor before
switching.
Just because an IDE does something for you, it
doesn't mean you don't need to kno wwhat it does.
Unless you volunteer to handle all "how do I do X in
Netbeans/Eclipse/Whatever", JAR and classpath
questions posted here by newbies yourself.I suppose I can agree with that to some extent. I wouldn't suggest to anyone that they just blindly trust whatever code the IDE inserts automatically.
But there's nothing wrong about learning by example. The IDE is willing to teach proper syntax, and eclipse will give suggestions about capitalizing class names and making constants all-caps.
There are things that frustrate new programmers where an IDE will be helpful, especially if the entire API is uncharted territory. -
Servlet cannot find helper class
Hello
Under WEB-INF/classes I put ServletExample and SingletonExample. Compiling ServletExample, that makes use of SingletonExample, works.
In the directory WEB-INF/classes I also have another direcotry, test. And in WEB-INF/classes/test I put again ServletExample and SingletonExample.
Here I have tried in several ways to compile the servlet, but I always get an:
Cannot find symbol class SingletonExample.
I tried writing package test at the top of both files, and even at the top of only one of these two.
I even tried to make WEB-INF/classes/test/ServletExample make use of SingletonExample residing in WEB-INF/classes, but I didnt succeded.
What happens when you have subdirectory in WEB-INF/classes/? I think this is a MUST, to have subdirectory in large webapplication, so I really dont want to put everything in the classes directory.
Do you how to resolve this prolem? And: if Im in WEB-INF/classes/test and want to referr from a servlet residing in this direcory to a Singleton/helper class residing in WEB-INF/classes/, which approach do I have to use?
Thanks
PaoloJeez, you aren't gonna get very far in Java like this.
CLASSPATH is wrong - again. You're supposed to give JARs and paths where the class loader is supposed to look, not the actual .class file.
Also, you're not telling the compiler to put the .class file in the package directory structure.
Your example is pretty awful. Try this:
Put this code into c:\common
package common;
import common.test.TestDown; // What the hell is this? There is no package test, but there is a package named common.test
public class TestUp
public void sayHello()
System.out.println("Hello.....");
}Put this code into c:\common\test
package common.test;
import common.TestUp;
public class TestDown
public TestDown()
TestUp testUp = new TestUp();
testUp.sayHello();
public static void main(String[] args)
new TestDown();
}Open a command shell and navigate to c:\, then do the following:
Directory of c:
07/01/2005 03:43 PM <DIR> .
07/01/2005 03:43 PM <DIR> ..
07/01/2005 03:45 PM <DIR> common
0 File(s) 0 bytes
3 Dir(s) 74,909,675,520 bytes free
C:\>javac -d . common\*.java
C:\>javac -d . common\test\*.java
C:\>java -classpath . common.test.TestDown
Hello.....Once you've got your head around this, go learn Ant and have it compile your projects properly.
% -
The previous version of Itunes had a function where I could identify duplicate songs in my iTUNES library. I cannot find this function in the new version of iTUNES.
Please advise where this is in the new version?The show duplicates/show exact duplicates features have been left out of iTunes 11. Rumor suggests they will be restored in the next build. In the meantime I have written two Windows scripts to make playlists of Duplicates and Exact Duplicates, either from a selection of tracks or the entire library.
If you want to manually remove duplicate tracks use shift-delete to remove selected tracks from the library as well as the playlist. Keep one of each repeated group of files and don't send to the recycle bin unless you are sure that there are multiple files on the disc as opposed to multiple entries to the same file.
There is also my DeDuper script if you don't want to do it by hand. This can preserve ratings, play counts, playlist membership, etc. which are lost in a manual clean up. Please take note of the warning to backup your library before deduping. See this thread for background on deduping and the script.
tt2 -
Hi,
I was trying the "How to BI JAVA SDK in a Portal iView and get the following error.
The project was not built since its classpath is incomplete. Cannot find the class file for com.sap.portal.services.api.connectorgateway.IConnectorGatewayService. Fix the classpath and try rebuilding this project.
I have the following in my portalapp.xml file
<property name="SharingReference" value="com.sap.portal.ivs.connectorservice"/>
and i have also added the jar file "com.sap.portal.ivs.connectorservice_api" in the set of lib's
Has some faced a similar issue? or can someone suggest how I could possibly resolve this.
Thanks,
SmithaHi Smitha:
My webdynpro dc was build failed for "This compilation unit indirectly references the missing type com.sap.engine.services.webservices.espbase.client.dynamic.content.GenericObject (typically some required class file is referencing a type outside the classpath)".
How should i do? Thank you! -
Cannot find symbol - class whatever ... Arraylists!
Hi all,
Having a problem creating an Arraylist. Firstly, I thought you could have an ArrayList of what ever you wanted. For example, private ArrayList<Anything> myarraylist... that would be an ArrayList of "anything".
I'm trying to create an ArrayList to store locations. However, these locations are stored inside the objects of another class (as a field).
When I go to do private ArrayList<Locations> it says it cannot find symbol - class locations. Obviously it's looking for a class that doesn't exist. How would I store the locations of rallies into the collection, that are stored inside the object of another class (i.e. a RoadTrip object which has details of dates, location, codes etc).
Hope you can understand that...!
CheersYou can create as many RoadTrip ArrayLists as you want, as long as the variables that point to the ArrayLists have unique names.
ArrayList<RoadTrip> al1 = new ArrayList<RoadTrip>();
ArrayList<RoadTrip> al2 = new ArrayList<RoadTrip>();Nothing wrong with that. -
Wrapper cannot find servlet class
Hi all
Can anyone please help me to resolve this error. It come about since I've provided the package (pa_sodev.pr_add_user_diary_event). My Java file is in Java Resources:src folder .
I don't have a folder called classes in my WEB_INF directory.
Many thanks
Zed
exception
javax.servlet.ServletException: Wrapper cannot find servlet class addEveProcess or a class it depends on
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Unknown Source)
root cause
java.lang.ClassNotFoundException: addEveProcess
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1484)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Unknown Source)Edited by: Zed420 on Jan 31, 2010 6:09 PMThanks for your reply, can I ask if my setup is correct ?
I'm using Eclipse, on my left in Dynamic Web Perspective I have Servers and myProject.
In myProject ->Java Resources:src (this is where all my java files are with package) and WebContent.
In WebContent ->META-INF and WEB-INF
In WEB-INF ->(this is where I have lib folder and my xml & jsp files)
In lib I have Oracle connector .jar
Can someone confirm if this is the right setup please.
thanks
Zed
Maybe you are looking for
-
Can Airplay mirroring work on TV only while iMac's Monitor is off?
Hi there Can anyone please tell me if airplay mirroring can work on an iMac the same way it works on iPhones? i.e. can it transfer the picture to TV only while iMac's screen goes off, instead of using both displays (iMac's screen and TV)? It would be
-
Business Objects Merge Dimension
Dear All, I have three data providers in Webi as per mentioned below Query1- emp no,emp name,city Query2- emp no,dept no,dept name Query3- dept no,loc As per user requirement I need to show the data in webi report mentioned below empno emp name
-
PNG files are grainy when opened in Illustrator.
Files that I create in Photoshop and save as PNG files are grainy and colored incorrectly when opened in Illustrator. The files are fine when opened in other programs. Please see the pictures below to illustrate my point. These are the same file, how
-
Could not kill one spid - PREEMPTIVE_XE_SESSIONCOMMIT
Dear DBA's, Today I had a problem in my SQL 2008 R2 (10.50.2796) instance. There's na every day Job where I stop one server audit, import some audit files to a table and then start it again. Yesterday night there was a problem in the step 1, which ha
-
Hi, I'm writing a code for Heap Sort, to sort an array of Comparables from 1 to n But it is not working, can some one please look at my code and tell me where I'm wrong, Please......... public class HeapSort { //Sorts an array of data of the spe