Tag: openshift

@serverendpoint路径在哪里映射(Websockets)

对于我使用spring框架的websocket,我有以下@serverendpoint路径: @ServerEndpoint(value=”/serverendpoint”, configurator = SpringConfigurator.class) 我的第一个问题是说我有一个urlwww.example.com 。 具有路径serverendpoint的serverendpoint在哪里被映射? 我可以在wss://example.com:$PORT/currentpage.html/serverendpoint访问我的serverendpoint wss://example.com:$PORT/currentpage.html/serverendpoint ? 或者这是错误的方式。 我有一台Wildfly 10服务器在运行。 基于另一个SO问题 ,我被告知要使用以下Uri: var wsUri = “wss://” + document.location.hostname + “:8443” + document.location.pathname + “/../serverendpoint”; 。 但是,当我这样做时,在谷歌浏览器中,我收到以下错误: WebSocket is already in CLOSING or CLOSED state. 我的console.log打印出websocket已连接,但后来我立即得到了上述错误。 我究竟做错了什么? 根据Wildfly服务器日志,我知道serverendpoint被映射: [io.undertow.websockets.jsr] (ServerService Thread Pool — 78) UT026003: Adding annotated server endpoint class com.voice2.spring.web.controller.serverendpoint for […]

对于openshift v3,Wildfly选项不可用

我正在使用openshift v3创建一个项目,但是从今天起我无法在openshift Web控制台中找到wildfly选项。 直到昨天它即将到来。 我再也找不到相同的了 尝试通过终端创建它 oc new-app –name=netsetos08 wildfly~https://github.com/test/test.git –> Found image 18929ed (2 weeks old) in image stream “openshift/wildfly” under tag “latest” for “wildfly” WildFly 10.1.0.Final ——————– Platform for building and running JEE applications on WildFly 10.1.0.Final Tags: builder, wildfly, wildfly10 * A source build using source code from https://github.com/sarthak0488/checkincode.git will be created […]

目标版本无效1.8

我试图在OPENSHIFT上部署我的应用程序,但是maven无法编译它并出现错误: 目标版本无效1.8 我的“构建”action_hook: export JAVA_HOME=”${OPENSHIFT_DATA_DIR}jdk1.8.0_05″ export PATH=${OPENSHIFT_DATA_DIR}jdk1.8.0_05/bin:$PATH cd $OPENSHIFT_REPO_DIR java -version mvn package -s .openshift/settings.xml -DskipTests=true 结果 java version “1.8.0_05” Java(TM) SE Runtime Environment (build 1.8.0_05-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode) [devlt-chernihiv.rhcloud.com repo]\> mvn package -s .openshift/settings.xml -DskipTests=true [INFO] Scanning for projects… [INFO] [INFO] ———————————————————————— [INFO] Building LaserTag 0.0.1-SNAPSHOT [INFO] ———————————————————————— […]

权限被拒绝使用JBoss部署到Openshift后出错

我们有一个应用程序需要使用SSL连接与某些政府Web服务进行通信。 当在开发环境(本地)上运行时,它运行得很好,但是当我们部署到OpenShift时,尝试运行相同的任务,问题出现并显示一个很大的错误StackTrace,我们可以说这个问题来自OpenShift: 10:00:29,286 WARN [org.apache.axiom.util.stax.dialect.StAXDialectDetector] (http–127.2.25.1-8080-6) Unable to determine dialect of the StAX implementation at jar:file:/opt/jboss-as-7.1.1.Final/jboss-modules.jar!/ 10:00:33,146 INFO [org.apache.commons.httpclient.HttpMethodDirector] (http–127.2.25.1-8080-6) I/O exception (java.net.BindException) caught when processing request: Permission denied 10:00:33,148 INFO [org.apache.commons.httpclient.HttpMethodDirector] (http–127.2.25.1-8080-6) Retrying request 10:00:33,214 INFO [org.apache.commons.httpclient.HttpMethodDirector] (http–127.2.25.1-8080-6) I/O exception (java.net.BindException) caught when processing request: Permission denied 10:00:33,216 INFO [org.apache.commons.httpclient.HttpMethodDirector] (http–127.2.25.1-8080-6) Retrying request 10:00:33,219 […]

OpenShift webapps mysql java连接

我在openshift上有一个JBoss EWS Tomcat 7 Java应用程序,安装了MySQL 5.5和PhpMyAdmin 4.0盒式磁带。 我在本地复制了存储库,并删除了源文件夹。 相反,我只是有一个已编译的Java应用程序,一个WAR文件,已被复制到webapps目录中,git被推送到OpenShift服务器。 如果我有一些数据库,我怎么能在webapp编译的war文件中访问它。 标准MySQL JDBC会起作用吗? 根据我读过的一些post,OpenShift阻止访问数据库的外部请求,在这种情况下,webapp目录的war文件可能正在发出“外部请求”。 其中的来源是: https : //www.openshift.com/forums/express/external-access-to-mysql (由信誉良好的OpenShift开发人员回答)。 我实际上在过去尝试过JDBC并且它不起作用,但这可能是因为代码不正确。 如果有人想编写一些显示如何完成此操作的代码,我将不胜感激。 如果你能测试它会更好:) 顺便说一下,在答案中请不要包括端口转发。 我知道有效,我以前尝试过,端口转发工作。 但它通常有点不安全,每次都必须从计算机启动。

Java SSL DH密钥对生成 – Prime大小错误

我目前正在将Reddit OAuth2登录到我的网络应用程序中。 握手和令牌交换在本地测试时工作正常但在服务器上运行时(托管在’OpenShift’DIY盒式磁带上)我收到以下错误: java.security.InvalidAlgorithmParameterException: Prime size must be multiple of 64, and can only range from 512 to 1024 (inclusive) 结果如何 java.lang.RuntimeException: Could not generate DH keypair 我一直在搜索大部分时间,并找到了不同的解决方案,从更改Java版本到使用BouncyCastle。 但是,我正在使用Scribe库,所以我不认为我可以实现BouncyCastle而不需要改变划线的基础,这会破坏它的目的。 安装JCE Unlimited Strength也出现了,但是我不能在OpenShift上做到这一点,因为没有root访问权限(也许可以让他们的团队之一去做)。 使用的java版本(取自java -version ): 本地试验机: java version “1.7.0_51” OpenJDK Runtime Environment (IcedTea 2.4.4) (7u51-2.4.4-1ubuntu1) OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode) OpenShift服务器: java […]

通过我的应用程序部署获得404

jenkins表明构建成功(见下面的日志),我可以看到战争 /app-root/runtime/repo/target/0.1-MVP tomcat webapps(jwboss / webapps)仅包含ROOT.war。 我如何导航到我部署的应用程序? 我正在使用tomcat装备。 是否有服务器管理器UI? (像tomcat manager这样的东西)不知道它是否重要,但我使用Spring作为我的应用程序 我试过了: .rhcloud.com/ .rhcloud.com// 我两个都得到404 http://mirror1.ops.rhcloud.com/nexus/content/groups/public/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar(422 KB,2925.7 KB /秒)[INFO ]打包webapp [INFO]在[/var/lib/openshift/52dbe400e0b8cdce430000d0/app-root/runtime/repo/target/0.1-MVP]中组装webapp [initial] [INFO]处理war项目[INFO]复制webapp资源[/ var / lib / openshift / 52dbe400e0b8cdce430000d0 / app-root / runtime / repo / src / main / webapp] [INFO] Webapp汇编于[531 msecs] [INFO]建立战争:/ var / lib / openshift / 52dbe400e0b8cdce430000d0 / app-root […]

NoSuchMethodError:javax.persistence.JoinColumn.foreignKey()

我正在尝试在OpenShift(JBoss企业应用程序平台6)上部署我的应用程序,并且我得到了标题中提到的NoSuchMethodError。 所以我搜索了整个事情并发现了一些文章或线程,提到自JPA-API 2.1以来这个方法是可用的。 我发现Openshift所需的依赖包含JPA-API 2.0。 我试图排除这种依赖,但它不起作用。 有任何想法吗? 请在下面找到pom.xml。 4.0.0 christmasmarkets christmasmarkets war 1.0 christmasmarkets eap http://maven.repository.redhat.com/techpreview/all true true springsource-repo SpringSource Repository http://repo.springsource.org/release eap http://maven.repository.redhat.com/techpreview/all true true UTF-8 1.6 1.6 4.1.2.RELEASE 4.3.7.Final 3.5.6-Final 3.2.0.Final 2.2.3 9.3-1102-jdbc41 org.jboss.spec jboss-javaee-6.0 3.0.2.Final-redhat-4 pom provided org.hibernate.javax.persistence hibernate-jpa-2.0-api org.springframework spring-context ${spring.version} org.springframework spring-web ${spring.version} org.springframework spring-webmvc ${spring.version} org.springframework spring-tx ${spring.version} org.springframework […]