Hippo cms and mysql on Glassfish - mysql

I have a big problem with the addition of a mysql database to Glassfish. I did all the steps located here http://www.onehippo.org/library/deployment/configuring/configuring-hippo-7-for-mysql.html .
When I use
$ mvn clean install
$ mvn -P cargo.run
It's looks fine, because in my workspace.xml I have :
<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="url" value="java:comp/env/jdbc/repositoryDS"/>
<param name="driver" value="javax.naming.InitialContext"/>
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
<param name="schema" value="mysql"/>
</FileSystem>
next I use
$ mvn clean install
$ mvn -P dist
and deploy created cms.war and site.war to glassfish server (Previously, I copied all the libraries and everything works. Inspired by https://blogs.oracle.com/geertjan/entry/hippo_tip_deploying_hippo_to ). All of project works fine.
The problem is the database. In new workspace.xml in glassfish (/opt/glassfish4/glassfish/domains/domain1/applications/cms/WEB-INF/storage/workspaces/default/workspace.xml) I have:
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${wsp.home}"/>
</FileSystem>
<PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.H2PersistenceManager">
<param name="url" value="jdbc:h2:file:${wsp.home}/db"/>
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
<param name="minBlobSize" value="4194304"/>
</PersistenceManager>
and server created db.h2.db file in storage/workspace/default, but I need a base in mysql. What can I do wrong?
Additional question. How to check what is in the database? In mysql hippo created something like this:
+--------------------+
| Tables_in_hippo |
+--------------------+
| DATASTORE |
| DEFAULT_BINVAL |
| DEFAULT_BUNDLE |
| DEFAULT_FSENTRY |
| DEFAULT_NAMES |
| DEFAULT_REFS |
| REPOSITORY_FSENTRY |
| VERSION_BINVAL |
| VERSION_BUNDLE |
| VERSION_FSENTRY |
| VERSION_NAMES |
| VERSION_REFS |
+--------------------+
There are no tables like "Book" "Author" "Shop". But in server Hippo have all this data which I can edit.
Thanks for reading.

Your MySQL configuration seems to be fine. You have to keep in mind that the most important thing is that all the configuration needs to be correct in the repository.xml file. The workspace.xml is generated/extracted out of the repository.xml file once the repository gets initialized for the first time. So if you've deployed Hippo before having the correct settings for MySQL, you might have an old workspace.xml in your directory, which results in the H2 db being used.
The first article you link to contains a section called "Make the repository use this configuration file". This is very important if you want to use your own configuration and not the built-in configuration which leverages the H2 database. If you do not provide this system property the build in configuration will be used.
Additional question. How to check what is in the database? There are
no tables like "Book" "Author" "Shop". But in server Hippo have all
this data which I can edit.
Persistence in Jackrabbit is a bit complicated, it makes sense to read the configuration overview documentation and persistence manager documentation first. The persistence of content and data is handled by an internal Jackrabbit component that handles the persistent storage of content nodes and properties. Property values are also stored in the persistence manager, with the exception of large binary values (usually stored inside the datastore).

Related

Azure DevOps SSRS Server Report Deployment

I've seen lots of questions about deploying SSRS reports via an Azure Pipeline, but I haven't found one that seems to address this.
When connecting to an SSRS instance via a Powershell task running the code
New-RsWebServiceProxy
We get Failed to establish proxy connection to Server Address : The term 'New-WebServiceProxy' is not recognized as a name of a cmdlet, function, script file, or executable program.
This is after registering ReportingServicesTools from the gallery
- task: PowerShell#2
inputs:
targetType: 'inline'
script: |
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
Install-Module -Name ReportingServicesTools
Import-Module ReportingServicesTools -UseWindowsPowerShell
PowerShell Version on the Agent;
| Name | Value |
|---------------------|------------------|
|PSVersion | 7.2.8|
|PSEdition | Core|
|GitCommitId | 7.2.8|
|OS | Linux 5.15.0-1030-azure #37-Ubuntu SMP Mon Dec …|
|Platform | Unix|
|PSCompatibleVersions | {1.0, 2.0, 3.0, 4.0…}|
|PSRemotingProtocolVersion | 2.3|
|SerializationVersion | 1.1.0.1|
|WSManStackVersion | 3.0|
The Repository seems to suggest that it won't be supported going foward.
https://github.com/microsoft/ReportingServicesTools/issues/239#issuecomment-595115438
Anyone know how to fix this?
Thanks,
Dan

Codeigniter Migrations why does migration_path need to be writable?

Why does migration_path need to be writable? Shouldn't php just need to read the files? I looked at migration code in system folder and cannot find reason.
Here is the comment in application/config/migration.php
/*
|--------------------------------------------------------------------------
| Migrations Path
|--------------------------------------------------------------------------
|
| Path to your migrations folder.
| Typically, it will be within your application path.
| Also, writing permission is required within the migrations path.
|
*/
$config['migration_path'] = APPPATH.'migrations/';

How to show file names in File Transfer?

PHPStorm has a nice File Transfer log:
[24.07.2014 12:36] Upload to server.net
[24.07.2014 12:36] Upload to server.net completed in less than a minute:
1 file transferred (36,4 Kb/s)
Anyway I could make it show the name of the file it transferred?
Settings/Preferences on Mac | Build, Execution, Deployment | Deployment | Options
Change Operations logging level to a more detailed one (Details).
Select File | Settings for Windows or select File | Default Settings for set option for all projects.

google clouddatastore adams.py demo not working in GCE instance

when running demo from google-cloud-datastore-1beta2-rev1-2.1.1/
adams.py <project-id>
ERROR:root:Error while doing datastore operation
ERROR:root:RPCError: beginTransaction Unauthorized.
ERROR:root:HTTPError: 403 Forbidden
I ensured the GCE instance has service account enabled (permissions below)
Cloud datastore API is enable in cloud console for the project
google cloud datastore is correctly installed in the GCE
As I am inside a GCE instance I dont need the private key file
Permissions
User info Enabled
Compute Read Write
Storage Full
Task queue Enabled
BigQuery Enabled
Cloud SQL Enabled
What am I missing? Please help
Adding an answer so it's easier for others to find:
Make sure that your GCE instance is running with the datastore scope enabled.
Run the command gcutil getinstance <my-instance>. You should get something like this:
+-----------------+-------------------------------------------------------------+
| name | <my-instance> |
| .... | |
| service-account | |
| scopes | [u'https://www.googleapis.com/auth/datastore', |
| | u'https://www.googleapis.com/auth/userinfo.email'] |
+-----------------+-------------------------------------------------------------+
Importantly, make sure that you see the datastore scope in the list.
When you create your instance, make sure to enable the correct scope:
gcutil --project <PROJECT_ID> addinstance <INSTANCE_NAME> --service_account_scopes=\
https://www.googleapis.com/auth/userinfo.email,\
https://www.googleapis.com/auth/datastore

Installing WSO2 greg and API manager on different VM with shared MySQL

I'm installing greg and APi manager using this configuration:
1 VM for MySQL
1 VM for API
1 VM for BAM
1 VM for greg
All latest currrent releases
I'm wandering which is the best configuration.
My idea was having all the tool to place data in MySQL, but I'm wandering on how to ling all the DB in the various config files
APi should point to registry runniong on his VM and to the BAM instance, but looking on the registru moaster-datasource.xml I found also this:
<datasource>
<name>WSO2AM_DB</name>
<description>The datasource used for API Manager database</description>
<jndiConfig>
<name>jdbc/WSO2AM_DB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:h2:repository/database/WSO2AM_DB;DB_CLOSE_ON_EXIT=FALSE</url>
<username>wso2carbon</username>
<password>wso2carbon</password>
<driverClassName>org.h2.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
That imply that registry has access to API manager DB ... what for?
I'll have to add also ESB and BPS so this deployment architecture becomes complex.
Any hints
Thanks
Luca
WSO2 servers are using H2 database which is shipped by default. So if you start up a fresh pack which will run on its own database instance.
In order to share the registry data between servers, you will have to configure registry mounting. This will be helpful to create JDBC mounting. But if you have one instance of a server, then you can omit clustering part from the article. You can follow the same configuration for other servers as well (BAM, API manager and BPS) to configure JDBC mounting. So that all your data will be stored in MySql and shared across servers.
If you need to store users information also in JDBC and share it across servers, then you will have to add another data source into master-datasource.xml and use it in CARBON-HOME/repository/conf/user-mgt.xml instead of the default data source.
API manager is having few different data sources for its own purposes. That doesn't mean to have any relationship with registry. By default "WSO2CarbonDB" is only used for registry and user manager purposes as stated in the description of each data sources.
You can use mounted database to resolve your issue . please refer [1] for how to mount guide.
[1]. http://ajithvblogs.blogspot.com/2012/09/create-jdbc-mount-to-wso2-governance.html
Thank You,
Dharshana