Re: setHeaderResponseDecorator cause problem logging into my app
Thanks Martins for your help. The reason which I am not absolutely sure, there was a conflict on using both and using JavaScriptHeadItem -- 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
Re: setHeaderResponseDecorator cause problem logging into my app
No notification on console/browser log. -- 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
setHeaderResponseDecorator cause problem logging into my app
I am having problem with inserting JavaScript into a Html body tag. Once I use the following code as shown in the tutorial into my AuthenticatedWebapplication, I can no longer login to my application. setHeaderResponseDecorator(response -> { return new ResourceAggregator(new JavaScriptFilteredIntoFooterHeaderResponse(response, "footercontainer")); }); Once I remove the above codes. I am able to log in. The weird thing noticed, there is no error messages, nothing my log. I am on Wicket 8.7.0. -- 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
Re: ClassCastException:JavaURLContext cannot be cast to class org.xx.xxx
I was actually able to solve this issue. My Html page had a form component and that why there was a form component in the code. -- 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
ClassCastException:JavaURLContext cannot be cast to class org.xx.xxx
I have been on this issue for atleast 2 weeks now. Trying to use Wicket with EJB. This occurs when I use @EJb for either a stateless or stateful bean . *My code below The webpage which has the EJB as a variable* public class PartnersZipCode extends PrescientTemplateOriginalPage{ @EJB(name = "ejb/publishZipCodes") transient private PublishZipCodes partnerInterests; @EJB transient private ProspectivePartners marketPlace; private String sessionZip="sessionZip"; private String sessionEmail="sessionEmail"; private String nameFromSession; private String dbKeys="dbKeys"; private Vector forkeys; private Form zipCodeFormOfInterest; private Label partnerOne; private Label partnerTwo; private Label interestedZips; private Collection listOfZips; public PartnersZipCode() { zipCodeFormOfInterest=new Form("zipCodeFormOfInterest"); partnerOne=new Label("partnerOne"); partnerTwo=new Label("partnerTwo"); interestedZips=new Label("interestedZips"); zipCodeFormOfInterest.add(partnerOne); zipCodeFormOfInterest.add(partnerTwo); zipCodeFormOfInterest.add(interestedZips); add(zipCodeFormOfInterest); nameFromSession=(String) getSession().getAttribute(sessionEmail); forkeys= (Vector) getSession().getAttribute(dbKeys); partnerInterests.publishZip(nameFromSession,listOfZips=(Collection) getSession().getAttribute(sessionZip)); } } *The EJB Class* @ManagedBean @JMSConnectionFactoryDefinition( name="java:app/jms/ZipCodesConnectionFactory" ) public class PublishZipCodes { Message message; Session session; JMSProducer messageProducer; Collection nextZipCode; //@Resource(lookup = "java:comp/jms/ZipCodesConnectionFactory") // ConnectionFactory connectionFactory; @Resource(lookup = "jms/ZipCodes") Topic topic; @EJB StartUpSingleton bean; @Inject @JMSConnectionFactory(value ="jms/ZipCodesConnectionFactory") JMSContext connection; public PublishZipCodes() { } @PostConstruct public void publish() { if(connection==null){ connection=bean.getConnection(); } // messageProducer=connection.createProducer(); nextZipCode=new ArrayList<>(); if(nextZipCode.isEmpty()){ } messageProducer=connection.createProducer(); message= connection.createTextMessage( Arrays.deepToString(nextZipCode.toArray()) ); messageProducer.send(topic,message); } public void closeConn(){ connection.close(); } public JMSContext getConnection() { return connection; } public void setConnection(JMSContext connection) { this.connection = connection; } public void publishZip(String toString, Collection arrayList) { nextZipCode=arrayList; if(messageProducer==null){ messageProducer=connection.createProducer(); } HashMap maptoString=new HashMap(); maptoString.put(toString,nextZipCode.toArray()); message= connection.createTextMessage((String) maptoString.keySet().stream().map(key -> key + "=" + maptoString.get(key)).collect(Collectors.joining(", ", "{", "}"))); messageProducer.send(topic,message); } } *The continuous and frustrating error below* java.lang.ClassCastException: class com.sun.enterprise.naming.impl.JavaURLContext cannot be cast to class org.prescients.prescientdocwicket.PublishZipCodes (com.sun.enterprise.naming.impl.JavaURLContext is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @1ff0c0f8; org.prescients.prescientdocwicket.PublishZipCodes is in unnamed module of loader org.glassfish.web.loader.WebappClassLoader @22507381) at org.prescients.prescientdocwicket.Wicket_Proxy_PublishZipCodes$$FastClassByCGLIB$$2031b0b8.invoke() at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.apache.wicket.proxy.LazyInitProxyFactory$AbstractCGLibInterceptor.intercept(LazyInitProxyFactory.java:364) at org.prescients.prescientdocwicket.Wicket_Proxy_PublishZipCodes$$EnhancerByCGLIB$$4a8b3f18.publishZip() at org.prescients.prescientdocwicket.PartnersZipCode.(PartnersZipCode.java:56) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:175) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:67) at org.apache.wicket.DefaultMapper
Re: Wicket's error message-> java.lang.IllegalStateException: This container is already dequeing
PrescientTemplateOriginalPage is actually the parent class of PrescientHome so that why PrescientTemplateOriginalPage had the tag, and prescientHome had the . I was able to solve the problem and your assistance was greatly appreciated. The problem is seems was how I was referring my form id. I needed to put and not . Francois thank you so much for all your assistance. -- 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
Re: Wicket's error message-> java.lang.IllegalStateException: This container is already dequeing
I don't think I have the privileges to do but let Martin Tzvetanov Grigorov know to close the issue on Jira. -- 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
Re: Wicket's error message-> java.lang.IllegalStateException: This container is already dequeing
I do appreciate you looking at this while on holiday. The 2nd constructor of PrescientTemplateOriginalPage I have deleted. Truth is it was not needed. The HTML code of PrescientHome I initially submitted did not include the HeaderPanel and footerPanel, was because of inheritance from PrescientTemplateOriginalPage so did not need to include them. The HTML Code from PrescientTemplateOriginalPage is below Template And the HTML code from PrecientHome is below TODO supply a title Doctors : Choose one Physician Dentist Optometrist . -- 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
Re: Wicket's error message-> java.lang.IllegalStateException: This container is already dequeing
Thanks for you reply. Included more codes below. Code for PrescientTemplateOriginalPage below package org.possible.bug; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.model.Model; /** * * @author oyeso */ public class PrescientTemplateOriginalPage extends WebPage { private final String footerId="footerPanel"; private final String headerId="headerPanel"; private FooterPanel footer; private HeaderPanel header; public PrescientTemplateOriginalPage() { this.header = new HeaderPanel(headerId); this.footer = new FooterPanel(footerId); add(header); add(footer); } public PrescientTemplateOriginalPage( FooterPanel footer, HeaderPanel header) { this.footer = footer; this.header = header; } } Code for HeaderPanel below import org.apache.wicket.Component; import org.apache.wicket.MarkupContainer; import org.apache.wicket.behavior.Behavior; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.image.Image; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.model.Model; public class HeaderPanel extends Panel{ private Label header; private Image imgHeader; public HeaderPanel(String id) { super(id); header=new Label("prescientDoctorsLabel",Model.of("Prescient Doctors") ); add(header); } } Code for FooterPanel Below import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.model.Model; public class FooterPanel extends Panel{ public FooterPanel(String id) { super(id); add(new Label("footerLabel",Model.of("Footer Label Here"))); } } Code for PrecientHome below package org.possible.bug; import java.io.IOException; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import org.apache.wicket.markup.html.MarkupUtil; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.DropDownChoice; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.FormComponentUpdatingBehavior; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; /** * * @author oyeso */ public class PrescientHome extends PrescientTemplateOriginalPage { private Model zipManager; private Form occForm; private WebMarkupContainer tagFrame; private Model occupationListModel; private List occupationList; private DropDownChoice occupationChoices; public PrescientHome() { zipManager=Model.of(new ZipManagedBean()); occupationListModel= new Model<>(); occupationList=zipManager.getObject().getOccCode(); occupationChoices=new DropDownChoice<>("occupationModel",occupationListModel, occupationList ); //queue(occForm); occForm=new Form("occupationForm"){ @Override protected void onSubmit() { //Do the next thing } }; occForm.add(occupationChoices); add(occForm); } New Stack Trace below java.lang.IllegalStateException: This container is already dequeing: [Page class = org.possible.bug.PrescientHome, id = 0, render count = 0] at org.apache.wicket.MarkupContainer.dequeuePreamble(MarkupContainer.java:1918) at org.apache.wicket.MarkupContainer.dequeue(MarkupContainer.java:1856) at org.apache.wicket.MarkupContainer.dequeueChild(MarkupContainer.java:2018) at org.apache.wicket.MarkupContainer.dequeue(MarkupContainer.java:1983) at org.apache.wicket.MarkupContainer.dequeuePreamble(MarkupContainer.java:1931) at org.apache.wicket.MarkupContainer.dequeue(MarkupContainer.java:1856) at org.apache.wicket.MarkupContainer.onInitialize(MarkupContainer.java:1887) at org.apache.wicket.Page.onInitialize(Page.java:298) at org.apache.wicket.Component.fireInitialize(Component.java:873) at org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:1038) at org.apache.wicket.Page.isPageStateless(Page.java:461) at org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.getPageInfo(AbstractBookmarkableMapper.java:473) at org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.mapHandler(AbstractBookmarkableMapper.java:420) at org.apache.wicket.core.request.mapper.MountedMapper.mapHandler(MountedMapper.java:155) at org.apache.wicket.request.mapper.CompoundRequestMapper.mapHandler(CompoundRequestMapper.java:210
Re: Wicket's error message-> java.lang.IllegalStateException: This container is already dequeing
Thanks for your reply Francois, much appreciated. Even when I adjust my code and remove the login object from the source code and from the html tag like the code below I still get the same error I was encountering. I definitely will try version 9 in the near future as soon as I can solve the current problem the framework is showing. Java Source below > > > > public class PrescientHome extends PrescientTemplateOriginalPage { > > private Model zipManager; > private Form occForm; > > private WebMarkupContainer tagFrame; > private Login login; > private Model occupationListModel; > private List occupationList; > private DropDownChoice occupationChoices; > public PrescientHome() > > { super(); } > @Override > protected void onInitialize() { > super.onInitialize(); > zipManager=Model.of(new ZipManagedBean()); > > > occupationListModel= new Model<>(); > occupationList=zipManager.getObject().getOccCode(); > occupationChoices=new > DropDownChoice<>("occupationModel",occupationListModel, occupationList ); > > occForm=new Form("occupationForm"){ > @Override > protected void onSubmit() > > { super.onSubmit(); } > }; > occForm.add(occupationChoices); > add(occForm); > > } > > > > > > > > } > > > HTML Source below > > > > > > TODO supply a title > > > > > > > > > > Doctors : > > Choose one > Physician > Dentist > Optometrist > > . > > > > > -- 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
Wicket's error message-> java.lang.IllegalStateException: This container is already dequeing
I am trying out the Wicket framework using version 8. I have been battling this strange error without success. I am using Payara application server on Windows 10 The required info is below, any tips or help in finding out where the problem is would be appreciated. I looked into stackoverflow, pretty much any help sites for similar questions but did not find any. It seems deque preamble is being called erroneously by wicket. Java Source below public class PrescientHome extends PrescientTemplateOriginalPage { private Model zipManager; private Form occForm; private WebMarkupContainer tagFrame; private Login login; private Model occupationListModel; private List occupationList; private DropDownChoice occupationChoices; public PrescientHome() { super(); } @Override protected void onInitialize() { super.onInitialize(); zipManager=Model.of(new ZipManagedBean()); login=new Login(); login.setResponsePage(Login.class); occupationListModel= new Model<>(); occupationList=zipManager.getObject().getOccCode(); occupationChoices=new DropDownChoice<>("occupationModel",occupationListModel, occupationList ); occForm=new Form("occupationForm"){ @Override protected void onSubmit() { super.onSubmit(); } }; occForm.add(occupationChoices); add(occForm); tagFrame=new WebMarkupContainer("TagFrame"); tagFrame.add(login); add(tagFrame); } } HTML Source below TODO supply a title Doctors : Choose one Physician Dentist Optometrist . The error displayed below. java.lang.IllegalStateException: This container is already dequeing: [Page class = org.prescients.prescientdocwicket.PrescientHome, id = 0, render count = 0] at org.apache.wicket.MarkupContainer.dequeuePreamble(MarkupContainer.java:1918) at org.apache.wicket.MarkupContainer.dequeue(MarkupContainer.java:1856) at org.apache.wicket.MarkupContainer.dequeueChild(MarkupContainer.java:2018) at org.apache.wicket.MarkupContainer.dequeue(MarkupContainer.java:1983) at org.apache.wicket.MarkupContainer.dequeuePreamble(MarkupContainer.java:1931) at org.apache.wicket.MarkupContainer.dequeue(MarkupContainer.java:1856) at org.apache.wicket.MarkupContainer.onInitialize(MarkupContainer.java:1887) at org.apache.wicket.Page.onInitialize(Page.java:298) atorg.prescients.prescientdocwicket.PrescientTemplateOriginalPage.onInitialize(PrescientTemplateOrigi nalPage.java:36) at org.prescients.prescientdocwicket.PrescientHome.onInitialize(PrescientHome.java:48) -- 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