weblogic


javaee and weblogic19 三 2010 03:08 下午

环境
weblogic10
sybase15

WARN: SQL Warning: 4016, SQLState: 01ZZZ
19.3.2010 10:26:25 org.hibernate.util.JDBCExceptionReporter logWarnings
WARN: Language name in login record ‘chinese’ is not an official name on this ASE. Using default ‘us_english’ from syslogins instead.

19.3.2010 10:26:25 org.hibernate.util.JDBCExceptionReporter logWarnings
WARN: SQL Warning: 0, SQLState: 010DP
19.3.2010 10:26:25 org.hibernate.util.JDBCExceptionReporter logWarnings
WARN: 010DP: 忽略了重复连接属性 charset。

解析
SQLState: 01ZZZ
在jdbc驱动属性中加上language=us_english

LANGUAGE
设置从服务器返回的错误消息和 jConnect 消息的语言。该设置必须是 syslanguages 中的一种语言。

SQLState: 010DP是由于在配置weblobic10数据源时,在url和properties属性中都配置了charset属性
丢弃一个就可以了。

javaee and weblogic01 九 2009 11:14 上午

使用CXF2.2.3的pojoservice和aegis Databinding在weblogic10上进行javafirst的webservice开发

cxf的默认绑定是jaxb,
cxf发布ws的常用方式
1)jaxws+jaxb
2)pojoservice(映射)+aegis

本文采用pojoservice+aegis Databinding进行java first的ws开发

1)
web.xml
<?xml version=”1.0″ encoding=”ISO-8859-1″?>

<!DOCTYPE web-app
PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN”
“http://java.sun.com/dtd/web-app_2_3.dtd”>
<web-app>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/cxf-servlet.xml</param-value>
</context-param>

<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>

<servlet>
<servlet-name>CXFServlet</servlet-name>
<display-name>CXF Servlet</display-name>
<servlet-class>
org.apache.cxf.transport.servlet.CXFServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/ws/*</url-pattern>
</servlet-mapping>
</web-app>

2)
cxf-servlet.xml

<?xml version=”1.0″ encoding=”UTF-8″?>
<beans xmlns=”http://www.springframework.org/schema/beans”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xmlns:simple=”http://cxf.apache.org/simple”
xmlns:soap=”http://cxf.apache.org/bindings/soap”
xsi:schemaLocation=”
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd
http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd”>

<import resource=”classpath:META-INF/cxf/cxf.xml” />
<import resource=”classpath:META-INF/cxf/cxf-extension-soap.xml” />
<import resource=”classpath:META-INF/cxf/cxf-servlet.xml” />

<simple:server id=”pojoservice” serviceClass=”com.webservice.HelloWorld” address=”/hello_world”>
<simple:serviceBean>
<bean  class=”com.webservice.impl.HelloWorldImpl” />
</simple:serviceBean>
<simple:dataBinding>
<bean scope=”prototype”  class=”org.apache.cxf.aegis.databinding.AegisDatabinding” />
</simple:dataBinding>
</simple:server>

</beans>

3)
com.webservice.HelloWorld.java
public interface HelloWorld{

String sayHi(String content);
}

com.webservice.impl.HelloWorldImpl.java
public class HelloWorldImpl implements HelloWorld {

public String sayHi(String text) {
System.out.println(“sayHi called” + new java.util.Date());
return “Hello ” + text;
}
}

4)将
jaxb-api-2.1.jar
xercesImpl-2.9.1.jar
放到D:\bea10\jrockit_150_11\jre\lib\endorsed
目录下否则报错

ERROR: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘pojoservice’: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Schema
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:458)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:168)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1744)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2909)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:973)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:361)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:182)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:359)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Caused by: java.lang.IllegalArgumentException: Schema
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.setAttribute(DocumentBuilderFactoryImpl.java:140)
at weblogic.xml.jaxp.WebLogicDocumentBuilderFactory.setAttribute(WebLogicDocumentBuilderFactory.java:146)
at weblogic.xml.jaxp.RegistryDocumentBuilder.setupDocumentBuilderFactory(RegistryDocumentBuilder.java:329)
at weblogic.xml.jaxp.RegistryDocumentBuilder.getDefaultDocumentBuilderFactory(RegistryDocumentBuilder.java:286)
at weblogic.xml.jaxp.RegistryDocumentBuilder.getDocumentBuilder(RegistryDocumentBuilder.java:222)
at weblogic.xml.jaxp.RegistryDocumentBuilder.parse(RegistryDocumentBuilder.java:147)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
at org.apache.cxf.aegis.type.XMLTypeCreator.readAegisFile(XMLTypeCreator.java:186)
at org.apache.cxf.aegis.type.XMLTypeCreator.getDocument(XMLTypeCreator.java:211)
at org.apache.cxf.aegis.type.XMLTypeCreator.findMapping(XMLTypeCreator.java:270)
at org.apache.cxf.aegis.type.XMLTypeCreator.createClassInfo(XMLTypeCreator.java:389)
at org.apache.cxf.aegis.databinding.AegisDatabinding.getParameterType(AegisDatabinding.java:553)
at org.apache.cxf.aegis.databinding.AegisDatabinding.initializeMessage(AegisDatabinding.java:338)
at org.apache.cxf.aegis.databinding.AegisDatabinding.initializeOperation(AegisDatabinding.java:299)
at org.apache.cxf.aegis.databinding.AegisDatabinding.initialize(AegisDatabinding.java:266)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:381)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:444)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:195)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
… 49 more
28.8.2009 10:41:22 org.springframework.web.context.ContextLoader initWebApplicationContext

javaee and weblogic22 七 2009 04:32 下午

解决struts2在weblogic10下无法找到struts-tags.tld的问题

报错信息
Compilation of JSP File ‘/example/HelloWorld.jsp’ failed:
——————————————————————————–

HelloWorld.jsp:2:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
<%@ taglib prefix=”s” uri=”/struts-tags” %>

^—-^
HelloWorld.jsp:2:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
<%@ taglib prefix=”s” uri=”/struts-tags” %>

^—-^

java.lang.IllegalStateException: Response already committed
at weblogic.servlet.internal.ServletResponseImpl.objectIfCommitted(ServletResponseImpl.java:1486)
at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:603)
at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:725)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
Truncated. see log file for complete stacktrace
>

解决办法
将struts2-core-2.1.6.jar/META-INF/struts-tags.tld拷贝到项目WEB-INF/tlds/struts-tags.tld

然后在web.xml中加入红色的部分

<?xml version=”1.0″ encoding=”UTF-8″?>
<web-app id=”WebApp_9″ version=”2.4″ xmlns=”http://java.sun.com/xml/ns/j2ee”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”>

<display-name>my Application</display-name>

<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<jsp-config>
<taglib>
<taglib-uri>struts-tags</taglib-uri>
<taglib-location>/WEB-INF/tlds/struts-tags.tld</taglib-location>
</taglib>
</jsp-config>

<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>

</web-app>

特别注意<taglib>一定要被<jsp-config>包住呀,要不然会报如下错误

[WARN ] -XX:MaxPermSize=128m is not a valid VM option. Ignoring
<2009-7-22 下午04时04分19秒 CST> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
D:\bea10\wlserver_10.0\platform\lib\p13n\p13n-schemas.jar;D:\bea10\wlserver_10.0\platform\lib\p13n\p13n_common.jar;D:\bea10\wlserver_10.0\platform\lib\p13n\p13n_system.jar;D:\bea10\wlserver_10.0\platform\lib\wlp\netuix_common.jar;D:\bea10\wlserver_10.0\platform\lib\wlp\netuix_schemas.jar;D:\bea10\wlserver_10.0\platform\lib\wlp\netuix_system.jar;D:\bea10\wlserver_10.0\platform\lib\wlp\wsrp-client.jar;D:\bea10\wlserver_10.0\platform\lib\wlp\wsrp-common.jar>
<2009-7-22 下午04时04分22秒 CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with BEA JRockit(R) Version R27.3.1-1_CR344434-89345-1.5.0_11-20070925-1628-windows-ia32 from BEA Systems, Inc.>
<2009-7-22 下午04时04分24秒 CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.0 MP1  Thu Oct 18 20:17:44 EDT 2007 1005184 >
<2009-7-22 下午04时04分26秒 CST> <Info> <WebLogicServer> <BEA-000215> <Loaded License : D:\bea10\license.bea>
<2009-7-22 下午04时04分26秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<2009-7-22 下午04时04分26秒 CST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
<2009-7-22 下午04时04分26秒 CST> <Notice> <Log Management> <BEA-170019> <The server log file \myserver\logs\myserver.log is opened. All server side log events will be written to this file.>
<2009-7-22 下午04时04分32秒 CST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<2009-7-22 下午04时04分38秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
<2009-7-22 下午04时04分38秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<2009-7-22 下午04时04分40秒 CST> <Error> <J2EE> <BEA-160197> <Unable to load descriptor..\..\web\src\context/WEB-INF/web.xml of module ../../web/src/context. The error is weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
problem: cvc-complex-type.2.4a: Expected elements ‘description@http://java.sun.com/xml/ns/javaee display-name@http://java.sun.com/xml/ns/javaee icon@http://java.sun.com/xml/ns/javaee distributable@http://java.sun.com/xml/ns/javaee context-param@http://java.sun.com/xml/ns/javaee filter@http://java.sun.com/xml/ns/javaee filter-mapping@http://java.sun.com/xml/ns/javaee listener@http://java.sun.com/xml/ns/javaee servlet@http://java.sun.com/xml/ns/javaee servlet-mapping@http://java.sun.com/xml/ns/javaee session-config@http://java.sun.com/xml/ns/javaee mime-mapping@http://java.sun.com/xml/ns/javaee welcome-file-list@http://java.sun.com/xml/ns/javaee problem-page@http://java.sun.com/xml/ns/javaee jsp-config@http://java.sun.com/xml/ns/javaee security-constraint@http://java.sun.com/xml/ns/javaee login-config@http://java.sun.com/xml/ns/javaee security-role@http://java.sun.com/xml/ns/javaee env-entry@http://java.sun.com/xml/ns/javaee ejb-ref@http://java.sun.com/xml/ns/javaee ejb-local-ref@http://java.sun.com/xml/ns/javaee service-ref@http://java.sun.com/xml/ns/javaee resource-ref@http://java.sun.com/xml/ns/javaee resource-env-ref@http://java.sun.com/xml/ns/javaee message-destination-ref@http://java.sun.com/xml/ns/javaee persistence-context-ref@http://java.sun.com/xml/ns/javaee persistence-unit-ref@http://java.sun.com/xml/ns/javaee post-construct@http://java.sun.com/xml/ns/javaee pre-destroy@http://java.sun.com/xml/ns/javaee message-destination@http://java.sun.com/xml/ns/javaee locale-encoding-mapping-list@http://java.sun.com/xml/ns/javaee’ instead of ‘taglib@http://java.sun.com/xml/ns/javaee’ here in element web-app@http://java.sun.com/xml/ns/javaee:<null>
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:234)
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:221)
at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:146)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:292)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:260)
at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:774)
at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:395)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:745)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:754)
at weblogic.servlet.internal.WebAppDescriptor.getWebAppBean(WebAppDescriptor.java:140)
at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.java:852)
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:285)
at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:137)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:39)
at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:187)
at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:165)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
.>
<2009-7-22 下午04时04分40秒 CST> <Error> <HTTP> <BEA-101064> <[WebAppModule(:web)] Error parsing descriptor in Web appplication “\..\..\web\src\context”
weblogic.application.ModuleException: VALIDATION PROBLEMS WERE FOUND
problem: cvc-complex-type.2.4a: Expected elements ‘description@http://java.sun.com/xml/ns/javaee display-name@http://java.sun.com/xml/ns/javaee icon@http://java.sun.com/xml/ns/javaee distributable@http://java.sun.com/xml/ns/javaee context-param@http://java.sun.com/xml/ns/javaee filter@http://java.sun.com/xml/ns/javaee filter-mapping@http://java.sun.com/xml/ns/javaee listener@http://java.sun.com/xml/ns/javaee servlet@http://java.sun.com/xml/ns/javaee servlet-mapping@http://java.sun.com/xml/ns/javaee session-config@http://java.sun.com/xml/ns/javaee mime-mapping@http://java.sun.com/xml/ns/javaee welcome-file-list@http://java.sun.com/xml/ns/javaee problem-page@http://java.sun.com/xml/ns/javaee jsp-config@http://java.sun.com/xml/ns/javaee security-constraint@http://java.sun.com/xml/ns/javaee login-config@http://java.sun.com/xml/ns/javaee security-role@http://java.sun.com/xml/ns/javaee env-entry@http://java.sun.com/xml/ns/javaee ejb-ref@http://java.sun.com/xml/ns/javaee ejb-local-ref@http://java.sun.com/xml/ns/javaee service-ref@http://java.sun.com/xml/ns/javaee resource-ref@http://java.sun.com/xml/ns/javaee resource-env-ref@http://java.sun.com/xml/ns/javaee message-destination-ref@http://java.sun.com/xml/ns/javaee persistence-context-ref@http://java.sun.com/xml/ns/javaee persistence-unit-ref@http://java.sun.com/xml/ns/javaee post-construct@http://java.sun.com/xml/ns/javaee pre-destroy@http://java.sun.com/xml/ns/javaee message-destination@http://java.sun.com/xml/ns/javaee locale-encoding-mapping-list@http://java.sun.com/xml/ns/javaee’ instead of ‘taglib@http://java.sun.com/xml/ns/javaee’ here in element web-app@http://java.sun.com/xml/ns/javaee:<null>
at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.java:858)
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:285)
at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
Truncated. see log file for complete stacktrace
weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
problem: cvc-complex-type.2.4a: Expected elements ‘description@http://java.sun.com/xml/ns/javaee display-name@http://java.sun.com/xml/ns/javaee icon@http://java.sun.com/xml/ns/javaee distributable@http://java.sun.com/xml/ns/javaee context-param@http://java.sun.com/xml/ns/javaee filter@http://java.sun.com/xml/ns/javaee filter-mapping@http://java.sun.com/xml/ns/javaee listener@http://java.sun.com/xml/ns/javaee servlet@http://java.sun.com/xml/ns/javaee servlet-mapping@http://java.sun.com/xml/ns/javaee session-config@http://java.sun.com/xml/ns/javaee mime-mapping@http://java.sun.com/xml/ns/javaee welcome-file-list@http://java.sun.com/xml/ns/javaee problem-page@http://java.sun.com/xml/ns/javaee jsp-config@http://java.sun.com/xml/ns/javaee security-constraint@http://java.sun.com/xml/ns/javaee login-config@http://java.sun.com/xml/ns/javaee security-role@http://java.sun.com/xml/ns/javaee env-entry@http://java.sun.com/xml/ns/javaee ejb-ref@http://java.sun.com/xml/ns/javaee ejb-local-ref@http://java.sun.com/xml/ns/javaee service-ref@http://java.sun.com/xml/ns/javaee resource-ref@http://java.sun.com/xml/ns/javaee resource-env-ref@http://java.sun.com/xml/ns/javaee message-destination-ref@http://java.sun.com/xml/ns/javaee persistence-context-ref@http://java.sun.com/xml/ns/javaee persistence-unit-ref@http://java.sun.com/xml/ns/javaee post-construct@http://java.sun.com/xml/ns/javaee pre-destroy@http://java.sun.com/xml/ns/javaee message-destination@http://java.sun.com/xml/ns/javaee locale-encoding-mapping-list@http://java.sun.com/xml/ns/javaee’ instead of ‘taglib@http://java.sun.com/xml/ns/javaee’ here in element web-app@http://java.sun.com/xml/ns/javaee:<null>
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:234)
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:221)
at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:146)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:292)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:260)
Truncated. see log file for complete stacktrace
>
<2009-7-22 下午04时04分40秒 CST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application ” due to error weblogic.application.ModuleException: [HTTP:101064][WebAppModule(:web)] Error parsing descriptor in Web appplication “\..\..\web\src\context”
weblogic.application.ModuleException: VALIDATION PROBLEMS WERE FOUND
problem: cvc-complex-type.2.4a: Expected elements ‘description@http://java.sun.com/xml/ns/javaee display-name@http://java.sun.com/xml/ns/javaee icon@http://java.sun.com/xml/ns/javaee distributable@http://java.sun.com/xml/ns/javaee context-param@http://java.sun.com/xml/ns/javaee filter@http://java.sun.com/xml/ns/javaee filter-mapping@http://java.sun.com/xml/ns/javaee listener@http://java.sun.com/xml/ns/javaee servlet@http://java.sun.com/xml/ns/javaee servlet-mapping@http://java.sun.com/xml/ns/javaee session-config@http://java.sun.com/xml/ns/javaee mime-mapping@http://java.sun.com/xml/ns/javaee welcome-file-list@http://java.sun.com/xml/ns/javaee problem-page@http://java.sun.com/xml/ns/javaee jsp-config@http://java.sun.com/xml/ns/javaee security-constraint@http://java.sun.com/xml/ns/javaee login-config@http://java.sun.com/xml/ns/javaee security-role@http://java.sun.com/xml/ns/javaee env-entry@http://java.sun.com/xml/ns/javaee ejb-ref@http://java.sun.com/xml/ns/javaee ejb-local-ref@http://java.sun.com/xml/ns/javaee service-ref@http://java.sun.com/xml/ns/javaee resource-ref@http://java.sun.com/xml/ns/javaee resource-env-ref@http://java.sun.com/xml/ns/javaee message-destination-ref@http://java.sun.com/xml/ns/javaee persistence-context-ref@http://java.sun.com/xml/ns/javaee persistence-unit-ref@http://java.sun.com/xml/ns/javaee post-construct@http://java.sun.com/xml/ns/javaee pre-destroy@http://java.sun.com/xml/ns/javaee message-destination@http://java.sun.com/xml/ns/javaee locale-encoding-mapping-list@http://java.sun.com/xml/ns/javaee’ instead of ‘taglib@http://java.sun.com/xml/ns/javaee’ here in element web-app@http://java.sun.com/xml/ns/javaee:<null>
at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.java:858)
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:285)
at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:137)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:39)
at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:187)
at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:165)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Caused by: weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
problem: cvc-complex-type.2.4a: Expected elements ‘description@http://java.sun.com/xml/ns/javaee display-name@http://java.sun.com/xml/ns/javaee icon@http://java.sun.com/xml/ns/javaee distributable@http://java.sun.com/xml/ns/javaee context-param@http://java.sun.com/xml/ns/javaee filter@http://java.sun.com/xml/ns/javaee filter-mapping@http://java.sun.com/xml/ns/javaee listener@http://java.sun.com/xml/ns/javaee servlet@http://java.sun.com/xml/ns/javaee servlet-mapping@http://java.sun.com/xml/ns/javaee session-config@http://java.sun.com/xml/ns/javaee mime-mapping@http://java.sun.com/xml/ns/javaee welcome-file-list@http://java.sun.com/xml/ns/javaee problem-page@http://java.sun.com/xml/ns/javaee jsp-config@http://java.sun.com/xml/ns/javaee security-constraint@http://java.sun.com/xml/ns/javaee login-config@http://java.sun.com/xml/ns/javaee security-role@http://java.sun.com/xml/ns/javaee env-entry@http://java.sun.com/xml/ns/javaee ejb-ref@http://java.sun.com/xml/ns/javaee ejb-local-ref@http://java.sun.com/xml/ns/javaee service-ref@http://java.sun.com/xml/ns/javaee resource-ref@http://java.sun.com/xml/ns/javaee resource-env-ref@http://java.sun.com/xml/ns/javaee message-destination-ref@http://java.sun.com/xml/ns/javaee persistence-context-ref@http://java.sun.com/xml/ns/javaee persistence-unit-ref@http://java.sun.com/xml/ns/javaee post-construct@http://java.sun.com/xml/ns/javaee pre-destroy@http://java.sun.com/xml/ns/javaee message-destination@http://java.sun.com/xml/ns/javaee locale-encoding-mapping-list@http://java.sun.com/xml/ns/javaee’ instead of ‘taglib@http://java.sun.com/xml/ns/javaee’ here in element web-app@http://java.sun.com/xml/ns/javaee:<null>
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:234)
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:221)
at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:146)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:292)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:260)
at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:774)
at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:395)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:745)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:754)
at weblogic.servlet.internal.WebAppDescriptor.getWebAppBean(WebAppDescriptor.java:140)
at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.java:852)
… 24 more

weblogic.application.ModuleException: VALIDATION PROBLEMS WERE FOUND
problem: cvc-complex-type.2.4a: Expected elements ‘description@http://java.sun.com/xml/ns/javaee display-name@http://java.sun.com/xml/ns/javaee icon@http://java.sun.com/xml/ns/javaee distributable@http://java.sun.com/xml/ns/javaee context-param@http://java.sun.com/xml/ns/javaee filter@http://java.sun.com/xml/ns/javaee filter-mapping@http://java.sun.com/xml/ns/javaee listener@http://java.sun.com/xml/ns/javaee servlet@http://java.sun.com/xml/ns/javaee servlet-mapping@http://java.sun.com/xml/ns/javaee session-config@http://java.sun.com/xml/ns/javaee mime-mapping@http://java.sun.com/xml/ns/javaee welcome-file-list@http://java.sun.com/xml/ns/javaee problem-page@http://java.sun.com/xml/ns/javaee jsp-config@http://java.sun.com/xml/ns/javaee security-constraint@http://java.sun.com/xml/ns/javaee login-config@http://java.sun.com/xml/ns/javaee security-role@http://java.sun.com/xml/ns/javaee env-entry@http://java.sun.com/xml/ns/javaee ejb-ref@http://java.sun.com/xml/ns/javaee ejb-local-ref@http://java.sun.com/xml/ns/javaee service-ref@http://java.sun.com/xml/ns/javaee resource-ref@http://java.sun.com/xml/ns/javaee resource-env-ref@http://java.sun.com/xml/ns/javaee message-destination-ref@http://java.sun.com/xml/ns/javaee persistence-context-ref@http://java.sun.com/xml/ns/javaee persistence-unit-ref@http://java.sun.com/xml/ns/javaee post-construct@http://java.sun.com/xml/ns/javaee pre-destroy@http://java.sun.com/xml/ns/javaee message-destination@http://java.sun.com/xml/ns/javaee locale-encoding-mapping-list@http://java.sun.com/xml/ns/javaee’ instead of ‘taglib@http://java.sun.com/xml/ns/javaee’ here in element web-app@http://java.sun.com/xml/ns/javaee:<null>.
weblogic.application.ModuleException: [HTTP:101064][WebAppModule(:web)] Error parsing descriptor in Web appplication “\..\..\web\src\context”
weblogic.application.ModuleException: VALIDATION PROBLEMS WERE FOUND
problem: cvc-complex-type.2.4a: Expected elements ‘description@http://java.sun.com/xml/ns/javaee display-name@http://java.sun.com/xml/ns/javaee icon@http://java.sun.com/xml/ns/javaee distributable@http://java.sun.com/xml/ns/javaee context-param@http://java.sun.com/xml/ns/javaee filter@http://java.sun.com/xml/ns/javaee filter-mapping@http://java.sun.com/xml/ns/javaee listener@http://java.sun.com/xml/ns/javaee servlet@http://java.sun.com/xml/ns/javaee servlet-mapping@http://java.sun.com/xml/ns/javaee session-config@http://java.sun.com/xml/ns/javaee mime-mapping@http://java.sun.com/xml/ns/javaee welcome-file-list@http://java.sun.com/xml/ns/javaee problem-page@http://java.sun.com/xml/ns/javaee jsp-config@http://java.sun.com/xml/ns/javaee security-constraint@http://java.sun.com/xml/ns/javaee login-config@http://java.sun.com/xml/ns/javaee security-role@http://java.sun.com/xml/ns/javaee env-entry@http://java.sun.com/xml/ns/javaee ejb-ref@http://java.sun.com/xml/ns/javaee ejb-local-ref@http://java.sun.com/xml/ns/javaee service-ref@http://java.sun.com/xml/ns/javaee resource-ref@http://java.sun.com/xml/ns/javaee resource-env-ref@http://java.sun.com/xml/ns/javaee message-destination-ref@http://java.sun.com/xml/ns/javaee persistence-context-ref@http://java.sun.com/xml/ns/javaee persistence-unit-ref@http://java.sun.com/xml/ns/javaee post-construct@http://java.sun.com/xml/ns/javaee pre-destroy@http://java.sun.com/xml/ns/javaee message-destination@http://java.sun.com/xml/ns/javaee locale-encoding-mapping-list@http://java.sun.com/xml/ns/javaee’ instead of ‘taglib@http://java.sun.com/xml/ns/javaee’ here in element web-app@http://java.sun.com/xml/ns/javaee:<null>
at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.java:858)
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:285)
at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:137)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:39)
at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:187)
at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:165)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Caused by: weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
problem: cvc-complex-type.2.4a: Expected elements ‘description@http://java.sun.com/xml/ns/javaee display-name@http://java.sun.com/xml/ns/javaee icon@http://java.sun.com/xml/ns/javaee distributable@http://java.sun.com/xml/ns/javaee context-param@http://java.sun.com/xml/ns/javaee filter@http://java.sun.com/xml/ns/javaee filter-mapping@http://java.sun.com/xml/ns/javaee listener@http://java.sun.com/xml/ns/javaee servlet@http://java.sun.com/xml/ns/javaee servlet-mapping@http://java.sun.com/xml/ns/javaee session-config@http://java.sun.com/xml/ns/javaee mime-mapping@http://java.sun.com/xml/ns/javaee welcome-file-list@http://java.sun.com/xml/ns/javaee problem-page@http://java.sun.com/xml/ns/javaee jsp-config@http://java.sun.com/xml/ns/javaee security-constraint@http://java.sun.com/xml/ns/javaee login-config@http://java.sun.com/xml/ns/javaee security-role@http://java.sun.com/xml/ns/javaee env-entry@http://java.sun.com/xml/ns/javaee ejb-ref@http://java.sun.com/xml/ns/javaee ejb-local-ref@http://java.sun.com/xml/ns/javaee service-ref@http://java.sun.com/xml/ns/javaee resource-ref@http://java.sun.com/xml/ns/javaee resource-env-ref@http://java.sun.com/xml/ns/javaee message-destination-ref@http://java.sun.com/xml/ns/javaee persistence-context-ref@http://java.sun.com/xml/ns/javaee persistence-unit-ref@http://java.sun.com/xml/ns/javaee post-construct@http://java.sun.com/xml/ns/javaee pre-destroy@http://java.sun.com/xml/ns/javaee message-destination@http://java.sun.com/xml/ns/javaee locale-encoding-mapping-list@http://java.sun.com/xml/ns/javaee’ instead of ‘taglib@http://java.sun.com/xml/ns/javaee’ here in element web-app@http://java.sun.com/xml/ns/javaee:<null>
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:234)
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:221)
at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:146)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:292)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:260)
at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:774)
at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:395)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:745)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:754)
at weblogic.servlet.internal.WebAppDescriptor.getWebAppBean(WebAppDescriptor.java:140)
at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.java:852)
… 24 more

weblogic.application.ModuleException: VALIDATION PROBLEMS WERE FOUND
problem: cvc-complex-type.2.4a: Expected elements ‘description@http://java.sun.com/xml/ns/javaee display-name@http://java.sun.com/xml/ns/javaee icon@http://java.sun.com/xml/ns/javaee distributable@http://java.sun.com/xml/ns/javaee context-param@http://java.sun.com/xml/ns/javaee filter@http://java.sun.com/xml/ns/javaee filter-mapping@http://java.sun.com/xml/ns/javaee listener@http://java.sun.com/xml/ns/javaee servlet@http://java.sun.com/xml/ns/javaee servlet-mapping@http://java.sun.com/xml/ns/javaee session-config@http://java.sun.com/xml/ns/javaee mime-mapping@http://java.sun.com/xml/ns/javaee welcome-file-list@http://java.sun.com/xml/ns/javaee problem-page@http://java.sun.com/xml/ns/javaee jsp-config@http://java.sun.com/xml/ns/javaee security-constraint@http://java.sun.com/xml/ns/javaee login-config@http://java.sun.com/xml/ns/javaee security-role@http://java.sun.com/xml/ns/javaee env-entry@http://java.sun.com/xml/ns/javaee ejb-ref@http://java.sun.com/xml/ns/javaee ejb-local-ref@http://java.sun.com/xml/ns/javaee service-ref@http://java.sun.com/xml/ns/javaee resource-ref@http://java.sun.com/xml/ns/javaee resource-env-ref@http://java.sun.com/xml/ns/javaee message-destination-ref@http://java.sun.com/xml/ns/javaee persistence-context-ref@http://java.sun.com/xml/ns/javaee persistence-unit-ref@http://java.sun.com/xml/ns/javaee post-construct@http://java.sun.com/xml/ns/javaee pre-destroy@http://java.sun.com/xml/ns/javaee message-destination@http://java.sun.com/xml/ns/javaee locale-encoding-mapping-list@http://java.sun.com/xml/ns/javaee’ instead of ‘taglib@http://java.sun.com/xml/ns/javaee’ here in element web-app@http://java.sun.com/xml/ns/javaee:<null>
at weblogic.servlet.internal.WebAppModule.createModuleException(WebAppModule.java:1073)
at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.java:883)
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:285)
at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
Truncated. see log file for complete stacktrace
weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
problem: cvc-complex-type.2.4a: Expected elements ‘description@http://java.sun.com/xml/ns/javaee display-name@http://java.sun.com/xml/ns/javaee icon@http://java.sun.com/xml/ns/javaee distributable@http://java.sun.com/xml/ns/javaee context-param@http://java.sun.com/xml/ns/javaee filter@http://java.sun.com/xml/ns/javaee filter-mapping@http://java.sun.com/xml/ns/javaee listener@http://java.sun.com/xml/ns/javaee servlet@http://java.sun.com/xml/ns/javaee servlet-mapping@http://java.sun.com/xml/ns/javaee session-config@http://java.sun.com/xml/ns/javaee mime-mapping@http://java.sun.com/xml/ns/javaee welcome-file-list@http://java.sun.com/xml/ns/javaee problem-page@http://java.sun.com/xml/ns/javaee jsp-config@http://java.sun.com/xml/ns/javaee security-constraint@http://java.sun.com/xml/ns/javaee login-config@http://java.sun.com/xml/ns/javaee security-role@http://java.sun.com/xml/ns/javaee env-entry@http://java.sun.com/xml/ns/javaee ejb-ref@http://java.sun.com/xml/ns/javaee ejb-local-ref@http://java.sun.com/xml/ns/javaee service-ref@http://java.sun.com/xml/ns/javaee resource-ref@http://java.sun.com/xml/ns/javaee resource-env-ref@http://java.sun.com/xml/ns/javaee message-destination-ref@http://java.sun.com/xml/ns/javaee persistence-context-ref@http://java.sun.com/xml/ns/javaee persistence-unit-ref@http://java.sun.com/xml/ns/javaee post-construct@http://java.sun.com/xml/ns/javaee pre-destroy@http://java.sun.com/xml/ns/javaee message-destination@http://java.sun.com/xml/ns/javaee locale-encoding-mapping-list@http://java.sun.com/xml/ns/javaee’ instead of ‘taglib@http://java.sun.com/xml/ns/javaee’ here in element web-app@http://java.sun.com/xml/ns/javaee:<null>
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:234)
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:221)
at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:146)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:292)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:260)
Truncated. see log file for complete stacktrace
>
<2009-7-22 下午04时04分40秒 CST> <Notice> <Log Management> <BEA-170027> <The server initialized the domain log broadcaster successfully. Log messages will now be broadcasted to the domain log.>
<2009-7-22 下午04时04分40秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
<2009-7-22 下午04时04分40秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
<2009-7-22 下午04时04分40秒 CST> <Notice> <Server> <BEA-002613> <Channel “Default” is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.>
<2009-7-22 下午04时04分40秒 CST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server “myserver” for domain “mydomain” running in Development Mode>
<2009-7-22 下午04时04分40秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
<2009-7-22 下午04时04分40秒 CST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>

javaee and weblogic22 七 2009 02:32 下午

<2009-7-22 下午12时42分30秒 CST> <Warning> <EJB> <BEA-010096>
<The Message-Driven EJB: XXXMDB is unable to connect to the JMS destination: jms/XXXJMSQueue.
Connection failed after 2 attempts. The MDB will attempt to reconnect
every 1 seconds. This log message will repeat every 600 seconds until the condit
ion clears.>
<2009-7-22 下午12时42分30秒 CST>
<Warning> <EJB> <BEA-010061> <The Message-Driven EJB: XXXMDB is unable to connect to the JMS destination: jms/XXXJMSQueue. The Error was:
[EJB:011009]Unable to create a JNDI InitialContext to lookup the JMS destination.
javax.naming.CommunicationException [Root exception is weblogic.socket.UnrecoverableConnectException: [Login failed for an unknown reason:]]
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(Ljava.lang.Throwable;)Ljavax.naming.NamingException;(ExceptionTranslator.java:47)
at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(Ljava.lang.Throwable;)Ljavax.naming.NamingException;(WLInitialContextFactoryDelegate.java:618)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Lweblogic.jndi.Environment;Ljava.lang.String;)Ljavax.naming.Context;(WLInitialContextFactoryDelegate.java:306)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Ljava.util.Hashtable;)Ljavax.naming.Context;(WLInitialContextFactoryDelegate.java:239)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(Ljava.util.Hashtable;)Ljavax.naming.Context;(WLInitialContextFactory.java:135)
at javax.naming.spi.NamingManager.getInitialContext(Ljava.util.Hashtable;)Ljavax.naming.Context;(Optimized Method)
at javax.naming.InitialContext.getDefaultInitCtx()Ljavax.naming.Context;(Optimized Method)
at javax.naming.InitialContext.init(Ljava.util.Hashtable;)V(Optimized Method)
at javax.naming.InitialContext.<init>(Ljava.util.Hashtable;)V(InitialContext.java:124)
at weblogic.ejb20.deployer.MessageDrivenBeanInfoImpl.getInitialContext()Ljavax.naming.Context;(Optimized Method)
at weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection()V(Optimized Method)
at weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS()V(JMSConnectionPoller.java:1180)
at weblogic.ejb20.internal.JMSConnectionPoller.trigger(Lweblogic.time.common.Schedulable;)V(Optimized Method)
at weblogic.time.common.internal.ScheduledTrigger.run()Ljava.lang.Object;(Optimized Method)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(Optimized Method)
at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(Optimized Method)
at weblogic.time.common.internal.ScheduledTrigger.executeLocally()V(Optimized Method)
at weblogic.time.common.internal.ScheduledTrigger.execute(Lweblogic.kernel.ExecuteThread;)V(Optimized Method)
at weblogic.time.server.ScheduledTrigger.execute(Lweblogic.kernel.ExecuteThread;)V(Optimized Method)
at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(Optimized Method)
at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
Caused by: weblogic.socket.UnrecoverableConnectException: [Login failed for an unknown reason:]
at weblogic.socket.Login.checkLoginSuccess(Ljava.lang.String;)Ljava.lang.String;(Login.java:126)
at weblogic.rjvm.t3.T3JVMConnection.connect(Ljava.net.InetAddress;I)V(T3JVMConnection.java:459)
at weblogic.rjvm.t3.T3JVMConnection.createConnection(Ljava.net.InetAddress;ILweblogic.protocol.configuration.NetworkChannel;)Lweblogic.rjvm.MsgAbbrevJVMConnection;(T3JVMConnection.java:483)
at weblogic.rjvm.ConnectionManager.createConnection(Lweblogic.protocol.Protocol;Ljava.net.InetAddress;ILweblogic.protocol.configuration.NetworkChannel;)Lweblogic.rjvm.MsgAbbrevJVMConnection;(ConnectionManager.java:1766)
at weblogic.rjvm.ConnectionManager.findOrCreateConnection(Lweblogic.protocol.Protocol;Lweblogic.rjvm.JVMID;)Lweblogic.rjvm.MsgAbbrevJVMConnection;(ConnectionManager.java:1293)
at weblogic.rjvm.ConnectionManager.bootstrap(Lweblogic.rjvm.JVMID;Lweblogic.protocol.Protocol;)V(ConnectionManager.java:430)
at weblogic.rjvm.ConnectionManager.bootstrap(Ljava.net.InetAddress;ILweblogic.protocol.Protocol;)Lweblogic.rjvm.RJVMImpl;(ConnectionManager.java:312)
at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(Ljava.net.InetAddress;ILjava.lang.String;)Lweblogic.rjvm.RJVM;(RJVMManager.java:223)
at weblogic.rjvm.RJVMManager.findOrCreate(Ljava.net.InetAddress;ILjava.lang.String;)Lweblogic.rjvm.RJVM;(RJVMManager.java:181)
at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(Ljava.net.InetAddress;I)Lweblogic.rjvm.RJVM;(RJVMFinder.java:222)
at weblogic.rjvm.RJVMFinder.findOrCreate(Z)Lweblogic.rjvm.RJVM;(RJVMFinder.java:188)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(Z)Lweblogic.rjvm.RJVM;(ServerURL.java:125)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Lweblogic.jndi.Environment;Ljava.lang.String;)Ljavax.naming.Context;(WLInitialContextFactoryDelegate.java:296)
… 19 more
>

此错误表示你的消息驱动bean绑定的JMS Queue的server的地址MDB无法连接到,检查你的weblogic-ejb-jar.xml

<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE weblogic-ejb-jar PUBLIC “-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN” “http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd”>

<weblogic-ejb-jar>
<description>Test</description>
<weblogic-enterprise-bean>
<ejb-name>XXXMDB</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>1</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>jms/XXXJMSQueue</destination-jndi-name>
<initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
<provider-url>t3://localhost:80</provider-url>
<!– 如果JMS和EJB容器不在一台机器上指定该JMS provider-url 并且两个weblogic的domain名、server名不同–>
<connection-factory-jndi-name>jms/XXXJMSFactory</connection-factory-jndi-name>
<jms-polling-interval-seconds>1</jms-polling-interval-seconds>
</message-driven-descriptor>
</weblogic-enterprise-bean>

</weblogic-ejb-jar>

javaee and weblogic and websphere16 七 2009 10:54 下午

Was6.1访问weblogic8.1.3ejb

Delegation Mode: PARENT_FIRST
[1] com.ibm.ws.classloader.JarClassLoader@2073328532 Local Classpath:  Delegation mode: PARENT_FIRST
[2] com.ibm.ws.classloader.ProtectionClassLoader@6f326f32
[3] com.ibm.ws.bootstrap.ExtClassLoader@19ee19ee
[4] org.eclipse.osgi.framework.adaptor.core.CDSBundleClassLoader@7a8c7a8c
[5] sun.misc.Launcher$AppClassLoader@3e163e16
[6] sun.misc.Launcher$ExtClassLoader@5fc45fc4
—Original exception—
java.lang.NoClassDefFoundError: com.sun.corba.se.connection.ORBSocketFactory
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:222)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148)
at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:526)
at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:477)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:373)
at java.lang.ClassLoader.loadClass(ClassLoader.java:561)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:131)
at weblogic.corba.j2ee.naming.ORBHelper.<clinit>(ORBHelper.java:112)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:144)
at weblogic.corba.client.ClientORBInitializer.initialize(ClientORBInitializer.java:84)
at weblogic.jndi.WLInitialContextFactory.<init>(WLInitialContextFactory.java:29)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1263)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:666)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:259)
at javax.naming.InitialContext.init(InitialContext.java:235)
at javax.naming.InitialContext.<init>(InitialContext.java:209)

将wlclient-8.1.3.0.jar、rt-Sun_JDK_1.4.2.jar加入你的classpath中

Caused by: java.lang.NoClassDefFoundError: Error while defining class: weblogic.corba.client.cluster.ORBSocketFactory
This error indicates that the class: com.sun.corba.se.connection.ORBSocketFactory
could not be located while defining the class: weblogic.corba.client.cluster.ORBSocketFactory
This is often caused by having the class at a higher point in the classloader hierarchy
Dumping the current context classloader hierarchy:
==> indicates defining classloader
*** indicates classloader where the missing class could have been found
==>[0]
com.ibm.ws.classloader.CompoundClassLoader@72107210

javaee and weblogic07 七 2009 10:50 下午

A JDBC pool connection leak was detected. A connection leak occurs when a connection obtained from the pool was not closed explicitly by calling close() and then was disposed by the garbage collector and returned to the connection pool. The following stack trace at create shows where the leaked connection was created. [Null exception passed, creating stack trace for offending caller

JDK1.4,Weblogic8.1.3,hibernate3.x,spring1.2.x
hibernate3.x跟spring1.2.x有不兼容的地方,更换版本吧
解决办法:更换spring版本为2.0.8!

javaee and weblogic06 七 2009 09:46 上午

环境jdk1.4 weblogic8.1.3 axis1.x
错误信息如下
org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
Caused by: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.endEntity(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.skipChar(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
… 10 more
此错误由于请求返回的xml有特殊的字符导致,可使用tcpmon进行发送和应答的xml内容

javaee and weblogic05 七 2009 06:29 下午

weblogic8.13配置JMS的步骤

1)进入consle控制台
2)mydomain->服务->JMS->连接工厂->配置新的JMS Connection Factory :指定JNDI名称 jms/SendJMSFactory,客户端ID,指定目标和部署myserver
暂时不指定客户端ID,因为MessageDrivenBean跟消息发送端都用到这个JMSConnectionFactory会抛出weblogic.jms.common.InvalidClientIDException
3)mydomain->服务->JMS->存储->配置新的JMS File Store :指定目录
4)mydomain->服务->服务器->配置新的JMS Server :选择第3步配置好的持久性存储 ,指定目标和部署myserver
5)给配置好的MyJMS Server->目标->配置新的 JMS Queue 指定 JNDI jms/SendJMSQueue

消息发送端
服务器URL: t3://localhost:7001
连接工厂: jms/SendJMSFactory
队列: jms/SendJMSQueue

可以点击mydomain->服务器->myserver->常规->查看JNDI树 查看时否已经有了两个jms的JNDI,有则表示部署成功了

每一个消息驱动EJB监听一个关联的JMS目的地。如果
这个JMS目的地被部署在另外一个Weblogic服务器实例
或者是外部的JMS提供者,这样得不到JMS目的地,这种情况下
EJB容器自动试探去连接JMS服务器,如果JMS重新启动,消息驱动Bean
就又可以接受消息了

jms-polling-interval-seconds 定义扫描监听JMS的间隔时间,默认10秒

6)使用Spring开发JMS消息发送端

JMSSender.java

package.com.corp.service;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Session;
import javax.jms.TextMessage;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;

/**
* @author Administrator
*/
public class JMSSender {

private static Log log = LogFactory.getLog(JMSSender.class);

private JmsTemplate jmsTemplate;

/**
* @return Returns the jmsTemplate.
*/
public JmsTemplate getJmsTemplate() {
return jmsTemplate;
}

/**
* @param jmsTemplate
*            The jmsTemplate to set.
*/
public void setJmsTemplate(JmsTemplate jmsTemplate) {
this.jmsTemplate = jmsTemplate;
}

public void sendMessage(final String s) {
jmsTemplate.send(new MessageCreator() {
public Message createMessage(Session session) throws JMSException {

log.debug(“Creating the message from loan parameters.”);
TextMessage textMessage = session.createTextMessage(s);

return textMessage;
}
});
}
}

applicationContext.xml

<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE beans PUBLIC “-//SPRING//DTD BEAN//EN” “http://www.springframework.org/dtd/spring-beans.dtd”>

<beans default-lazy-init=”true”>

<bean id=”jndiTemplate” class=”org.springframework.jndi.JndiTemplate”>
<property name=”environment”>
<props>
<prop key=”java.naming.factory.initial”>weblogic.jndi.WLInitialContextFactory</prop>
<prop key=”java.naming.provider.url”>t3://localhost:7001</prop>
</props>
</property>
</bean>

<bean id=”jmsQueueConnectionFactory”
class=”org.springframework.jndi.JndiObjectFactoryBean”>
<property name=”jndiTemplate”>
<ref bean=”jndiTemplate”/>
</property>
<property name=”jndiName”>
<value>jms/SendJMSFactory</value>
</property>
</bean>

<bean id=”sendDestination”
class=”org.springframework.jndi.JndiObjectFactoryBean”>
<property name=”jndiTemplate”>
<ref bean=”jndiTemplate”/>
</property>
<property name=”jndiName”>
<value>jms/SendJMSQueue</value>
</property>
</bean>

<bean id=”jmsTemplate”
class=”org.springframework.jms.core.JmsTemplate102″>
<property name=”connectionFactory”>
<ref bean=”jmsQueueConnectionFactory”/>
</property>
<property name=”defaultDestination”>
<ref bean=”sendDestination”/>
</property>
<property name=”receiveTimeout”>
<value>30000</value>
</property>
</bean>

<bean id=”jmsSender” class=”com.corp.service.JMSSender”>
<property name=”jmsTemplate”>
<ref bean=”jmsTemplate”/>
</property>
</bean>
</beans>

index.jsp
调用JMSSender发送消息

<%@ page language=”java” contentType=”text/html; charset=ISO-8859-1″
pageEncoding=”ISO-8859-1″%>
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=ISO-8859-1″>
<title>Insert title here</title>
</head>
<body>

<%
org.springframework.beans.factory.BeanFactory beanFactory = (org.springframework.beans.factory.BeanFactory)
pageContext.getServletContext().
getAttribute(org.springframework.web.context.
WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);

com.corp.service.JMSSender jmsSender = (com.loanapp.service.JMSSender)beanFactory.getBean(“jmsSender”);

jmsSender.sendMessage(“Helloworld”);
%>
</body>
</html>

转载于http://www.ziki.cn/blog/archives/1182354149.html

javaee and weblogic04 七 2009 10:28 下午

1)建立线程

登录weblogic8控制台
mydomain->服务器->myserver
监视->常规->监视所有活动队列->点配置->点配置新的Execute Queue
名称                        MY_QUEUE
对列长度                    65536
队列长度阈值百分比    90
线程计数                     20
线程数增加                  1
最大线程数                  400
最小线程数                  5
线程优先级                  5

2)在应用模块中邦定线程为web模块应用配置进程分发策略
修改WEB-INF/weblogic.xml
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE weblogic-web-app PUBLIC “-//BEA Systems, Inc.//DTD Web Application 8.1//EN” “http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd”>
<weblogic-web-app>
<servlet-descriptor>
<servlet-name>tapestry</servlet-name>
<dispatch-policy>MY_QUEUE</dispatch-policy>
</servlet-descriptor>
</weblogic-web-app>
3)在应用模块中邦定线程为ejb模块应用配置进程分发策略
修改weblogic-ejb-jar.xml
<weblogic-enterprise-bean>
<ejb-name>EjbServiceBean</ejb-name>
<transaction-descriptor>
<trans-timeout-seconds>600</trans-timeout-seconds>
</transaction-descriptor>
<enable-call-by-reference>true</enable-call-by-reference>
<jndi-name>ejb/EjbServiceBean</jndi-name>
<dispatch-policy>MY_QUEUE</dispatch-policy>
</weblogic-enterprise-bean>
注意:如果ejb和web模块不在同一服务器,则需要同时在ejb和web服务器上建立各自的线程队列
参考 weblogic-ejb-jar.dtd

javaee and spring and weblogic21 六 2009 06:36 下午

第1步
开发基于POJI的POJO的业务实现,最基本的我们经常那么干的

第2步
使用Spring的xml解耦合这些POJO实现
产生applicationContext-datasource.xml 等

第3步
消息驱动Bean开发继承自org.springframework.ejb.support.AbstractMessageDrivenBean
给消息驱动Bean注入第二步的Beanfactory,在onMessage(Message message)中调用beanFactory中的
POJO实现业务处理,消息驱动Bean是Spring工厂的消费类。

第4步
部署消息驱动Bean,消息驱动Bean是JMS的消息处理Bean

第5步
书写特定容器的配置文件绑定JNDI

附开发实例文件如下

weblogic-ejb-jar.xml
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE weblogic-ejb-jar PUBLIC “-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN” “http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd”>
<weblogic-ejb-jar>
<description>Test</description>
<weblogic-enterprise-bean>
<ejb-name>MyMessageDrivenBean</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>8</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>jms/DestMyMessageQueue</destination-jndi-name>
<initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
<provider-url>t3://localhost:7001</provider-url>
<!– 如果JMS和EJB容器不在一台机器上指定该JMS provider-url–>
<connection-factory-jndi-name>jms/MyMessageDrivenBean</connection-factory-jndi-name>
<jms-polling-interval-seconds>10</jms-polling-interval-seconds>
<!–jms-client-id>myMessageDrivenBean</jms-client-id–>
</message-driven-descriptor>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>

META-INF/ejb-jar.xml
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE ejb-jar PUBLIC “-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN” “http://java.sun.com/dtd/ejb-jar_2_0.dtd”>
<ejb-jar id=”ejb-jar_1″>
<description>ejb</description>
<display-name>ejb</display-name>
<enterprise-beans>
<message-driven id=”MessageDriven_1″>
<description>MyMessageDrivenBean</description>
<display-name>Name for MyMessageDrivenBean</display-name>
<ejb-name>MyMessageDrivenBean</ejb-name>
<ejb-class>service.MyMessageDrivenBean</ejb-class>
<transaction-type>Bean</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
</message-driven>
</enterprise-beans>
<assembly-descriptor id=”AssemblyDescriptor_1″>
</assembly-descriptor>
</ejb-jar>

消息驱动Bean加载所需要的POJObeanFactory的Bean资源
beanRefContext.xml

<bean id=”businessBeanFactory”
>
<constructor-arg>
<list>
<value>applicationContext-datasource.xml</value>
<value>applicationContext.xml</value>
<value>applicationContext-service.xml</value>
</list>
</constructor-arg>
</bean>

消息驱动Bean
MyMessageDrivenBean.java

package service;

import javax.ejb.MessageDrivenBean;
import javax.ejb.MessageDrivenContext;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.ObjectMessage;
import javax.jms.TextMessage;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.access.ContextSingletonBeanFactoryLocator;
import org.springframework.ejb.support.AbstractMessageDrivenBean;

public class MyMessageDrivenBean extends AbstractMessageDrivenBean implements
MessageDrivenBean, MessageListener {

private static final long serialVersionUID = 7819604050800044554L;

private static Log log = LogFactory.getLog(MyMessageDrivenBean.class); // log

/**
* for spring inject this property
*/
private MessageHandelService messageHandelService;

public MessageHandelService getMessageHandelService() {
return messageHandelService;
}

public void setMessageHandelService(
MessageHandelService messageHandelService) {
this.messageHandelService = messageHandelService;
}

protected void onEjbCreate() {
this.setMessageHandelService((MessageHandelService) getBeanFactory()
.getBean(“messageHandelService”));
/**
* 从spring 工厂bean中得到需要的业务实现,业务实现是基于POJI的POJO实现
* 本身消息驱动Bean只负责暴露接口JNDI来接受JMS的Queue并调用POJI的POJO实现处理业务逻辑
* 就是真正的业务逻辑是写在POJO中实现的 消息驱动Bean相对于Spring来说是Bean消费者
*/
}

public void onMessage(Message message) {

if (message instanceof ObjectMessage) { // 如果接受的消息是序列化后的对象,直接强制转换
ObjectMessage objMessage = (ObjectMessage) message;
MyDomain model = null;
try {
model = (MyDomain) objMessage.getObject();
} catch (JMSException e) {
e.printStackTrace();
}
}
// 业务处理调用接口
this.getMessageHandelService().doFoo();

if (message instanceof TextMessage) {

}

}

public void setMessageDrivenContext(
MessageDrivenContext messageDrivenContext) {
super.setMessageDrivenContext(messageDrivenContext);
setBeanFactoryLocator(ContextSingletonBeanFactoryLocator.getInstance());// 指定默认的beanRefContext.xml
setBeanFactoryLocatorKey(“businessBeanFactory”);
}

}

下一页 »