Re: Syncope on AWS

2017-08-22 Thread Francesco Chicchiriccò

Hi John,
from the logs below I see something strange, e.g. that

org.apache.syncope.client.console.rest.UserRestClient.searchCount(UserRestClient.java:63)

throws NOT_FOUND, e.g. 404 - which barely means that the REST endpoint

/rest/users

returns 404.

I cannot figure out how this might happen. Maybe it is related to the 
troublesome setup you went through.


FYI, I am going to fix soon the 500 returned by /rest/groups/own when 
accessing via admin (which is not a regular user, so cannot be part of 
any group, actually).


Regards.

On 21/08/2017 18:21, John Stegeman wrote:

Hi Francesco,
I was authenticating into console and swagger using admin.

Also, I forget to add the environment details from initial email (my 
apologies):  Tomcat 8, Java 8, Amazon Linux 2017.03, current Syncope 
version



Just FYI:  During our setup, we have been bouncing back and forth 
between the AWS Elastic Beanstalk (EBS) environment using a mySQL 
backend and the Syncope Distribution environment.  Many of the errors 
have been resolved, partly due to us mapping the EBS environment 
environment variables and properly size the EBS env.


Per your instructions,

1.  We cleaned out the logs, logged into console with admin, 
navigated to Realms.  I then exited and pulled the logs from EBS.


2.  The log information was captured (below).

3.  I then attempted to access the Users tab within Realms and was 
punted back to the login screen (this the primary issue we are 
observing).


4.  We have learned a a lot over the last week about setting up 
Syncope, but may be missing something.  Any assistance is greatly 
appreciated.



In core-connie.log, all messages were INFO and it appears all the 
connector bundles were loaded.

In core-persistence.log no issues (found data and left untouched)
In core-rest.log it appears the WebApplicationContext initialized 
properly (with completed message).  No errors.



Below is the full content of console.log

14:31:09.478 ERROR org.apache.cxf.jaxrs.utils.JAXRSUtils - No message 
body reader has been found for class 
org.apache.syncope.common.lib.to.ErrorTO, ContentType: 
text/html;charset=iso-8859-1
14:31:09.486 ERROR org.apache.cxf.jaxrs.utils.JAXRSUtils - No message 
body reader has been found for class java.util.List, ContentType: 
text/html;charset=iso-8859-1
14:31:09.495 ERROR 
org.apache.syncope.client.console.SyncopeConsoleRequestCycleListener 
- Exception found
org.apache.wicket.WicketRuntimeException: Error attaching this 
container for rendering: [WebMarkupContainer [Component id = body]]
at 
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1837) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.Component.onBeforeRender(Component.java:3916) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.Component.internalBeforeRender(Component.java:950) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.Component.beforeRender(Component.java:1018) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1825) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.Component.onBeforeRender(Component.java:3916) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.Component.internalBeforeRender(Component.java:950) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.Component.beforeRender(Component.java:1018) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1825) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.Component.onBeforeRender(Component.java:3916) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.Component.internalBeforeRender(Component.java:950) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.Component.beforeRender(Component.java:1018) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1825) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.Component.onBeforeRender(Component.java:3916) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.markup.html.form.Form.onBeforeRender(Form.java:1807) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.Component.internalBeforeRender(Component.java:950) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.Component.beforeRender(Component.java:1018) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1825) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.Component.onBeforeRender(Component.java:3916) 
~[wicket-core-7.7.0.jar:7.7.0]
at 
org.apache.wicket.Component.internalBeforeRender(Component.java:950) 

Re: Any tutorials?

2017-08-22 Thread Francesco Chicchiriccò

Hi Sergio,
sorry, my bad.

You need to:

1. declare the JDBC driver dependency in enduser/pom.xml (not 
core/pom.xml as said initially), as follows:



  mysql
mysql-connector-java
  5.1.42
  test


right after


  com.h2database
  h2
  test


2. add the JDBC driver as Tomcat dependency, via cargo:

  
mysql
mysql-connector-java
  

right after

  
com.h2database
h2
  

I have just tried to be sure, and it worked in embedded mode.

In case of deployment onto an external container (rather than in 
embedded mode), you'll have to copy the JDBC Driver JAR onto the 
container's classpath ($CATALINA_HOME/lib for Tomcat).


HTH
Regards.

On 21/08/2017 23:42, Sergio Muriel wrote:


com.mysql.jdbc.Driver for MySQL

com.microsoft.sqlserver.jdbc.SQLServerDriver for SQL Server


Yes, I'm trying to configure a DBTable Connector Bundle?




*From:* Francesco Chicchiriccò 
*Sent:* Sunday, August 20, 2017 1:02 AM
*To:* user@syncope.apache.org
*Subject:* Re: Any tutorials?
On 2017-08-20 01:20 Sergio Muriel wrote:

> Although I can see now the drivers in:
>
> core/target/syncope/WEB-INF/lib/mssql-jdbc-6.1.0.jre8.jar
>
> core/target/syncope/WEB-INF/lib/mysql-connector-java-5.1.42.jar
>
> I still get the same error "InvalidExternalResource [JDBC Driver is not
> found on classpath.]" when I try to create a new resource.
>
> I did as you suggest:
>
> * Added the dependency to core/pom.xml
> * Rebuilt everything from the root directory via "mvn -Pall clean
> install".
> * Ran it from enduser via "mvn -P embedded,all"
>
> I don't know what is wrong.

Which value did you provide for the "JDBC Driver" property? Are you
attempting to configure the DBTable Connector Bundle?

https://connid.atlassian.net/wiki/spaces/BASE/pages/360497/Database+Table#DatabaseTable-ConfigurationProperties

Regards.

> FROM: Francesco Chicchiriccò 
> SENT: Saturday, August 19, 2017 7:39 AM
> TO: user@syncope.apache.org
> SUBJECT: Re: Any tutorials?
>
> Hi Sergio,
> about some points below:
>
>> First point about AnyTypeClasses worked flawlessly. (Although I'm
>> still trying
>> to figure out why I cannot reuse those schemata pre-loaded there).
>
> The pre-loaded Schemas are already assigned to some AnyTypeClass - and
> each Schema might be assigned to an AnyTypeClass instance at most.
>
>> I take back part of what I said on the second point. The dependency
>> addition
>> actually works and downloads the drivers, but I did it on
>> enduser/pom.xml
>> instead of core/pom.xml because the Getting Started page [1] suggests
>> to run it
>> from there:
>>
>> " .. then, from the enduser subdirectory, execute:
>> mvn -P embedded,all"
>
> Logically, the MySQL JDBC driver is used by the Core, not by the
> Enduser UI, so the correct procedure is to add the dependency to
> core/pom.xml, rebuild everything from the root directory via "mvn clean
> install" or "mvn -Pall clean install", then move back to the enduser
> subdirectory and start as reported by the Getting Started guide.
>
> Regards.
>
> On 19-ago-17, at 2:37, Sergio Muriel  wrote:
>
>> Hi again Francesco,
>
>> I take back part of what I said on the second point. The dependency
>> addition
>> actually works and downloads the drivers, but I did it on
>> enduser/pom.xml
>> instead of core/pom.xml because the Getting Started page [1] suggests
>> to run it
>> from there:
>
>> " .. then, from the enduser subdirectory, execute:
>> mvn -P embedded,all"
>
>> Is it okay?
>
>> [1] https://syncope.apache.org/docs/getting-started.html 

Apache Syncope 2.0.4 - Getting Started 


syncope.apache.org
Apache Syncope is an Open Source system for managing digital 
identities in enterprise environments, implemented in Java EE 
technology and released under the Apache 2 ...




>
> Apache Syncope 2.0.4 - Getting Started
> syncope.apache.org
> Apache Syncope is an Open Source system for managing digital identities
> in enterprise environments, implemented in Java EE technology and
> released under the Apache 2 ...
>
>> From: Sergio Muriel 
>> Sent: Friday, August 18, 2017 3:06 PM
>> To: user@syncope.apache.org
>> Subject: Re: Any tutorials?
>
>> Hi Francesco,
>
>> First point about AnyTypeClasses worked flawlessly. (Although I'm
>> still trying
>> to figure out why I cannot reuse those schemata pre-loaded there).
>
>> Second point about dependency still throws same error: "
>> InvalidExternalResource. JDBC Driver is not found on classpath." This
>> is what I
>> added (right before the first  occurrence in
>> core/pom.xml ) :
>
>> 
>
>> 
>> mysql
>>