Re: Serialization of DAO
On Wed, Mar 20, 2013 at 2:34 AM, Martin Grigorov mgrigo...@apache.orgwrote: If you ask how Wicket decides which classes to auto-inject Yes, this is what I'm asking. In my application class, I have this line getComponentInstantiationListeners().add(new GuiceComponentInjector(this, new BlogModule())); If I understand you, then when I do a new MyComponent() it's going to look back up to my application class line above and wire things up properly to make sure I have all of my dependencies injected properly. Is that right? Sorry for drawing this, DI is a new concept for me, and clearly I'm having trouble understanding. Thanks for your help! ___ Stephen Walsh | http://connectwithawalsh.com
Re: Serialization of DAO
How does wicket know which module to inject? ___ Stephen Walsh | http://connectwithawalsh.com On Sun, Mar 17, 2013 at 12:59 PM, Dan Retzlaff dretzl...@gmail.com wrote: Wicket only injects Components and Behaviors by default. To inject into anything else, call Injector.get().inject(this) in its constructor. On Fri, Mar 15, 2013 at 2:27 PM, Stephen Walsh step...@connectwithawalsh.com wrote: I have a much better understanding on this now. Are there any plans to support injection on LDMs, or is there a suggested work around for this? It seems like you'd want a DAO service to get an object from the DB within a custom model so you can return that back to your component. ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Mar 14, 2013 at 5:03 PM, Martin Grigorov mgrigo...@apache.org wrote: Take a look at wicket-examples and the unit tests in wicket-guice module. On Thu, Mar 14, 2013 at 10:53 PM, Stephen Walsh step...@connectwithawalsh.com wrote: Any other thoughts on this? ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Mar 14, 2013 at 10:30 AM, Stephen Walsh step...@connectwithawalsh.com wrote: Thanks, Martin. I intialize here, (which I just realized is not the best spot): private void setUpMongo() { mongo = MongoUtil.getMongo(); morphia = new Morphia().map(Blog.class).map(Person.class); blogDAO = new BlogDAO(mongo, morphia); } I am using the Wicket Guice module, and I think your second point is what I was getting at. From learning about Guice ( http://www.youtube.com/watch?feature=player_embeddedv=hBVJbzAagfs ), I thought the point was to initialize once and then reuse wherever needed. I figured initialization would happen in the application class. Maybe I'm misunderstanding. If it's supposed to happen in the application class, then I don't really have need for a module because I don't have an interface in this case, right? Thanks for the help on this. ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Mar 14, 2013 at 3:20 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, I don't see how you initialize blogDAO. If you don't use wicket-ioc module then you will need to lookup the DAO from the application whenever you need it: public void onSubmit() { BlogDAO blogDao = MyApplication.get().getBlogDAO(); blogDao.save(blog); } This way you wont keep reference to it in the page/component and it wont be serialized. If you use wicket-guice module then you can do: @Inject private BlogDAO blogDao; and use it anywhere. Wicket will use Guice to lookup the bean at component creation but the bean will be wrapped in a serializable proxy. That is a lightweight proxy will be (de)serialized with the page. This is the recommended way. wicket-string works the same way. wicket-cdi leaves the proxy creation to the CDI implementation. On Thu, Mar 14, 2013 at 5:19 AM, Stephen Walsh step...@connectwithawalsh.com wrote: I'm attempting to implement Guice for my DAO connections as my JBoss server keeps running out of memory. Not entirely sure why that is, but I'm hoping this is at least part of it. I read through http://markmail.org/message/sz64l4eytzc3ctkh and understand why the DAO needs to be serialized, and I also followed https://cwiki.apache.org/confluence/display/WICKET/Wicket%2C+Guice+and+Ibatis+exampleto try and figure out where and how exactly to inject my DAO. My DAO already extends a basic DAO class that has all of the basics for getting stuff from the database. Neither of these are interfaces (not sure if this is a problem or not). My DAO works just fine in panels, but as soon as it's on a page, it throws the not seralizable exception. Regardless it doesn't really solve the problem of really only needing one DAO for the whole application instead of creating one whenever it's needed in every place that it's needed. If I understand dependency injection, then this is the whole point. Here's my class. Hopefully someone can point me in the right direction for this page and my application class: public class EditBlogEntry extends BasePage { private Logger logger = LoggerFactory.getLogger(EditBlogEntry.class); private Mongo mongo
Re: Serialization of DAO
I have a much better understanding on this now. Are there any plans to support injection on LDMs, or is there a suggested work around for this? It seems like you'd want a DAO service to get an object from the DB within a custom model so you can return that back to your component. ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Mar 14, 2013 at 5:03 PM, Martin Grigorov mgrigo...@apache.orgwrote: Take a look at wicket-examples and the unit tests in wicket-guice module. On Thu, Mar 14, 2013 at 10:53 PM, Stephen Walsh step...@connectwithawalsh.com wrote: Any other thoughts on this? ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Mar 14, 2013 at 10:30 AM, Stephen Walsh step...@connectwithawalsh.com wrote: Thanks, Martin. I intialize here, (which I just realized is not the best spot): private void setUpMongo() { mongo = MongoUtil.getMongo(); morphia = new Morphia().map(Blog.class).map(Person.class); blogDAO = new BlogDAO(mongo, morphia); } I am using the Wicket Guice module, and I think your second point is what I was getting at. From learning about Guice ( http://www.youtube.com/watch?feature=player_embeddedv=hBVJbzAagfs), I thought the point was to initialize once and then reuse wherever needed. I figured initialization would happen in the application class. Maybe I'm misunderstanding. If it's supposed to happen in the application class, then I don't really have need for a module because I don't have an interface in this case, right? Thanks for the help on this. ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Mar 14, 2013 at 3:20 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, I don't see how you initialize blogDAO. If you don't use wicket-ioc module then you will need to lookup the DAO from the application whenever you need it: public void onSubmit() { BlogDAO blogDao = MyApplication.get().getBlogDAO(); blogDao.save(blog); } This way you wont keep reference to it in the page/component and it wont be serialized. If you use wicket-guice module then you can do: @Inject private BlogDAO blogDao; and use it anywhere. Wicket will use Guice to lookup the bean at component creation but the bean will be wrapped in a serializable proxy. That is a lightweight proxy will be (de)serialized with the page. This is the recommended way. wicket-string works the same way. wicket-cdi leaves the proxy creation to the CDI implementation. On Thu, Mar 14, 2013 at 5:19 AM, Stephen Walsh step...@connectwithawalsh.com wrote: I'm attempting to implement Guice for my DAO connections as my JBoss server keeps running out of memory. Not entirely sure why that is, but I'm hoping this is at least part of it. I read through http://markmail.org/message/sz64l4eytzc3ctkh and understand why the DAO needs to be serialized, and I also followed https://cwiki.apache.org/confluence/display/WICKET/Wicket%2C+Guice+and+Ibatis+exampleto try and figure out where and how exactly to inject my DAO. My DAO already extends a basic DAO class that has all of the basics for getting stuff from the database. Neither of these are interfaces (not sure if this is a problem or not). My DAO works just fine in panels, but as soon as it's on a page, it throws the not seralizable exception. Regardless it doesn't really solve the problem of really only needing one DAO for the whole application instead of creating one whenever it's needed in every place that it's needed. If I understand dependency injection, then this is the whole point. Here's my class. Hopefully someone can point me in the right direction for this page and my application class: public class EditBlogEntry extends BasePage { private Logger logger = LoggerFactory.getLogger(EditBlogEntry.class); private Mongo mongo; private Morphia morphia; private BlogDAO blogDAO; public EditBlogEntry(final Blog blogEntry) { // Add edit blogPost form to page Form? form = new Form(form); form.add(new Button(postIt) { @Override public void onSubmit() { // This merely gets a new mongo instance that has my blog entry mapped by morphia for saving the whole POJO to mongo setUpMongo(); blogDAO.save(blogEntry); BlogEntryDetails details = new BlogEntryDetails(new PageParameters().add(id, blogEntry.getObjectId().toString())); setResponsePage(details
Re: Serialization of DAO
Thanks, Martin. I intialize here, (which I just realized is not the best spot): private void setUpMongo() { mongo = MongoUtil.getMongo(); morphia = new Morphia().map(Blog.class).map(Person.class); blogDAO = new BlogDAO(mongo, morphia); } I am using the Wicket Guice module, and I think your second point is what I was getting at. From learning about Guice ( http://www.youtube.com/watch?feature=player_embeddedv=hBVJbzAagfs), I thought the point was to initialize once and then reuse wherever needed. I figured initialization would happen in the application class. Maybe I'm misunderstanding. If it's supposed to happen in the application class, then I don't really have need for a module because I don't have an interface in this case, right? Thanks for the help on this. ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Mar 14, 2013 at 3:20 AM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, I don't see how you initialize blogDAO. If you don't use wicket-ioc module then you will need to lookup the DAO from the application whenever you need it: public void onSubmit() { BlogDAO blogDao = MyApplication.get().getBlogDAO(); blogDao.save(blog); } This way you wont keep reference to it in the page/component and it wont be serialized. If you use wicket-guice module then you can do: @Inject private BlogDAO blogDao; and use it anywhere. Wicket will use Guice to lookup the bean at component creation but the bean will be wrapped in a serializable proxy. That is a lightweight proxy will be (de)serialized with the page. This is the recommended way. wicket-string works the same way. wicket-cdi leaves the proxy creation to the CDI implementation. On Thu, Mar 14, 2013 at 5:19 AM, Stephen Walsh step...@connectwithawalsh.com wrote: I'm attempting to implement Guice for my DAO connections as my JBoss server keeps running out of memory. Not entirely sure why that is, but I'm hoping this is at least part of it. I read through http://markmail.org/message/sz64l4eytzc3ctkh and understand why the DAO needs to be serialized, and I also followed https://cwiki.apache.org/confluence/display/WICKET/Wicket%2C+Guice+and+Ibatis+exampleto try and figure out where and how exactly to inject my DAO. My DAO already extends a basic DAO class that has all of the basics for getting stuff from the database. Neither of these are interfaces (not sure if this is a problem or not). My DAO works just fine in panels, but as soon as it's on a page, it throws the not seralizable exception. Regardless it doesn't really solve the problem of really only needing one DAO for the whole application instead of creating one whenever it's needed in every place that it's needed. If I understand dependency injection, then this is the whole point. Here's my class. Hopefully someone can point me in the right direction for this page and my application class: public class EditBlogEntry extends BasePage { private Logger logger = LoggerFactory.getLogger(EditBlogEntry.class); private Mongo mongo; private Morphia morphia; private BlogDAO blogDAO; public EditBlogEntry(final Blog blogEntry) { // Add edit blogPost form to page Form? form = new Form(form); form.add(new Button(postIt) { @Override public void onSubmit() { // This merely gets a new mongo instance that has my blog entry mapped by morphia for saving the whole POJO to mongo setUpMongo(); blogDAO.save(blogEntry); BlogEntryDetails details = new BlogEntryDetails(new PageParameters().add(id, blogEntry.getObjectId().toString())); setResponsePage(details); } }); LoadableDetachableModel ldm = new LoadableDetachableModel() { @Override protected Object load() { //TODO need to set athr only on new blogEntry blogEntry.setAthr(CampingAwaitsSession.get().getUser()); return blogEntry; } }; form.add(new BlogEntryPanel(blogEntry, new CompoundPropertyModelBlog(ldm))); add(form); } Any thoughts? I feel like I understand the concept but the implementation is throwing me. ___ Stephen Walsh | http://connectwithawalsh.com -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: Serialization of DAO
Any other thoughts on this? ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Mar 14, 2013 at 10:30 AM, Stephen Walsh step...@connectwithawalsh.com wrote: Thanks, Martin. I intialize here, (which I just realized is not the best spot): private void setUpMongo() { mongo = MongoUtil.getMongo(); morphia = new Morphia().map(Blog.class).map(Person.class); blogDAO = new BlogDAO(mongo, morphia); } I am using the Wicket Guice module, and I think your second point is what I was getting at. From learning about Guice ( http://www.youtube.com/watch?feature=player_embeddedv=hBVJbzAagfs), I thought the point was to initialize once and then reuse wherever needed. I figured initialization would happen in the application class. Maybe I'm misunderstanding. If it's supposed to happen in the application class, then I don't really have need for a module because I don't have an interface in this case, right? Thanks for the help on this. ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Mar 14, 2013 at 3:20 AM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, I don't see how you initialize blogDAO. If you don't use wicket-ioc module then you will need to lookup the DAO from the application whenever you need it: public void onSubmit() { BlogDAO blogDao = MyApplication.get().getBlogDAO(); blogDao.save(blog); } This way you wont keep reference to it in the page/component and it wont be serialized. If you use wicket-guice module then you can do: @Inject private BlogDAO blogDao; and use it anywhere. Wicket will use Guice to lookup the bean at component creation but the bean will be wrapped in a serializable proxy. That is a lightweight proxy will be (de)serialized with the page. This is the recommended way. wicket-string works the same way. wicket-cdi leaves the proxy creation to the CDI implementation. On Thu, Mar 14, 2013 at 5:19 AM, Stephen Walsh step...@connectwithawalsh.com wrote: I'm attempting to implement Guice for my DAO connections as my JBoss server keeps running out of memory. Not entirely sure why that is, but I'm hoping this is at least part of it. I read through http://markmail.org/message/sz64l4eytzc3ctkh and understand why the DAO needs to be serialized, and I also followed https://cwiki.apache.org/confluence/display/WICKET/Wicket%2C+Guice+and+Ibatis+exampleto try and figure out where and how exactly to inject my DAO. My DAO already extends a basic DAO class that has all of the basics for getting stuff from the database. Neither of these are interfaces (not sure if this is a problem or not). My DAO works just fine in panels, but as soon as it's on a page, it throws the not seralizable exception. Regardless it doesn't really solve the problem of really only needing one DAO for the whole application instead of creating one whenever it's needed in every place that it's needed. If I understand dependency injection, then this is the whole point. Here's my class. Hopefully someone can point me in the right direction for this page and my application class: public class EditBlogEntry extends BasePage { private Logger logger = LoggerFactory.getLogger(EditBlogEntry.class); private Mongo mongo; private Morphia morphia; private BlogDAO blogDAO; public EditBlogEntry(final Blog blogEntry) { // Add edit blogPost form to page Form? form = new Form(form); form.add(new Button(postIt) { @Override public void onSubmit() { // This merely gets a new mongo instance that has my blog entry mapped by morphia for saving the whole POJO to mongo setUpMongo(); blogDAO.save(blogEntry); BlogEntryDetails details = new BlogEntryDetails(new PageParameters().add(id, blogEntry.getObjectId().toString())); setResponsePage(details); } }); LoadableDetachableModel ldm = new LoadableDetachableModel() { @Override protected Object load() { //TODO need to set athr only on new blogEntry blogEntry.setAthr(CampingAwaitsSession.get().getUser()); return blogEntry; } }; form.add(new BlogEntryPanel(blogEntry, new CompoundPropertyModelBlog(ldm))); add(form); } Any thoughts? I feel like I understand the concept but the implementation is throwing me. ___ Stephen Walsh | http://connectwithawalsh.com -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Serialization of DAO
I'm attempting to implement Guice for my DAO connections as my JBoss server keeps running out of memory. Not entirely sure why that is, but I'm hoping this is at least part of it. I read through http://markmail.org/message/sz64l4eytzc3ctkh and understand why the DAO needs to be serialized, and I also followed https://cwiki.apache.org/confluence/display/WICKET/Wicket%2C+Guice+and+Ibatis+exampleto try and figure out where and how exactly to inject my DAO. My DAO already extends a basic DAO class that has all of the basics for getting stuff from the database. Neither of these are interfaces (not sure if this is a problem or not). My DAO works just fine in panels, but as soon as it's on a page, it throws the not seralizable exception. Regardless it doesn't really solve the problem of really only needing one DAO for the whole application instead of creating one whenever it's needed in every place that it's needed. If I understand dependency injection, then this is the whole point. Here's my class. Hopefully someone can point me in the right direction for this page and my application class: public class EditBlogEntry extends BasePage { private Logger logger = LoggerFactory.getLogger(EditBlogEntry.class); private Mongo mongo; private Morphia morphia; private BlogDAO blogDAO; public EditBlogEntry(final Blog blogEntry) { // Add edit blogPost form to page Form? form = new Form(form); form.add(new Button(postIt) { @Override public void onSubmit() { // This merely gets a new mongo instance that has my blog entry mapped by morphia for saving the whole POJO to mongo setUpMongo(); blogDAO.save(blogEntry); BlogEntryDetails details = new BlogEntryDetails(new PageParameters().add(id, blogEntry.getObjectId().toString())); setResponsePage(details); } }); LoadableDetachableModel ldm = new LoadableDetachableModel() { @Override protected Object load() { //TODO need to set athr only on new blogEntry blogEntry.setAthr(CampingAwaitsSession.get().getUser()); return blogEntry; } }; form.add(new BlogEntryPanel(blogEntry, new CompoundPropertyModelBlog(ldm))); add(form); } Any thoughts? I feel like I understand the concept but the implementation is throwing me. ___ Stephen Walsh | http://connectwithawalsh.com
Re: RSS
Both very helpful. Thank you! ___ Stephen Walsh | http://connectwithawalsh.com On Tue, Mar 12, 2013 at 5:06 AM, Andrea Del Bene an.delb...@gmail.comwrote: You can take a look at the very basic RSS feeds producer that I've implemented for my Wicket guide: https://github.com/bitstorm/**Wicket-tutorial-examples/blob/** master/CustomResourceMounting/**src/main/java/org/**wicketTutorial/** RSSProducerResource.javahttps://github.com/bitstorm/Wicket-tutorial-examples/blob/master/CustomResourceMounting/src/main/java/org/wicketTutorial/RSSProducerResource.java I've used directly Rome framework to produce RSS, without the related wicketstuff module. In the application class of the project you can see how I used this custom resource mounting it to a fixed URL. Anyone have a working solution for producing RSS feeds from content stored in a DB on a Wicket 6.5+ page? I've been reading through all of the old docs on wicketstuff-rome, but it seems it's not supported with the changes made to 6.5+. I can generate my xml file, but not really sure how to go about actually publishing it and having Wicket recognize it as a resource once it's on the file system. Hope that makes sense... __**_ Stephen Walsh | http://connectwithawalsh.com --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RSS
Anyone have a working solution for producing RSS feeds from content stored in a DB on a Wicket 6.5+ page? I've been reading through all of the old docs on wicketstuff-rome, but it seems it's not supported with the changes made to 6.5+. I can generate my xml file, but not really sure how to go about actually publishing it and having Wicket recognize it as a resource once it's on the file system. Hope that makes sense... ___ Stephen Walsh | http://connectwithawalsh.com
Re: Dynamic Sidebar
Any thoughts on this? ___ Stephen Walsh | http://connectwithawalsh.com On Sat, Mar 2, 2013 at 4:26 PM, Stephen Walsh step...@connectwithawalsh.com wrote: I think that's what I'm having trouble with. I have created the list view like this: //define menu items final ListLink sidebarMenu = new ArrayListLink(); sidebarMenu.add(new Link(new) { public void onClick() { setResponsePage(new EditBlogEntry(new Blog())); } }); //put them into a model IModel sidebarLDM = new LoadableDetachableModel() { @Override protected Object load() { return sidebarMenu; } }; //pass the model to the panel constructor add(new SidebarPanel(sidebar, sidebarLDM)); public SidebarPanel(String id, IModel sidebarMenu) { super(id, sidebarMenu); add(new ListView(sidebarMenuItems, sidebarMenu) { @Override protected void populateItem(ListItem item) { item.add((Link)item.getModelObject()); } }); } I'm not sure what the markup needs to look like for the html For my base page I have this to include the panel with the repeater: div wicket:id=sidebar /div But I'm not sure what to put in the html for the actual panel with the list view wicket:panel div wicket:id=sidebarMenuItems /div /wicket:panel This is what I started with and it's not working currently. Thanks for the help. ___ Stephen Walsh | http://connectwithawalsh.com On Sat, Mar 2, 2013 at 3:45 PM, Nick Pratt nbpr...@gmail.com wrote: You can use a ListView or any of the other repeaters to achieve this. Your repeated markup will be an anchor. N On Mar 2, 2013 3:35 PM, Stephen Walsh step...@connectwithawalsh.com wrote: I want to create a sidebar panel that is dynamic based on the links attach to it. So far I have created a LDM that gets the list view of links that I create. I pass the LDM the sidebar panel constructor and Wicket is complaining about not having the markup for the link that is passed. Obviously this makes sense, but I'm not quite sure how to markup the html when I don't know what it's going to look like necessarily? I've been looking at containers and enclosures but I'm not quite getting it. Any thoughts on this? I search all over google and couldn't find exactly what I was looking for. Thanks! ___ Stephen Walsh | http://connectwithawalsh.com
Rendering HTML from String
I am having a heck of a time trying to find any examples on this. I have saved a string in a TextArea with the TinyMCE behavior in my database. I want to output it with the associated HTML tags. Any direction on this? ___ Stephen Walsh | http://connectwithawalsh.com
Re: Rendering HTML from String
Nevermind, found setEscapeModelStrings(false) ___ Stephen Walsh | http://connectwithawalsh.com On Mon, Mar 4, 2013 at 4:41 PM, Stephen Walsh step...@connectwithawalsh.com wrote: I am having a heck of a time trying to find any examples on this. I have saved a string in a TextArea with the TinyMCE behavior in my database. I want to output it with the associated HTML tags. Any direction on this? ___ Stephen Walsh | http://connectwithawalsh.com
TextField to ArrayList
I have an object that has a ListTag which is a simple object with a name, id, etc. I'm attempting to use wicketstuff tagit, and my form has a tagittextfield for this item. I'm hoping to get the comma separated string into ListTag. If I pre-populate the new object with a list, I get something like: [tag1, tag2]. If I try to submit the form though it fails because it's getting a string instead of an array list. Makes sense. Is there a way to convert this comma separated list into an array before the validator runs on the object which is bound to the form? Thanks as always! ___ Stephen Walsh | http://connectwithawalsh.com
Re: How to redirect an external web site and where is setRequestTarget method?
I'm using throw new RestartResponseAtInterceptPageException to redirect to an external page. That doc is for Wicket 1.3. I found that same page and started using RestartResponseAtInterceptPageException instead. I forget where I found the documentation on it, but I believe that was a change with 1.5+. ___ Stephen Walsh | http://connectwithawalsh.com On Sun, Mar 3, 2013 at 9:01 PM, mike.hua hz...@sohu.com wrote: According to the web site: https://cwiki.apache.org/WICKET/how-to-redirect-to-an-external-non-wicket-page.html public void onSubmit() { // Make sure no output for the current cycle is ever sent. getRequestCycle().setRequestTarget(new RedirectRequestTarget(http://www.163.com;)); } I can't find the method setRequestTarget under getRequestCycle(). What's the matter? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-redirect-an-external-web-site-and-where-is-setRequestTarget-method-tp4656924.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
Dynamic Sidebar
I want to create a sidebar panel that is dynamic based on the links attach to it. So far I have created a LDM that gets the list view of links that I create. I pass the LDM the sidebar panel constructor and Wicket is complaining about not having the markup for the link that is passed. Obviously this makes sense, but I'm not quite sure how to markup the html when I don't know what it's going to look like necessarily? I've been looking at containers and enclosures but I'm not quite getting it. Any thoughts on this? I search all over google and couldn't find exactly what I was looking for. Thanks! ___ Stephen Walsh | http://connectwithawalsh.com
Re: Dynamic Sidebar
I think that's what I'm having trouble with. I have created the list view like this: //define menu items final ListLink sidebarMenu = new ArrayListLink(); sidebarMenu.add(new Link(new) { public void onClick() { setResponsePage(new EditBlogEntry(new Blog())); } }); //put them into a model IModel sidebarLDM = new LoadableDetachableModel() { @Override protected Object load() { return sidebarMenu; } }; //pass the model to the panel constructor add(new SidebarPanel(sidebar, sidebarLDM)); public SidebarPanel(String id, IModel sidebarMenu) { super(id, sidebarMenu); add(new ListView(sidebarMenuItems, sidebarMenu) { @Override protected void populateItem(ListItem item) { item.add((Link)item.getModelObject()); } }); } I'm not sure what the markup needs to look like for the html For my base page I have this to include the panel with the repeater: div wicket:id=sidebar /div But I'm not sure what to put in the html for the actual panel with the list view wicket:panel div wicket:id=sidebarMenuItems /div /wicket:panel This is what I started with and it's not working currently. Thanks for the help. ___ Stephen Walsh | http://connectwithawalsh.com On Sat, Mar 2, 2013 at 3:45 PM, Nick Pratt nbpr...@gmail.com wrote: You can use a ListView or any of the other repeaters to achieve this. Your repeated markup will be an anchor. N On Mar 2, 2013 3:35 PM, Stephen Walsh step...@connectwithawalsh.com wrote: I want to create a sidebar panel that is dynamic based on the links attach to it. So far I have created a LDM that gets the list view of links that I create. I pass the LDM the sidebar panel constructor and Wicket is complaining about not having the markup for the link that is passed. Obviously this makes sense, but I'm not quite sure how to markup the html when I don't know what it's going to look like necessarily? I've been looking at containers and enclosures but I'm not quite getting it. Any thoughts on this? I search all over google and couldn't find exactly what I was looking for. Thanks! ___ Stephen Walsh | http://connectwithawalsh.com
Re: Regarding Facebook login API in wicket 1.5
I am currently using these maven dependencies: • restfb • scribe oauth I used Facebook's server side authentication method from here: https://developers.facebook.com/docs/howtos/login/server-side-login/ The example is in PHP but it's very easy to translate to java. 1). create an app with Facebook. 2). authorize it with Scribe using the Facebook API that is implemented in his code. 3). Send user to authorization URL, get a code back as a page parameter. 4). Request the permissions that the user authorized your app for from the authorization URL. Using restfb. 5). Display or manipulate user as needed. Restfb is the newer version of the original code that you were using. On Saturday, February 23, 2013, kshitiz wrote: I was looking for more approaches for Facebook login and someone told me about this https://github.com/wicketstuff/core/wiki/Facebook. Has anyone tried out that API? I am really looking for a good solution for integrating wicket app with Facebook. Please tell me the available approaches. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Regarding-Facebook-login-API-in-wicket-1-5-tp4656656p4656714.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org javascript:; For additional commands, e-mail: users-h...@wicket.apache.orgjavascript:; -- ___ Stephen Walsh | http://connectwithawalsh.com
Re: Regarding Facebook login API in wicket 1.5
Good. Hope that works out for you. ___ Stephen Walsh | http://connectwithawalsh.com On Sat, Feb 23, 2013 at 1:00 PM, kshitiz k.agarw...@gmail.com wrote: Yes...actually there is something that I found... https://cwiki.apache.org/WICKET/adding-facebook-connect-via-javascript-sdk.html . It is using restFB. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Regarding-Facebook-login-API-in-wicket-1-5-tp4656656p4656718.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: Eclipse or IntelliJ
The only caveat to my development is that It will be commercial. I tried the community edition and it worked for my basic wicket dev, but the integration with JBoss in the commercial edition is *extremely* helpful. I could do all of it in the comman line, but I like one stop shop tools. I haven't run into anything yet that I miss from Eclipse and if I use IDEA for personal gain monetarily then a personal license will be in order. On Friday, February 22, 2013, Gwyn Evans wrote: On 20 February 2013 17:54, Stephen Walsh step...@connectwithawalsh.comjavascript:; wrote: I definitely like the look and feel of IDEA better, but time will tell if it's more productive. It will certainly take the full 30 day trial period to evaluate whether it's worth the cost. Don't forget that they also do a free Community Edition that has a good chance http://www.jetbrains.com/idea/features/editions_comparison_matrix.html?IU of being all you need for a longer evaluation[*]. (I've got a old personal licence but when I changed employers, the corporate standard's Eclipse I can't use non-corporate commercially licensed apps there - I can however legitimately use open-source-licensed apps, so was able to switch to using the CE with no major issues.) /Gwyn -- ___ Stephen Walsh | http://connectwithawalsh.com
Re: Anyone using Wicket-Stuff Facebook
This was the code that I implemented to get the access Token. Obviously it isn't finished yet because I need to implement some error handling, actual saving and of the user, etc., but it's a framework that hopefully can help someone else that wants to use OAuth in the Scribe package. Note: I'm also using RestFB instead of the wicket-stuff package. It made a lot more sense to me and seemed to have better user support. I'm sure wicket-facebook would work just as well here. public class LoggedOutPanel extends Panel { private static final String apiKey = my_api_key; private static final String apiSecret = my_api_secret; private static final Token EMPTY_TOKEN = null; private static final OAuthService service = new ServiceBuilder() .provider(FacebookApi.class) .apiKey(apiKey) .apiSecret(apiSecret) .callback(http://localhost:8080/project-1.0-SNAPSHOT/signin;) .build(); public LoggedOutPanel (String id, PageParameters parameters) { super(id); final ExternalLink fbLogin = new ExternalLink(fb-login, service.getAuthorizationUrl(EMPTY_TOKEN)); fbLogin.add(new Image(fb-login-img, new ContextRelativeResource(/images/facebook_login.png))); add(fbLogin); } } public final class SignIn extends BasePage { private static final String apiKey = my_api_key; private static final String apiSecret = my_api_secret; private static final Token EMPTY_TOKEN = null; private static final OAuthService service = new ServiceBuilder() .provider(FacebookApi.class) .apiKey(apiKey) .apiSecret(apiSecret) .callback(http://localhost:8080/project-1.0-SNAPSHOT/signin;) .build(); private String ACCESS_TOKEN; public SignIn(final PageParameters parameters) { if(parameters.isEmpty()) { // TODO Try logging in again } else { Verifier verifier = new Verifier(parameters.get(code).toString()); Token accessToken = service.getAccessToken(EMPTY_TOKEN, verifier); ACCESS_TOKEN = accessToken.getToken().toString(); FacebookClient fb = new DefaultFacebookClient(ACCESS_TOKEN); Person user = fb.fetchObject(me, Person.class, Parameter.with(fields, username)); System.out.println(User name: + user.getUsername()); } } } ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Feb 21, 2013 at 12:27 AM, Stephen Walsh step...@connectwithawalsh.com wrote: I got this figure out. I'll post my solution tomorrow when I have a few minutes. Basically, I wasn't understanding that the code was coming back in a page parameter. Once I understood that it was fairly easy to implement. On Monday, February 18, 2013, Stephen Walsh wrote: That's where I'm headed right now. I had a signin page with PageParameters that picked it up by accident... I think I'm headed in the right direction now. I'll post my solution when I get it finished. I'd still be interested to see your solution also. Thanks again. ___ Stephen Walsh | http://connectwithawalsh.com On Mon, Feb 18, 2013 at 6:29 PM, Michael Chandler michael.chand...@onassignment.com wrote: The browser gets a token back that makes perfect sense and the example is completed. How do I consume the token? I'll play around with it a bit and let you know what I come up with. Thanks for the help. Based on the path I was taking, the redirect URI is the key. Facebook redirects as such: YOUR_REDIRECT_URI? access_token=USER_ACCESS_TOKEN expires_in=NUMBER_OF_SECONDS_UNTIL_TOKEN_EXPIRES state=YOUR_STATE_VALUE Of course, if the request fails authentication, they redirect as follows: YOUR_REDIRECT_URI? error_reason=user_denied error=access_denied error_description=The+user+denied+your+request. state=YOUR_STATE_VALUE So your redirect page could start out like this: public class FacebookResponseListener extends WebPage { private static final long serialVersionUID = 1L; public FacebookResponseListener(PageParameters params) { // if there is an error, handle it if (params.get(error_reason) != null) { // handle the error here! } else { String accessToken = params.get(access_token).toString(); int expiresIn = params.get(expires_in).toInt(); // etc... etc... } } } Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- ___ Stephen Walsh | http://connectwithawalsh.com
Re: Regarding Facebook login API in wicket 1.5
You will probably have to create at least a test application for this to work. I just supplied some code earlier today that worked for me. If you still want to use your method above, when you create your test application with Facebook, you can set the URL to a localhost of your choice so you can test locally without having a domain and hosting setup. ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Feb 21, 2013 at 10:44 AM, kshitiz k.agarw...@gmail.com wrote: Hi, I am trying to implement Facebook connect in my application as given in https://cwiki.apache.org/WICKET/adding-facebook-connect.html. I have copied the same code in my application but when hosted, I am not able to see facebook login UI in the application. I have not registered the application in Facebook yet though but yet shouldn't UI of facebook login suppose to appear in the application? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Regarding-Facebook-login-API-in-wicket-1-5-tp4656656.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: Eclipse or IntelliJ
I have the advantage that I'm fairly new to both so after spending some time with Eclipse and hating that it was so slow after my machine had been asleep and even doing basic things like trying to switch to a different file, I figured I would try something else. I definitely like the look and feel of IDEA better, but time will tell if it's more productive. It will certainly take the full 30 day trial period to evaluate whether it's worth the cost. ___ Stephen Walsh | http://connectwithawalsh.com On Wed, Feb 20, 2013 at 11:18 AM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: I agree it's not fair at all. My reasoning was that I wanted to evaluate if I'd be more productive with Idea and if some Eclipse irritants would be fixed there. In Idea, I found a different set of irritants and I couldn't say I was more productive. Having already wasted a week trying it out, I couldn't justify spending even more time to get to use it productively and buying licenses. On 20/02/2013 11:59 AM, Jochen Mader wrote: Well, weighting a few years of Eclipse usage vs one week of Idea is not really a fair comparison. It took me about 4 months to really get into Idea (short-cuts, different compile behavior ...). If you ever really consider switching an IDE don't base your assumptions on a week of usage. If there weren't any differences we wouldn't have several major IDEs. But that's just my two cents ;) P.S.: Netbeans is also an awesome IDE, it just gets horribly slow with bigger projects (and that's based on the most recent Release of Netbeans I tried a week ago). On Wed, Feb 20, 2013 at 5:48 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hi William, This might be your lucky day :) Here's the fix for that horrible slowness in xml tabs: From: http://wiki.eclipse.org/**Platform_UI/Juno_Performance_** Investigationhttp://wiki.eclipse.org/Platform_UI/Juno_Performance_Investigation Ensure you are already running on a package from the Juno SR1 release (September 2012) Invoke Help Install New Software Select this repository: http://download.eclipse.org/** eclipse/updates/4.2 http://download.eclipse.org/eclipse/updates/4.2 Expand Juno SR1 Patches and install Eclipse UI Juno SR1 Optimizations Have a nice day, Bertrand p.s. I use Eclipse Juno. Tried Intellij 12 for a week but didn't like it... It was a constant battle to get my project working. On 20/02/2013 9:29 AM, William Speirs wrote: I've always used Eclipse and am currently using Juno. The Maven support got much better, but other stupid things seem to have broke. For example, switching tabs into the XML editor (or pom editor) seems to require calculating Pi to 10 million digits each time. Actually, I think there is a memory leak somewhere and its just a GC going off, I should load it in VisualVM and see. There are other annoying things about Eclipse with respect to settings, but they can usually be fixed by editing some file in the .settings directory. Tried IntelliJ once and it was terribly slow (and looked a bit ugly on Linux)... maybe I should try 12? At the end of the day... anything's better than vim/emacs :-) Bill- On Wed, Feb 20, 2013 at 8:03 AM, Martin Grigorov mgrigo...@apache.orgwrote: My main problem with Eclipse was that it mixes the classpaths for main and test. If you have separate config files in the test classpath some weird things may happen. There is a ticket about this since March 2008: https://bugs.eclipse.org/bugs/**show_bug.cgi?id=224708https://bugs.eclipse.org/bugs/show_bug.cgi?id=224708and it says we need someone to help us to implement it. It strange because Eclipse is OSGi based, i.e. they should have a very good control over the classloaders. So I moved to IDEA and I find it much better for my needs. On Wed, Feb 20, 2013 at 2:52 PM, Richard W. Adams rwada...@up.com wrote: If you do software development for a living (as opposed to a hobby), one thing to consider is what tools are used at prospective employers. I work at a large (40,000+) company where Eclipse is the standard tool. Partly because it's open source (read free, no budget impact) has such a large support community. Plus it meets all our needs. I've used Eclipse for years (both home work), and have been satisfied with it. ** This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. ** -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com
Re: Anyone using Wicket-Stuff Facebook
I got this figure out. I'll post my solution tomorrow when I have a few minutes. Basically, I wasn't understanding that the code was coming back in a page parameter. Once I understood that it was fairly easy to implement. On Monday, February 18, 2013, Stephen Walsh wrote: That's where I'm headed right now. I had a signin page with PageParameters that picked it up by accident... I think I'm headed in the right direction now. I'll post my solution when I get it finished. I'd still be interested to see your solution also. Thanks again. ___ Stephen Walsh | http://connectwithawalsh.com On Mon, Feb 18, 2013 at 6:29 PM, Michael Chandler michael.chand...@onassignment.com javascript:_e({}, 'cvml', 'michael.chand...@onassignment.com'); wrote: The browser gets a token back that makes perfect sense and the example is completed. How do I consume the token? I'll play around with it a bit and let you know what I come up with. Thanks for the help. Based on the path I was taking, the redirect URI is the key. Facebook redirects as such: YOUR_REDIRECT_URI? access_token=USER_ACCESS_TOKEN expires_in=NUMBER_OF_SECONDS_UNTIL_TOKEN_EXPIRES state=YOUR_STATE_VALUE Of course, if the request fails authentication, they redirect as follows: YOUR_REDIRECT_URI? error_reason=user_denied error=access_denied error_description=The+user+denied+your+request. state=YOUR_STATE_VALUE So your redirect page could start out like this: public class FacebookResponseListener extends WebPage { private static final long serialVersionUID = 1L; public FacebookResponseListener(PageParameters params) { // if there is an error, handle it if (params.get(error_reason) != null) { // handle the error here! } else { String accessToken = params.get(access_token).toString(); int expiresIn = params.get(expires_in).toInt(); // etc... etc... } } } Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.orgjavascript:_e({}, 'cvml', 'users-unsubscr...@wicket.apache.org'); For additional commands, e-mail: users-h...@wicket.apache.orgjavascript:_e({}, 'cvml', 'users-h...@wicket.apache.org'); -- ___ Stephen Walsh | http://connectwithawalsh.com
Eclipse or IntelliJ
Who uses what and why? I've only ever used Eclipse, but I discovered IntelliJ earlier this week and it's so different. Just wondering pros and cons on each. Thanks! ___ Stephen Walsh | http://connectwithawalsh.com
Re: Eclipse or IntelliJ
That's what I'm hoping for. IntelliJ looks a lot more polished especially for the Mac. Eclipse is crippling at times because it is so slow. Just sort of getting a feel for the Wicket community and what people like best. ___ Stephen Walsh | http://connectwithawalsh.com On Tue, Feb 19, 2013 at 4:03 PM, Josh Kamau joshnet2...@gmail.com wrote: Hi; You use one of them and you feel like you are missing something? No you are not. The one you are most familiar with is the best. I use intellij ... This discussion might also give you what you are looking for. http://www.linkedin.com/groups/Which-IDE-you-use-develop-80181.S.125932453?qid=98abd743-9a14-4eee-91e5-dbd6854bbf52trk=group_most_popular-0-b-ttlgoback=%2Egmp_80181 Josh On Wed, Feb 20, 2013 at 1:00 AM, Cedric Gatay gata...@gmail.com wrote: At SRMvision we use exclusively IntelliJ for developping. Its excellent Maven support, smart completion and robustness made us forget eclipse very quickly. Le 19 févr. 2013 22:18, Stephen Walsh step...@connectwithawalsh.com a écrit : Who uses what and why? I've only ever used Eclipse, but I discovered IntelliJ earlier this week and it's so different. Just wondering pros and cons on each. Thanks! ___ Stephen Walsh | http://connectwithawalsh.com
Re: Anyone using Wicket-Stuff Facebook
I'm also using Scribe, Martin. I'm following up with the developer to figure out how to use it. He has a copy and paste in his example which obviously won't work for an actual user. https://github.com/fernandezpablo85/scribe-java/blob/master/src/test/java/org/scribe/examples/FacebookExample.java ___ Stephen Walsh | http://connectwithawalsh.com On Mon, Feb 18, 2013 at 1:53 AM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, If you need to implement OAuth authentication then I can recommend you https://github.com/fernandezpablo85/scribe-java It is easy to implement both OAuth v.1 and v.2 with it On Mon, Feb 18, 2013 at 5:28 AM, Stephen Walsh step...@connectwithawalsh.com wrote: https://github.com/wicketstuff/core/wiki/Facebook Anyone using this that can point me in the right direction on how to use the behaviors? I followed the example on getting a login button and it seems like that works well, but I have no idea to tell if the user has validated and how to capture that validation. Clearly it's in the behaviors section of the jar, but I'm not quite sure how to use it. Thanks. ___ Stephen Walsh | http://connectwithawalsh.com -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: Anyone using Wicket-Stuff Facebook
On Mon, Feb 18, 2013 at 1:59 PM, Michael Chandler michael.chand...@onassignment.com wrote: you should be able to define a return URL when a user successfully authenticates that you host This is the part that I don't understand. I guess I create a separate OAuth class page that launches when the user authenticates, but how I get the code out of the URL? I need the code to send back to Facebook so I can get an access token. The other part that is confusing to me is that I had an identical JUnit test set up to do what you did above, but I'm getting an error: java.lang.UnsupportedOperationException: Unsupported operation, please use 'getAuthorizationUrl' and redirect your users there on this line Token requestToken = service.getRequestToken(); I'd be really interested to see how you implement with LinkedIn as I assume it will be very similar for my implementation. Thanks, Mike. ___ Stephen Walsh | http://connectwithawalsh.com
Re: Anyone using Wicket-Stuff Facebook
On Mon, Feb 18, 2013 at 5:27 PM, Michael Chandler michael.chand...@onassignment.com wrote: Facebook should post the access token to your OAuth Accept Redirect URL which you can consume and set to a Token instance. The browser gets a token back that makes perfect sense and the example is completed. How do I consume the token? I'll play around with it a bit and let you know what I come up with. Thanks for the help. ___ Stephen Walsh | http://connectwithawalsh.com
Re: Anyone using Wicket-Stuff Facebook
That's where I'm headed right now. I had a signin page with PageParameters that picked it up by accident... I think I'm headed in the right direction now. I'll post my solution when I get it finished. I'd still be interested to see your solution also. Thanks again. ___ Stephen Walsh | http://connectwithawalsh.com On Mon, Feb 18, 2013 at 6:29 PM, Michael Chandler michael.chand...@onassignment.com wrote: The browser gets a token back that makes perfect sense and the example is completed. How do I consume the token? I'll play around with it a bit and let you know what I come up with. Thanks for the help. Based on the path I was taking, the redirect URI is the key. Facebook redirects as such: YOUR_REDIRECT_URI? access_token=USER_ACCESS_TOKEN expires_in=NUMBER_OF_SECONDS_UNTIL_TOKEN_EXPIRES state=YOUR_STATE_VALUE Of course, if the request fails authentication, they redirect as follows: YOUR_REDIRECT_URI? error_reason=user_denied error=access_denied error_description=The+user+denied+your+request. state=YOUR_STATE_VALUE So your redirect page could start out like this: public class FacebookResponseListener extends WebPage { private static final long serialVersionUID = 1L; public FacebookResponseListener(PageParameters params) { // if there is an error, handle it if (params.get(error_reason) != null) { // handle the error here! } else { String accessToken = params.get(access_token).toString(); int expiresIn = params.get(expires_in).toInt(); // etc... etc... } } } Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Anyone using Wicket-Stuff Facebook
https://github.com/wicketstuff/core/wiki/Facebook Anyone using this that can point me in the right direction on how to use the behaviors? I followed the example on getting a login button and it seems like that works well, but I have no idea to tell if the user has validated and how to capture that validation. Clearly it's in the behaviors section of the jar, but I'm not quite sure how to use it. Thanks. ___ Stephen Walsh | http://connectwithawalsh.com
Re: a loading ... something ...
What about a lazyload panel? http://www.wicket-library.com/wicket-examples/ajax/lazy-loading;jsessionid=88070A23F11D560015390052668E124D?0 ___ Stephen Walsh | http://connectwithawalsh.com On Wed, Feb 13, 2013 at 11:15 AM, grazia grazia.russolass...@gmail.comwrote: There are some pages in my app that load slowly due to the amount of data the customer needs to have (we have already optimized the retrieval part as much as possible). So I thought it would be nice to have a Loading ... dialog or something that disappears as soon as the data on the page have finished loading. What would you recommend for a Wicket app ? Any examples I could look at ? Thank you ! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/a-loading-something-tp4656323.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: Eclipse JRE 1.5
Looked like there were some other items I needed to upgrade as well: maven compiler plugin, junit. There was one called sfl40j or similar. What is this used for? Thanks again for help! Learning a lot from you guys. Hope to contribute back once I really start understanding. New to java and wicket, so I'm very grateful. — Stephen Walsh On Sat, Feb 9, 2013 at 4:57 AM, Martijn Dashorst martijn.dasho...@gmail.com wrote: Also upgrade your maven-eclipse-plugin to use 2.9. Works much better on OS X. Martijn On Fri, Feb 8, 2013 at 12:08 AM, Stephen Walsh step...@connectwithawalsh.com wrote: This was the answer, Gabriel! Because my computer only has one JRE (1.6 with dev docs) installed, Eclipse was using it, but it appeared as though I was using 1.5. This minor change to my pom.xml solved it though! Thank you! ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Feb 7, 2013 at 12:55 PM, Gabriel Landon glan...@piti.pf wrote: Hi Stephen, This did happen to me once! Did you check in your pom.xml that your source and target attributes are 1.6 ? plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId version2.5.1/version configuration * source1.6/source target1.6/target* optimizetrue/optimize debugtrue/debug showDeprecationtrue/showDeprecation showWarningstrue/showWarnings /configuration /plugin Regards, Gabriel. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Eclipse-JRE-1-5-tp4656164p4656170.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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Eclipse JRE 1.5
I'm using Eclipse Juno to develop my wicket app, and what I've noticed is that the JRE keeps switching back to 1.5 instead of staying on 6. I've tried changing this in the build path and pointing it to the developer version of Java 6 multiple times. I'm wondering if there's a setting somewhere in the Wicket code that forces the JRE to use 1.5. I feel like I've seen mail on the list recently that would indicate that Wicket uses Java 6 and would maybe move to Java 7 when Oracle makes some changes on their end. Thoughts? Thanks! ___ Stephen Walsh | http://connectwithawalsh.com
Re: Eclipse JRE 1.5
That's what I figured. I've now discovered that Maven isn't finding rt.jar because I'm developing on a Mac. Mac Java doesn't use rt.jar it uses classes.jar. [INFO] --- maven-eclipse-plugin:2.8:eclipse (default-cli) @ campingawaits --- [INFO] Using Eclipse Workspace: /Users/stephen/Documents/workspace [WARNING] Workspace defines a VM that does not contain a valid jre/lib/rt.jar: /Library/Java/JavaVirtualMachines/1.6.0_37-b06-434.jdk/Contents/Home [WARNING] Workspace defines a VM that does not contain a valid jre/lib/rt.jar: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home [INFO] no substring wtp server match. [INFO] Using as WTP server : JBoss 7.1 Runtime [INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5 Searching for how to get Maven to quit using the default 1.5 on my Wicket 6.5 project. Thanks, Martin. ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Feb 7, 2013 at 11:32 AM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, Wicket 1.5 is built with Java 1.5. Wicket 6 with Java 6 Wicket 7 will most probably with JDK 7 Wicket source code doesn't have anything that can talk to Eclipse or any other IDE :-) On Thu, Feb 7, 2013 at 6:16 PM, Stephen Walsh step...@connectwithawalsh.com wrote: I'm using Eclipse Juno to develop my wicket app, and what I've noticed is that the JRE keeps switching back to 1.5 instead of staying on 6. I've tried changing this in the build path and pointing it to the developer version of Java 6 multiple times. I'm wondering if there's a setting somewhere in the Wicket code that forces the JRE to use 1.5. I feel like I've seen mail on the list recently that would indicate that Wicket uses Java 6 and would maybe move to Java 7 when Oracle makes some changes on their end. Thoughts? Thanks! ___ Stephen Walsh | http://connectwithawalsh.com -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: Eclipse JRE 1.5
This was the answer, Gabriel! Because my computer only has one JRE (1.6 with dev docs) installed, Eclipse was using it, but it appeared as though I was using 1.5. This minor change to my pom.xml solved it though! Thank you! ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Feb 7, 2013 at 12:55 PM, Gabriel Landon glan...@piti.pf wrote: Hi Stephen, This did happen to me once! Did you check in your pom.xml that your source and target attributes are 1.6 ? plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId version2.5.1/version configuration * source1.6/source target1.6/target* optimizetrue/optimize debugtrue/debug showDeprecationtrue/showDeprecation showWarningstrue/showWarnings /configuration /plugin Regards, Gabriel. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Eclipse-JRE-1-5-tp4656164p4656170.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: Upgrade to 6.5.0
That ended up being the issue. Had to clear out my JBOSS and change a line in my web.xml. Thanks! __ Stephen Walsh | http://connectwithawalsh.com On Jan 28, 2013, at 9:48, Paul Bors p...@bors.ws wrote: Looks like your application server is not finding your com.myApp.myAppApp as per: Caused by: java.lang.ClassNotFoundException: com.myApp.myAppApp from [Module deployment.myApp-1.0-SNAPSHOT.war:main from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) Most likely your deployment is corupt. ~ Thank you, Paul Bors On Sat, Jan 26, 2013 at 5:37 PM, Stephen Walsh step...@connectwithawalsh.com wrote: I've been out of development on my side project for awhile and recently just got back in. I upgraded to the latest version and got this this morning and could not figure it out. Any help? 16:29:30,433 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/myApp-1.0-SNAPSHOT]] (MSC service thread 1-3) Exception starting filter wicket.myApp: org.apache.wicket.WicketRuntimeException: Unable to create application of class com.myApp.myAppApp at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:86) [wicket-core-6.5.0.jar:6.5.0] at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:50) [wicket-core-6.5.0.jar:6.5.0] at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:370) [wicket-core-6.5.0.jar:6.5.0] at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:336) [wicket-core-6.5.0.jar:6.5.0] at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:447) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3269) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3865) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_37] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_37] at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_37] Caused by: java.lang.ClassNotFoundException: com.myApp.myAppApp from [Module deployment.myApp-1.0-SNAPSHOT.war:main from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) at java.lang.Class.forName0(Native Method) [classes.jar:1.6.0_37] at java.lang.Class.forName(Class.java:247) [classes.jar:1.6.0_37] at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:72) [wicket-core-6.5.0.jar:6.5.0] ... 12 more 16:29:30,469 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Error filterStart 16:29:30,470 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Context [/myApp-1.0-SNAPSHOT] startup failed due to previous errors 16:29:30,471 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC1: Failed to start service jboss.web.deployment.default-host./myApp-1.0-SNAPSHOT: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./myApp-1.0-SNAPSHOT: JBAS018040: Failed to start context at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_37
Re: Upgrade to 6.5.0
I did a find and replace to remove the app name. That was an oversight. __ Stephen Walsh | http://connectwithawalsh.com On Jan 27, 2013, at 5:07, Sven Meier s...@meiers.net wrote: You're sure the application class is com.myApp.myAppApp? Looks like an accidental duplication of myApp. Sven On 01/26/2013 11:36 PM, Stephen Walsh wrote: Caused by: java.lang.ClassNotFoundException: com.myApp.myAppApp from [Module deployment.myApp- - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Upgrade to 6.5.0
to start: service jboss.web.deployment.default-host./campingawaits-1.0-SNAPSHOT: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./campingawaits-1.0-SNAPSHOT: JBAS018040: Failed to start context On Jan 27, 2013, at 8:25 AM, Stephen Walsh step...@connectwithawalsh.com wrote: I did a find and replace to remove the app name. That was an oversight. __ Stephen Walsh | http://connectwithawalsh.com On Jan 27, 2013, at 5:07, Sven Meier s...@meiers.net wrote: You're sure the application class is com.myApp.myAppApp? Looks like an accidental duplication of myApp. Sven On 01/26/2013 11:36 PM, Stephen Walsh wrote: Caused by: java.lang.ClassNotFoundException: com.myApp.myAppApp from [Module deployment.myApp- - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Upgrade to 6.5.0
campingawaits-1.0-SNAPSHOT.war 09:45:28,147 INFO [org.jboss.as.controller] (management-handler-thread - 1) JBAS014774: Service status report JBAS014777: Services which failed to start: service jboss.web.deployment.default-host./campingawaits-1.0-SNAPSHOT: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./campingawaits-1.0-SNAPSHOT: JBAS018040: Failed to start context On Jan 27, 2013, at 8:40 AM, Stephen Walsh step...@connectwithawalsh.com wrote: Here was the original error: 16:29:29,557 INFO [org.jboss.as.repository] (management-handler-thread - 8) JBAS014900: Content added at location /usr/share/jboss-as-7.1.1.Final/standalone/data/content/2c/fd9a0ad0a567de3c4bfde63b541413297ba7f5/content 16:29:29,617 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of campingawaits-1.0-SNAPSHOT.war 16:29:30,433 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/campingawaits-1.0-SNAPSHOT]] (MSC service thread 1-3) Exception starting filter wicket.campingawaits: org.apache.wicket.WicketRuntimeException: Unable to create application of class com.campingawaits.CampingAwaitsApp at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:86) [wicket-core-6.5.0.jar:6.5.0] at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:50) [wicket-core-6.5.0.jar:6.5.0] at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:370) [wicket-core-6.5.0.jar:6.5.0] at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:336) [wicket-core-6.5.0.jar:6.5.0] at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:447) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3269) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3865) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_37] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_37] at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_37] Caused by: java.lang.ClassNotFoundException: com.campingawaits.CampingAwaitsApp from [Module deployment.campingawaits-1.0-SNAPSHOT.war:main from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) at java.lang.Class.forName0(Native Method) [classes.jar:1.6.0_37] at java.lang.Class.forName(Class.java:247) [classes.jar:1.6.0_37] at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:72) [wicket-core-6.5.0.jar:6.5.0] ... 12 more 16:29:30,469 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Error filterStart 16:29:30,470 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Context [/campingawaits-1.0-SNAPSHOT] startup failed due to previous errors 16:29:30,471 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC1: Failed to start service jboss.web.deployment.default-host./campingawaits-1.0-SNAPSHOT: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./campingawaits-1.0-SNAPSHOT: JBAS018040: Failed to start context at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at java.util.concurrent.ThreadPoolExecutor
Re: Upgrade to 6.5.0
I'm using the default web.xml. I've never touched it since I've started, but here it is: ?xml version=1.0 encoding=ISO-8859-1? web-app 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; version=2.5 display-namecampingawaits/display-name !-- There are three means to configure Wickets configuration mode and they are tested in the order given. 1) A system property: -Dwicket.configuration 2) servlet specific init-param 3) context specific context-param The value might be either development (reloading when templates change) or deployment. If no configuration is found, development is the default. -- filter filter-namewicket.campingawaits/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.campingawaits.CampingAwaitsApp/param-value /init-param /filter filter-mapping filter-namewicket.campingawaits/filter-name url-pattern/*/url-pattern /filter-mapping /web-app I ran mvn clean and it was successful. WEB-INF, does have the classes folders and my classes that have been built. I'm not sure what you mean by your last question. I'm on a Mac and using Terminal, Maven, and the j-boss maven plugin to deploy to my jboss install. Update to the above. I ran into the same issue, but now jboss won't even start. I've got a few away from desk items, so I'll have to check this when I get back and after a clean jboss install. Thanks for the help thus far. ___ Stephen Walsh | http://connectwithawalsh.com On Sun, Jan 27, 2013 at 9:52 AM, Stephen Walsh step...@connectwithawalsh.com wrote: Also, it seems like this might be a deployment issue, but I'm not sure. I'm using mvn package jboss-as:deploy to get my package into jboss, and after rolling back to 6.0.0, I'm still having the same issue 09:45:27,020 INFO [org.jboss.as.repository] (management-handler-thread - 1) JBAS014900: Content added at location /usr/share/jboss-as-7.1.1.Final/standalone/data/content/a2/dffcda3610a8edc34edcd11ac16fc22eed4591/content 09:45:27,057 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of campingawaits-1.0-SNAPSHOT.war 09:45:27,948 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/campingawaits-1.0-SNAPSHOT]] (MSC service thread 1-3) Exception starting filter wicket.campingawaits: org.apache.wicket.WicketRuntimeException: Unable to create application of class com.campingawaits.CampingAwaitsApp at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication( ContextParamWebApplicationFactory.java:86) [wicket-core-6.0.0.jar:6.0.0] at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication( ContextParamWebApplicationFactory.java:50) [wicket-core-6.0.0.jar:6.0.0] at org.apache.wicket.protocol.http.WicketFilter.init( WicketFilter.java:339) [wicket-core-6.0.0.jar:6.0.0] at org.apache.wicket.protocol.http.WicketFilter.init( WicketFilter.java:314) [wicket-core-6.0.0.jar:6.0.0] at org.apache.catalina.core.ApplicationFilterConfig.getFilter( ApplicationFilterConfig.java:447) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.filterStart( StandardContext.java:3269) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.start( StandardContext.java:3865) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.deployment.WebDeploymentService.start( WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService( ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run( ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask( ThreadPoolExecutor.java:886) [classes.jar:1.6.0_37] at java.util.concurrent.ThreadPoolExecutor$Worker.run( ThreadPoolExecutor.java:908) [classes.jar:1.6.0_37] at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_37] Caused by: java.lang.ClassNotFoundException: com.campingawaits.CampingAwaitsApp from [Module deployment.campingawaits-1.0-SNAPSHOT.war:main from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass( ModuleClassLoader.java:190) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked( ConcurrentClassLoader.java:468) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked( ConcurrentClassLoader.java:456) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked( ConcurrentClassLoader.java:423) at org.jboss.modules.ConcurrentClassLoader.performLoadClass( ConcurrentClassLoader.java:398) at org.jboss.modules.ConcurrentClassLoader.loadClass( ConcurrentClassLoader.java:120
Re: Upgrade to 6.5.0
Well, I got a clean install of jboss and used the web interface to add my war to the deployment area. When I tried to enable it, I got the same errors as below. So I'm still not up and running with either 6.0.0 or 6.5.0. :( On Jan 27, 2013, at 10:03 AM, Stephen Walsh step...@connectwithawalsh.com wrote: I'm using the default web.xml. I've never touched it since I've started, but here it is: ?xml version=1.0 encoding=ISO-8859-1? web-app 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; version=2.5 display-namecampingawaits/display-name !-- There are three means to configure Wickets configuration mode and they are tested in the order given. 1) A system property: -Dwicket.configuration 2) servlet specific init-param 3) context specific context-param The value might be either development (reloading when templates change) or deployment. If no configuration is found, development is the default. -- filter filter-namewicket.campingawaits/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.campingawaits.CampingAwaitsApp/param-value /init-param /filter filter-mapping filter-namewicket.campingawaits/filter-name url-pattern/*/url-pattern /filter-mapping /web-app I ran mvn clean and it was successful. WEB-INF, does have the classes folders and my classes that have been built. I'm not sure what you mean by your last question. I'm on a Mac and using Terminal, Maven, and the j-boss maven plugin to deploy to my jboss install. Update to the above. I ran into the same issue, but now jboss won't even start. I've got a few away from desk items, so I'll have to check this when I get back and after a clean jboss install. Thanks for the help thus far. ___ Stephen Walsh | http://connectwithawalsh.com On Sun, Jan 27, 2013 at 9:52 AM, Stephen Walsh step...@connectwithawalsh.com wrote: Also, it seems like this might be a deployment issue, but I'm not sure. I'm using mvn package jboss-as:deploy to get my package into jboss, and after rolling back to 6.0.0, I'm still having the same issue 09:45:27,020 INFO [org.jboss.as.repository] (management-handler-thread - 1) JBAS014900: Content added at location /usr/share/jboss-as-7.1.1.Final/standalone/data/content/a2/dffcda3610a8edc34edcd11ac16fc22eed4591/content 09:45:27,057 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of campingawaits-1.0-SNAPSHOT.war 09:45:27,948 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/campingawaits-1.0-SNAPSHOT]] (MSC service thread 1-3) Exception starting filter wicket.campingawaits: org.apache.wicket.WicketRuntimeException: Unable to create application of class com.campingawaits.CampingAwaitsApp at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:86) [wicket-core-6.0.0.jar:6.0.0] at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:50) [wicket-core-6.0.0.jar:6.0.0] at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:339) [wicket-core-6.0.0.jar:6.0.0] at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:314) [wicket-core-6.0.0.jar:6.0.0] at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:447) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3269) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3865) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_37] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_37] at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_37] Caused
Re: Upgrade to 6.5.0
I'll have to double check on this for sure when I get home, but a simple JBOSS question. I can't just run mvn package jboss-as:deploy over and over again? This has seemed to work for months up until this point. Obviously I need to discontinue if it's not good practice; I just didn't know any better. I'll try again when I get home. I'm on a different computer that's out of sync with my code at home. Here's the class: package com.campingawaits; import org.apache.wicket.Page; import org.apache.wicket.Session; import org.apache.wicket.authorization.IAuthorizationStrategy; import org.apache.wicket.authorization.strategies.page.SimplePageAuthorizationStrategy; import org.apache.wicket.protocol.http.WebApplication; import org.apache.wicket.request.Request; import org.apache.wicket.request.Response; import org.apache.wicket.settings.IRequestCycleSettings.RenderStrategy; import com.campingawaits.auth.AuthenticatedWebPage; import com.campingawaits.auth.CampingAwaitsSession; import com.campingawaits.auth.SignIn; import com.campingawaits.base.About; import com.campingawaits.base.Blog; import com.campingawaits.base.ContactUs; import com.campingawaits.base.Index; import com.campingawaits.blog.BlogDetails; /** * Application object for your web application. If you want to run this application without deploying, run the Start class. * * @see com.campingawaits.Start#main(String[]) */ public class CampingAwaitsApplication extends WebApplication { /** * Contstruct */ public CampingAwaitsApplication() { } /** * @see org.apache.wicket.Application#getHomePage() */ @Override public Class? extends Page getHomePage() { return Index.class; } /** * @see org.apache.wicket.protocol.http.WebApplication#newSession(org.apache.wicket.request.Request, * org.apache.wicket.request.Response) */ @Override public Session newSession(Request request, Response response) { return new CampingAwaitsSession(request); } /** * @see org.apache.wicket.Application#init() */ @Override public void init() { super.init(); getResourceSettings().setThrowExceptionOnMissingResource(false); getRequestCycleSettings().setRenderStrategy(RenderStrategy.REDIRECT_TO_RENDER); IAuthorizationStrategy authorizationStrategy = new SimplePageAuthorizationStrategy( AuthenticatedWebPage.class, SignIn.class) { @Override protected boolean isAuthorized() { return (((CampingAwaitsSession)Session.get()).isSignedIn()); } }; getSecuritySettings().setAuthorizationStrategy(authorizationStrategy); /*mountPage(/, Index.class);*/ mountPage(/news, Blog.class); mountPage(/news/${id}, BlogDetails.class); mountPage(/contact, ContactUs.class); mountPage(/about, About.class); } } ___ Stephen Walsh | http://connectwithawalsh.com On Sun, Jan 27, 2013 at 10:38 AM, procrastinative.developer procrastinative.develo...@gmail.com wrote: I think that Sven has right about war duplication. Jboss maven plugin has 3 goals to manage deployments: deploy, redeploy, undeploy. If you use only deploy goal, jboss could leave some trashes in deployment location. So if you reinstall JBoss, the old configuration files could still be on your disc. You should remove this folders (temp, works etc) - I don't know where this files are located on mac. Fast check: Download fresh zipped installation from JBoss site (http://www.jboss.org/jbossas/downloads) and unzip it, copy war into %JBOSS%/standalone/deployments and run it %JBOSS%/run/stanalone Can you publish also the com.campingawaits.CampingAwaitsApp class? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Upgrade-to-6-5-0-tp4655782p4655802.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: Upgrade to 6.5.0
Just to clarify, the class is not out of sync, the applications (Eclipse, JBOSS, etc.) ___ Stephen Walsh | http://connectwithawalsh.com On Sun, Jan 27, 2013 at 11:46 AM, Stephen Walsh step...@connectwithawalsh.com wrote: I'll have to double check on this for sure when I get home, but a simple JBOSS question. I can't just run mvn package jboss-as:deploy over and over again? This has seemed to work for months up until this point. Obviously I need to discontinue if it's not good practice; I just didn't know any better. I'll try again when I get home. I'm on a different computer that's out of sync with my code at home. Here's the class: package com.campingawaits; import org.apache.wicket.Page; import org.apache.wicket.Session; import org.apache.wicket.authorization.IAuthorizationStrategy; import org.apache.wicket.authorization.strategies.page.SimplePageAuthorizationStrategy; import org.apache.wicket.protocol.http.WebApplication; import org.apache.wicket.request.Request; import org.apache.wicket.request.Response; import org.apache.wicket.settings.IRequestCycleSettings.RenderStrategy; import com.campingawaits.auth.AuthenticatedWebPage; import com.campingawaits.auth.CampingAwaitsSession; import com.campingawaits.auth.SignIn; import com.campingawaits.base.About; import com.campingawaits.base.Blog; import com.campingawaits.base.ContactUs; import com.campingawaits.base.Index; import com.campingawaits.blog.BlogDetails; /** * Application object for your web application. If you want to run this application without deploying, run the Start class. * * @see com.campingawaits.Start#main(String[]) */ public class CampingAwaitsApplication extends WebApplication { /** * Contstruct */ public CampingAwaitsApplication() { } /** * @see org.apache.wicket.Application#getHomePage() */ @Override public Class? extends Page getHomePage() { return Index.class; } /** * @see org.apache.wicket.protocol.http.WebApplication#newSession(org.apache.wicket.request.Request, * org.apache.wicket.request.Response) */ @Override public Session newSession(Request request, Response response) { return new CampingAwaitsSession(request); } /** * @see org.apache.wicket.Application#init() */ @Override public void init() { super.init(); getResourceSettings().setThrowExceptionOnMissingResource(false); getRequestCycleSettings().setRenderStrategy(RenderStrategy.REDIRECT_TO_RENDER); IAuthorizationStrategy authorizationStrategy = new SimplePageAuthorizationStrategy( AuthenticatedWebPage.class, SignIn.class) { @Override protected boolean isAuthorized() { return (((CampingAwaitsSession)Session.get()).isSignedIn()); } }; getSecuritySettings().setAuthorizationStrategy(authorizationStrategy); /*mountPage(/, Index.class);*/ mountPage(/news, Blog.class); mountPage(/news/${id}, BlogDetails.class); mountPage(/contact, ContactUs.class); mountPage(/about, About.class); } } ___ Stephen Walsh | http://connectwithawalsh.com On Sun, Jan 27, 2013 at 10:38 AM, procrastinative.developer procrastinative.develo...@gmail.com wrote: I think that Sven has right about war duplication. Jboss maven plugin has 3 goals to manage deployments: deploy, redeploy, undeploy. If you use only deploy goal, jboss could leave some trashes in deployment location. So if you reinstall JBoss, the old configuration files could still be on your disc. You should remove this folders (temp, works etc) - I don't know where this files are located on mac. Fast check: Download fresh zipped installation from JBoss site (http://www.jboss.org/jbossas/downloads) and unzip it, copy war into %JBOSS%/standalone/deployments and run it %JBOSS%/run/stanalone Can you publish also the com.campingawaits.CampingAwaitsApp class? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Upgrade-to-6-5-0-tp4655782p4655802.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: Upgrade to 6.5.0
Got it working now. I think I had some stuff that was keeping the new install of JBOSS from actually being uninstalled. Thanks for the help. Now to figure out why Maven keeps building with Java 1.5 instead of 1.6. ___ Stephen Walsh | http://connectwithawalsh.com On Sun, Jan 27, 2013 at 12:08 PM, procrastinative.developer procrastinative.develo...@gmail.com wrote: if this fix help you can use JBoss maven plugin in old way. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Upgrade-to-6-5-0-tp4655782p4655809.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
Upgrade to 6.5.0
I've been out of development on my side project for awhile and recently just got back in. I upgraded to the latest version and got this this morning and could not figure it out. Any help? 16:29:30,433 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/myApp-1.0-SNAPSHOT]] (MSC service thread 1-3) Exception starting filter wicket.myApp: org.apache.wicket.WicketRuntimeException: Unable to create application of class com.myApp.myAppApp at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:86) [wicket-core-6.5.0.jar:6.5.0] at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:50) [wicket-core-6.5.0.jar:6.5.0] at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:370) [wicket-core-6.5.0.jar:6.5.0] at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:336) [wicket-core-6.5.0.jar:6.5.0] at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:447) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3269) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3865) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_37] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_37] at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_37] Caused by: java.lang.ClassNotFoundException: com.myApp.myAppApp from [Module deployment.myApp-1.0-SNAPSHOT.war:main from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) at java.lang.Class.forName0(Native Method) [classes.jar:1.6.0_37] at java.lang.Class.forName(Class.java:247) [classes.jar:1.6.0_37] at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:72) [wicket-core-6.5.0.jar:6.5.0] ... 12 more 16:29:30,469 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Error filterStart 16:29:30,470 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Context [/myApp-1.0-SNAPSHOT] startup failed due to previous errors 16:29:30,471 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC1: Failed to start service jboss.web.deployment.default-host./myApp-1.0-SNAPSHOT: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./myApp-1.0-SNAPSHOT: JBAS018040: Failed to start context at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_37] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_37] at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_37] 16:29:30,765 INFO [org.jboss.as.server] (management-handler-thread - 8) JBAS018562: Redeployed myApp-1.0-SNAPSHOT.war 16:29:30,766 INFO [org.jboss.as.controller] (management-handler-thread - 8) JBAS014774: Service status report JBAS014777: Services which failed to start: service jboss.web.deployment.default-host./myApp-1.0-SNAPSHOT: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./myApp-1.0-SNAPSHOT: JBAS018040: Failed to start context Thanks
Upgrade to 6.5.0
I've been out of development on my side project for awhile and recently just got back in. I upgraded to the latest version and got this this morning and could not figure it out. Any help? 16:29:30,433 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/myApp-1.0-SNAPSHOT]] (MSC service thread 1-3) Exception starting filter wicket.myApp: org.apache.wicket.WicketRuntimeException: Unable to create application of class com.myApp.myAppApp at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:86) [wicket-core-6.5.0.jar:6.5.0] at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:50) [wicket-core-6.5.0.jar:6.5.0] at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:370) [wicket-core-6.5.0.jar:6.5.0] at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:336) [wicket-core-6.5.0.jar:6.5.0] at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:447) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3269) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3865) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_37] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_37] at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_37] Caused by: java.lang.ClassNotFoundException: com.myApp.myAppApp from [Module deployment.myApp-1.0-SNAPSHOT.war:main from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) at java.lang.Class.forName0(Native Method) [classes.jar:1.6.0_37] at java.lang.Class.forName(Class.java:247) [classes.jar:1.6.0_37] at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:72) [wicket-core-6.5.0.jar:6.5.0] ... 12 more 16:29:30,469 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Error filterStart 16:29:30,470 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Context [/myApp-1.0-SNAPSHOT] startup failed due to previous errors 16:29:30,471 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC1: Failed to start service jboss.web.deployment.default-host./myApp-1.0-SNAPSHOT: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./myApp-1.0-SNAPSHOT: JBAS018040: Failed to start context at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_37] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_37] at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_37] 16:29:30,765 INFO [org.jboss.as.server] (management-handler-thread - 8) JBAS018562: Redeployed myApp-1.0-SNAPSHOT.war 16:29:30,766 INFO [org.jboss.as.controller] (management-handler-thread - 8) JBAS014774: Service status report JBAS014777: Services which failed to start: service jboss.web.deployment.default-host./myApp-1.0-SNAPSHOT: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./myApp-1.0-SNAPSHOT: JBAS018040: Failed to start context Thanks
Clueless on this error
Randomly got this today. Tried upgrading to 6.1.1, a fresh install of JBoss and still didn't have any luck fixing it… Thoughts? 13:23:15,991 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/campingawaits-1.0-SNAPSHOT]] (MSC service thread 1-3) Exception starting filter wicket.campingawaits: org.apache.wicket.WicketRuntimeException: Unable to create application of class com.campingawaits.CampingAwaitsApp at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:86) [wicket-core-6.0.0.jar:6.0.0] at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:50) [wicket-core-6.0.0.jar:6.0.0] at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:339) [wicket-core-6.0.0.jar:6.0.0] at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:314) [wicket-core-6.0.0.jar:6.0.0] at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:447) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3269) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3865) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_35] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_35] at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_35] Caused by: java.lang.ClassNotFoundException: com.campingawaits.CampingAwaitsApp from [Module deployment.campingawaits-1.0-SNAPSHOT.war:main from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) at java.lang.Class.forName0(Native Method) [classes.jar:1.6.0_35] at java.lang.Class.forName(Class.java:247) [classes.jar:1.6.0_35] at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:72) [wicket-core-6.0.0.jar:6.0.0] ... 12 more 13:23:16,169 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Error filterStart 13:23:16,170 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Context [/campingawaits-1.0-SNAPSHOT] startup failed due to previous errors 13:23:16,509 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC1: Failed to start service jboss.web.deployment.default-host./campingawaits-1.0-SNAPSHOT: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./campingawaits-1.0-SNAPSHOT: JBAS018040: Failed to start context at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_35] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_35] at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_35] 13:23:16,729 INFO [org.jboss.as.server] (management-handler-thread - 5) JBAS015870: Deploy of deployment campingawaits-1.0-SNAPSHOT.war was rolled back with failure message {JBAS014671: Failed services = {jboss.web.deployment.default-host.\/campingawaits-1.0-SNAPSHOT\ = org.jboss.msc.service.StartException in service jboss.web.deployment.default-host.\/campingawaits-1.0-SNAPSHOT\: JBAS018040: Failed to start context}} 13:23:16,732 INFO [org.jboss.as.controller] (management-handler-thread - 5) JBAS014774: Service status report
Re: Clueless on this error
I'll review when I get home. Thanks for the quick reply. __ Stephen Walsh On Oct 17, 2012, at 14:44, Richard W. Adams rwada...@up.com wrote: Just a guess, but based on ClassNotFoundException: com.campingawaits.CampingAwaitsApp, it sounds like something changed your classpath so the class loader can no longer find this class. _ I have yet to meet a C compiler that is more friendly and easier to use than eating soup with a knife. From: Stephen Walsh stephen.wa...@me.com To: users@wicket.apache.org users@wicket.apache.org Date: 10/17/2012 02:21 PM Subject:Clueless on this error Randomly got this today. Tried upgrading to 6.1.1, a fresh install of JBoss and still didn't have any luck fixing it… Thoughts? 13:23:15,991 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/campingawaits-1.0-SNAPSHOT]] (MSC service thread 1-3) Exception starting filter wicket.campingawaits: org.apache.wicket.WicketRuntimeException: Unable to create application of class com.campingawaits.CampingAwaitsApp at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:86) [wicket-core-6.0.0.jar:6.0.0] at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:50) [wicket-core-6.0.0.jar:6.0.0] at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:339) [wicket-core-6.0.0.jar:6.0.0] at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:314) [wicket-core-6.0.0.jar:6.0.0] at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:447) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3269) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3865) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_35] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_35] at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_35] Caused by: java.lang.ClassNotFoundException: com.campingawaits.CampingAwaitsApp from [Module deployment.campingawaits-1.0-SNAPSHOT.war:main from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) at java.lang.Class.forName0(Native Method) [classes.jar:1.6.0_35] at java.lang.Class.forName(Class.java:247) [classes.jar:1.6.0_35] at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:72) [wicket-core-6.0.0.jar:6.0.0] ... 12 more 13:23:16,169 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Error filterStart 13:23:16,170 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Context [/campingawaits-1.0-SNAPSHOT] startup failed due to previous errors 13:23:16,509 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC1: Failed to start service jboss.web.deployment.default-host./campingawaits-1.0-SNAPSHOT: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./campingawaits-1.0-SNAPSHOT: JBAS018040: Failed to start context at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA
Re: DatePicker Error
This is a screen shot of my referenced libraries. One interesting thing that happens is that my Java will occasionally show 1.5 instead of what it shows here. Not sure if this has anything to do with it On Sep 25, 2012, at 02:05, Martin Grigorov mgrigo...@apache.org wrote: Hi, It seems you have mixed versions of wicket-datetime and wicket-core in the classpath. Make sure they are both the same version. On Tue, Sep 25, 2012 at 5:22 AM, Stephen Walsh step...@connectwithawalsh.com wrote: I've packaged and deployed the examples page to JBoss AS 7.1.1 and the date picker page works just fine; however, when I package and deploy my own application, I get the following error javax.servlet.ServletException: Filter execution threw an exception root cause java.lang.NoSuchMethodError: org.apache.wicket.Session.getClientInfo()Lorg/apache/wicket/core/request/ClientInfo; org.apache.wicket.extensions.yui.calendar.DateTimeField.getClientTimeZone(DateTimeField.java:315) org.apache.wicket.extensions.yui.calendar.DateTimeField.onBeforeRender(DateTimeField.java:417) org.apache.wicket.Component.internalBeforeRender(Component.java:993) org.apache.wicket.Component.beforeRender(Component.java:1027) org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) org.apache.wicket.Component.onBeforeRender(Component.java:3855) org.apache.wicket.markup.html.form.Form.onBeforeRender(Form.java:1706) org.apache.wicket.Component.internalBeforeRender(Component.java:993) org.apache.wicket.Component.beforeRender(Component.java:1027) org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) org.apache.wicket.Component.onBeforeRender(Component.java:3855) org.apache.wicket.Page.onBeforeRender(Page.java:826) org.apache.wicket.Component.internalBeforeRender(Component.java:993) org.apache.wicket.Component.beforeRender(Component.java:1027) org.apache.wicket.Component.internalPrepareForRender(Component.java:2228) org.apache.wicket.Page.internalPrepareForRender(Page.java:279) org.apache.wicket.Component.render(Component.java:2310) org.apache.wicket.Page.renderPage(Page.java:1035) org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105) org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:182) org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167) org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784) org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255) org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212) org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283) org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188) org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:244) Any thoughts on why this might happen and how to fix it? Thanks in advance! Stephen Walsh | http://connectwithawalsh.com -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DatePicker Error
I'll take a look when I get home, but I have wicket 6.0.0 in core, extensions, date-time, auth-roles in my class path. I set this up in my pom. Stephen Walsh | http://connectwithawalsh.com On Tue, Sep 25, 2012 at 7:35 AM, Martin Grigorov mgrigo...@apache.orgwrote: The attachment didn't make it. Check what is in .war#WEB-INF/lib folder. On Tue, Sep 25, 2012 at 3:32 PM, Stephen Walsh step...@connectwithawalsh.com wrote: This is a screen shot of my referenced libraries. One interesting thing that happens is that my Java will occasionally show 1.5 instead of what it shows here. Not sure if this has anything to do with it On Sep 25, 2012, at 02:05, Martin Grigorov mgrigo...@apache.org wrote: Hi, It seems you have mixed versions of wicket-datetime and wicket-core in the classpath. Make sure they are both the same version. On Tue, Sep 25, 2012 at 5:22 AM, Stephen Walsh step...@connectwithawalsh.com wrote: I've packaged and deployed the examples page to JBoss AS 7.1.1 and the date picker page works just fine; however, when I package and deploy my own application, I get the following error javax.servlet.ServletException: Filter execution threw an exception root cause java.lang.NoSuchMethodError: org.apache.wicket.Session.getClientInfo()Lorg/apache/wicket/core/request/ClientInfo; org.apache.wicket.extensions.yui.calendar.DateTimeField.getClientTimeZone(DateTimeField.java:315) org.apache.wicket.extensions.yui.calendar.DateTimeField.onBeforeRender(DateTimeField.java:417) org.apache.wicket.Component.internalBeforeRender(Component.java:993) org.apache.wicket.Component.beforeRender(Component.java:1027) org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) org.apache.wicket.Component.onBeforeRender(Component.java:3855) org.apache.wicket.markup.html.form.Form.onBeforeRender(Form.java:1706) org.apache.wicket.Component.internalBeforeRender(Component.java:993) org.apache.wicket.Component.beforeRender(Component.java:1027) org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) org.apache.wicket.Component.onBeforeRender(Component.java:3855) org.apache.wicket.Page.onBeforeRender(Page.java:826) org.apache.wicket.Component.internalBeforeRender(Component.java:993) org.apache.wicket.Component.beforeRender(Component.java:1027) org.apache.wicket.Component.internalPrepareForRender(Component.java:2228) org.apache.wicket.Page.internalPrepareForRender(Page.java:279) org.apache.wicket.Component.render(Component.java:2310) org.apache.wicket.Page.renderPage(Page.java:1035) org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105) org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:182) org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167) org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784) org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255) org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212) org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283) org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188) org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:244) Any thoughts on why this might happen and how to fix it? Thanks in advance! Stephen Walsh | http://connectwithawalsh.com -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DatePicker Error
Martin, this is what I've got right now. properties wicket.version6.0.0/wicket.version jetty.version7.5.0.v20110901/jetty.version /properties dependencies !-- WICKET DEPENDENCIES -- dependency groupIdorg.apache.wicket/groupId artifactIdwicket-core/artifactId version${wicket.version}/version /dependency !-- OPTIONAL DEPENDENCY -- dependency groupIdorg.apache.wicket/groupId artifactIdwicket-extensions/artifactId version${wicket.version}/version /dependency dependency groupIdorg.apache.wicket/groupId artifactIdwicket-auth-roles/artifactId version${wicket.version}/version /dependency dependency groupIdorg.apache.wicket/groupId artifactIdwicket-datetime/artifactId version${wicket.version}/version /dependency Stephen Walsh | http://connectwithawalsh.com On Sep 25, 2012, at 07:52, Stephen Walsh step...@connectwithawalsh.com wrote: I'll take a look when I get home, but I have wicket 6.0.0 in core, extensions, date-time, auth-roles in my class path. I set this up in my pom. Stephen Walsh | http://connectwithawalsh.com On Tue, Sep 25, 2012 at 7:35 AM, Martin Grigorov mgrigo...@apache.org wrote: The attachment didn't make it. Check what is in .war#WEB-INF/lib folder. On Tue, Sep 25, 2012 at 3:32 PM, Stephen Walsh step...@connectwithawalsh.com wrote: This is a screen shot of my referenced libraries. One interesting thing that happens is that my Java will occasionally show 1.5 instead of what it shows here. Not sure if this has anything to do with it On Sep 25, 2012, at 02:05, Martin Grigorov mgrigo...@apache.org wrote: Hi, It seems you have mixed versions of wicket-datetime and wicket-core in the classpath. Make sure they are both the same version. On Tue, Sep 25, 2012 at 5:22 AM, Stephen Walsh step...@connectwithawalsh.com wrote: I've packaged and deployed the examples page to JBoss AS 7.1.1 and the date picker page works just fine; however, when I package and deploy my own application, I get the following error javax.servlet.ServletException: Filter execution threw an exception root cause java.lang.NoSuchMethodError: org.apache.wicket.Session.getClientInfo()Lorg/apache/wicket/core/request/ClientInfo; org.apache.wicket.extensions.yui.calendar.DateTimeField.getClientTimeZone(DateTimeField.java:315) org.apache.wicket.extensions.yui.calendar.DateTimeField.onBeforeRender(DateTimeField.java:417) org.apache.wicket.Component.internalBeforeRender(Component.java:993) org.apache.wicket.Component.beforeRender(Component.java:1027) org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) org.apache.wicket.Component.onBeforeRender(Component.java:3855) org.apache.wicket.markup.html.form.Form.onBeforeRender(Form.java:1706) org.apache.wicket.Component.internalBeforeRender(Component.java:993) org.apache.wicket.Component.beforeRender(Component.java:1027) org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) org.apache.wicket.Component.onBeforeRender(Component.java:3855) org.apache.wicket.Page.onBeforeRender(Page.java:826) org.apache.wicket.Component.internalBeforeRender(Component.java:993) org.apache.wicket.Component.beforeRender(Component.java:1027) org.apache.wicket.Component.internalPrepareForRender(Component.java:2228) org.apache.wicket.Page.internalPrepareForRender(Page.java:279) org.apache.wicket.Component.render(Component.java:2310) org.apache.wicket.Page.renderPage(Page.java:1035) org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105) org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:182) org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167) org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784) org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255) org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212) org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283
Re: DatePicker Error
I didn't look in the .war#WEB-INF/lib folder. I had all sorts of junk in there! That did the trick though. Thank you again for educating a newbie. Very grateful for the Wicket community thus far. On Sep 25, 2012, at 16:59, Stephen Walsh step...@connectwithawalsh.com wrote: Martin, this is what I've got right now. properties wicket.version6.0.0/wicket.version jetty.version7.5.0.v20110901/jetty.version /properties dependencies !-- WICKET DEPENDENCIES -- dependency groupIdorg.apache.wicket/groupId artifactIdwicket-core/artifactId version${wicket.version}/version /dependency !-- OPTIONAL DEPENDENCY -- dependency groupIdorg.apache.wicket/groupId artifactIdwicket-extensions/artifactId version${wicket.version}/version /dependency dependency groupIdorg.apache.wicket/groupId artifactIdwicket-auth-roles/artifactId version${wicket.version}/version /dependency dependency groupIdorg.apache.wicket/groupId artifactIdwicket-datetime/artifactId version${wicket.version}/version /dependency Stephen Walsh | http://connectwithawalsh.com On Sep 25, 2012, at 07:52, Stephen Walsh step...@connectwithawalsh.com wrote: I'll take a look when I get home, but I have wicket 6.0.0 in core, extensions, date-time, auth-roles in my class path. I set this up in my pom. Stephen Walsh | http://connectwithawalsh.com On Tue, Sep 25, 2012 at 7:35 AM, Martin Grigorov mgrigo...@apache.org wrote: The attachment didn't make it. Check what is in .war#WEB-INF/lib folder. On Tue, Sep 25, 2012 at 3:32 PM, Stephen Walsh step...@connectwithawalsh.com wrote: This is a screen shot of my referenced libraries. One interesting thing that happens is that my Java will occasionally show 1.5 instead of what it shows here. Not sure if this has anything to do with it On Sep 25, 2012, at 02:05, Martin Grigorov mgrigo...@apache.org wrote: Hi, It seems you have mixed versions of wicket-datetime and wicket-core in the classpath. Make sure they are both the same version. On Tue, Sep 25, 2012 at 5:22 AM, Stephen Walsh step...@connectwithawalsh.com wrote: I've packaged and deployed the examples page to JBoss AS 7.1.1 and the date picker page works just fine; however, when I package and deploy my own application, I get the following error javax.servlet.ServletException: Filter execution threw an exception root cause java.lang.NoSuchMethodError: org.apache.wicket.Session.getClientInfo()Lorg/apache/wicket/core/request/ClientInfo; org.apache.wicket.extensions.yui.calendar.DateTimeField.getClientTimeZone(DateTimeField.java:315) org.apache.wicket.extensions.yui.calendar.DateTimeField.onBeforeRender(DateTimeField.java:417) org.apache.wicket.Component.internalBeforeRender(Component.java:993) org.apache.wicket.Component.beforeRender(Component.java:1027) org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) org.apache.wicket.Component.onBeforeRender(Component.java:3855) org.apache.wicket.markup.html.form.Form.onBeforeRender(Form.java:1706) org.apache.wicket.Component.internalBeforeRender(Component.java:993) org.apache.wicket.Component.beforeRender(Component.java:1027) org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) org.apache.wicket.Component.onBeforeRender(Component.java:3855) org.apache.wicket.Page.onBeforeRender(Page.java:826) org.apache.wicket.Component.internalBeforeRender(Component.java:993) org.apache.wicket.Component.beforeRender(Component.java:1027) org.apache.wicket.Component.internalPrepareForRender(Component.java:2228) org.apache.wicket.Page.internalPrepareForRender(Page.java:279) org.apache.wicket.Component.render(Component.java:2310) org.apache.wicket.Page.renderPage(Page.java:1035) org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105) org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:182) org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167) org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784) org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64
Re: String Value Conversion Exception
On a related note to this original question. Can someone explain the difference between the two lines below? listItem.add(new Label(when, new ModelPost(blogPost))); listItem.add(new Label(text, blogPost.getText())); The first one gives me some random but predictable text: post.Post@497f079e The next gives me the actual text of the test post:text1 I'm not sure why it matters here. In my details page as you can below, the getters are being used to pull back the necessary data. Thanks in advance. On Sep 21, 2012, at 19:45, Stephen Walsh step...@connectwithawalsh.com wrote: Got this resolved. I missed a line in my Post class add(this); which adds the Post in question to the HashMap. On Sep 21, 2012, at 08:38, Stephen Walsh step...@connectwithawalsh.com wrote: I attempted your solution Sebastien and did parameters.set(id, 43); This was one of the id's that was showing up in the link when I looked at the status bar. I still got the same error (string value exception) and it also said something about a null pointer. I'm at work and don't have the stack trace, but I thought it might be helpful to provide more info. Any other thoughts on this? Thanks again. _ Stephen Walsh On Thu, Sep 20, 2012 at 4:46 PM, Stephen Walsh step...@connectwithawalsh.com wrote: Are they not being set when the BlogDetails.link gives the blogPost object and it set page parameters there? __ Stephen Walsh On Sep 20, 2012, at 14:23, Francois Meillet francois.meil...@gmail.com wrote: I don't see where you set the parameters... parameters.set(id, x); It has to be done somewhere. If parameters.get(id) return null, as null can't be converted to long, you get the exception. François Le 20 sept. 2012 à 21:16, Stephen Walsh step...@connectwithawalsh.com a écrit : Thanks for responding. That would make sense. Is there any way to identify when or when it couldn't be converted? Does the array that I provided cause this issue? In my Post class I followed the example code and have the class assigning ids as long. ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Sep 20, 2012 at 12:55 PM, Francois Meillet francois.meil...@gmail.com wrote: parameters.get(id).toLong() throws this exception when id can't be converted to long. François Le 20 sept. 2012 à 19:06, Stephen Walsh step...@connectwithawalsh.com a écrit : I am new to Wicket and Java, so forgive any ignorance or lack of information. I am modeling a blog type application after the Wicket Examples Library application and have not had any luck passing the post id to the details page. I'm not using the user portion at this point because I'll be doing a role based authorization later. The blog page populates the array that it is given and provides a link to the detail page, but this is when the exception is thrown. Any thoughts? Thanks! public abstract class BasePage extends WebPage { /** * */ private static final long serialVersionUID = 1L; private String pageTitle = (no title); /** * * @return pageTitle */ public final String getPageTitle() { return pageTitle; } /** * * @param title */ public final void setPageTitle(String title) { pageTitle = title; } public BasePage() { this(new PageParameters()); } /** * * @param parameters */ public BasePage(final PageParameters parameters) { super(parameters); add(new Label(title, new PropertyModelString(this, pageTitle))); add(new BookmarkablePageLink(logo, Index.class)); add(new BookmarkablePageLink(home, Index.class)); add(new BookmarkablePageLink(news, Blog.class)); add(new BookmarkablePageLink(contact, ContactUs.class)); add(new BookmarkablePageLink(about, About.class)); add(new FooterPanel(social)); } /** * Construct * * @param model */ public BasePage(IModel? model) { super(model); } public class Blog extends BasePage { /** * Constructor * * @param params */ public Blog(final PageParameters paramaters) { setPageTitle(News); //Add a list of blogPosts final PageableListViewPost listView; add(listView = new PageableListViewPost(blogPosts, new PropertyModelListPost(this, blogPosts), 5) { @Override public void populateItem(final ListItemPost listItem) { final Post blogPost
Re: String Value Conversion Exception
Sorry for the barrage of emails. It seems like when I changed the Post.toString() method, it changed all of my models in the blog page. Also not sure why this happened. Thanks for your patience. I'm really trying to understand this. On Sep 22, 2012, at 09:25, Stephen Walsh step...@connectwithawalsh.com wrote: On a related note to this original question. Can someone explain the difference between the two lines below? listItem.add(new Label(when, new ModelPost(blogPost))); listItem.add(new Label(text, blogPost.getText())); The first one gives me some random but predictable text: post.Post@497f079e The next gives me the actual text of the test post:text1 I'm not sure why it matters here. In my details page as you can below, the getters are being used to pull back the necessary data. Thanks in advance. On Sep 21, 2012, at 19:45, Stephen Walsh step...@connectwithawalsh.com wrote: Got this resolved. I missed a line in my Post class add(this); which adds the Post in question to the HashMap. On Sep 21, 2012, at 08:38, Stephen Walsh step...@connectwithawalsh.com wrote: I attempted your solution Sebastien and did parameters.set(id, 43); This was one of the id's that was showing up in the link when I looked at the status bar. I still got the same error (string value exception) and it also said something about a null pointer. I'm at work and don't have the stack trace, but I thought it might be helpful to provide more info. Any other thoughts on this? Thanks again. _ Stephen Walsh On Thu, Sep 20, 2012 at 4:46 PM, Stephen Walsh step...@connectwithawalsh.com wrote: Are they not being set when the BlogDetails.link gives the blogPost object and it set page parameters there? __ Stephen Walsh On Sep 20, 2012, at 14:23, Francois Meillet francois.meil...@gmail.com wrote: I don't see where you set the parameters... parameters.set(id, x); It has to be done somewhere. If parameters.get(id) return null, as null can't be converted to long, you get the exception. François Le 20 sept. 2012 à 21:16, Stephen Walsh step...@connectwithawalsh.com a écrit : Thanks for responding. That would make sense. Is there any way to identify when or when it couldn't be converted? Does the array that I provided cause this issue? In my Post class I followed the example code and have the class assigning ids as long. ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Sep 20, 2012 at 12:55 PM, Francois Meillet francois.meil...@gmail.com wrote: parameters.get(id).toLong() throws this exception when id can't be converted to long. François Le 20 sept. 2012 à 19:06, Stephen Walsh step...@connectwithawalsh.com a écrit : I am new to Wicket and Java, so forgive any ignorance or lack of information. I am modeling a blog type application after the Wicket Examples Library application and have not had any luck passing the post id to the details page. I'm not using the user portion at this point because I'll be doing a role based authorization later. The blog page populates the array that it is given and provides a link to the detail page, but this is when the exception is thrown. Any thoughts? Thanks! public abstract class BasePage extends WebPage { /** * */ private static final long serialVersionUID = 1L; private String pageTitle = (no title); /** * * @return pageTitle */ public final String getPageTitle() { return pageTitle; } /** * * @param title */ public final void setPageTitle(String title) { pageTitle = title; } public BasePage() { this(new PageParameters()); } /** * * @param parameters */ public BasePage(final PageParameters parameters) { super(parameters); add(new Label(title, new PropertyModelString(this, pageTitle))); add(new BookmarkablePageLink(logo, Index.class)); add(new BookmarkablePageLink(home, Index.class)); add(new BookmarkablePageLink(news, Blog.class)); add(new BookmarkablePageLink(contact, ContactUs.class)); add(new BookmarkablePageLink(about, About.class)); add(new FooterPanel(social)); } /** * Construct * * @param model */ public BasePage(IModel? model) { super(model); } public class Blog extends BasePage { /** * Constructor * * @param params */ public Blog(final PageParameters paramaters) { setPageTitle(News); //Add a list of blogPosts
Re: String Value Conversion Exception
Thanks, Sebastien. I'll give that a try. On Sep 22, 2012, at 10:08, Sebastien seb...@gmail.com wrote: Hi, Label is designed to display a text, and that's what you supplied in the second line. But you provides a typed model in the first one. So the effect is that le Label will call blobPost.toString(). If you wish to provide a model to the Label (which is recommended in case the text changes), prefer: new Label(when, new PropertyModelString(blogPost, text)) Hope this helps, Sebastien. On Sat, Sep 22, 2012 at 4:25 PM, Stephen Walsh step...@connectwithawalsh.com wrote: On a related note to this original question. Can someone explain the difference between the two lines below? listItem.add(new Label(when, new ModelPost(blogPost))); listItem.add(new Label(text, blogPost.getText())); The first one gives me some random but predictable text: post.Post@497f079e The next gives me the actual text of the test post:text1 I'm not sure why it matters here. In my details page as you can below, the getters are being used to pull back the necessary data. Thanks in advance. On Sep 21, 2012, at 19:45, Stephen Walsh step...@connectwithawalsh.com wrote: Got this resolved. I missed a line in my Post class add(this); which adds the Post in question to the HashMap. On Sep 21, 2012, at 08:38, Stephen Walsh step...@connectwithawalsh.com wrote: I attempted your solution Sebastien and did parameters.set(id, 43); This was one of the id's that was showing up in the link when I looked at the status bar. I still got the same error (string value exception) and it also said something about a null pointer. I'm at work and don't have the stack trace, but I thought it might be helpful to provide more info. Any other thoughts on this? Thanks again. _ Stephen Walsh On Thu, Sep 20, 2012 at 4:46 PM, Stephen Walsh step...@connectwithawalsh.com wrote: Are they not being set when the BlogDetails.link gives the blogPost object and it set page parameters there? __ Stephen Walsh On Sep 20, 2012, at 14:23, Francois Meillet francois.meil...@gmail.com wrote: I don't see where you set the parameters... parameters.set(id, x); It has to be done somewhere. If parameters.get(id) return null, as null can't be converted to long, you get the exception. François Le 20 sept. 2012 à 21:16, Stephen Walsh step...@connectwithawalsh.com a écrit : Thanks for responding. That would make sense. Is there any way to identify when or when it couldn't be converted? Does the array that I provided cause this issue? In my Post class I followed the example code and have the class assigning ids as long. ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Sep 20, 2012 at 12:55 PM, Francois Meillet francois.meil...@gmail.com wrote: parameters.get(id).toLong() throws this exception when id can't be converted to long. François Le 20 sept. 2012 à 19:06, Stephen Walsh step...@connectwithawalsh.com a écrit : I am new to Wicket and Java, so forgive any ignorance or lack of information. I am modeling a blog type application after the Wicket Examples Library application and have not had any luck passing the post id to the details page. I'm not using the user portion at this point because I'll be doing a role based authorization later. The blog page populates the array that it is given and provides a link to the detail page, but this is when the exception is thrown. Any thoughts? Thanks! public abstract class BasePage extends WebPage { /** * */ private static final long serialVersionUID = 1L; private String pageTitle = (no title); /** * * @return pageTitle */ public final String getPageTitle() { return pageTitle; } /** * * @param title */ public final void setPageTitle(String title) { pageTitle = title; } public BasePage() { this(new PageParameters()); } /** * * @param parameters */ public BasePage(final PageParameters parameters) { super(parameters); add(new Label(title, new PropertyModelString(this, pageTitle))); add(new BookmarkablePageLink(logo, Index.class)); add(new BookmarkablePageLink(home, Index.class)); add(new BookmarkablePageLink(news, Blog.class)); add(new BookmarkablePageLink(contact, ContactUs.class)); add(new BookmarkablePageLink(about, About.class)); add(new FooterPanel(social)); } /** * Construct * * @param model */ public BasePage(IModel? model) { super(model); } public class Blog extends BasePage { /** * Constructor * * @param params */ public Blog
Re: String Value Conversion Exception
This worked wonderfully. Thanks for the guidance on this. Stephen Walsh | http://connectwithawalsh.com On Sep 22, 2012, at 10:08, Sebastien seb...@gmail.com wrote: Hi, Label is designed to display a text, and that's what you supplied in the second line. But you provides a typed model in the first one. So the effect is that le Label will call blobPost.toString(). If you wish to provide a model to the Label (which is recommended in case the text changes), prefer: new Label(when, new PropertyModelString(blogPost, text)) Hope this helps, Sebastien. On Sat, Sep 22, 2012 at 4:25 PM, Stephen Walsh step...@connectwithawalsh.com wrote: On a related note to this original question. Can someone explain the difference between the two lines below? listItem.add(new Label(when, new ModelPost(blogPost))); listItem.add(new Label(text, blogPost.getText())); The first one gives me some random but predictable text: post.Post@497f079e The next gives me the actual text of the test post:text1 I'm not sure why it matters here. In my details page as you can below, the getters are being used to pull back the necessary data. Thanks in advance. On Sep 21, 2012, at 19:45, Stephen Walsh step...@connectwithawalsh.com wrote: Got this resolved. I missed a line in my Post class add(this); which adds the Post in question to the HashMap. On Sep 21, 2012, at 08:38, Stephen Walsh step...@connectwithawalsh.com wrote: I attempted your solution Sebastien and did parameters.set(id, 43); This was one of the id's that was showing up in the link when I looked at the status bar. I still got the same error (string value exception) and it also said something about a null pointer. I'm at work and don't have the stack trace, but I thought it might be helpful to provide more info. Any other thoughts on this? Thanks again. _ Stephen Walsh On Thu, Sep 20, 2012 at 4:46 PM, Stephen Walsh step...@connectwithawalsh.com wrote: Are they not being set when the BlogDetails.link gives the blogPost object and it set page parameters there? __ Stephen Walsh On Sep 20, 2012, at 14:23, Francois Meillet francois.meil...@gmail.com wrote: I don't see where you set the parameters... parameters.set(id, x); It has to be done somewhere. If parameters.get(id) return null, as null can't be converted to long, you get the exception. François Le 20 sept. 2012 à 21:16, Stephen Walsh step...@connectwithawalsh.com a écrit : Thanks for responding. That would make sense. Is there any way to identify when or when it couldn't be converted? Does the array that I provided cause this issue? In my Post class I followed the example code and have the class assigning ids as long. ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Sep 20, 2012 at 12:55 PM, Francois Meillet francois.meil...@gmail.com wrote: parameters.get(id).toLong() throws this exception when id can't be converted to long. François Le 20 sept. 2012 à 19:06, Stephen Walsh step...@connectwithawalsh.com a écrit : I am new to Wicket and Java, so forgive any ignorance or lack of information. I am modeling a blog type application after the Wicket Examples Library application and have not had any luck passing the post id to the details page. I'm not using the user portion at this point because I'll be doing a role based authorization later. The blog page populates the array that it is given and provides a link to the detail page, but this is when the exception is thrown. Any thoughts? Thanks! public abstract class BasePage extends WebPage { /** * */ private static final long serialVersionUID = 1L; private String pageTitle = (no title); /** * * @return pageTitle */ public final String getPageTitle() { return pageTitle; } /** * * @param title */ public final void setPageTitle(String title) { pageTitle = title; } public BasePage() { this(new PageParameters()); } /** * * @param parameters */ public BasePage(final PageParameters parameters) { super(parameters); add(new Label(title, new PropertyModelString(this, pageTitle))); add(new BookmarkablePageLink(logo, Index.class)); add(new BookmarkablePageLink(home, Index.class)); add(new BookmarkablePageLink(news, Blog.class)); add(new BookmarkablePageLink(contact, ContactUs.class)); add(new BookmarkablePageLink(about, About.class)); add(new FooterPanel(social)); } /** * Construct * * @param model */ public BasePage(IModel? model) { super(model); } public class Blog
Re: String Value Conversion Exception
I attempted your solution Sebastien and did parameters.set(id, 43); This was one of the id's that was showing up in the link when I looked at the status bar. I still got the same error (string value exception) and it also said something about a null pointer. I'm at work and don't have the stack trace, but I thought it might be helpful to provide more info. Any other thoughts on this? Thanks again. _ Stephen Walsh On Thu, Sep 20, 2012 at 4:46 PM, Stephen Walsh step...@connectwithawalsh.com wrote: Are they not being set when the BlogDetails.link gives the blogPost object and it set page parameters there? __ Stephen Walsh On Sep 20, 2012, at 14:23, Francois Meillet francois.meil...@gmail.com wrote: I don't see where you set the parameters... parameters.set(id, x); It has to be done somewhere. If parameters.get(id) return null, as null can't be converted to long, you get the exception. François Le 20 sept. 2012 à 21:16, Stephen Walsh step...@connectwithawalsh.com a écrit : Thanks for responding. That would make sense. Is there any way to identify when or when it couldn't be converted? Does the array that I provided cause this issue? In my Post class I followed the example code and have the class assigning ids as long. ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Sep 20, 2012 at 12:55 PM, Francois Meillet francois.meil...@gmail.com wrote: parameters.get(id).toLong() throws this exception when id can't be converted to long. François Le 20 sept. 2012 à 19:06, Stephen Walsh step...@connectwithawalsh.com a écrit : I am new to Wicket and Java, so forgive any ignorance or lack of information. I am modeling a blog type application after the Wicket Examples Library application and have not had any luck passing the post id to the details page. I'm not using the user portion at this point because I'll be doing a role based authorization later. The blog page populates the array that it is given and provides a link to the detail page, but this is when the exception is thrown. Any thoughts? Thanks! public abstract class BasePage extends WebPage { /** * */ private static final long serialVersionUID = 1L; private String pageTitle = (no title); /** * * @return pageTitle */ public final String getPageTitle() { return pageTitle; } /** * * @param title */ public final void setPageTitle(String title) { pageTitle = title; } public BasePage() { this(new PageParameters()); } /** * * @param parameters */ public BasePage(final PageParameters parameters) { super(parameters); add(new Label(title, new PropertyModelString(this, pageTitle))); add(new BookmarkablePageLink(logo, Index.class)); add(new BookmarkablePageLink(home, Index.class)); add(new BookmarkablePageLink(news, Blog.class)); add(new BookmarkablePageLink(contact, ContactUs.class)); add(new BookmarkablePageLink(about, About.class)); add(new FooterPanel(social)); } /** * Construct * * @param model */ public BasePage(IModel? model) { super(model); } public class Blog extends BasePage { /** * Constructor * * @param params */ public Blog(final PageParameters paramaters) { setPageTitle(News); //Add a list of blogPosts final PageableListViewPost listView; add(listView = new PageableListViewPost(blogPosts, new PropertyModelListPost(this, blogPosts), 5) { @Override public void populateItem(final ListItemPost listItem) { final Post blogPost = listItem.getModelObject(); listItem.add(BlogDetails.link(details, blogPost, getLocalizer().getString(noPostTitle, this))); listItem.add(new Label(text, new ModelPost(blogPost))); listItem.add(new Label(tags, new ModelPost(blogPost))); listItem.add(removeLink(remove, listItem)); listItem.add(EditBlogPost.link(edit, blogPost.getId())); } }); add(new PagingNavigator(navigator, listView)); } public ListPost getBlogPosts() { final ListPost blogPosts = new ArrayListPost(); blogPosts.add(new Post(Post1, text1, tag1, tag2, tag3)); blogPosts.add(new Post(Post2, text2, tag1, tag2, tag3
Re: String Value Conversion Exception
Got this resolved. I missed a line in my Post class add(this); which adds the Post in question to the HashMap. On Sep 21, 2012, at 08:38, Stephen Walsh step...@connectwithawalsh.com wrote: I attempted your solution Sebastien and did parameters.set(id, 43); This was one of the id's that was showing up in the link when I looked at the status bar. I still got the same error (string value exception) and it also said something about a null pointer. I'm at work and don't have the stack trace, but I thought it might be helpful to provide more info. Any other thoughts on this? Thanks again. _ Stephen Walsh On Thu, Sep 20, 2012 at 4:46 PM, Stephen Walsh step...@connectwithawalsh.com wrote: Are they not being set when the BlogDetails.link gives the blogPost object and it set page parameters there? __ Stephen Walsh On Sep 20, 2012, at 14:23, Francois Meillet francois.meil...@gmail.com wrote: I don't see where you set the parameters... parameters.set(id, x); It has to be done somewhere. If parameters.get(id) return null, as null can't be converted to long, you get the exception. François Le 20 sept. 2012 à 21:16, Stephen Walsh step...@connectwithawalsh.com a écrit : Thanks for responding. That would make sense. Is there any way to identify when or when it couldn't be converted? Does the array that I provided cause this issue? In my Post class I followed the example code and have the class assigning ids as long. ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Sep 20, 2012 at 12:55 PM, Francois Meillet francois.meil...@gmail.com wrote: parameters.get(id).toLong() throws this exception when id can't be converted to long. François Le 20 sept. 2012 à 19:06, Stephen Walsh step...@connectwithawalsh.com a écrit : I am new to Wicket and Java, so forgive any ignorance or lack of information. I am modeling a blog type application after the Wicket Examples Library application and have not had any luck passing the post id to the details page. I'm not using the user portion at this point because I'll be doing a role based authorization later. The blog page populates the array that it is given and provides a link to the detail page, but this is when the exception is thrown. Any thoughts? Thanks! public abstract class BasePage extends WebPage { /** * */ private static final long serialVersionUID = 1L; private String pageTitle = (no title); /** * * @return pageTitle */ public final String getPageTitle() { return pageTitle; } /** * * @param title */ public final void setPageTitle(String title) { pageTitle = title; } public BasePage() { this(new PageParameters()); } /** * * @param parameters */ public BasePage(final PageParameters parameters) { super(parameters); add(new Label(title, new PropertyModelString(this, pageTitle))); add(new BookmarkablePageLink(logo, Index.class)); add(new BookmarkablePageLink(home, Index.class)); add(new BookmarkablePageLink(news, Blog.class)); add(new BookmarkablePageLink(contact, ContactUs.class)); add(new BookmarkablePageLink(about, About.class)); add(new FooterPanel(social)); } /** * Construct * * @param model */ public BasePage(IModel? model) { super(model); } public class Blog extends BasePage { /** * Constructor * * @param params */ public Blog(final PageParameters paramaters) { setPageTitle(News); //Add a list of blogPosts final PageableListViewPost listView; add(listView = new PageableListViewPost(blogPosts, new PropertyModelListPost(this, blogPosts), 5) { @Override public void populateItem(final ListItemPost listItem) { final Post blogPost = listItem.getModelObject(); listItem.add(BlogDetails.link(details, blogPost, getLocalizer().getString(noPostTitle, this))); listItem.add(new Label(text, new ModelPost(blogPost))); listItem.add(new Label(tags, new ModelPost(blogPost))); listItem.add(removeLink(remove, listItem)); listItem.add(EditBlogPost.link(edit, blogPost.getId())); } }); add(new PagingNavigator(navigator, listView)); } public ListPost
Re: String Value Conversion Exception
Thanks for responding. That would make sense. Is there any way to identify when or when it couldn't be converted? Does the array that I provided cause this issue? In my Post class I followed the example code and have the class assigning ids as long. ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Sep 20, 2012 at 12:55 PM, Francois Meillet francois.meil...@gmail.com wrote: parameters.get(id).toLong() throws this exception when id can't be converted to long. François Le 20 sept. 2012 à 19:06, Stephen Walsh step...@connectwithawalsh.com a écrit : I am new to Wicket and Java, so forgive any ignorance or lack of information. I am modeling a blog type application after the Wicket Examples Library application and have not had any luck passing the post id to the details page. I'm not using the user portion at this point because I'll be doing a role based authorization later. The blog page populates the array that it is given and provides a link to the detail page, but this is when the exception is thrown. Any thoughts? Thanks! public abstract class BasePage extends WebPage { /** * */ private static final long serialVersionUID = 1L; private String pageTitle = (no title); /** * * @return pageTitle */ public final String getPageTitle() { return pageTitle; } /** * * @param title */ public final void setPageTitle(String title) { pageTitle = title; } public BasePage() { this(new PageParameters()); } /** * * @param parameters */ public BasePage(final PageParameters parameters) { super(parameters); add(new Label(title, new PropertyModelString(this, pageTitle))); add(new BookmarkablePageLink(logo, Index.class)); add(new BookmarkablePageLink(home, Index.class)); add(new BookmarkablePageLink(news, Blog.class)); add(new BookmarkablePageLink(contact, ContactUs.class)); add(new BookmarkablePageLink(about, About.class)); add(new FooterPanel(social)); } /** * Construct * * @param model */ public BasePage(IModel? model) { super(model); } public class Blog extends BasePage { /** * Constructor * * @param params */ public Blog(final PageParameters paramaters) { setPageTitle(News); //Add a list of blogPosts final PageableListViewPost listView; add(listView = new PageableListViewPost(blogPosts, new PropertyModelListPost(this, blogPosts), 5) { @Override public void populateItem(final ListItemPost listItem) { final Post blogPost = listItem.getModelObject(); listItem.add(BlogDetails.link(details, blogPost, getLocalizer().getString(noPostTitle, this))); listItem.add(new Label(text, new ModelPost(blogPost))); listItem.add(new Label(tags, new ModelPost(blogPost))); listItem.add(removeLink(remove, listItem)); listItem.add(EditBlogPost.link(edit, blogPost.getId())); } }); add(new PagingNavigator(navigator, listView)); } public ListPost getBlogPosts() { final ListPost blogPosts = new ArrayListPost(); blogPosts.add(new Post(Post1, text1, tag1, tag2, tag3)); blogPosts.add(new Post(Post2, text2, tag1, tag2, tag3)); blogPosts.add(new Post(Post3, text3, tag1, tag2, tag3)); blogPosts.add(new Post(Post4, text4, tag1, tag2, tag3)); blogPosts.add(new Post(Post5, text5, tag1, tag2, tag3)); blogPosts.add(new Post(Post6, text6, tag1, tag2, tag3)); blogPosts.add(new Post(Post7, text7, tag1, tag2, tag3)); blogPosts.add(new Post(Post8, text8, tag1, tag2, tag3)); blogPosts.add(new Post(Post9, text9, tag1, tag2, tag3)); blogPosts.add(new Post(Post10, text10, tag1, tag2, tag3)); return blogPosts; } } public class BlogDetails extends BasePage { /** * * @param parameters * PageParameters * @throws StringValueConversionException */ public BlogDetails(final PageParameters parameters) throws StringValueConversionException { this(Post.get
Re: String Value Conversion Exception
Are they not being set when the BlogDetails.link gives the blogPost object and it set page parameters there? __ Stephen Walsh On Sep 20, 2012, at 14:23, Francois Meillet francois.meil...@gmail.com wrote: I don't see where you set the parameters... parameters.set(id, x); It has to be done somewhere. If parameters.get(id) return null, as null can't be converted to long, you get the exception. François Le 20 sept. 2012 à 21:16, Stephen Walsh step...@connectwithawalsh.com a écrit : Thanks for responding. That would make sense. Is there any way to identify when or when it couldn't be converted? Does the array that I provided cause this issue? In my Post class I followed the example code and have the class assigning ids as long. ___ Stephen Walsh | http://connectwithawalsh.com On Thu, Sep 20, 2012 at 12:55 PM, Francois Meillet francois.meil...@gmail.com wrote: parameters.get(id).toLong() throws this exception when id can't be converted to long. François Le 20 sept. 2012 à 19:06, Stephen Walsh step...@connectwithawalsh.com a écrit : I am new to Wicket and Java, so forgive any ignorance or lack of information. I am modeling a blog type application after the Wicket Examples Library application and have not had any luck passing the post id to the details page. I'm not using the user portion at this point because I'll be doing a role based authorization later. The blog page populates the array that it is given and provides a link to the detail page, but this is when the exception is thrown. Any thoughts? Thanks! public abstract class BasePage extends WebPage { /** * */ private static final long serialVersionUID = 1L; private String pageTitle = (no title); /** * * @return pageTitle */ public final String getPageTitle() { return pageTitle; } /** * * @param title */ public final void setPageTitle(String title) { pageTitle = title; } public BasePage() { this(new PageParameters()); } /** * * @param parameters */ public BasePage(final PageParameters parameters) { super(parameters); add(new Label(title, new PropertyModelString(this, pageTitle))); add(new BookmarkablePageLink(logo, Index.class)); add(new BookmarkablePageLink(home, Index.class)); add(new BookmarkablePageLink(news, Blog.class)); add(new BookmarkablePageLink(contact, ContactUs.class)); add(new BookmarkablePageLink(about, About.class)); add(new FooterPanel(social)); } /** * Construct * * @param model */ public BasePage(IModel? model) { super(model); } public class Blog extends BasePage { /** * Constructor * * @param params */ public Blog(final PageParameters paramaters) { setPageTitle(News); //Add a list of blogPosts final PageableListViewPost listView; add(listView = new PageableListViewPost(blogPosts, new PropertyModelListPost(this, blogPosts), 5) { @Override public void populateItem(final ListItemPost listItem) { final Post blogPost = listItem.getModelObject(); listItem.add(BlogDetails.link(details, blogPost, getLocalizer().getString(noPostTitle, this))); listItem.add(new Label(text, new ModelPost(blogPost))); listItem.add(new Label(tags, new ModelPost(blogPost))); listItem.add(removeLink(remove, listItem)); listItem.add(EditBlogPost.link(edit, blogPost.getId())); } }); add(new PagingNavigator(navigator, listView)); } public ListPost getBlogPosts() { final ListPost blogPosts = new ArrayListPost(); blogPosts.add(new Post(Post1, text1, tag1, tag2, tag3)); blogPosts.add(new Post(Post2, text2, tag1, tag2, tag3)); blogPosts.add(new Post(Post3, text3, tag1, tag2, tag3)); blogPosts.add(new Post(Post4, text4, tag1, tag2, tag3)); blogPosts.add(new Post(Post5, text5, tag1, tag2, tag3)); blogPosts.add(new Post(Post6, text6, tag1, tag2, tag3)); blogPosts.add(new Post(Post7, text7, tag1, tag2, tag3)); blogPosts.add(new Post(Post8, text8, tag1, tag2, tag3)); blogPosts.add(new Post(Post9, text9, tag1, tag2, tag3)); blogPosts.add(new Post(Post10, text10, tag1, tag2, tag3)); return blogPosts; } } public class BlogDetails extends BasePage { /** * * @param