What should I use to perform the crawler test?

2018-01-24 Thread Sokab
Hi everyone. I have to write a crowler test for wicket application (wildfly
server). Do You think Jsoup is enough?I tried to log in to my application to
use Jsoup, for example the code on this page
http://www.scrapingauthority.com/2016/08/16/web-scraping-in-java-with-jsoup/
but I had many problems, because I did not have a reaction. Should I use
something else like Selenium and do not use Jsoup? I apologize for my
question but I really do not know what to use. I need to check where in my
application are errors after entering a link or search for a text. Thanks
for any help.

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Problem with return method inside validating class

2017-06-11 Thread Sokab
I wander why I can't return any method form repository inside Validator.I
need to have all logins inside validator. All methods works properly in
another classes but not in the validating class  (implemented IValidator).
Someone knows why?


 public class LoginValidator implements IValidator{

@Inject
UserBO userBO;

private final List existingLogins1 = userBO.findAllLogins(); // 
<--- this not works only in this class ???
private final List allUsers = userBO.findAll(); // <-- another
method like this also don't work
private final List existingLogins2 = Arrays.asList("aaa",
"bbb");

@Override
public void validate(IValidatable validatable) {

}

private void error(IValidatable validatable, String errorKey) {
System.out.println("ERROR");
}

 }


 public class RegisterForm extends Form{
@Override
protected void onInitialize() {


 User users = new User();
 CompoundPropertyModel model = new CompoundPropertyModel(users);
 this.setModel(model);

 RequiredTextField login = new RequiredTextField("login");
 //login.add(new LoginValidator()); 

  ..
}
 }

When i redirect page to the registration immediately an error is displayed:

Unexpected RuntimeException
Last cause: null

Root cause:

java.lang.NullPointerException
 at
pl.mnlabs.superleague.Validators.LoginValidator.(LoginValidator.java:21)
 at
pl.mnlabs.superleague.page.registration.RegisterForm.onInitialize(RegisterForm.java:54)
 at org.apache.wicket.Component.fireInitialize(Component.java:878)
 at
org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:1048)
 at
org.apache.wicket.MarkupContainer.addedComponent(MarkupContainer.java:1025)
 at org.apache.wicket.MarkupContainer.add(MarkupContainer.java:239)
 at
pl.mnlabs.superleague.page.registration.SuperLeagueRegistrationPage.onInitialize(SuperLeagueRegistrationPage.java:26)
 at org.apache.wicket.Component.fireInitialize(Component.java:878)
 at
org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:1048)
 at org.apache.wicket.Page.isPageStateless(Page.java:459)
 at
org.apache.wicket.request.handler.render.WebPageRenderer.isPageStateless(WebPageRenderer.java:287)
 at
org.apache.wicket.request.handler.render.WebPageRenderer.shouldRenderPageAndWriteResponse(WebPageRenderer.java:333)
 at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:193)
 at
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
 at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:912)
 at
org.apache.wicket.request.RequestHandlerExecutor.execute(RequestHandlerExecutor.java:65)
 at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:283)
 at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:253)
 at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:221)
 at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:262)
 at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:204)
 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:286)
 at
io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
 at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
 at
io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
 at
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
 at
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
 at
org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
 at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
 at
io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
 at
io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
 at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
 at
io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
 at
io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
 at
io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
 at

Re: How reload necessary Panel inside common layout?

2017-06-01 Thread Sokab
Thank You very much!!!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-reload-necessary-Panel-inside-common-layout-tp4677948p4677977.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How reload necessary Panel inside common layout?

2017-05-31 Thread Sokab
Thanks for reply I suppose I have to add my component panel to
AjaxRequestTarget (target.add(panel) itp..) but my problem is that I do not
understand how handle panels (Panel3 / 4) inside Panel2 and redirect
(display) to some WebPage (MainPage). When I use simple page it is ok  (just
I am expanding my parent class  add BookmarkablePageLink and 
in html ) but when I use panels I do not know how to handle it. I'm sorry
for English

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-reload-necessary-Panel-inside-common-layout-tp4677948p4677969.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How reload necessary Panel inside common layout?

2017-05-30 Thread Sokab
Hi. I follow this post 
 ( 
https://stackoverflow.com/questions/24061261/loading-wicket-panels-dynamically-in-a-div

  
) and try display necessary Panel inside layout but I really can't do it.

I created a sample project:

public class WicketApplication extends WebApplication{
@Override
public Class getHomePage()
{
return MainPage.class;
}

@Override
protected void init() {
super.init();
}
}

***
MainPage.html:

http://wicket.apache.org;>
  

Main Page

   
   
  




MainPage.java:

public class MainPage extends WebPage{

@Override
protected void onInitialize() {
super.onInitialize(); 

add(new Panel1("panel1"));  
}
}

***
Panel1.html:
http://wicket.apache.org;>








Panel1.java:
public class Panel1 extends Panel{

public Panel1(String id) {
super(id);
}

@Override
protected void onInitialize() {
super.onInitialize(); 

add(new Panel2("panel2")); 
}
}

***
Panel2.html:
http://wicket.apache.org;>



 Page1 <#>  
 Page2 <#>  






Panel2.java:
public class Panel2 extends Panel{

public Panel2(String id) {
super(id);
}

@Override
protected void onInitialize() {
super.onInitialize(); 


add(new AjaxLink("page3") {
@Override
public void onClick(AjaxRequestTarget target) {
   // ??
}
});
   

add(new AjaxLink("page4") {
@Override
public void onClick(AjaxRequestTarget target) {
//??
}
});

}
}

***
Panel3.html:
http://wicket.apache.org;>


Panel 3 Content




Panel3.java:
public class Panel3 extends Panel{
public Panel3(String id) {
super(id);
}
}

***
Panel4.html:
http://wicket.apache.org;>


Panel 4 Content




Panel4.java:
public class Panel4 extends Panel{
public Panel4(String id) {
super(id);
}
}
**
After clicked on AjaxLink inside Panel2 I need display panel3 or panel4 in
MainPage without reload all page. How can I do this?  Can I call
wicket:id="homePanel" from MainPage.html inside Panel2.java and and replace
panel3/panel4 after ajax request? Thank You for any hint.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-reload-necessary-Panel-inside-common-layout-tp4677948.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket tabs does not work properly.

2017-04-12 Thread Sokab
I am using version 7  (7.6.0)

Thank You so much for the hint Sven. It helped :)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-tabs-does-not-work-properly-tp4677657p4677672.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket tabs does not work properly.

2017-04-11 Thread Sokab
Hi Sven



Stacktrace

Root cause:

org.apache.wicket.WicketRuntimeException: Cannot modify component hierarchy
after render phase has started (page version cant change then anymore)
 at
org.apache.wicket.Component.checkHierarchyChange(Component.java:3662)
 at org.apache.wicket.Page.dirty(Page.java:271)
 at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:332)
 at org.apache.wicket.Page.dirty(Page.java:250)
 at org.apache.wicket.Page.componentModelChanging(Page.java:904)
 at org.apache.wicket.Component.modelChanging(Component.java:2218)
 at
org.apache.wicket.Component.setDefaultModelObject(Component.java:3121)
 at
org.apache.wicket.extensions.markup.html.tabs.TabbedPanel.setSelectedTab(TabbedPanel.java:393)
 at
org.apache.wicket.extensions.markup.html.tabs.TabbedPanel.onBeforeRender(TabbedPanel.java:268)
 at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
 at org.apache.wicket.Component.beforeRender(Component.java:1018)
 at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1836)
 at org.apache.wicket.Component.onBeforeRender(Component.java:3916)
 at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
 at org.apache.wicket.Component.beforeRender(Component.java:1018)
 at
org.apache.wicket.Component.internalPrepareForRender(Component.java:2236)
 at org.apache.wicket.Component.render(Component.java:2325)
 at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1526)
 at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1729)
 at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1704)
 at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1659)
 at
org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:517)
 at
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:70)
 at
org.apache.wicket.Component.internalRenderComponent(Component.java:2601)
 at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1668)
 at
org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onRender(Border.java:527)
 at org.apache.wicket.Component.internalRender(Component.java:2401)
 at org.apache.wicket.Component.render(Component.java:2329)
 at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1526)
 at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1729)
 at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1704)
 at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:799)
 at
org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.renderAssociatedMarkup(AssociatedMarkupSourcingStrategy.java:77)
 at
org.apache.wicket.markup.html.panel.BorderMarkupSourcingStrategy.onComponentTagBody(BorderMarkupSourcingStrategy.java:46)
 at
org.apache.wicket.Component.internalRenderComponent(Component.java:2601)
 at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1668)
 at org.apache.wicket.Component.internalRender(Component.java:2401)
 at org.apache.wicket.Component.render(Component.java:2329)
 at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1526)
 at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1729)
 at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1704)
 at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:799)
 at
org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.renderAssociatedMarkup(AssociatedMarkupSourcingStrategy.java:77)
 at
org.apache.wicket.markup.html.panel.BorderMarkupSourcingStrategy.onComponentTagBody(BorderMarkupSourcingStrategy.java:46)
 at
org.apache.wicket.Component.internalRenderComponent(Component.java:2601)
 at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1668)
 at org.apache.wicket.Component.internalRender(Component.java:2401)
 at org.apache.wicket.Component.render(Component.java:2329)
 at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1526)
 at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1729)
 at org.apache.wicket.Page.onRender(Page.java:879)
 at org.apache.wicket.markup.html.WebPage.onRender(WebPage.java:141)
 at org.apache.wicket.Component.internalRender(Component.java:2401)
 at org.apache.wicket.Component.render(Component.java:2329)
 at org.apache.wicket.Page.renderPage(Page.java:1018)
 at
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:124)
 at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:236)
 at

Wicket tabs does not work properly.

2017-04-11 Thread Sokab
Hi everyone! Maybe someone know what I am doing wrong. I follow this 
https://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.html

  

and this:
http://www.roseindia.net/tutorials/wicket/tab-wicket.shtml
  

and I  try to add Tabs wicket but I can't (Home page worked well before
adding this 'Tabs Wicket' ) ".  I have this error:

Unexpected RuntimeException
Last cause: Cannot modify component hierarchy after render phase has started
(page version cant change then anymore)

Home.html:

...



 HOME Page


 [tabbed panel will be here]








Home.java:
public class Home extends WebPage{

public Home() {

NavomaticBorder navomaticBorder = new
NavomaticBorder("navomaticBorder");   

List tabs = new ArrayList();
  
tabs.add(new AbstractTab(new Model("firstTab")) {
@Override
public Panel getPanel(String panelId) {
return new TabPanel1(panelId);
}
});

tabs.add(new AbstractTab(new Model("secondTab")) {
@Override
public Panel getPanel(String panelId) {
return new TabPanel2(panelId);
}
});
  
//  navomaticBorder.add( new AjaxTabbedPanel("tabs", tabs) );
navomaticBorder.add( new TabbedPanel("tabs", tabs) );
add(navomaticBorder); 
}
}

//#
TabPanel1.html:


TODO supply a title





This is tab - panel 1 





TabPanel1.java:
public class TabPanel1 extends Panel{

public TabPanel1(String id) {
super(id);
}
}
//#
TabPanel2.html:


TODO supply a title





This is tab - panel 2 





TabPanel2.java:
public class TabPanel2 extends Panel{

public TabPanel2(String id) {
super(id);
}
}
//#

What am I doing wrong? Thank You for any advice.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-tabs-does-not-work-properly-tp4677657.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How save entity after clicking on submit button inside Form Wicket class.

2017-04-11 Thread Sokab
Thanks for the advice! :)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-save-entity-after-clicking-on-submit-button-inside-Form-Wicket-class-tp4677474p4677656.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Why AjaxLink start only after I refresh side?

2017-03-30 Thread Sokab
Hi Everyone. I followed this tutorial (
https://www.youtube.com/watch?v=gdXZDsaA1K0=PLon8X6Hq3cnI8bH-skje0NFegYXG97K3t=6
) I want display ModalWindow but first i need some reaction after click on
button but I don't see any reaction... it is possible only when I refresh
this page. What is wrong with that?

MoviesToWatch.html (This page is diplay inside Wicket Border ):



TODO supply a title






Add Movie



 view <#>  




//##
MoviesToWatch.java

public class MoviesToWatch extends WebPage{

private ModalWindow modalWindow;

public MoviesToWatch() {

UserContentBorder userContentBorder = new
UserContentBorder("moviesToWatch"); // Border

//* Part with ModalWindow  *
modalWindow = new ModalWindow("modalWindow");

modalWindow.setPageCreator(new PageCreator(){
@Override
public Page createPage() {
return new ModalAddMovies();   //simple web page
}

});

modalWindow.setWindowClosedCallback(new WindowClosedCallback(){
@Override
public void onClose(AjaxRequestTarget art) {
//TODO
}

});

//* Part with AjaxLink  *


AjaxLink link1 = new AjaxLink("viewLink")
{
@Override
public void onClick(AjaxRequestTarget target) {// <-- this
method is not colled after click (it work after refresh side)
System.out.println("I AM INSIDE");
//modalWindow.show(target);
}
};


userContentBorder.add(link1);
userContentBorder.add(modalWindow);
add(userContentBorder);
}
  
}
//##
UserContentBorder.hrml:



TODO supply a title









 Home <#>  









 My Movies <#>  
 Movies To Watch <#>  














//##
UserContentBorder.java:

public class UserContentBorder extends Border{

public UserContentBorder(String id) {
super(id);

MyBorderNavbarLeft myBorderNavbarLeft = new
MyBorderNavbarLeft("navigationLeft");
MyBorderNavbar myBorderNavbar = new MyBorderNavbar("navigation");

this.addToBorder(myBorderNavbar);
this.addToBorder(myBorderNavbarLeft);
this.addToBorder(new MyBorderBody("bodyBorder"));

Link homePage = new Link("homePage"){
@Override
public void onClick() {
this.setResponsePage(new HomePage());
}
};
myBorderNavbar.add(homePage);

Link myMovies = new Link("myMovies"){
@Override
public void onClick() {
this.setResponsePage(new MyMovies());
}
};
myBorderNavbarLeft.add(myMovies);

Link moviesToWatch = new Link("moviesToWatch"){
@Override
public void onClick() {
this.setResponsePage(new MoviesToWatch());
}
};
myBorderNavbarLeft.add(moviesToWatch);
}

}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Why-AjaxLink-start-only-after-I-refresh-side-tp4677524.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How save entity after clicking on submit button inside Form Wicket class.

2017-03-29 Thread Sokab
Hi Sebastian. Thank You For answer.

I solved this problem after I changed inside Form:
@EJB 
NewSessionBeanLocal beanLocal 

to

@Inject
NewSessionBeanLocal beanLocal   ..and it works. 

I didn't configured the dependency injection because I don't know how if You
ask me about some separate file or class (Sorry I start to learn Wicket). I
just tried to change atributes inside @EJB( ... like: beanName, lookup ...)
but that did not help.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-save-entity-after-clicking-on-submit-button-inside-Form-Wicket-class-tp4677474p4677512.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How save entity after clicking on submit button inside Form Wicket class.

2017-03-28 Thread Sokab
Hi Everyone. When I try save entity inside simple WebPage like this
everything is ok:

import com.example.entities.Person;
import javax.ejb.EJB;

public class Register extends WebPage{
@EJB
NewSessionBeanLocal beanLocal;

public Register(){
  
NavomaticBorder navomaticBorder = new
NavomaticBorder("navigationBorder");  
RegisterForm form = new RegisterForm("form");  
navomaticBorder.add(form);
add(navomaticBorder);

  // save entity to database for test
Person person = new Person();
person.setSurname("ABC");
person.setUsername("DEF");

beanLocal.addPerson(person);  // IT IS OK
}
}

//

Html Form:



TODO supply a title






Username 
Suername 

  




//

but when i try do this inside Form, becouse I want save entity after click
on Subimt button (register Person):

import com.example.Repository.NewSessionBeanLocal;
import com.example.entities.Person;
import javax.ejb.EJB;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.model.CompoundPropertyModel;

public class RegisterForm extends Form{
@EJB
NewSessionBeanLocal beanLocal;

Person person = new Person();

public RegisterForm(String id) {
super(id);
CompoundPropertyModel model = new CompoundPropertyModel(person);
this.setModel(model);

this.add(new TextField("username"));
this.add(new TextField("surname"));
}

@Override
public void onSubmit() {
Person p = (Person)this.getModelObject();
System.out.println("TO: : : "+ p.getUsername()+ " "+
p.getSurname());  // shows right data

  //Person p = new Person();
  //p.setSurname("ABC");
 //p.setUsername("DEF");

beanLocal.addPerson(p); // <-- PROBLEM IS HERE
}

}


 I have error:
Unexpected RuntimeException:

Last cause: null
WicketMessage: Method onFormSubmitted of interface
org.apache.wicket.markup.html.form.IFormSubmitListener targeted at
[RegisterForm [Component id = form]] on component [RegisterForm [Component
id = form]] threw an exception

Root cause:
java.lang.NullPointerException
 at
com.example.navigationBefore.RegisterForm.onSubmit(RegisterForm.java:34)
(...)

Something I'm doing wrong? I Should not save entity inside onSubmit() Form
method?  Thank you for any advice.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-save-entity-after-clicking-on-submit-button-inside-Form-Wicket-class-tp4677474.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WicketMessage: Can't instantiate page using constructor 'public com.mycompany.StartPage()'. An exception has been thrown during construction!

2017-03-26 Thread Sokab
Thank You very much!! :)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketMessage-Can-t-instantiate-page-using-constructor-public-com-mycompany-StartPage-An-exception-h-tp4677445p4677447.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



WicketMessage: Can't instantiate page using constructor 'public com.mycompany.StartPage()'. An exception has been thrown during construction!

2017-03-26 Thread Sokab
Hi Everyone! I am new and I want to learn to Wicket. When I create new simple
project with Wicket everything is ok but when I try add EJB class to Wicket
(WebPage) always i have this same error:

"WicketMessage: Can't instantiate page using constructor 'public
com.mycompany.StartPage()'. An exception has been thrown during
construction!"

It is my Wicket class:

import javax.ejb.EJB;
import org.apache.wicket.markup.html.WebPage;
public class StartPage extends WebPage{
@EJB
PersonManagerLocal managerLocal;

public StartPage() {
managerLocal.addPerson();
}
}
//***
EJB class:

@Stateless
public class PersonManager implements PersonManagerLocal{

@Override
public void addPerson() {
System.out.println("HELLO I AM EJB");
}
//***
Interface:
//@Local
public interface PersonManagerLocal {
public void addPerson();
}
//***
WEB.xml:

http://xmlns.jcp.org/xml/ns/javaee;
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd;
 version="3.1">


30




WicketSampleEterprise-war
   
org.apache.wicket.protocol.http.WicketFilter

applicationClassName
com.mycompany.WicketApplication




WicketSampleEterprise-war
/*


//***
Wicket initialization class:

public class WicketApplication extends WebApplication{

@Override
public Class getHomePage() 
{
return StartPage.class;
}

@Override
protected void init(){
super.init();
}
}

I use: Netbeans 8.2, Wicket 7, EJB3.1, wildfly 10
Maybe someone knows what's wrong? Thank you for any advice.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketMessage-Can-t-instantiate-page-using-constructor-public-com-mycompany-StartPage-An-exception-h-tp4677445.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org