我在webLogic 12C中部署Spring启动应用程序时遇到了麻烦.
10.4.4 403禁止服务器理解请求,但拒绝履行请求.授权无效,请求不应重复.如果请求方法不是HEAD并且服务器希望公开为什么请求没有得到满足,那么它应该描述实体中拒绝的原因.当服务器不希望确切地说明请求被拒绝的原因,或者没有其他响应适用时,通常会使用此状态代码.
我想知道是否有人可以提供帮助.
我在WebLogic 12.1.2.0.0上部署了一个WAR文件.应用程序通过HTTPS调用Web服务.证书在DemoTrust.jks中导入.所有SSL相关设置都应该是正确的.实际上它可以工作但是在服务器重新启动后它不能工作大约15-20分钟,之后它又开始工作了.在此期间,控制台中会打印以下错误:
<Warning> <Security> <BEA-090504> <Certificate chain received from xxx.xxxxxxxx.xxx.com -
167.107.80.230 failed hostname verification check. Certificate contained xxx.xxxxxxxx.xxx.com
but check expected xxx.xxxxxxxx.xxx.com>
Run Code Online (Sandbox Code Playgroud)
警告后我得到:
javax.xml.ws.WebServiceException: javax.net.ssl.SSLKeyException: Hostname verification failed:
HostnameVerifier=weblogic.security.utils.SSLWLSHostnameVerifier,hostname=xxx.xxxxxxxx.xxx.com.
Run Code Online (Sandbox Code Playgroud)
在上面的警告中,包含的和预期的域是相同的.
谢谢您的帮助!
-E
我想在CDI 1.0中排除扫描类.我在WebLogic 12.1.12(Weld,CDI 1.0)中使用CDI的默认实现.
我看到了几个带有CDI 1.1的网站和文档,但没有使用之前的版本.
我的webapp包含一个库,其中包含一个带注释的类@javax.ws.rs.ext.Provider.如果存在此类,则我的webapp(在EAR中部署为WAR)无法启动,并出现以下错误:
<19-Jun-2014 14:41:50 o'clock BST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "1403185262187" for task "2". Error is: "weblogic.application.ModuleException: com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes."
weblogic.application.ModuleException: com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
Truncated. see log file for complete stacktrace
Caused By: com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes. …Run Code Online (Sandbox Code Playgroud) 我们当前在WebLogic 10.3.5.0上运行了一个应用程序,我们正在迁移到WL 12.1.2.0.0.我们遇到了对另一个应用程序进行Un-marshalling WS调用的问题.我们在升级时熟悉编组错误,但似乎这个问题不一样.
奇怪的是它在同一WL版本的DEV/Test服务器上工作正常,但在本地部署时会返回以下错误(必须是env /配置设置不匹配?):
JAXB unmarshalling exception: null; nested exception is javax.xml.bind.UnmarshalException - with linked exception: [org.xml.sax.SAXParseException; cvc-complex-type.3.2.2: Attribute 'xsi:nil' is not allowed to appear in element 'error'.]
Run Code Online (Sandbox Code Playgroud)
从错误消息,它似乎没有识别xsi命名空间或其他东西.架构没有从10.3.5更改,也不应该是问题的根源.任何人都有任何想法,甚至是一个起点去看?
非常感谢
编辑:添加web.xml和weblogic.xml
web.xml中
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="cpc-mi" version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
...
</web-app>
Run Code Online (Sandbox Code Playgroud)
weblogic.xml中
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd
http://xmlns.oracle.com/weblogic/weblogic-web-app
http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd"
xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
...
</weblogic-web-app>
Run Code Online (Sandbox Code Playgroud) 要安装weblogic应用程序服务器,我使用以下链接解压缩了我收到的2个文件或oracle:
http://download.oracle.com/otn/nt/middleware/12c/wls/1212/wls1212_dev.zip http://download.oracle.com/otn/nt/middleware/12c/wls/1212/wls1212_dev_supplemental.zip
..发现在这个页面上.
我只是解压缩了两个文件,它们会自动解压缩到同一个文件夹.设置MW_HOME和JAVA_HOME环境变量分别指向解压缩文件夹和Java 7 JDK位置,我运行该configure.cmd文件并成功结束.
问题是,如果我按照上面的说明操作,我无法达到此页面显示的相同结果.我在这里总结了这些说明:( ORACLE_HOME与之相反MW_HOME,它们都指向安装文件夹.)
%ORACLE_HOME%/wlserver/server/bin/setWLSEnv
cd %ORACLE_HOME%/oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.1.2
mvn install:install-file -DpomFile=oracle-maven-sync.12.1.2.pom -Dfile=oracle-maven-sync.12.1.2.jar
mvn com.oracle.maven:oracle-maven-sync:push -Doracle-maven-sync.oracleHome=D:/oracle_home
mvn help:describe -DgroupId=com.oracle.weblogic -DartifactId=weblogic-maven-plugin -Dversion=12.1.2-0-0
Run Code Online (Sandbox Code Playgroud)
哪里oracle-maven-sync.oracleHome是The path to the Oracle home that you wish to populate the Maven repository from..它基本上是包含目录的Weblogic目录wlserver.
问题是最后一行(要求安装的插件描述的行)显示以下错误消息(忽略被屏蔽的IP,我在这个问题中手动屏蔽它们):
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building …Run Code Online (Sandbox Code Playgroud) 从Tomcat迁移到Weblogic 12.1.3时,我遇到了这个异常,javax.naming.namenotfoundexception while trying to look up
然后我尝试了以下内容:
NameNotFoundException:仅在从Eclipse Kepler发布而不是Indigo
以及
如何访问weblogic 10.3中定义的JNDI数据源时尝试查找'jdbc' . 6
我现在得到了标题错误
我的查找代码
ds = (DataSource) initContext.lookup("MyDB");
Run Code Online (Sandbox Code Playgroud)
在weblogic JNDI名称中
MyDB
Run Code Online (Sandbox Code Playgroud)
有什么帮助吗?
我无法使用weblogic 12.1.3通过Jersey 2.22.1中的@Context在ContainerRequestFilter中注入HttpServletRequest.我研究了这个问题存在的几个地方,并且在很多地方我看到它在Jersey 2.4中得到修复,但我仍然看到这个问题.我的实现和代码已附加.如果我遗失任何东西,请告诉我.
AuthFilter筛选
@Provider
@Priority(Priorities.AUTHENTICATION)
public class AuthFilter implements ContainerRequestFilter {
@Context
HttpServletRequest webRequest;
@Context
HttpServletResponse webResponse;
@Override
public void filter(ContainerRequestContext requestContext) throws IOException {
final HttpSession session = webRequest.getSession();
final String userName = (String)session.getAttribute("USER_NAME");
Run Code Online (Sandbox Code Playgroud)
web.xml中
<servlet>
<servlet-name>jersey-application</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value> xyz.xyz.xyz.xyz.xyz.resource</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>authentication-servlet</servlet-name>
<servlet-class>xyz.xyz.xyz.xyz.xyz.xyz.AuthenticationServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>jersey-application</servlet-name>
<url-pattern>/jaxrs/*</url-pattern>
</servlet-mapping>
Run Code Online (Sandbox Code Playgroud)
的pom.xml
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<version>2.22.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-moxy</artifactId>
<version>2.22.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-spring3</artifactId>
<version>2.22.1</version>
<exclusions>
<exclusion>
<artifactId>spring-context</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-beans</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion> …Run Code Online (Sandbox Code Playgroud) 当我从spring 4.3.4迁移到4.3.7时,我在添加Jackson-core依赖后面临NoclassDefined错误
引发者:org.springframework.beans.BeanInstantiationException:无法实例化[org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]:构造函数抛出异常; 嵌套异常是java.lang.NoClassDefFoundError:com/fasterxml/jackson/core/util/DefaultIndenter
我试着添加杰克逊核心
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.8.5</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
依赖也没有运气
任何能够对此有所了解的人都将不胜感激.
谢谢Vinod
我正在尝试使用带有Hibernate 5.x和Spring-data-jpa 1.9.4的WebLogic 12.2.1部署EAR文件.在Weblogic 12.1.3上部署了相同的配置.JPA 2.1用于它们.
Weblogic正在抛出一个ClassNotFoundException查找QueryDsl库,该库对spring-data是可选的:
weblogic.management.DeploymentException: java.lang.ClassNotFoundException: com.mysema.query.types.path.PathBuilder
Run Code Online (Sandbox Code Playgroud)
Spring-data的清单甚至将此jar引用为可选.由于Oracle没有发布任何源代码,因此我无法完全调试问题.在我ApplicationContext实际初始化任何Spring连接之前,它似乎很久就会抛出一个错误.
相同的配置在Websphere 8.5.5上部署得很好.使用Weblogic 12.2.1似乎存在某种部署冲突,但我无法发现任何其他有意义的差异.有没有人遇到类似的东西?
weblogic12c ×10
java ×4
spring ×2
weblogic ×2
cdi ×1
jackson ×1
java-8 ×1
java-ee ×1
jax-rs ×1
jaxb ×1
jersey ×1
jersey-2.0 ×1
jndi ×1
spring-boot ×1
spring-mvc ×1
weld ×1