Deploy 6.4.0 to Jetty 9.29

0

Hi,

I used:

TIB_js-jrs-cp_6.4.0_bin

With default_master.properties of:

################################################################################
#                                                                              #
# Master Properties File                                                       #
#                                                                              #
# Standard usage is to rename this file to default_master.properties.          #
# It should be placed in the root of the buildomatic directory, like:          #
#                                                                              #
#     <js-install>/buildomatic/default_master.properties                       #
#                                                                              #
# There is one sample property file for each database type. Sample property    #
# files are found in:                                                          #
#                                                                              #
#     <js-install>/buildomatic/sample_conf                                     #
#                                                                              #
################################################################################

################################################################################
#                                                                              #
# Installation Settings                                                        #
#                                                                              #
# Set values for:                                                              #
#                                                                              #
#   1) Application server type                                                 #
#                                                                              #
#   2) Path to application server home directory                               #
#                                                                              #
#   3) Database location and connection settings                               #
#                                                                              #
################################################################################

# Application Server Settings
# Type tomcat supports installation on Apache Tomcat 7 and 8
# Type jboss-eap supports installation on JBoss EAP 6.x and 7 versions
# Type wildfly supports installation on Wildfly 8 and 9
# Type glassfish supports installation on glassfish 4.1.x
# See Platform Support document, Release Notes and Installation guide for more details.

# appServerType = tomcat
# appServerType = jboss-eap-6
# appServerType = jboss-eap-7
appServerType = wildfly
# appServerType = glassfish
# appServerType = skipAppServerCheck

# Tomcat app server root dir
appServerDir = /opt/wildfly
# appServerDir = /home/devuser/apache-tomcat-8.0.36
# if linux package managed tomcat instance, set two properties below
# CATALINA_HOME = /usr/share/tomcat8
# CATALINA_BASE = /var/lib/tomcat8

# JBoss app server root dir
# appServerDir = C:\\wildfly-9.0.2.Final
# appServerDir = /home/devuser/wildfly-9.0.2.Final

# jboss.profile = default

# Glassfish app server root dir
# appServerDir = C:\\glassfish-4.1.1
# appServerDir = /home/devuser/glassfish-4.1.1

# database type
dbType=postgresql

# database location and connection settings

dbHost=localhost
dbUsername=postgres
dbPassword=??????


# additional database parameters
# (uncomment these if you want non-default settings)

# dbPort=5432

# JasperServer db name, sample db names
js.dbName=jasperserver
sugarcrm.dbName=sugarcrm
foodmart.dbName=foodmart

# web app name
# (set one of these to deploy to a non-default war file name)
webAppNameCE = jasperserver
# webAppNamePro = jasperserver-pro


################################################################################
#                                                                              #
# Additional Settings                                                          #
#                                                                              #
# Set values for:                                                              #
#                                                                              #
#   1) Setup Alternate JDBC Driver                                             #
#                                                                              #
#   2) Skip JDBC Driver Deploy                                                 #
#                                                                              #
#   3) Modify Diagnostic JMX Configurations                                    #
#                                                                              #
#   4) AWS Data Source Settings                                                #
#                                                                              #
#   5) Glassfish Application Server Settings                                   #
#                                                                              #
#   6) Report Scheduler Email Properties                                       #
#                                                                              #
#   7) Encryption Settings                                                     #
#                                                                              #
#   8) Override PostgreSQL default Locale on DB Creation                       #
#                                                                              #
#   9) External Authentication Data Sources                                    #
#                                                                              #
################################################################################

# 1) Setup Alternate JDBC Driver
#
# Uncomment and modify the value in order to change the default
# Driver will be found here: <path>/buildomatic/conf_source/db/postgresql/jdbc
#
maven.jdbc.groupId=postgresql
maven.jdbc.artifactId=postgresql
maven.jdbc.version=9.4-1210.jdbc41


# 2) Skip JDBC Driver Deploy
#
# Uncomment and modify the value in order to change the default
# Flag used to skip JDBC driver deploying during deployment process
#
deployJDBCDriver=true


# 3) Modify Diagnostic JMX Configurations
#
# Current default settings are shown as the property values below
# Uncomment and modify the value in order to change the default
#
# Diagnostic server: false uses Jaspersoft built in server, true to supply your own
# diagnostic.jmx.usePlatformServer = false
#
# change this value if you have more than one app server on same machine running JRS
# diagnostic.jmx.port = 10990
#
# change this if you have more than one instance of JRS on the same app server
# diagnostic.jmx.name = jasperserver
#
# change this to your RMI registry host name or IP, if you use a separate one
# diagnostic.jmx.rmiHost = localhost


# 4) AWS Data Source Settings
#
# Current default settings are shown as the property values below
# Uncomment and modify the value in order to change the default
#
# Change this value if you want to disable the AWS Data Source security group creation
# This group will allow your instace have access to target AWS data source instance
# aws.db.security.group.changes.enabled=true
#
# Db Security Group Name. Need to be overridden if server (where instance is running)
# is out of scope Amazon to have unique group name for this server.
# aws.db.security.group.name=JRSSecurityGroup
#
# Change this value to have a specific description
# aws.db.security.group.description=Jasper Report Server Security Group
#
# Provide the server IP address if your server is outside Amazon
# This is the Ingress Public IP address of server that will be added in the
# DB Security Group to have access to target AWS data source instance
# aws.db.security.group.ingressPublicIp=


# 5) Glassfish Application Server Settings
#
# Current default settings are shown as the property values below
# Uncomment and modify the value in order to change the default
#
# Glassfish domain name (default is domain1)
# glassfishDomain=domain1
#
# Glassfish domain port (default is 4848), user (default is admin) and password.
# glassfishPort=4848
# glassfishUser=admin
# AS_ADMIN_PASSWORD=adminadmin


# 6) Report Scheduler Email Properties
#
# Current default settings are shown as the property values below
# Uncomment and modify the value in order to change the default
#
# These properties control the configuration of the Report Scheduler functionality.
# The standard default application server http ports are the following: tomcat 8080,
# jboss 8080, glassfish 4848, weblogic 7001, websphere 9080
# These values will show up in the file WEB-INF/js.quartz.properties
#
# quartz.mail.sender.host=mail.example.com
# quartz.mail.sender.port=25
# quartz.mail.sender.protocol=smtp
# quartz.mail.sender.username=admin
# quartz.mail.sender.password=password
# quartz.mail.sender.from=admin@example.com
# quartz.web.deployment.uri=http://localhost:8080/jasperserver-pro


# 7) Encryption Settings
#
# For encryption of buildomatic passwords: only encrypt=true is required. The rest of the
# properties are going to be set to defaults below. One could also choose to modify those
# properties but only for the first encrypt=true build pass.
#
# Note: JNDI password decryption in context.xml only works for Tomcat (and tcServer). Other
# servers should handle their own container encryption. For eg., for jboss, after encrypt=true
# install run, js-jdbc-ds.xml gets the encrypted password values. If the intention was to encrypt
# buildomatic only, the admin must reset the password to plain text ones in JBoss or use internal
# JBoss encryption. Also, see the JasperReports Server Admin Guide for a full description.
#
# encrypt=true
# build.key.algo=AES
# build.key.size=128
# enc.transformation=AES/CBC/PKCS5Padding
# enc.block.size=16
# propsToEncrypt=dbPassword


# 8) Override PostgreSQL default Locale on DB Creation
#
# When the 'jasperserver' repository database is created under Linux, the default
# locale is used from PostgreSQL. PostgreSQL sets this locale when it is installed
# and initialized. If the PostgreSQL locale does not support UTF-8 encoding then
# JasperServer will have trouble with the database creation. The 'jasperserver'
# database should have UTF-8 encoding in order to fully support language
# internationalization. The PostgreSQL default locale can be overridden by using
# the properties below in order to specify a locale that supports UTF-8 encoding.
#
# Uncomment the properties below to specify a particular Locale
#
# db.set.lc_collate=en_US.utf8
# db.set.lc_ctype=en_US.utf8

# 9) External Authentication Data Sources
#
# Configure external LDAP context source or external database datasource here in order to be able
# to encrypt the passwords.
#
# external.jdbcDriverClass=com.mysql.jdbc.Driver
# external.jdbcUrl=jdbc:mysql://localhost:3306/EXTERNAL_DB
# external.dbUsername=externalUsername
# external.dbPassword=password
#
# external.ldapUrl=ldap://localhost:389/o=External_LDAP_Org
# external.ldapDn=cn=Manager,o=External_LDAP_Org
# external.ldapPassword=secret

# TODO: KEEP THIS PROPERTY LAST
# dummy property to temporarily fix bug 33916.
# Without this property, the last comments in master property file are removed,
# when buildomatic is encrypted (encrypt=true).
# The permanent fix will be to upgrade buildomatic/target to commons-configuration 2.0.
# http://commons.apache.org/proper/commons-configuration/download_configur...
# Original Apache bug https://issues.apache.org/jira/browse/CONFIGURATION-525
preserve_master_properties_footer_comments_when_encrypting_buildomatic=true

I coppied the resulting war contents to my webapps home REPORTS in jetty when I restart jetty I get this:

e:/opt/jetty/webapps/REPORTS/,STARTING}{/REPORTS}
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)

....

Caused by:
java.lang.IllegalStateException: Nothing to bind for name jdbc/jasperserver
        at org.eclipse.jetty.plus.webapp.PlusDescriptorProcessor.bindEntry(PlusDescriptorProcessor.java:895)
        at org.eclipse.jetty.plus.webapp.PlusDescriptorProcessor.bindResourceRef(PlusDescriptorProcessor.java:812)
        at org.eclipse.jetty.plus.webapp.PlusDescriptorProcessor.visitResourceRef(PlusDescriptorProcessor.java:252)


I have tried many different configurtions and they all results with these error during startup.

Any help would be appreciated pointing me in the right direction.

E

 

 

ej197us's picture
Joined: Sep 3 2017 - 10:11am
Last seen: 1 year 11 months ago

2 Answers:

0

SOLVED:

Added jetty-env.xml to WEB-INF Folder

<Configure id='wac' class="org.eclipse.jetty.webapp.WebAppContext">

 <New id="jasperserver" class="org.eclipse.jetty.plus.jndi.Resource">
     <Arg></Arg>
     <Arg>jdbc/jasperserver</Arg>
     <Arg>
      <New class="com.mchange.v2.c3p0.ComboPooledDataSource">
         <Set name="driverClass">org.postgresql.Driver</Set>
         <Set name="jdbcUrl">jdbc:postgresql://127.0.0.1:5432/jasperserver</Set>
         <Set name="user">postgres</Set>
         <Set name="password">???</Set>
      </New>
     </Arg>
    </New>

 <New id="sugarcrm" class="org.eclipse.jetty.plus.jndi.Resource">
     <Arg></Arg>
     <Arg>jdbc/sugarcrm</Arg>
     <Arg>
      <New class="com.mchange.v2.c3p0.ComboPooledDataSource">
         <Set name="driverClass">org.postgresql.Driver</Set>
         <Set name="jdbcUrl">jdbc:postgresql://127.0.0.1:5432/sugarcrm</Set>
         <Set name="user">postgres</Set>
         <Set name="password">????</Set>
      </New>
     </Arg>
    </New>

 <New id="foodmart" class="org.eclipse.jetty.plus.jndi.Resource">
     <Arg></Arg>
     <Arg>jdbc/foodmart</Arg>
     <Arg>
      <New class="com.mchange.v2.c3p0.ComboPooledDataSource">
         <Set name="driverClass">org.postgresql.Driver</Set>
         <Set name="jdbcUrl">jdbc:postgresql://127.0.0.1:5432/foodmart</Set>
         <Set name="user">postgres</Set>
         <Set name="password">???</Set>
      </New>
     </Arg>
    </New>

 

</Configure>

 

ej197us's picture
Joined: Sep 3 2017 - 10:11am
Last seen: 1 year 11 months ago
0

Hello! 

I have tried several methods on deploying JasperReports Server on Jetty without any luck. Could you please help me with configuring jasperreports server by providing some more input on how you have done it? 

Thank you in advance!

Regards, 
adi 

 

adi071's picture
3
Joined: Jul 19 2018 - 6:13am
Last seen: 1 year 3 months ago
Feedback