weblogic

How to specify JAXBContext implementation in weblogic 12.1.3

三世轮回 提交于 2019-12-03 17:23:47
I have created a MDB in java using JAXB to parse the xml content. This MDB is working from a long time now (about 3 years) on a 10.3.4 weblogic server. Now I've to migrate it on a weblogic 12.1.3 server, and for a reason I'm not knowing yet, the implemention choose by weblogic isn't the same as I want. But I can't figure out how to set it. Right now my code init code is this : private JAXBContext getJAXBContext() throws JAXBException { if (v1JaxbContext == null) { v1JaxbContext = JAXBContext.newInstance(MyClass.class); } System.out.println("jaxbContext : "+v1JaxbContext.getClass().getName());

oracle Array filled with null data in java

假如想象 提交于 2019-12-03 16:47:29
When I try to throw an Array of strings to oracle stored procedure as: String arrStr[] ={"val1","val2","val3"}; ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor("STR_ARRAY", connection ); oracle.sql.ARRAY oracleArray = new oracle.sql.ARRAY(descriptor, connection, arrStr); oracleArray holds null data , oracleArray.datumArray = {???,???,???} In my case (see my comment above), it was caused by encoding problem, however - without any exception or debug information. Including orai18n.jar to the project libraries solved this... it is really sad, there is no exception or something that

WebLogic11g-创建域(Domain)及基本配置

给你一囗甜甜゛ 提交于 2019-12-03 15:25:59
最近看到经常有人提问weblogic相关问题,所以闲暇之际写几篇博文(基于weblogic11),仅供大家参考。 具体weblogic的介绍以及安装,这里就不赘述了。 以域的创建开篇,虽然简单,但是细节很多。步骤如下: 1、创建域(Domain)的方式: Domain简单定义为:是一个逻辑管理单元,Domain下面包含着weblogic应用服务器中的所有东西,weblogic应用服务器的启动,停止都是以domain为单位进行管理的 windows下面可以直接在开始菜单安装程序中创建domain,如图所示: linux下面可以直接进入weblogic安装目录中创建domain,具体位置: weblogic11/ wlserver_10.3/common/bin/config.sh 当然config.cmd即是windows的创建domain的方式了。 2、创建domain: 上图所示,默认选中“创建新的Weblogic域”,点击“下一步” “扩展现有的Weblogic域”是指对已经存在的域进行额外配置 3、选择域源: 上图所示,默认选中“Basic Weblogic Server Domain……”,即创建基本的域。点击“下一步” 其它几种domain类型是针对特定应用的,如sip、webservice。 4、指定域名和位置: 上图所示,输入域的名称“example”,域的位置默认是

Weblogic: Call DB2 stored procedure without schema name (property currentSchema)

人盡茶涼 提交于 2019-12-03 14:56:06
I have a Java application that runs on Weblogic. The application needs to access a stored procedure in a DB2 data base, therefore a JDBC data source is configured and accessed by its JNDI name. Data source: ClassDriver: com.ibm.db2.jcc.DB2Driver Properties: user=MYUSER DatabaseName=MYDB The following example works as expected. Context env = null; DataSource pool = null; Hashtable ht = new Hashtable(); ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"); ht.put(Context.PROVIDER_URL,"t3://myserver:7777"); env = new InitialContext(ht); pool = (DataSource) env.lookup(

Weblogic increase memory

浪尽此生 提交于 2019-12-03 13:34:58
How do I increase the memory used by my Weblogic (Java). While starting the server from eclipse it shows a message that JAVA Memory arguments: -Xms256m -Xmx512m -XX:MaxPermSize=256m . I couldn't understand from where is it taking that value from. After sometime the Weblogic server fails because of low permgen space. I added startup arguments from console but that doesn't have any effect. Can you help me from where is it taking the memory values from? When you configure a "Server" in Eclipse for WebLogic, you select a domain directory (for local). That domain directory contains the startup

NameNotFoundException when calling a EJB in Weblogic 10.3

风格不统一 提交于 2019-12-03 13:08:32
问题 I have a EJB defined as this: package com.foo; @Stateless (mappedName="HelloWorld") public class HelloWorldBean implements HelloWorld, HelloWorldLocal .... When it's deployed to Weblogic (WL), it gets the name myBean. I'm not sure if this is important. I try to call the bean with this code: Hashtable ht = new Hashtable(); ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory"); ht.put(Context.PROVIDER_URL, "t3://localhost:7001"); ic = new InitialContext(ht); tp =

ClassNotFoundException (HqlToken) when running in WebLogic

不想你离开。 提交于 2019-12-03 13:04:02
I have a .war file for an application that normally runs fine in Jetty. I'm trying to port the application to run in WebLogic, but at startup I'm getting these exceptions: ERROR:Foo - Error in named query: findBar org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from Bar] at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:80) at antlr.CharScanner.setTokenObjectClass(CharScanner.java:340) at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:54) at antlr.CharScanner.<init>(CharScanner.java:51) at antlr.CharScanner.<init>(CharScanner.java:60)

Best way to set environmental variables in WebLogic startup

房东的猫 提交于 2019-12-03 12:52:55
问题 In Oracle WebLogic, what is the best way to set an environmental variable so that it can be accessed by your code? We have third-party apps running WebLogic that look for an environment variable. Note: We start our managed servers using Node Manager. I would prefer to be able to set it somewhere in the domain configuration, like in the Server Start tab in the Admin Console, but there seems no good place to do that. The only way I can see to do it would be Edit the bin/setDomainEnv.sh to

When is it appropriate to use an EAR and when should your apps be in WARs?

前提是你 提交于 2019-12-03 10:18:01
We have many Spring web applications to make on a WebLogic server and are curious about when WARs should go in an EAR and when they should just exist as WARs. Occassionally, the WARs will need to access common logic JARs, but I don't see why these would need to go into an EAR when they could just be packaged into the WARs. From what I understand, if several WARs are in an EAR and you need to modify one of those WARs, you need to redeploy the entire EAR to update the server. This will cause all of the WARs to bounce. If they weren't in an EAR, however, I could just update the one WAR and it

Ignoring SSL validation in Java

与世无争的帅哥 提交于 2019-12-03 09:20:41
问题 I have to call an HTTP service hosted on web server with an invalid SSL certificate. In dev, I'm importing the certificate with keytool but the certificate will be different on each client install, so I can't just bundle it. Foreword: I DO know that skipping SSL validation is really ugly. In this specific case, I would not even need SSL and all other communications in the system are over simple HTTP. So I really don't care about MITM attacks or such. An attacker would not need to go as far as