我正在使用HiknateCp,Hibernate和我在java中的playframework应用程序.在几分钟的空闲状态之后,似乎播放应用程序死了,当它获得新请求时它再次启动.有时我也看到Db持久性错误,其中sessionfactory不可用,我认为这是此问题的副作用.为什么应用程序在空闲状态下死机,我可以将它配置为不这样做吗?
在几分钟的空闲时间内,每次新请求后,我都会得到以下日志 -
[info] application - Application shutdown...
[info] application - Stopping HikariCP connection pool...
[info] application - Starting HikariCP connection pool...
Run Code Online (Sandbox Code Playgroud)
Persistence.xml: -
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="defaultPersistenceUnit" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.use_sql_comments" value="true"/>
<property name="hibernate.logSql" value="true"/>
<property name="hibernate.connection.provider_class" value="com.zaxxer.hikari.hibernate.HikariConnectionProvider"/>
<property name="hibernate.hikari.dataSourceClassName" value="com.impossibl.postgres.jdbc.PGDataSource"/>
</properties>
</persistence-unit>
</persistence>
Run Code Online (Sandbox Code Playgroud)
Application.conf: -
# JPA configuration
# ~~~~~
# You can declare as many Ebean servers as you want.
# By convention, …Run Code Online (Sandbox Code Playgroud) 当我尝试运行我的selenium代码以在EC2 Box中启动chrome驱动程序和测试登录功能时,我收到以下错误.
我在另一个终端上运行这样的Xvfb服务器Xvfb :1 -screen 0 1366x768x24 -ac.
我也加入export DISPLAY=:1了/usr/bin/google-chrome-stable
Basicaly我正在尝试测试此链接上的登录功能:https://talentconnect.pge.com/sap/bc/webdynpro/sap/hrrcf_a_startpage_ext_cand?sap-wd-configId=ZPERJ_STARTPAGE_EXT_CAND&sap-client=810
一旦代码命中sendkey()登录凭证,它就会出现此错误.
错误日志:
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: an X display is required for keycode conversions, consider using Xvfb
(Session info: chrome=31.0.1650.63)
(Driver info: chromedriver=2.8.240825,platform=Linux 3.2.0-36-virtual x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 83 milliseconds
Build info: version: '2.33.0', revision: '4ecaf82108b2a6cc6f006aae81961236eba93358', time: '2013-05-22 12:00:17'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-36-virtual', …Run Code Online (Sandbox Code Playgroud) 我是MP Android Chart的新手,我无法弄清楚如何用不同的颜色填充特定的Y系列.屏幕截图中突出显示为第2点.
在阅读功能文档后,我试图改变第1点突出显示的线条颜色,并用一些颜色点3填充图形下的区域.但是第1点和第3点不起作用,我无法弄清楚第2点是如何完成的.截图和代码附件.
公共类LineChartActivity扩展AppCompatActivity {
private static final String TAG = "Test";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_line_chart);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
Log.i(TAG, "Line Chart Activity Created");
LineChart chart = (LineChart) findViewById(R.id.chart);
LineData data = new LineData(getXAxisValues(), getDataSet());
chart.setData(data);
setXAxis(chart);
chart.getAxisRight().setDrawLabels(false);
//chart.setAutoScaleMinMaxEnabled(true);
chart.setGridBackgroundColor(128);
chart.setBorderColor(255);
chart.setDrawGridBackground(false);
//chart.setBackgroundColor(0);
chart.getLegend().setEnabled(false);
chart.setPinchZoom(true);
chart.setDescription("");
chart.setTouchEnabled(true);
chart.setDoubleTapToZoomEnabled(true);
chart.animateXY(2000, 2000);
chart.invalidate();
}
private ArrayList<ILineDataSet> getDataSet() {
ArrayList<ILineDataSet> dataSets = null;
ArrayList<Entry> valueSet1 = new ArrayList<>();
Entry v1e1 = new Entry(110.000f, 0);
valueSet1.add(v1e1); …Run Code Online (Sandbox Code Playgroud)