You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by Dave Varon <va...@gmail.com> on 2018/03/30 16:06:23 UTC

2.0.8 (stable) YAMLFactory not found et al

Ciao,

Just an FYI I built the 2.0.8 maven archetype on ubuntu 16.04, tomcat
8.0.x, java 1.8.0 and deployed.  Docs were reasonable but not without some
confusion.

I experienced the same YAMLFactory error as expressed in this note
<https://markmail.org/message/qv7huab3zgzcsuqy> to the
incubator/syncope-user list:  https://markmail.org/message/qv7huab3zgzcsuqy

I saw the reply recommending the debian pkgs, however I've also read the
docs which state:   *Difficult to extend beyond pre-sets. *...this seems to
be contradictory, but I suppose "difficult" != "impossible"

In any event, I resolved this by adding the following dependency to
core/pom.xml

<dependency>

    <groupId>com.fasterxml.jackson.dataformat</groupId>

    <artifactId>jackson-dataformat-yaml</artifactId>

    <version>2.1.2</version>

</dependency>



I also created the below handy-dandy buld/deploy script because I kept
finding new things in the docs that I had to deal with like ports,
resources, paths, etc.

---

#!/bin/bash


HOMEDIR="/home/ubuntu/iam"

SRCDIRS="core console enduser"

SRCPATH="/target/classes/"

PROP="*properties"

FORM="customForm.json"


BASEDIR="/opt/syncope"

CONFDIR="$BASEDIR/conf"

DEPLOYDIR="/var/lib/tomcat8/webapps"

LOGDIR="$BASEDIR/log"


TC_CMD=/etc/init.d/tomcat8


cd $HOMEDIR

mvn clean verify \

   -Dconf.directory=$CONFDIR \

   -Dbundles.directory=$BASEDIR/bundles \

   -Dlog.directory=$LOGDIR


for dir in $SRCDIRS

do

  cp $dir$SRCPATH$PROP $CONFDIR

  if [ "enduser" == "$dir" ]

  then

    cp $dir$SRCPATH$FORM $CONFDIR

  fi

done


echo Stopping tomcat...;eval "$TC_CMD stop"

rm $LOGDIR/*

rm -rf $DEPLOYDIR/syncope*

find . -name "*.war" -exec cp {} $DEPLOYDIR \; -print

echo Starting tomcat...;eval "$TC_CMD start"

---



HTH,

Dave Varon
Creator of YADA <https://github.com/Novartis/YADA>
https://github.com/Novartis/YADA

Re: 2.0.8 (stable) YAMLFactory not found et al

Posted by varontron <va...@gmail.com>.
Hi,

Thanks for your feedback.  I can confirm the YAML jar issue is resolved in
2.0.9-SNAPSHOT.

-----
http://analgesicsolutions.com
https://github.com/Novartis/YADA

--
Sent from: http://syncope-dev.1063484.n5.nabble.com/

Re: 2.0.8 (stable) YAMLFactory not found et al

Posted by Francesco Chicchiriccò <il...@apache.org>.
Hi Dave,
see my replies embedded below.

Regards.

On 30/03/2018 18:06, Dave Varon wrote:
> Ciao,
>
> Just an FYI I built the 2.0.8 maven archetype on ubuntu 16.04, tomcat
> 8.0.x, java 1.8.0 and deployed.  Docs were reasonable but not without some
> confusion.

Glad that you made it: should you have any proposal about how to improve 
the docs, just send a PR:

http://syncope.apache.org/contributing.html

> I experienced the same YAMLFactory error as expressed in this note
> <https://markmail.org/message/qv7huab3zgzcsuqy> to the
> incubator/syncope-user list:  https://markmail.org/message/qv7huab3zgzcsuqy
>
> I saw the reply recommending the debian pkgs, however I've also read the
> docs which state:   *Difficult to extend beyond pre-sets. *...this seems to
> be contradictory, but I suppose "difficult" != "impossible"

I suggested debian packages in that case because they are 
straightforward to install, and it seemed to me the fastest way to get 
Syncope up an running for evaluation.

"Difficult" in that context means more that no customizations, as 
intended in

https://syncope.apache.org/docs/reference-guide.html#customization

can be made, but if you can cope with the standard flows, all is functional.

> In any event, I resolved this by adding the following dependency to
> core/pom.xml
>
> <dependency>
>      <groupId>com.fasterxml.jackson.dataformat</groupId>
>      <artifactId>jackson-dataformat-yaml</artifactId>
>      <version>2.1.2</version>
> </dependency>

I think I have incidentally fixed this problem just yesterday (thanks 
for confirmation, anyway!) as part of

https://issues.apache.org/jira/browse/SYNCOPE-1289

Hence, 2.0.9 won't have this problem any more.

Essentially, the problem used to arise when the swagger-ui extension is 
not in use.

Your fix is fine, just replace

<version>2.1.2</version>

with

<version>${jackson.version}</version>

to avoid potential conflicts.

> I also created the below handy-dandy buld/deploy script because I kept
> finding new things in the docs that I had to deal with like ports,
> resources, paths, etc.

Looks handy!

> ---
>
> #!/bin/bash
>
>
> HOMEDIR="/home/ubuntu/iam"
>
> SRCDIRS="core console enduser"
>
> SRCPATH="/target/classes/"
>
> PROP="*properties"
>
> FORM="customForm.json"
>
>
> BASEDIR="/opt/syncope"
>
> CONFDIR="$BASEDIR/conf"
>
> DEPLOYDIR="/var/lib/tomcat8/webapps"
>
> LOGDIR="$BASEDIR/log"
>
>
> TC_CMD=/etc/init.d/tomcat8
>
>
> cd $HOMEDIR
>
> mvn clean verify \
>
>     -Dconf.directory=$CONFDIR \
>
>     -Dbundles.directory=$BASEDIR/bundles \
>
>     -Dlog.directory=$LOGDIR
>
>
> for dir in $SRCDIRS
>
> do
>
>    cp $dir$SRCPATH$PROP $CONFDIR
>
>    if [ "enduser" == "$dir" ]
>
>    then
>
>      cp $dir$SRCPATH$FORM $CONFDIR
>
>    fi
>
> done
>
>
> echo Stopping tomcat...;eval "$TC_CMD stop"
>
> rm $LOGDIR/*
>
> rm -rf $DEPLOYDIR/syncope*
>
> find . -name "*.war" -exec cp {} $DEPLOYDIR \; -print
>
> echo Starting tomcat...;eval "$TC_CMD start"
>
> ---
>
>
>
> HTH,
>
> Dave Varon
> Creator of YADA <https://github.com/Novartis/YADA>
> https://github.com/Novartis/YADA
>

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/