- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在使用 SpringMVC、Hibernate、Maven 和 MySQL 数据库编写一个简单的数据库配置应用程序。
我在本地使用Eclipse IDE和Tomcat 8.5。
这个相同的代码在本地(PC)上运行良好。所以我尝试在 OpenShift 中部署它,这些是我面临的错误,我的容器经常崩溃(不知道为什么?) 我已经被这些错误困扰了一个多星期了)。请阐明它,这可能对像我这样的许多人有用。已经谢谢了! :)
部署 登录 OpenShift:
Running jboss-webserver-3/webserver30-tomcat8-openshift image, version 1.1-7
I> No access restrictor found, access to all MBean is allowed
Jolokia: Agent started with URL http://127.0.0.1:8778/jolokia/
2018-03-19 14:14:02,260 [main] INFO org.apache.catalina.startup.Catalina- Cluster RuleSet not found due to [java.lang.ClassNotFoundException: org.apache.catalina.ha.ClusterRuleSet]. Cluster configuration disabled.
2018-03-19 14:14:02,261 [main] INFO org.apache.catalina.startup.Catalina- Cluster RuleSet not found due to [java.lang.ClassNotFoundException: org.apache.catalina.ha.ClusterRuleSet]. Cluster configuration disabled.
2018-03-19 14:14:03,159 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Server version: Apache Tomcat/8.0.18
2018-03-19 14:14:03,159 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Server built: Aug 11 2015 14:53:16 UTC
2018-03-19 14:14:03,159 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Server number: 8.0.18-25_patch_00.ep7.el7.-patch-00
2018-03-19 14:14:03,159 [main] INFO org.apache.catalina.startup.VersionLoggerListener- OS Name: Linux
2018-03-19 14:14:03,160 [main] INFO org.apache.catalina.startup.VersionLoggerListener- OS Version: 3.10.0-693.15.2.el7.x86_64
2018-03-19 14:14:03,160 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Architecture: amd64
2018-03-19 14:14:03,160 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Java Home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.51-1.b16.el7_1.x86_64/jre
2018-03-19 14:14:03,160 [main] INFO org.apache.catalina.startup.VersionLoggerListener- JVM Version: 1.8.0_51-b16
2018-03-19 14:14:03,160 [main] INFO org.apache.catalina.startup.VersionLoggerListener- JVM Vendor: Oracle Corporation
2018-03-19 14:14:03,160 [main] INFO org.apache.catalina.startup.VersionLoggerListener- CATALINA_BASE: /opt/webserver
2018-03-19 14:14:03,160 [main] INFO org.apache.catalina.startup.VersionLoggerListener- CATALINA_HOME: /opt/webserver
2018-03-19 14:14:03,160 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Dnop
2018-03-19 14:14:03,160 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
2018-03-19 14:14:03,160 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Djava.library.path=/opt/webserver/lib
2018-03-19 14:14:03,160 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Djava.security.egd=file:/dev/./urandom
2018-03-19 14:14:03,160 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -javaagent:/opt/webserver/lib/jolokia.jar=port=8778,host=127.0.0.1,discoveryEnabled=false
2018-03-19 14:14:03,161 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Djava.endorsed.dirs=/opt/webserver/endorsed
2018-03-19 14:14:03,161 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Dcatalina.base=/opt/webserver
2018-03-19 14:14:03,161 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Dcatalina.home=/opt/webserver
2018-03-19 14:14:03,161 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Djava.io.tmpdir=/opt/webserver/temp
2018-03-19 14:14:03,161 [main] INFO org.apache.catalina.core.AprLifecycleListener- Loaded APR based Apache Tomcat Native library 1.1.32 using APR version 1.4.8.
2018-03-19 14:14:03,161 [main] INFO org.apache.catalina.core.AprLifecycleListener- APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
2018-03-19 14:14:03,188 [main] INFO org.apache.catalina.core.AprLifecycleListener- OpenSSL successfully initialized (OpenSSL 1.0.1e 11 Feb 2013)
2018-03-19 14:14:03,344 [main] INFO org.apache.coyote.http11.Http11AprProtocol- Initializing ProtocolHandler ["http-apr-8080"]
2018-03-19 14:14:03,355 [main] INFO org.apache.catalina.startup.Catalina- Initialization processed in 1137 ms
2018-03-19 14:14:03,374 [main] INFO org.apache.catalina.core.StandardService- Starting service Catalina
2018-03-19 14:14:03,374 [main] INFO org.apache.catalina.core.StandardEngine- Starting Servlet Engine: Apache Tomcat/8.0.18
2018-03-19 14:14:03,401 [localhost-startStop-1] INFO org.apache.catalina.startup.HostConfig- Deploying web application archive /deployments/ROOT.war
2018-03-19 14:14:08,856 [localhost-startStop-1] INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/]- No Spring WebApplicationInitializer types detected on classpath
2018-03-19 14:14:08,947 [localhost-startStop-1] INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/]- Initializing Spring root WebApplicationContext
2018-03-19 14:14:08,947 [localhost-startStop-1] INFO org.springframework.web.context.ContextLoader- Root WebApplicationContext: initialization started
2018-03-19 14:14:09,061 [localhost-startStop-1] INFO org.springframework.web.context.support.XmlWebApplicationContext- Refreshing Root WebApplicationContext: startup date [Mon Mar 19 14:14:09 EDT 2018]; root of context hierarchy
2018-03-19 14:14:09,253 [localhost-startStop-1] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader- Loading XML bean definitions from ServletContext resource [/WEB-INF/dispatcher-servlet.xml]
2018-03-19 14:14:10,942 [localhost-startStop-1] INFO org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor- JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-03-19 14:14:13,458 [localhost-startStop-1] INFO org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping- Mapped "{[/ || /home],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.redhat.api.controller.ControllerClass.goHome()
2018-03-19 14:14:13,459 [localhost-startStop-1] INFO org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping- Mapped "{[/check],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.redhat.api.controller.ControllerClass.goCheck()
2018-03-19 14:14:13,857 [localhost-startStop-1] INFO org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter- Looking for @ControllerAdvice: Root WebApplicationContext: startup date [Mon Mar 19 14:14:09 EDT 2018]; root of context hierarchy
2018-03-19 14:14:14,143 [localhost-startStop-1] INFO org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter- Looking for @ControllerAdvice: Root WebApplicationContext: startup date [Mon Mar 19 14:14:09 EDT 2018]; root of context hierarchy
2018-03-19 14:14:14,654 [localhost-startStop-1] INFO org.springframework.web.servlet.handler.SimpleUrlHandlerMapping- Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
2018-03-19 14:14:14,854 [localhost-startStop-1] INFO org.springframework.jdbc.datasource.DriverManagerDataSource- Loaded JDBC driver: com.mysql.jdbc.Driver
DataBase Connection Established
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
2018-03-19 14:14:15,462 [localhost-startStop-1] INFO org.hibernate.Version- HHH000412: Hibernate Core {5.2.5.Final}
2018-03-19 14:14:15,464 [localhost-startStop-1] INFO org.hibernate.cfg.Environment- HHH000206: hibernate.properties not found
2018-03-19 14:14:15,746 [localhost-startStop-1] INFO org.hibernate.annotations.common.Version- HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
Mon Mar 19 14:14:16 EDT 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
2018-03-19 14:14:17,958 [localhost-startStop-1] INFO org.hibernate.dialect.Dialect- HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
Mon Mar 19 14:14:20 EDT 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Session Factory Block Crossed
2018-03-19 14:14:20,662 [localhost-startStop-1] INFO org.springframework.orm.hibernate5.HibernateTransactionManager- Using DataSource [org.springframework.jdbc.datasource.DriverManagerDataSource@65868c29] of Hibernate SessionFactory for HibernateTransactionManager
Transaction Done
2018-03-19 14:14:20,944 [localhost-startStop-1] INFO org.springframework.web.context.ContextLoader- Root WebApplicationContext: initialization completed in 11997 ms
2018-03-19 14:14:20,962 [localhost-startStop-1] INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/]- Initializing Spring FrameworkServlet 'dispatcher'
2018-03-19 14:14:20,962 [localhost-startStop-1] INFO org.springframework.web.servlet.DispatcherServlet- FrameworkServlet 'dispatcher': initialization started
2018-03-19 14:14:20,964 [localhost-startStop-1] INFO org.springframework.web.context.support.XmlWebApplicationContext- Refreshing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Mon Mar 19 14:14:20 EDT 2018]; parent: Root WebApplicationContext
2018-03-19 14:14:20,964 [localhost-startStop-1] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader- Loading XML bean definitions from ServletContext resource [/WEB-INF/dispatcher-servlet.xml]
2018-03-19 14:14:21,344 [localhost-startStop-1] INFO org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor- JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-03-19 14:14:21,540 [localhost-startStop-1] INFO org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping- Mapped "{[/ || /home],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.redhat.api.controller.ControllerClass.goHome()
2018-03-19 14:14:21,541 [localhost-startStop-1] INFO org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping- Mapped "{[/check],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.redhat.api.controller.ControllerClass.goCheck()
2018-03-19 14:14:21,645 [localhost-startStop-1] INFO org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter- Looking for @ControllerAdvice: WebApplicationContext for namespace 'dispatcher-servlet': startup date [Mon Mar 19 14:14:20 EDT 2018]; parent: Root WebApplicationContext
2018-03-19 14:14:21,657 [localhost-startStop-1] INFO org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter- Looking for @ControllerAdvice: WebApplicationContext for namespace 'dispatcher-servlet': startup date [Mon Mar 19 14:14:20 EDT 2018]; parent: Root WebApplicationContext
2018-03-19 14:14:21,863 [localhost-startStop-1] INFO org.springframework.web.servlet.handler.SimpleUrlHandlerMapping- Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
2018-03-19 14:14:21,945 [localhost-startStop-1] INFO org.springframework.jdbc.datasource.DriverManagerDataSource- Loaded JDBC driver: com.mysql.jdbc.Driver
DataBase Connection Established
Mon Mar 19 14:14:22 EDT 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
2018-03-19 14:14:22,144 [localhost-startStop-1] INFO org.hibernate.dialect.Dialect- HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
Mon Mar 19 14:14:22 EDT 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Session Factory Block Crossed
2018-03-19 14:14:22,448 [localhost-startStop-1] INFO org.springframework.orm.hibernate5.HibernateTransactionManager- Using DataSource [org.springframework.jdbc.datasource.DriverManagerDataSource@5b82fb3a] of Hibernate SessionFactory for HibernateTransactionManager
Transaction Done
2018-03-19 14:14:22,640 [localhost-startStop-1] INFO org.springframework.web.servlet.DispatcherServlet- FrameworkServlet 'dispatcher': initialization completed in 1678 ms
2018-03-19 14:14:22,654 [localhost-startStop-1] INFO org.apache.catalina.startup.HostConfig- Deployment of web application archive /deployments/ROOT.war has finished in 19,251 ms
2018-03-19 14:14:22,655 [localhost-startStop-1] INFO org.apache.catalina.startup.HostConfig- Deploying web application directory /deployments/manager
2018-03-19 14:14:23,746 [localhost-startStop-1] INFO org.apache.jasper.servlet.TldScanner- At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2018-03-19 14:14:23,751 [localhost-startStop-1] INFO org.apache.catalina.startup.HostConfig- Deployment of web application directory /deployments/manager has finished in 1,096 ms
2018-03-19 14:14:23,751 [localhost-startStop-1] INFO org.apache.catalina.startup.HostConfig- Deploying web application directory /deployments/docs
2018-03-19 14:14:24,449 [localhost-startStop-1] INFO org.apache.jasper.servlet.TldScanner- At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2018-03-19 14:14:24,451 [localhost-startStop-1] INFO org.apache.catalina.startup.HostConfig- Deployment of web application directory /deployments/docs has finished in 700 ms
2018-03-19 14:14:24,451 [localhost-startStop-1] INFO org.apache.catalina.startup.HostConfig- Deploying web application directory /deployments/examples
OpenShift Container Crash Image
我的 .java 配置文件
package com.redhat.api.config;
/* Username: userCWJ Password: TGYMNnYI6iohkPfF Database Name: sampledb Connection URL: mysql://mysql:3306/*/
import java.util.Properties;
import javax.sql.DataSource;
import org.hibernate.SessionFactory;
import org.springframework.beans.BeanInstantiationException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.parsing.BeanDefinitionParsingException;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.orm.hibernate5.HibernateTransactionManager;
import org.springframework.orm.hibernate5.LocalSessionFactoryBuilder;
import org.springframework.stereotype.Component;
import com.redhat.api.entity.EntityClass;
@Component
@ComponentScan
@Configuration
public class ConfigClass{
@Autowired
@Bean(name = "dataSource")
public DataSource getMySQLDataSource() throws BeanInstantiationException, BeanDefinitionParsingException {
DriverManagerDataSource driverMgrDataSource = new DriverManagerDataSource();
driverMgrDataSource.setDriverClassName("com.mysql.jdbc.Driver");
driverMgrDataSource.setUrl("jdbc:mysql://mysql:3306/sampledb");
driverMgrDataSource.setUsername("userCWJ");
driverMgrDataSource.setPassword("TGYMNnYI6iohkPfF");
System.out.println("DataBase Connection Established");
return driverMgrDataSource;
}
@Autowired
@Bean(name = "sessionFactory")
public SessionFactory getSessionFactory() {
Properties hibernateProperties = new Properties();
hibernateProperties.put("hibernate.dialect", "org.hibernate.dialect.MySQLDialect");
hibernateProperties.setProperty("hibernate.show_sql", "true");
hibernateProperties.setProperty("hibernate.format_sql", "true");
hibernateProperties.setProperty("hibernate.hbm2ddl.auto", "update");
LocalSessionFactoryBuilder localSessionFacBuilder = new LocalSessionFactoryBuilder(getMySQLDataSource());
localSessionFacBuilder.addProperties(hibernateProperties);
localSessionFacBuilder.addAnnotatedClass(EntityClass.class);
try {
SessionFactory sessionFactory = localSessionFacBuilder.buildSessionFactory();
return sessionFactory;
}
catch (ExceptionInInitializerError ex) {
System.out.println(ex.getMessage());
}
finally {
System.out.println("Session Factory Block Crossed");
}
System.out.println("SessionFactory Created");
return null;
}
@Autowired
@Bean(name = "transactionManager")
public HibernateTransactionManager getHibernateTransactionManager(SessionFactory sessionFactory)
throws BeanInstantiationException, BeanDefinitionParsingException {
HibernateTransactionManager hibernateTranMgr = new HibernateTransactionManager(sessionFactory);
System.out.println("Transaction Done");
return hibernateTranMgr;
}}
我的 Pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.redhat</groupId>
<artifactId>api</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>api Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.3.12.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.3.12.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.3.12.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>4.3.12.RELEASE</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>6.0.6</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.2.5.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>4.3.11.Final</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
</dependencies>
<build>
<finalName>ROOT</finalName>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
</project>
据我所知,我猜,该错误应该是由于 pom.xml 中的某些依赖项引起的,但我无法解决。
最佳答案
在pom.xml中,我们只需添加必需的依赖项。我猜这就是我的代码中的问题,我做了这个更改和一些小更改,例如从数据源中删除 @Autowire 注释等。现在它工作正常,我的应用程序托管在 OpenShift 中。
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.redhat</groupId>
<artifactId>api</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>api Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.3.12.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>4.3.12.RELEASE</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>6.0.6</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.2.5.Final</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
<build>
<finalName>ROOT</finalName>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
</project>
关于java - OpenShift 部署 : Container Crash. - SpringMVC+Hibernate+Maven+MySQL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49370829/
我是 devops 的新手,并且正在阅读有关此的 openshift 文档。似乎 buildconfig 和 pipeline(openshift 4.6 中的 tekton)都可以实现 source
我正在寻找 OpenShift Origin 和 OpenShift Enterprise 之间的主要区别。我知道第一个是开源的,后者是商业版。与开源版本相比,OpenShift Enterprise
在 Openshift 上部署应用程序后,收集应用程序的 1) CPU、2) 网络、3) 内存、4) 磁盘存储使用情况的推荐方法/最佳实践是什么?基本上是为了监控应用程序。 如果它们能够以时间序列格式
几天来,我一直在尝试通过 Openshift 连接到我的应用程序,但仍然没有运气。 我现在不确定该去哪个论坛,因为我在任何地方都没有得到帮助。 1) 我通过终端运行sudo rhc setup (我之
Spinnaker 是否可以作为云提供商在 Red Hat 的 Openshift 上运行和部署应用程序? 如果没有,需要什么才能使之成为现实? 谢谢。 最佳答案 首先,您需要为 Openshift
我目前正在使用 Red Had 提供的免费培训来学习 Openshift 作为开发人员和管理员。你知道我可以用来获得“刺激”经验的任何其他地方吗?提前致谢。 :) 最佳答案 红帽提供的免费培训是一个良
我在 openshift 中创建应用程序时不小心选择了大齿轮。有没有办法在不重新创建我的应用程序的情况下降级齿轮类型?比如从大到中,甚至从大到小。highcpu。 提前谢谢各位 最佳答案 您确实必须重
我创建了一个 Web 应用程序,我想在 Openshift 上进行部署。 最简单的方法是什么?我正在使用 Openshift Eclipse 客户端。 我应该创建一个新的 openshift,然后从我
我想在 Openshift 中定义一条具有多条路径的路由,每条路径转发到不同的服务。例如/pathA 会将请求转发到 ServiceA ,而/pathB 会将请求转发到 ServiceB。 这在 Op
我想创建一个构建器图像 app_name:latest这将采用多个源输入,例如,另一个图像和二进制源,然后将输出创建到 app_name:latest . 示例 - { "kind": "Bu
我有一个 openshift 应用程序,我在本地彻底重新设计了该应用程序,并希望在 openshift 服务器上重新开始。 我可以删除所有齿轮并重做它们,但是有没有一种优雅的方法或任何方法可以将 op
大约一周以来,它说: Queued for provisioning Due to an increase in OpenShift Online Starter popularity, please
我希望我的部署配置使用作为构建配置输出的镜像。 我目前正在使用这样的东西: - apiVersion: v1 kind: DeploymentConfig metadata: anno
与 OpenShift Container Platform(以前的 Enterprise)相比,OpenShift Origin 是否有任何强制限制?我的意思是,像 Origin 这样的东西,你最多
一个 openshift 应用程序可以有多个域吗? Heroku 允许这样做。完全不同的域(app.abc.com、app.xyz.com)或子域(*.abc.com、*.xyz.com)。 open
我想开发一种新的墨盒供我自己使用。我使用 OpenShift Cartridge Development Kit 开始我的工作。我的构建脚本写在.openshift/action_hooks/buil
我正在使用 flask 。我安装了 Flask-migrate 并一直在使用它来迁移我的 postgresql 数据库。它在我的本地盒子上工作正常。但是,当我在 openshift 上运行它时出现错误
当我尝试在打开的类次项目中推送一些更改时,我在尝试构建项目时遇到了这个错误: remote: Found pom.xml... attempting to build with 'mvn --glob
在不可扩展的奇异齿轮中,齿轮空闲多长时间没有流量。我看过 https://access.redhat.com/site/documentation/en-US/OpenShift_Online/2.0
我试图在 OpenShift 中更新图像时触发部署。该图像托管在私有(private)外部 docker 注册表中。我创建了一个 ImageStream映射到这个外部图像。当我将新图像推送到注册表时,
我是一名优秀的程序员,十分优秀!