Weblogic 10.3.4& Spring 3.0.6& web.xml中

时间:2011-11-07 20:44:38

标签: spring spring-mvc weblogic11g weblogic-integration

目前正致力于开发需要在Weblogic 10.3.4上部署的休息服务。在线使用Spring 3.0.6示例但是DispatcherServlet的基本加载似乎导致了Weblogic的问题。

<servlet>
   <servlet-name>mvc-dispatcher</servlet-name>
   <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
   <load-on-startup>1</load-on-startup>
</servlet>

weblogic控制台窗口中显示的异常是:

<07-Nov-2011 20:29:33 o'clock GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
log4j:WARN No appenders could be found for logger (org.springframework.web.servlet.DispatcherServlet).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
=============== DEBUG MESSAGE: unimplemented bytecode ================

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_PRIV_INSTRUCTION (0xc0000096) at pc=0x026b26d0, pid=7200, tid=7924
#
# JRE version: 6.0_21-b51
# Java VM: Java HotSpot(TM) Client VM (17.0-b17 mixed mode windows-x86 )
# Problematic frame:
# j  javax.validation.Validation.byDefaultProvider()Ljavax/validation/bootstrap/GenericBootstrap;+0
#
# An error report file with more information is saved as:
# C:\bea\user_projects\domains\saw_ca_wl10\hs_err_pid7200.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

目标AdminServer日志中显示的异常是

####<07-Nov-2011 20:29:54 o'clock GMT> <Info> <EJB> <JGOGGINS212> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1320697794074> <BEA-010008> <EJB Deploying file: KCS-ejb-0.0.1-SNAPSHOT.jar> 
####<07-Nov-2011 20:29:54 o'clock GMT> <Info> <Deployer> <JGOGGINS212> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1320697794499> <BEA-149060> <Module KCS-ejb-0.0.1-SNAPSHOT.jar of application KCS-ear-0 successfully transitioned from STATE_NEW to STATE_PREPARED on server AdminServer.> 
####<07-Nov-2011 20:29:54 o'clock GMT> <Info> <Deployer> <JGOGGINS212> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1320697794499> <BEA-149059> <Module /KCS-webApp of application KCS-ear-0 is transitioning from STATE_NEW to STATE_PREPARED on server AdminServer.> 
####<07-Nov-2011 20:29:55 o'clock GMT> <Info> <Deployer> <JGOGGINS212> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1320697795146> <BEA-149060> <Module /KCS-webApp of application KCS-ear-0 successfully transitioned from STATE_NEW to STATE_PREPARED on server AdminServer.> 
####<07-Nov-2011 20:29:55 o'clock GMT> <Info> <Deployer> <JGOGGINS212> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1320697795270> <BEA-149059> <Module KCS-ejb-0.0.1-SNAPSHOT.jar of application KCS-ear-0 is transitioning from STATE_PREPARED to STATE_ADMIN on server AdminServer.> 
####<07-Nov-2011 20:29:55 o'clock GMT> <Info> <Deployer> <JGOGGINS212> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1320697795301> <BEA-149060> <Module KCS-ejb-0.0.1-SNAPSHOT.jar of application KCS-ear-0 successfully transitioned from STATE_PREPARED to STATE_ADMIN on server AdminServer.> 
####<07-Nov-2011 20:29:55 o'clock GMT> <Info> <Deployer> <JGOGGINS212> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1320697795301> <BEA-149059> <Module /KCS-webApp of application KCS-ear-0 is transitioning from STATE_PREPARED to STATE_ADMIN on server AdminServer.> 
####<07-Nov-2011 20:29:55 o'clock GMT> <Info> <Deployer> <JGOGGINS212> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1320697795302> <BEA-149060> <Module /KCS-webApp of application KCS-ear-0 successfully transitioned from STATE_PREPARED to STATE_ADMIN on server AdminServer.> 
####<07-Nov-2011 20:29:55 o'clock GMT> <Info> <ServletContext-/KCS-webApp> <JGOGGINS212> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1320697795498> <BEA-000000> <Initializing Spring FrameworkServlet 'mvc-dispatcher'> 

使用Maven构建并将所有spring-core / web / webmvc / context都定义为依赖于运行时。

还尝试将“org.springframework.web.servlet-3.0.5.RELEASE,jar”文件复制到bea \ modules文件夹,以尝试解决weblogic中的运行时问题。

尝试了weblogic-application.xml,

<prefer-application-packages>
<package-name>org.springframework.*</package-name>
<package-name>org.springframework.web.*</package-name>
<package-name>org.springframework.web.servlet.*</package-name>  
<prefer-application-packages>

所有这些,同样的问题。

我注意到发行说明已声明“此版本的WebLogic Server支持Spring 3.0。”,http://download.oracle.com/docs/cd/E17904_01/web.1111/e13852/toc.htm#BGGEAIJJ

1 个答案:

答案 0 :(得分:0)

在Java 7和8版本中,函数代码的大小限制为64 KB。当我们的代码在函数中超过64 KB时,编译器无法编译整个代码并抛出错误未实现的字节代码

COMPILE ERROR:

发生的错误信息/堆栈跟踪: =============== DEBUG MESSAGE:未实现的字节码================ Java运行时环境检测到致命错误:

注意:此功能视为

1)函数是我们在jsp或java文件中编写的普通函数。

2)我们的普通jsp(Java Server Page)页面在java编程中编译时也被视为函数

示例:

// The Function Size Should Less Than 64KB
public static function myFunction(){
   // Your Code
}