jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dipu <dipu....@googlemail.com>
Subject Re: Runnig jackrabbit as web application
Date Thu, 04 Jun 2009 08:45:03 GMT
from the stacktrace it looks like you have Unresolved compilation problems

-dipu

On Tue, Jun 2, 2009 at 9:53 PM, sjtirtha <sjtirtha@gmail.com> wrote:
> Hi,
>
> I'm trying to run jackrabbit as a web application(wicket)
> Unfortunately I got error during the login in the TransientRepository.
> The DB that is used is Derby.
>
> I wrote a Test class to test the login and it works.
> Does anybody know, why it does not work if I run it as a web application?
>
> Steve
>
> I attached you the class that executes the lgin into TransientRepository
>
> ##########################################################
> import javax.jcr.Repository;
> import javax.jcr.Session;
> import javax.jcr.SimpleCredentials;
>
> import org.apache.jackrabbit.core.TransientRepository;
>
> public class JcrUtil {
>    private static Session session;
>
>    public static Session getSession() throws Exception{
>        if(session == null){
>            Repository repository = new TransientRepository();
>            session = repository.login(new SimpleCredentials("username",
> "password".toCharArray()));
>            //session = repository.login("admin");
>            System.out.println("Logged in");
>        }
>
>        return session;
>    }
> }
> ##############################################################
>
> Below I attached you the error message that I get when I call "getSession"
> in a web application
> ##############################################################
>
> WicketMessage: Can't instantiate page using constructor public
> com.startup.ui.HomePage(org.apache.wicket.PageParameters) and argument
>
> Root cause:
>
> java.lang.Error: Unresolved compilation problems:
>        imageComp cannot be resolved to a type
>        Syntax error on token "add", = expected after this token
>
>     at com.startup.ui.HomePage.<init>(HomePage.java:20)
>     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>     at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>     at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:147)
>     at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:66)
>     at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:262)
>     at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283)
>     at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210)
>     at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
>     at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1171)
>     at org.apache.wicket.RequestCycle.step(RequestCycle.java:1248)
>     at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1349)
>     at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
>     at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387)
>     at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:199)
>     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
>     at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
>     at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>     at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>     at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>     at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
>     at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
>     at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>     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:534)
>     at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)
>     at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
>     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:520)
>
> Complete stack:
>
> org.apache.wicket.WicketRuntimeException: Can't instantiate page using
> constructor public
> com.startup.ui.HomePage(org.apache.wicket.PageParameters) and argument
>     at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:168)
>     at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:66)
>     at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:262)
>     at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283)
>     at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210)
>     at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
>     at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1171)
>     at org.apache.wicket.RequestCycle.step(RequestCycle.java:1248)
>     at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1349)
>     at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
>     at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387)
>
> 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:494)
>     at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:147)
>     at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:66)
>     at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:262)
>     at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283)
>     at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210)
>     at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
>     at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1171)
>     at org.apache.wicket.RequestCycle.step(RequestCycle.java:1248)
>     at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1349)
>     at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
>     at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387)
>
>
> ##############################################################
>

Mime
View raw message