You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by kumar ramanathan <ku...@gmail.com> on 2014/04/18 18:08:28 UTC

Class not found error while complie application class

Hi Friends,I have trouble in run my first wicket application .Please find the
details below.a. I have created three files
HelloWorldApplication.java,HelloWorld.java,HelloWorld.html,web.xml b. I have
downloaded the wicket jar files and placed it in the tomcat lib directoryc.
I have set the classpath to the jar filesd. Then I did the javac
HelloWorld.java -> successfulle.Then I did javac HelloWorldApplication.java
, the system throws the below error*kumar@ubuntu:~/javaapplications/wicket$
javac HelloWorldApplication.java HelloWorldApplication.java:17: cannot find
symbolsymbol  : class HelloWorldlocation: class HelloWorldApplication       
return HelloWorld.class;                    ^Note:
HelloWorldApplication.java uses unchecked or unsafe operations.Note:
Recompile with -Xlint:unchecked for details.1 error*I need your help to run
te application program , so that i can proceed to run my first wicket
program in my machine.Thanks,Kumar Ramanathan

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Class-not-found-error-while-complie-application-class-tp4665464.html
Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.

Re: Class not found error while complie application class

Posted by Sandor Feher <sf...@bluesystem.hu>.
I suggest to start with http://wicket.apache.org/start/quickstart.html.
This makes your first steps much easier.

Regards,

Sandor

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Class-not-found-error-while-complie-application-class-tp4665464p4665466.html
Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.

Re: Class not found error while complie application class

Posted by kumar ramanathan <ku...@gmail.com>.
Thanks Andrea , It fixed my problem.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Class-not-found-error-while-complie-application-class-tp4665464p4665468.html
Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.

Re: Class not found error while complie application class

Posted by kumar ramanathan <ku...@gmail.com>.
Hi Andrea,

Am facing issues in running my first application in wicket using tomcat .
Please find the information below.

a. I have drafted three files HelloWorld.java , HelloWorldApplication.java
, HelloWorld.html

as below.


 *HelloWorld.java:*

package HelloWorld;


 import org.apache.wicket.markup.html.WebPage;

import org.apache.wicket.markup.html.basic.Label;

public class HelloWorld extends WebPage {

public HelloWorld() {

add(new Label("message", "HelloWorld"));

}

}


 *HelloWorldApplication.java*


 package HelloWorld;

import org.apache.wicket.Page;

import org.apache.wicket.protocol.http.WebApplication;


 public class HelloWorldApplication extends WebApplication {

public Class getHomePage() {

return HelloWorld.class;

} }


 *HelloWorld.html*

<html>

<body>

<span wicket:id="message" id="message" />

</body>

</html>


 *web.xml*

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="
http://java.sun.com/xml/ns/javaee" xmlns:web="
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="HelloWorldWicket"
version="2.5">

<display-name>HelloWorldWicket</display-name>

<filter>

<filter-name>HelloWorldApplication</filter-name>

<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>

<init-param>

<param-name>applicationClassName</param-name>

<param-value>HelloWorld.HelloWorldApplication</param-value>

</init-param>

</filter>

<filter-mapping>

<filter-name>HelloWorldApplication</filter-name>

<url-pattern>/*</url-pattern>

</filter-mapping>

</web-app>


 b. Then i have sucessfully complied the java files using javac
HelloWorld.java and javac HelloWorldApplication and created the .class files


 Then i have copied this two class files HelloWorld.class and
HelloWorldApplication.class to the tomcat path
/home/kumar/javaapplications/tomcat/apache-tomcat-6.0.36/webapps/ROOT/WEB-INF/classes/HelloWorld/
and placed the web.xml file in WEB-INF path,HelloWorld.html file in ROOT
directory.


 After that i have started the tomcat server and launched
http:/localhost:8080/HelloWorld.html , empty page came. So tried with
http:/localhost:8080/HelloWorld/ ---> the 404 error comes up.


 I need your help how could i run my first wicket application in tomcat
(amnot using eclipse , maven) with this asusual servlet process.


 Please help me ,am waiting for your reply.







On Sat, Apr 19, 2014 at 3:10 AM, Andrea Del Bene-3 [via Apache Wicket] <
ml-node+s1842946n4665467h55@n4.nabble.com> wrote:

> Hi,
>
> this kind of questions should be posted to the users list and not the
> dev one. Anyway, I think you should add to your classpath also the
> current directory "."
> Please consider also to use Maven instead of directly compiling with
> javac. It saves you a lot of work.
>
> > Hi Friends,I have trouble in run my first wicket application .Please
> find the
> > details below.a. I have created three files
> > HelloWorldApplication.java,HelloWorld.java,HelloWorld.html,web.xml b. I
> have
> > downloaded the wicket jar files and placed it in the tomcat lib
> directoryc.
> > I have set the classpath to the jar filesd. Then I did the javac
> > HelloWorld.java -> successfulle.Then I did javac
> HelloWorldApplication.java
> > , the system throws the below error*kumar@ubuntu:~/javaapplications/wicket$
>
> > javac HelloWorldApplication.java HelloWorldApplication.java:17: cannot
> find
> > symbolsymbol  : class HelloWorldlocation: class HelloWorldApplication
> > return HelloWorld.class;                    ^Note:
> > HelloWorldApplication.java uses unchecked or unsafe operations.Note:
> > Recompile with -Xlint:unchecked for details.1 error*I need your help to
> run
> > te application program , so that i can proceed to run my first wicket
> > program in my machine.Thanks,Kumar Ramanathan
> >
> > --
> > View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Class-not-found-error-while-complie-application-class-tp4665464.html
> > Sent from the Forum for Wicket Core developers mailing list archive at
> Nabble.com.
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Class-not-found-error-while-complie-application-class-tp4665464p4665467.html
>  To unsubscribe from Class not found error while complie application
> class, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4665464&code=a3VtYXJyYW1hbmF0aGFAZ21haWwuY29tfDQ2NjU0NjR8LTQ2Njc1NzExMg==>
> .
> NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
with regards,
Kumar R M
Save the Earth.She will take care of you


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Class-not-found-error-while-complie-application-class-tp4665464p4665470.html
Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.

Re: Class not found error while complie application class

Posted by Andrea Del Bene <an...@gmail.com>.
Hi,

this kind of questions should be posted to the users list and not the 
dev one. Anyway, I think you should add to your classpath also the 
current directory "."
Please consider also to use Maven instead of directly compiling with 
javac. It saves you a lot of work.
> Hi Friends,I have trouble in run my first wicket application .Please find the
> details below.a. I have created three files
> HelloWorldApplication.java,HelloWorld.java,HelloWorld.html,web.xml b. I have
> downloaded the wicket jar files and placed it in the tomcat lib directoryc.
> I have set the classpath to the jar filesd. Then I did the javac
> HelloWorld.java -> successfulle.Then I did javac HelloWorldApplication.java
> , the system throws the below error*kumar@ubuntu:~/javaapplications/wicket$
> javac HelloWorldApplication.java HelloWorldApplication.java:17: cannot find
> symbolsymbol  : class HelloWorldlocation: class HelloWorldApplication
> return HelloWorld.class;                    ^Note:
> HelloWorldApplication.java uses unchecked or unsafe operations.Note:
> Recompile with -Xlint:unchecked for details.1 error*I need your help to run
> te application program , so that i can proceed to run my first wicket
> program in my machine.Thanks,Kumar Ramanathan
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Class-not-found-error-while-complie-application-class-tp4665464.html
> Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.