How to change default H2 database to Postgresql for Kie Workbench (JBPM 7.2.0) running under existing under Wildfly (10.1.0) manually? - jboss

I have an existing Wildfly installation containing other apps. Besides that I want to deploy Kie Workbench too. Here I do not want to use the demo installation using Ant, which starts downloading and installing JBoss afresh.
My existing environment is below.
OS: Windows Server
Database: Postgres 9.6.1
JDBC: postgresql-42.1.4.jar
App Server: wildfly-10.1.0.Final
BPM/Drools App: kie-wb-7.2.0.Final-wildfly10.war
I deployed the Kie Workbench by downloading the war file from here:
https://repo1.maven.org/maven2/org/kie/kie-wb/
Now I would like to change the default H2 database driver with Postgresql 9.6.
Prior to this I created users and datasources already and had a workable kie-wb site, but only problem is: it is running on H2.
Any help appreciated in replacing H2 with Postgresql driver.

This post explains how to use Postresql with Wildfly 10.
According to this page you can just drop the Kies application to the deployments directory. This means probably that it uses the "default" H2 data source. Hence you must change jndi-name and pool-name of the newly added Postgresql in step 1 to those of the H2 and comment the H2 data source.

I performed the below steps. But somewhere I went wrong, not sure where. I am unable to login to the kie workbench.
JBPM App Server Configuration for PostgreSQL
Uncompress the zip file: jbpm-installer-full-7.2.0.Final build.properties file
Update release.version=7.2.0.Final in
Remove references of H2 in build.properties file
Add postgresql references in build.properties file including jdbc driver details and download url
Change H2 hibernate dialect to that of PostgreSQLDialect in jbpm-persistence-JPA2.xml file
Change all H2 reference and replace with PostgreSQL in standalone-wildfly-10.1.0.Final.xml, standalone-full-wildfly-10.1.0.Final.xml files
Change default datasource to jBPMDS in those two files:
Upload Postgres Driver and create module.xml file with the postgresql driver using JBOSS-CLI commands.
Issue the below ant commands from the directory of the expanded zip files:
ant clean.generated.ddl
ant download.ddl.dependencies
ant install.jboss
ant install.jBPM-console.into.jboss
Make sure standalone.xml and standalone-full.xml are being copied into the Wildfly configuration directory correctly.
Move the wildfly directory to the location of the JBOSS_HOME, or create environment variable pointing to the same.
Create the directory modules\org\postgresql\main in JBOSS_HOME home and copy files: module.xml, postgresql-42.1.4.jar
Add admin user in the Management Realm: admin
Add JBPM users with roles in braces in Application Realm: kieserver(kie-server), workbench(admin,kie-server)
Run the sql scripts from ddl_dependency folder as the ant script is failing.
Issue standalone -b 0.0.0.0 -c standalone-full.xml command
Bing! you are done!

Related

Configure SQuirreL for DB2

How to configure SQuirreL for DB2 access.
In SQuirreL I do see two DB2 drivers. But they are both marked with an red X.
I checked with Start Page but did not find an easy solution :/
Download the DB2 Driver from the IBM Website and extract the ZIP archive.
Optionally you may want to copy it from the DB2 Server installation path:
/opt/ibm/db2/V11.1/java/db2jcc4.jar
Use db2jcc4.jar and copy it into the squirrel folder e.g. plugins/db2
In der Driver in the tab "Extra Class Path" add the db2jcc4.jar file
Change the class name to com.ibm.db2.jcc.DB2Driver

could not load library for oracle_fdw

I am facing issue while creating oracle_fdw.
I have copied oracle_fdw.dll to postgres lib folder *
both .sql file and control file to shrared/extension
now when I connect to psql with superadmin user & make an query
create extension oracle_fdw;
I am getting response
ERROR: could not load library "D:/postgresdb/lib/oracle_fdw.dll": The specified procedure could not be found.
From the error it seems that the oracle_fdw library is not available in the lib folder of postGreSQL installation directory.
You may download the Oracle fdw extension/or library file from https://github.com/laurenz/oracle_fdw/releases/ - please download the one suitable to your system environment(eg : 32bit windows/64bit).
Extract the downloaded .zip file.
copy the oracle_fdw.dll from \oracle_fdw-1.4.0-pg95-win64\lib folder to \Program Files\PostgreSQL\9.5\lib dir
&
2.copy all the files from oracle_fdw-1.4.0-pg95-win64\share\extension to \Program Files\PostgreSQL\9.5\share\extension
Now restart postGreSQL server and try.
Note : Always download and use compatible version of library; e.g.: PostgreSQL 9.5 version you should download same version of oracle_fdw zip.
Just had the same problem so this is what i did to resolve it. Not sure if all steps are needed since i was trying untill it worked.
Downloaded:
Instant Client Package
Instant Client Package - SQL*Plus
Instant Client Package - ODBC
From oracle (http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html)
Unzipped everything to one folder (c:\oracle)
Ran odbc_install in that folder
Added folder to PATH variable (System properties - Environment variables)
Restarted postgresql server
After that it worked. Also notice that you need the same version as your server (x86, x64).
Hope this helps.

deploy adempiere project .war file on jboss server

How To deploy Adempiere project .war file on jboss server?
Kindly describe the steps briefly.
Manually Adempiere deployment is some what more complicated. You can't find the only one specific .war file in adempiere.
If you are going to do adempiere manually deployment then you need to find the following
*.jars and *.wars from source and place the jars and wars in respective places in jboss application server
webui.war
adempiereApps.war
adempiereRootBase.war
Adempiere.jar
AdempiereApps.jar
AdempiereRoot.jar
CCTools.jar
CSTools.jar
CompiereJasperReqs.jar
Generating the Adempiere Installer :- (You can download adempiere installer from sourceforge also)
Adempiere already integrated with jboss 4.2.3. For getting adempiere installers sake you need run the *ADEMPIERE_Trunk/utils_dev/build.xml* using ant. then system will craete installers for you. These installers are available *ADEMPIERE_Trunk/adempiere/install*.
Now copy these installer (.zip or .tar.gz) and place into your desired server location and extract it. Ex :-( C:\Adempiere or /home/user/Adempiere, this path we called as ADEMPIERE_HOME)
To Configure Adempiere server :-
open up a console window and go to the $ADEMPIERE_HOME/ directory. Run the script RUN_setup(.bat or .sh depending on your OS), Now it will open a popup enter your data (related to database configuration , application server configurations and ports) and click on the OK button. after 1 to 2 Minutes the process will be completed.
To Run Adempiere server :-
To run the ADempiere Server from a console, open up a console window and go to the $ADEMPIERE_HOME/utils directory. Run the script RUN_Server2 (.bat or .sh depending on your OS).
Now you can access from browser.

Error opening zip file or JAR manifest missing : ../modules/org.eclipse.persistence_1.1.0.0_2-1.jar

I am building a project in jdeveloper 11.1.2, but when i want to deploy it in weblogic it appears the next message
Error opening zip file or JAR manifest missing : ../modules/org.eclipse.persistence_1.1.0.0_2-1.jar
The file is there so i don't know what's happening.
The solution for this problem is removing the hash area named "RunConfigurations" in the project file. (Model.jpr)
I have resolved this issue in different way.
First of all it was an integrated weblogic server and the error was coming exactly after security patches have been installed on my Windows XP machine.
To repair:
In JDeverloper go to "View"->"Application Server Navigotor"; select IntegratedWeblogicServer and open properties. We need Domain Directory. Domain Directory for the IntegratedWeblogicServer is not located under "..:\Oracle\Middleware". By default it was placed (at least on my machine) under "C:\Documents and Settings\user name\Application Data\JDeveloper\system11.1.2.1.38.60.81\DefaultDomain\".
So copy entire modules folder from you Fusion Middleware home "..:\Oracle\Middleware\" to "C:\Documents and Settings\user name\Application Data\JDeveloper\system11.1.2.1.38.60.81".
Restart integrated weblogic server.
It works for me ...
Good luck.
Answer for JDeveloper version : 11.1.2.1.0:
Right Click Model.jpr -> Project Properties -> Run/Debug/Profile -> Run Configurations. Select EclipseLink JPA Client -> Edit -> Launch Settings -> Java Options --> -javaagent:D:/JDeveloper/modules/org.eclipse.persistence_1.1.0.0_2-1.jar
D:/JDeveloper/modules is the path where my org.eclipse.persistence_1.1.0.0_2-1.jar file is located.
So give whatever your org.eclipse.persistence_1.1.0.0_2-1.jar path is after -javaagent:
I had the same problem with JDeveloper 11g 11.1.2.1.0 (R2) in Windows 7, and I solved it by uninstalling the following automatic updates of windows, it is not a problem of a project or specific application in JDeveloper, because it occurs at trying to run the integrated WebServer.
These are the uninstalled updates:
KB2647518
KB2665364
KB2641653
KB2639308
KB2621440

How to start and Stop SOLR from A user created windows service

I had a two bat files start.bat and stop.bat for starting and stopping SOLR server manually,
Is it possible for me to create a windows serive which will call start.bat on starting the service and also call stop.bat on stopping the sERVICE
Consider Solr Multicore feature with Tomcat. Each core is like a fully fledged installation, "separate configurations and indexes, with their own config and schema for very different applications, but still have the convenience of unified administration" http://wiki.apache.org/solr/CoreAdmin
Even if you dont use multiple indexes, it's much more elegant to set up. Solr is available on startup if Tomcat is set that way. I assume you are using Solr 1.4.
You need to do these steps:
Set up a solr root directory
Overview
c:\solr
|-lib
|-solr.war
|-solr.xml
Create c:\solr
from the Solr package directory, copy the lib directory to the root dir.
from \example\webapps of Solr package directory, copy the solr.war
solr.xml has the following contents
<?xml version="1.0" encoding="UTF-8" ?>
<solr persistent="false" sharedLib="lib">
<cores adminPath="/admin/cores">
<core name="myindex" instanceDir="myindexdir" />
</cores>
</solr>
The core parameter specifies a new core. The attributes specify that for serving http//localhost:8080/mysearchapp/myindex, the index directory is myindexdir, which brings us to the next step.
Create the actual core
Overview
c:\solr
|-lib
|-solr.war
|-solr.xml
|-myindexdir
|-bin
|-conf
|-data
copy the conf directory, where you have done your configuration to myindexdir. Dont bother creating bin and data, it will be automatically created.
Set up tomcat
install Tomcat, run it once (dont skip this) and open http://localhost:8080 to see if it is successfully installed
Of course, set it to start on boot by using services.msc
Open this directory
Apache Software Foundation\Tomcat 6.0\conf\Catalina\localhost
Create the file mysearchapp.xml
Context docBase="c:\solr\solr.war" debug="0" crossContext="true" >
<Environment name="solr/home" type="java.lang.String" value="c:\solr\" override="true" />
</Context>
Restart tomcat and open http://localhost:8080/mysearchapp/
If all goes well it will display
Welcome to Solr!
Solr Admin myindex
Now do your operations on your core like http://localhost:8080/mysearchapp/myindex/select?q=MY-QUERY
Solr runs on top of a Servlet container like Tomcat. So for starting Solr you have to configure Solr with your Servlet container and then start.
Yes you can of course create a Windows Service. However you have not mentioned which Servlet container are you using for running Solr?
If it is Apache Tomcat here you go:
1. Just go to tomcat/bin folder from command prompt
2. Say service.bat install
3. You can see the service being listed in the Microsoft Services
Application
4. Right click on the service and add solr home (in Start
parameters). For an example if your Solr home is in D drive then:
-Dsolr.solr.home="D:\solr"
5.You are done. Just right click on the service, start it or even you can set
it to start automatically when your system starts.