JORAM/JoramMQblue arrow Accessing Unicode enabled Database from Joram startup
Author Messages

rohini

Member since
08.05.2013

1 post

point 08.05.2013 at 11:50:46

We are using Joram tool for messaging in our java application. Following is the Joram startup file, using which we take the database connection for starting up the joram server. Database which we are trying to access has following configuration . For crating Joram connection we are passing two parameters DBURL +DBPROP, DBUSER and DBPassword

jrap.DBDriver=com.informix.jdbc.IfxDriver
jrap.DBURL=jdbc:informix-sqli://10.215.79.46:53999/hkrdb:informixserver=olr_boke_test
jrap.DBUser=jrapusr
jrap.DBPassword=-c9aa8f5ac389b1a207a6df87216de44
jrap.DBName=hkrdb
jrap.DBProps=DBDATE:DMY4;db_locale=en_us.utf8;client_locale=en_us.utf8;server_locale=en_us.utf8

Following is the Joram startup java file in which connection parameters are passed

File Name : JoramStartup.sh

public Connection getConnection()

Connection conn = null;
// String dburl = getEnv("jrap.DBURL");
String dburl = getEnv("jrap.DBURL")+";"+getEnv("jrap.DBProps"); // SWARUP FOR LOCALE ISSUE
log.info("jrap.dbur1" + dburl);
//
String usr = getEnv("jrap.DBUser");
String pwd = null;

try
pwd = CriptoUtil.decode(getEnv("jrap.DBPassword"));
log.info("Password Encrypted Successfully");
catch (InvalidKeyException e)
// TODO Auto-generated catch block
e.printStackTrace();
catch (NoSuchPaddingException e)
// TODO Auto-generated catch block
e.printStackTrace();
catch (NoSuchAlgorithmException e)
// TODO Auto-generated catch block
e.printStackTrace();
catch (BadPaddingException e)
// TODO Auto-generated catch block
e.printStackTrace();
catch (IllegalBlockSizeException e)
// TODO Auto-generated catch block
e.printStackTrace();

try
Class.forName("com.informix.jdbc.IfxDriver");
conn = DriverManager.getConnection(dburl, usr, pwd);
catch (Exception e2)
e2.printStackTrace();
log.error("SQLException occured.");

return conn;

DBURL which is being passed through above program is :

jdbc:informix-sqli://10.215.79.46:53999/hkrdb:informixserver=olr_boke_test;DBDATE:DMY4;db_locale=en_us.utf8;client_locale=en_us.utf8;server_locale=en_us.utf8

This program internally calls DriverManager.class which is taking actual connection


In DriverManager.class follwing is the method for getConnection

public static Connection getConnection(String url,
String user, String password) throws SQLException
java.util.Properties info = new java.util.Properties();

// Gets the classloader of the code that called this method, may
// be null.
ClassLoader callerCL = DriverManager.getCallerClassLoader();

if (user != null)
info.put("user", user);

if (password != null)
info.put("password", password);

return (getConnection(url, info, callerCL));

----

Joram server is not getting started following is the error shown in logfile.

2013-08-02 11:57:47,222 INFO [JoramStartUp] Password Encrypted Successfully
2013-08-02 11:57:47,222 ERROR [STDERR] java.util.NoSuchElementException
2013-08-02 11:57:47,222 ERROR [STDERR] at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
2013-08-02 11:57:47,222 ERROR [STDERR] at java.util.StringTokenizer.nextToken(StringTokenizer.java:360)
2013-08-02 11:57:47,222 ERROR [STDERR] at com.informix.jdbc.IfxDriver.a(IfxDriver.java:903)
2013-08-02 11:57:47,222 ERROR [STDERR] at com.informix.jdbc.IfxDriver.connect(IfxDriver.java:234)
2013-08-02 11:57:47,222 ERROR [STDERR] at java.sql.DriverManager.getConnection(DriverManager.java:582)
2013-08-02 11:57:47,222 ERROR [STDERR] at java.sql.DriverManager.getConnection(DriverManager.java:185)
2013-08-02 11:57:47,222 ERROR [STDERR] at com.krcl.rap.common.util.JoramStartUp.getConnection(JoramStartUp.java:478)
2013-08-02 11:57:47,222 ERROR [STDERR] at com.krcl.rap.common.util.JoramStartUp.getRemoteServer(JoramStartUp.java:314)
2013-08-02 11:57:47,222 ERROR [STDERR] at com.krcl.rap.common.util.JoramStartUp.start(JoramStartUp.java:159)
2013-08-02 11:57:47,222 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-08-02 11:57:47,222 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2013-08-02 11:57:47,222 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2013-08-02 11:57:47,222 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
2013-08-02 11:57:47,222 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
2013-08-02 11:57:47,222 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
2013-08-02 11:57:47,222 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
2013-08-02 11:57:47,222 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
2013-08-02 11:57:47,222 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
2013-08-02 11:57:47,222 ERROR [STDERR] at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
2013-08-02 11:57:47,232 ERROR [STDERR] at $Proxy38.start(Unknown Source)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:297)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:823)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:460)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
2013-08-02 11:57:47,232 ERROR [STDERR] at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
2013-08-02 11:57:47,239 ERROR [STDERR] at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
2013-08-02 11:57:47,239 ERROR [STDERR] at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1440)
2013-08-02 11:57:47,239 ERROR [STDERR] at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1158)
2013-08-02 11:57:47,240 ERROR [STDERR] at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1179)
2013-08-02 11:57:47,240 ERROR [STDERR] at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1099)
2013-08-02 11:57:47,240 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
2013-08-02 11:57:47,240 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
2013-08-02 11:57:47,240 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
2013-08-02 11:57:47,240 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
2013-08-02 11:57:47,240 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
2013-08-02 11:57:47,240 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:823)
2013-08-02 11:57:47,240 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
2013-08-02 11:57:47,241 ERROR [STDERR] at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:782)
2013-08-02 11:57:47,241 ERROR [STDERR] at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
2013-08-02 11:57:47,241 ERROR [STDERR] at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
2013-08-02 11:57:47,241 ERROR [STDERR] at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
2013-08-02 11:57:47,241 ERROR [STDERR] at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
2013-08-02 11:57:47,241 ERROR [STDERR] at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)
2013-08-02 11:57:47,241 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
2013-08-02 11:57:47,241 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
2013-08-02 11:57:47,241 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
2013-08-02 11:57:47,242 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
2013-08-02 11:57:47,242 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
2013-08-02 11:57:47,242 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:775)
2013-08-02 11:57:47,242 ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
2013-08-02 11:57:47,242 ERROR [STDERR] at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
2013-08-02 11:57:47,242 ERROR [STDERR] at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
2013-08-02 11:57:47,242 ERROR [STDERR] at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
2013-08-02 11:57:47,242 ERROR [STDERR] at org.jboss.Main.boot(Main.java:221)
2013-08-02 11:57:47,242 ERROR [STDERR] at org.jboss.Main$1.run(Main.java:556)
2013-08-02 11:57:47,242 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
2013-08-02 11:57:47,242 ERROR [JoramStartUp] SQLException occured.
2013-08-02 11:57:47,242 ERROR [STDERR] java.lang.NullPointerException
2013-08-02 11:57:47,242 ERROR [STDERR] at com.krcl.rap.common.util.JoramStartUp.getRemoteServer(JoramStartUp.java:326)
2013-08-02 11:57:47,242 ERROR [STDERR] at com.krcl.rap.common.util.JoramStartUp.start(JoramStartUp.java:159)

serge

Member since
09.10.2012

4 posts

point 08.19.2013 at 19:42:29

Hi Rohini,

thank you for using or testing Joram.
Your problem looks like quite technical, and would probably be best answered on the joram@ow2.org mailing list where you will find more technical contributors.

On this forum we would gladly learn why and how you use Joram, so feel free to share !

reply
go back

forum reply


Forum registration required

Prior to participating in this forum, you must register. Thank you for entering the personal identifier supplied to you. If you are not already registered, you must register.

[login] [register] [password forgotten?]