Jexbox Play! Framework Connector Plugin

Jexbox Play! Framework connector hooks as ExceptionHandler, so any uncaught exceptions in your Play! application will be sent to your Jexbox database. The connector extracts complete exception stack trace, including nested exceptions, error message and system properties and page/component traces

License

License

GroupId

GroupId

com.jexbox.connector
ArtifactId

ArtifactId

jexbox-play
Last Version

Last Version

0.0.4
Release Date

Release Date

Type

Type

jar
Description

Description

Jexbox Play! Framework Connector Plugin
Jexbox Play! Framework connector hooks as ExceptionHandler, so any uncaught exceptions in your Play! application will be sent to your Jexbox database. The connector extracts complete exception stack trace, including nested exceptions, error message and system properties and page/component traces
Source Code Management

Source Code Management

https://github.com/jexbox/play-plugin.git

Download jexbox-play

How to add to project

<!-- https://jarcasting.com/artifacts/com.jexbox.connector/jexbox-play/ -->
<dependency>
    <groupId>com.jexbox.connector</groupId>
    <artifactId>jexbox-play</artifactId>
    <version>0.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.jexbox.connector/jexbox-play/
implementation 'com.jexbox.connector:jexbox-play:0.0.4'
// https://jarcasting.com/artifacts/com.jexbox.connector/jexbox-play/
implementation ("com.jexbox.connector:jexbox-play:0.0.4")
'com.jexbox.connector:jexbox-play:jar:0.0.4'
<dependency org="com.jexbox.connector" name="jexbox-play" rev="0.0.4">
  <artifact name="jexbox-play" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.jexbox.connector', module='jexbox-play', version='0.0.4')
)
libraryDependencies += "com.jexbox.connector" % "jexbox-play" % "0.0.4"
[com.jexbox.connector/jexbox-play "0.0.4"]

Dependencies

compile (3)

Group / Artifact Type Version
com.jexbox.connector : jexbox-core jar 0.0.1
commons-codec : commons-codec jar 1.9
com.typesafe.play : play_2.11 jar 2.3.1

Project Modules

There are no modules declared in this project.

About Jexbox

Jexbox is a powerful Java based exception tracking system which captures and stores application exceptions in online database. There is no need to search endless log files - stored exception data (type, message, stack trace, line in page, request & session data) is available at any time in your account. Thanks to its intelligent grouping & report system, software engineers are now capable to track all possible exception situations by searching and analyzing existing data.

How to Install the Connector for Play! 2.3.x

Managed dependencies

Add jexbox-play dependencies to your project/Build.scala file as follow

libraryDependencies ++= Seq(
    "commons-codec" % "commons-codec" % "1.9",
    "com.google.code.gson" % "gson" % "2.2.4",
    "com.jexbox.connector" % "jexbox-core" % "0.0.1",
    "com.jexbox.connector" % "jexbox-play" % "0.0.2"
)
resolvers += "sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"

Manual Jar Installation
Download the latest jexbox-play-0.0.2.jar and place it in the lib/ folder.
The connector depends on
jexbox-core-0.0.1.jar
com.google.code.gson
commons-codec

The Play! Framework connector is implemented as plug-in for Play! applications and can be declared in conf/play.plugins file as follow

10000:com.jexbox.connector.play.JexboxConnectorPlayPlugin  

Then to handle automatically non-catched exceptions, decoration of the GlobalSettings will be required in application Global class

public Promise<Result> onError(RequestHeader request, Throwable t) {  
    Session session = Http.Context.current().session();  
    JexboxConnectorPlayPlugin jbp = Play.application().plugin(JexboxConnectorPlayPlugin.class);  
    jbp.getJexboxConnector().send(t, request, session);  
    return super.onError(request, t);  
}  

Then the connector should be configured with settings in the conf/application.conf file as follow

#Required  
com.jexbox.connector.play.app-id=copy here the application ID, available in www.jexbox.com admin panel  
  
#Optional  
com.jexbox.connector.play.host=  
com.jexbox.connector.play.environment=  
com.jexbox.connector.play.ssl=  
com.jexbox.connector.play.appVersion=  
com.jexbox.connector.play.background=  
com.jexbox.connector.play.proxyHost=  
com.jexbox.connector.play.proxyPort=  
com.jexbox.connector.play.useSystemProxy=

To send catched exceptions, the instance of Jexbox connector can be obtained in application controllers as follow

...  
...  
...
} catch (Throwable e) {  
    Session session = Http.Context.current().session();  
    Request request = Http.Context.current().request();  
    JexboxConnectorPlayPlugin jbp = Play.application().plugin(JexboxConnectorPlayPlugin.class);  
    jbp.getJexboxConnector().send(t, request, session);
}

Versions

Version
0.0.4
0.0.3
0.0.2
0.0.1