On 10/01/2013 17:44, Jan Bernhardt wrote:
Hi Francesco,

Thanks for investigating!

After creating  a new Syncope project and not making any changes, I was also 
able to run syncope in embedded mode.

But I still get the same exception, when I try to make it run in a "real 
environment". I guess I will have to investigate it a little more...

I'll let you know as soon as I find the reason/solution.

I have just copied core/target/syncope.war and console/target/syncope-console.war under $CATALINA_HOME/webapps, started my local PostgreSQL server and finally started Tomcat.

Everything is working as well.

Moreover, I have also defined a datasource (in $CATALINA_HOME/conf/context.xml) as follows:

<Resource name="jdbc/syncopeDataSource" auth="Container" type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" testWhileIdle="true"
testOnBorrow="true" testOnReturn="true" validationQuery="SELECT 1" validationInterval="30000" maxActive="50" minIdle="2" maxWait="10000" initialSize="2" removeAbandonedTimeout="20000"
          removeAbandoned="true" logAbandoned="true" suspectTimeout="20000"
timeBetweenEvictionRunsMillis="5000" minEvictableIdleTimeMillis="5000"
jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer"
username="syncope" password="syncope" driverClassName="org.postgresql.Driver"
          url="jdbc:postgresql://localhost:5432/syncope"/>

then uncommented the <resource-ref/> at the end of $CATALINA_HOME/webapps/syncope/WEB-INF/web.xml and restarted Tomcat. All this to make Syncope work with real datasource rather than Spring's emulated datasource.

Everything is working as well.

You should try to look at all logs (including Tomcat's) during startup...

Regards.

[1] 
https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments#RunSyncopeinrealenvironments-ApacheTomcat7

-----Original Message-----
From: Francesco Chicchiriccò [mailto:ilgro...@apache.org]
Sent: Donnerstag, 10. Januar 2013 17:13
To: dev@syncope.apache.org
Subject: Re: Console is not working with trunk version

Jan,
everything is working for me, at least in embedded mode (I haven't tried yet
to deploy to an external container).

Here is what I did, following instructions at [1]

mvn archetype:generate \
      -DarchetypeGroupId=org.apache.syncope \
      -DarchetypeArtifactId=syncope-archetype \ -
DarchetypeRepository=http://repository.apache.org/content/repositories/s
napshots
\
      -DarchetypeVersion=1.1.0-SNAPSHOT

then, from the generated directory

mvn clean package
cd console
mvn -Pembedded

At this point I am able to log in to
http://localhost:9080/syncope-console/ and operate normally.

Could you check this, please?

Regards.

[1]
https://cwiki.apache.org/confluence/display/SYNCOPE/Create+a+new+Sync
ope+project

On 10/01/2013 16:51, Jan Bernhardt wrote:
Thanks!

BTW I also tried the embedded mode, also with the same exception...

Regards.
Jan


-----Original Message-----
From: Francesco Chicchiriccò [mailto:ilgro...@apache.org]
Sent: Donnerstag, 10. Januar 2013 15:50
To: dev@syncope.apache.org
Subject: Re: Console is not working with trunk version

On 10/01/2013 15:37, Jan Bernhardt wrote:
Hi Francesco,

I used our archetype to generate a new project and then deployed
this one
to Tomcat 7.
First I used my (old) syncope postgres DB settings. But I also
created a new
(empty) DB getting still the same error messages.

Ok, I'll replicate your setup and let you know.

Regards.

-----Original Message-----
From: Francesco Chicchiriccò [mailto:ilgro...@apache.org]
Sent: Donnerstag, 10. Januar 2013 15:33
To: dev@syncope.apache.org
Subject: Re: Console is not working with trunk version

On 10/01/2013 15:26, Jan Bernhardt wrote:
Hi Syncopers,

I just tried to setup a syncope IDM based on the current trunk
version. I
was able to package and deploy core and console just fine. But when
I try to login to our console I get an unexpected RuntimeException!!
Does someone has a clue why this is happening?
Which setup are you running? From sources? From a generated project
via archetype? If so, embedded or in an external Tomcat?

Unexpected RuntimeException

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

Stacktrace

Root cause:

java.lang.NullPointerException
         at
org.apache.syncope.console.SyncopeSession.setEntitlements(SyncopeSess
i
on.java:81)
         at
org.apache.syncope.console.pages.Login$1.onSubmit(Login.java:113)
         at
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:75
7)
         at
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:70
0)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at
org.apache.wicket.RequestListenerInterface.internalInvoke(RequestLi
st
ener
Interface.java:258)
         at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerIn
te
rfac
e.java:216)
         at
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHand
le
r.in
vokeListener(ListenerInterfaceRequestHandler.java:240)
         at
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHand
le
r.r
espond(ListenerInterfaceRequestHandler.java:226)
         at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(
Re
questCycle.java:840)
         at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerS
t
ack.java:64)
         at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.j
av
a:2
54)
         at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCy
cl
e.java:211)
         at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(
R
equestCycle.java:282)
         at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(Wi
ck
etFil
ter.java:244)
         at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketF
il
ter.ja
va:188)
         at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.
ja
va:267)
         at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ap
pl
icationFi
lterChain.java:243)
         at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicatio
nF
ilterChai
n.java:210)
         at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:225)
         at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
al
ve.java:169)
         at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenti
ca
torB
ase.java:472)
         at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
168)
         at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve
.j
ava:9
8)
         at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
927)
         at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:118)
         at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.j
av
a:4
07)
         at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHt
tp
11P
rocessor.java:999)
         at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
Ab
stractProtocol.java:565)
         at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpo
in
t.ja
va:309)
         at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
ut
or.java:886)
         at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.ja
va:908)
         at java.lang.Thread.run(Thread.java:662)
Viele Grüße

--
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/

Reply via email to