Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL database? #10

Open
adrianmihalko opened this issue Feb 23, 2016 · 15 comments
Open

SQL database? #10

adrianmihalko opened this issue Feb 23, 2016 · 15 comments

Comments

@adrianmihalko
Copy link

Dear Joep,

Because in the last time xsltransform.net is many times unavailable I decided to host my own version. :) It was not easy, because I am not a pro sysadmin/developer, but it now runs fine. Unless few things:

  • I can't save
  • I don't know how to enable URL shortening

The first run wasn't success, because the application cannot find the fiddles database. I created manually, now it is running. If I click on Save I get:

error] play - Cannot invoke the action, eventually got an error: javax.persistence.PersistenceException: ERROR executing DML bindLog[] error[Table 'fiddles.fiddle' doesn't exist]
[error] application - 

! @6p81h5hp2 - Internal server error, for (POST) [/save] ->

play.api.Application$$anon$1: Execution exception[[PersistenceException: ERROR executing DML bindLog[] error[Table 'fiddles.fiddle' doesn't exist]]]

If I am not wrong it is missing only the database structure, but it is not included in this repo (or just I can't find it).

Regards,
Adrian

@joepjoosten
Copy link
Owner

Hi Adrian,

Yes, you'r right, the schema isn't included...

CREATE TABLE fiddle (
id bigint(20) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
CREATE TABLE fiddle_revision (
id bigint(20) NOT NULL AUTO_INCREMENT,
revision int(11) DEFAULT NULL,
engine varchar(255) DEFAULT NULL,
fiddle_id bigint(20) DEFAULT NULL,
xml text,
xsl text,
PRIMARY KEY (id),
KEY ix_fiddle_revision_fiddle_1 (fiddle_id),
CONSTRAINT fk_fiddle_revision_fiddle_1 FOREIGN KEY (fiddle_id) REFERENCES fiddle (id)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
CREATE TABLE play_evolutions (
id int(11) NOT NULL,
hash varchar(255) NOT NULL,
applied_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
apply_script text,
revert_script text,
state varchar(255) DEFAULT NULL,
last_problem text,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

I'm currently working on a version that uses aws lambda for converting the xml with xslt. If i've the time to finish this, the service will be more stable, and my hosting costs will come down.

@adrianmihalko
Copy link
Author

Excellent, everything is working now. Yeah! :)

BTW: yesterday I tried to find another tool like this app and it's not exist at all (live xslt transform). So, thank you very much for your work.

@GitGianluc
Copy link

GitGianluc commented May 5, 2016

Hi @adrianmihalko! Since no deployment documentation is provided (and I'm surely far less skilled than you), could you please provide a step-by-step description on how you managed to host this tool on your own server?

The example running on http://xsltransform.net is hardly ever available since some time on: I guess that many people around here would be really grateful, starting with me!

Thank you in advance,

Gianluca

@rsulliv1
Copy link

rsulliv1 commented Mar 8, 2017

Here are the high level deployment steps:

  1. get yourself a machine to deploy from; assuming centos 6.6
  2. install mysql
  3. install scala
  4. install sbt
  5. configure mysql server
  6. create database named 'fiddles'
  7. configure mysql user & permissions
  8. create table noted above in the fiddles db
  9. edit conf/application.conf to include correct db connection details
  10. build project via sbt; confirm no errors
  11. run project via sbt

@hikmat30ce
Copy link

@rsulliv1 can you mention the procedure in details, I am new to sbt. I need this tool to install locally

@hikmat30ce
Copy link

I have hosted on my vm and it will be available 24/7 365 days,
feel free to use for free :)
http://xsltransform.hikmatu.com/

@martin-honnen
Copy link

@hikmat30ce, thanks for providing the URL to another online version of XSL-tester. Have you considered updating your installation to the latest version 9.8 of Saxon HE (https://sourceforge.net/projects/saxon/files/latest/download?source=files) as that provides XSLT 3.0 support? Would be great to use it to share XSLT 3 snippets given that XSLT 3 is a W3C recommendation since June of this year.

@hikmat30ce
Copy link

Hi @martin-honnen , glad you find it useful.
As I am not the the developer of XSL-tester, so it will be a bit complex for me to make changes in the code.
If the original developer make an update , the I will happily update and deploy online.

Note: I have only deployed this code in my cloud, docker.

@martin-honnen
Copy link

@hikmat30ce , if I would want to try to update and test and deploy the XSL-tester myself, what do I need besides a fork of your project and the updates (I have tried that with https://github.com/martin-honnen/XSL-tester/tree/update-to-xslt3)? Is there still a need to perform the steps

  1. install mysql
  2. install scala
  3. install sbt
  4. configure mysql server
  5. create database named 'fiddles'
  6. configure mysql user & permissions
  7. create table noted above in the fiddles db

that @rsulliv1 outlined? Or have you automated that with your docker files as well?

@hikmat30ce
Copy link

hikmat30ce commented Nov 12, 2017

If you are using windows, follow below steps

  1. Install sbt for windows from : http://www.scala-sbt.org/download.html
  2. Install mysql, I will sugegst to install xampp :https://www.apachefriends.org/index.html
  3. Create database from above sql
  4. Download code from :https://github.com/joepjoosten/XSL-tester
  5. Update db configuration in conf/application.conf (line 36 to 39)
  6. While you are on root folder of the project, type sbt and hit enter, it will download the necessary files
  7. type run and your project will be started on localhost:9000

@hikmat30ce
Copy link

@martin-honnen a docker image is uploaded on docker hub (https://hub.docker.com/r/hikmat30ce/xslt-tester/)

@cory-griffin
Copy link

I have hosted on my vm and it will be available 24/7 365 days, feel free to use for free :) http://xsltransform.hikmatu.com/

This site seems to be down as well. Does anyone know of one that's up and running?

@martin-honnen
Copy link

@cory-griffin , if you want to run XSLT 3 online then I have created a couples of options:

The first one uses Saxon-JS is in the browser, the second one allows various XSLT 1 or XSLT 3 options, the last one is kind of a .NET clone of the original xsltransform.net, updated to use Saxon 10 HE by now.

@cory-griffin
Copy link

@martin-honnen, thank you so much! You are a life saver!

@rsulliv1
Copy link

rsulliv1 commented Aug 2, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants