You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by androidcoolguy <an...@hotmail.com> on 2011/07/07 19:42:42 UTC

Re: [ANNOUNCE] Wicketopia 0.9 Released...

James,

I am a new user of wicketopia :) I tried your cool tool and I got the NPE
error. I am not sure what else need to be configured for Spring to inject
PersistenceProvider. It might not be injected due to something I need to
setup in the Spring applicationContext?

Would you mind sharing the xml file or throw some light?

Thanks.

My codes -

package wicket.pages;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.Model;
import org.apache.wicket.spring.injection.annot.SpringBean;
import org.wicketopia.persistence.PersistenceProvider;
import org.wicketopia.persistence.component.scaffold.Scaffold;

import com.appspot.cloudserviceapi.media.xmm.Movies;

public class HomePage extends WebPage {
    @SpringBean
    private PersistenceProvider persistenceProvider;

    public HomePage() {
		add(new Label("message", new Model("Hello World!")));
        add(new Scaffold<Movies>("scaffold", Movies.class,
persistenceProvider));
	}

}

The NPE is -

Unexpected RuntimeException

WicketMessage: Can't instantiate page using constructor public
wicket.pages.HomePage()

Root cause:

java.lang.NullPointerException
     at
org.wicketopia.persistence.component.scaffold.Scaffold.<init>(Scaffold.java:85)
     at wicket.pages.HomePage.<init>(HomePage.java:24)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
     at
com.google.appengine.tools.development.agent.runtime.Runtime.newInstance_(Runtime.java:112)
     at
com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:120)
     at
org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:192)
     at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)
     at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:298)
     at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)
     at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
     at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
     at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
     at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
     at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
     at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
     at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
     at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
     at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     at
com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:35)
     at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:58)
     at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
     at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
     at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     at
com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:97)
     at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
     at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
     at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
     at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
     at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
     at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
     at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
     at
com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:351)
     at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
     at org.mortbay.jetty.Server.handle(Server.java:326)
     at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
     at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
     at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
     at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
     at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
     at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
     at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

Complete stack:

org.apache.wicket.WicketRuntimeException: Can't instantiate page using
constructor public wicket.pages.HomePage()
     at
org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212)
     at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)
     at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:298)
     at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)
     at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
     at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
     at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
     at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
     at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
     at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
     at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)

java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
     at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
     at
com.google.appengine.tools.development.agent.runtime.Runtime.newInstance_(Runtime.java:112)
     at
com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:120)
     at
org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:192)
     at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)
     at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:298)
     at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)
     at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
     at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
     at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
     at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
     at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
     at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
     at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)

display page view




--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ANNOUNCE-Wicketopia-0-9-Released-tp3418771p3652189.html
Sent from the Users forum mailing list archive at Nabble.com.

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


RE: [ANNOUNCE] Wicketopia 0.9 Released...

Posted by androidcoolguy <an...@hotmail.com>.
Turned out to be sqlite3 pagination issue, nothing to do with Wicketopia.
Issue resolved! Thus, verified that Wicketopia 0.9.2 all good.

Please let me know if you still need any help in maintaining the project.
Thanks!

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ANNOUNCE-Wicketopia-0-9-Released-tp3418771p3677022.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: [ANNOUNCE] Wicketopia 0.9 Released...

Posted by James Carman <ja...@carmanconsulting.com>.
Try using the @Enabled annotation to limit editing to only certain
"contexts" (such as ADMIN or something).

On Sat, Oct 22, 2011 at 11:18 AM, androidcoolguy
<an...@hotmail.com> wrote:
> James,
>
> Your metadata annotation is based on Metastopheles, but I can't find much
> information about it. Do you have more information elsewhere that you could
> provide?
>
> Specifically, I need to see if there is a way to make a property "read only"
> (non-editable). What kind of annotation should I apply in the domain class?
>
> Thanks.
>
> AG
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/ANNOUNCE-Wicketopia-0-9-Released-tp3418771p3928352.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


RE: [ANNOUNCE] Wicketopia 0.9 Released...

Posted by androidcoolguy <an...@hotmail.com>.
James,

Your metadata annotation is based on Metastopheles, but I can't find much
information about it. Do you have more information elsewhere that you could
provide?

Specifically, I need to see if there is a way to make a property "read only"
(non-editable). What kind of annotation should I apply in the domain class?

Thanks.

AG

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ANNOUNCE-Wicketopia-0-9-Released-tp3418771p3928352.html
Sent from the Users forum mailing list archive at Nabble.com.

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


RE: [ANNOUNCE] Wicketopia 0.9 Released...

Posted by androidcoolguy <an...@hotmail.com>.
I fixed all the issues over the weekend.

If you like, I can send you the changes as I don't have commit access to the
project.

There is still slight issues though, it seems like navigation/paging is not
working correctly if there are more than 1000 records.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ANNOUNCE-Wicketopia-0-9-Released-tp3418771p3675266.html
Sent from the Users forum mailing list archive at Nabble.com.

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


RE: [ANNOUNCE] Wicketopia 0.9 Released...

Posted by androidcoolguy <an...@hotmail.com>.
More good news. I used JPA provider instead of hibernate by looking at your
latest codes to make Wicketopia works on GAEJ.

Also have to change the JpaPersistenceProvider in such a way -

    public int getCount(Class<?> entityType)
    {
      Integer results = (Integer) entityManager.createQuery("select
count(obj) from " + entityType.getName() + " obj").getSingleResult();
      return results.intValue();
//        List results = entityManager.createQuery("select count(*) from " +
entityType.getName()).getResultList();
//        return ((Number)results.get(0)).intValue();
      
    }

I left off at the create method while saving the Person. Error is -

java.lang.UnsupportedOperationException: This feature isn't available until
JPA 2.0

You can try yourself at http://cloudserviceapi.appspot.com/app/ to see the
error. Note that I removed some fields like start date and end date as they
were on my way to complete the "port" :(

I have proven my track record, could you make me a committer of project
Wicketopia now :) ?


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ANNOUNCE-Wicketopia-0-9-Released-tp3418771p3661400.html
Sent from the Users forum mailing list archive at Nabble.com.

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


RE: [ANNOUNCE] Wicketopia 0.9 Released...

Posted by androidcoolguy <an...@hotmail.com>.
I am working on making it works on GAE/J. But stuck at
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">  <property name="driverClassName" value="org.vnetcon.blobdb.driver.jdbc.BlobDBDriver" />  <property name="url" value="blobdb|http://localhost:8888/blobdb/ws|username=username|password=password" />  <property name="username" value="sa" />  <property name="password" value="" /></bean>
And the partial error -
WARNING: Could not obtain connection to query metadatajava.sql.SQLException: URL is not in the correct format: blobdb|http://localhost:8888/blobdb/ws|username=username|password=password	at com.google.cloud.sql.jdbc.internal.Exceptions.driverUrlNotInCorrectFormat(Exceptions.java:103)	at com.google.cloud.sql.jdbc.Driver.connect(Driver.java:47)	at com.google.cloud.sql.jdbc.Driver.connect(Driver.java:24)	at java.sql.DriverManager.getConnection(DriverManager.java:582)	at java.sql.DriverManager.getConnection(DriverManager.java:154)	at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:173)
I posted the error with GAE forum :)
Will let you know how it goes.
J
Date: Sun, 10 Jul 2011 20:21:13 -0700
From: ml-node+3658631-962999233-250840@n4.nabble.com
To: androidcoolguy@hotmail.com
Subject: Re: [ANNOUNCE] Wicketopia 0.9 Released...



	Hi James

Great effort mate thanks, Haven't had a look as yet am sure it will be

useful. If you need help with documentation do let us know


Cheers



On Mon, Jul 11, 2011 at 8:51 AM, androidcoolguy

<[hidden email]>wrote:


> Ok after some struggling, I managed to get it work. I noticed that

> Wicketopia

> has a tight coupling with Hibernate, especially -

>

>    <bean id="persistenceProvider"

> class="org.wicketopia.persistence.hibernate.HibernatePersistenceProvider">

>        <property name="sessionFactory" ref="sessionFactory"/>

>    </bean>

>

> And the codes needs sessionFactory to be initialized (not null), in order

> to

> work. That was why I were having NPE.

>

> Is there any plan to support Google App Engine for Java? I can help out if

> you can give me some guidelines.

>

> Thanks for such an awesome framework!

>

> --

> View this message in context:

> http://apache-wicket.1842946.n4.nabble.com/ANNOUNCE-Wicketopia-0-9-Released-tp3418771p3658471.html
> Sent from the Users forum mailing list archive at Nabble.com.

>

> ---------------------------------------------------------------------

> To unsubscribe, e-mail: [hidden email]

> For additional commands, e-mail: [hidden email]

>

>


	
	

	

	
	
		If you reply to this email, your message will be added to the discussion below:
		http://apache-wicket.1842946.n4.nabble.com/ANNOUNCE-Wicketopia-0-9-Released-tp3418771p3658631.html
	
	
		
		To unsubscribe from [ANNOUNCE] Wicketopia 0.9 Released..., click here.
	Insert mode 		 	   		  

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ANNOUNCE-Wicketopia-0-9-Released-tp3418771p3661170.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: [ANNOUNCE] Wicketopia 0.9 Released...

Posted by Nivedan Nadaraj <sh...@gmail.com>.
Hi James
Great effort mate thanks, Haven't had a look as yet am sure it will be
useful. If you need help with documentation do let us know

Cheers


On Mon, Jul 11, 2011 at 8:51 AM, androidcoolguy
<an...@hotmail.com>wrote:

> Ok after some struggling, I managed to get it work. I noticed that
> Wicketopia
> has a tight coupling with Hibernate, especially -
>
>    <bean id="persistenceProvider"
> class="org.wicketopia.persistence.hibernate.HibernatePersistenceProvider">
>        <property name="sessionFactory" ref="sessionFactory"/>
>    </bean>
>
> And the codes needs sessionFactory to be initialized (not null), in order
> to
> work. That was why I were having NPE.
>
> Is there any plan to support Google App Engine for Java? I can help out if
> you can give me some guidelines.
>
> Thanks for such an awesome framework!
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/ANNOUNCE-Wicketopia-0-9-Released-tp3418771p3658471.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: [ANNOUNCE] Wicketopia 0.9 Released...

Posted by androidcoolguy <an...@hotmail.com>.
Ok after some struggling, I managed to get it work. I noticed that Wicketopia
has a tight coupling with Hibernate, especially -

    <bean id="persistenceProvider"
class="org.wicketopia.persistence.hibernate.HibernatePersistenceProvider">
        <property name="sessionFactory" ref="sessionFactory"/>
    </bean>

And the codes needs sessionFactory to be initialized (not null), in order to
work. That was why I were having NPE.

Is there any plan to support Google App Engine for Java? I can help out if
you can give me some guidelines.

Thanks for such an awesome framework!

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ANNOUNCE-Wicketopia-0-9-Released-tp3418771p3658471.html
Sent from the Users forum mailing list archive at Nabble.com.

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