varsha rao

+ Follow
since Mar 06, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by varsha rao


I have precisely done the same thing which you said. I also did some more research on this.

You need to convert it to XMLType.

Unforunately this didnt work on Oracle10g .

Has someone tried the same on 10g?

Hi ,

I have the following query

SELECT z.itr_sys_id,
(SELECT XMLElement("AMOUNT",XMLAgg(XMLElement("wmm_match_am", wmm_match_am)))
FROM wire_mti_match x
WHERE x.itr_sys_id = z.itr_sys_id
) AS Amount
FROM icms_transaction z

The result returned is as follows
156565 <AMOUNT><wmm_match_am>500</wmm_match_am><wmm_match_am>500</wmm_match_am><wmm_match_am>0</wmm_match_am></AMOUNT>

But when i do resultset.getString("Amount") , i get null
I am not able to read the result into an appropriate java object.

Could anyone help me with this please?

Hi all,

I found a solution for this. In Java5.0 the Character class provides methods which will return the code point for a given char[] array

codePointAt(char[] a, int index) ;

Using this method we can get the Unicode for a String in any Language which can be displayed on the browser

// here is the method for the same "value" is the String in hindi (or any other) Language

public static String getUnicode(String value)

StringBuffer testBuffer = new StringBuffer();
char[] test = value.toCharArray();

if(test != null)
int size1 = test.length;

for(int j = 0 ; j < size1;j++)
testBuffer.append(Character.codePointAt(test, j));


return testBuffer.toString();

This method will return you the correspoding unicode in dec which you can write to a properties file and use the samefor display

Reference :

12 years ago
I am able to read the hindi code from the excel sheet , but i need to convert the hindi characters to the corresponding unicode.

My prog should read hindi code from excel and write the corresponding unicode to a properties file.

Excel sheet data Properties file data

पुन:आरंभ करें read this and write --> \u0905\u0928\u0941\u0930\u094b\u0927\u002

There is a tool called unipad which provides the unicode for hindi words but do we have any api's in java to use any such tool?

Is there any way for achieving this ?
12 years ago
HI ,

I have a requirement where i have to read hindi text from an excel sheet and write it onto a file. The problem is in the hindi propeties file we need to have the unicode of the hindi word for it to get reflected on the screen and i am not able to do this. I am able to read the hindi text from excel but i dont know how to convert it to unicode. When i run mhy code in debug mode or try to print the hindi string , only a set of ??? are displayed.

Can anyone please help me with this.

I am not sure if this is the right forum for this question. Please let me know if i have posted it in the wrong place.

12 years ago
thanks a lot Marco . Just one more small help , do you have any code examples where JTA has been implemented. Do we need EJB's for JTA or can we implement it wihtout it.

13 years ago
Hi ,

Can anyone tell me if we have a rollback option for LDAP operations. my requirement is, whenever a i update a record in my oracle database, i need to migrate it to TDS as well. But if an exception occurs, the rollback should happen in both TDS as well as oracle .

My code outline is like this

Method a()
update in oracle

method b()
update in TDS

method c()

method a;
method b;


but if a NamingException occurs in method b , i have to roll back all the LDAP operations i performed there . Rolling back oracle operations is ok , but how do we roll back the LDAP operations.

Can someone help me with this.


13 years ago
HI all,

I am trying to write the following query in hibernate

select * from TABLE where txn_id in (select max(txn_id) from TABLE group by

the corresponding criteria i have written is as follows

Criteria searchFormatCodes = session.createCriteria(B2bFormatsummaryTxn.class);

searchFormatCodes.add(Expression.eq("userId", userId));

DetachedCriteria dc = DetachedCriteria.forClass(B2bFormatsummaryTxn.class);

searchFormatCodes.add(Subqueries.propertyIn("comp_id.txnId", dc));

but when i try to execute it i get the following error

Caused by: java.sql.SQLException: ORA-00913: too many values

How do i do the correct grouping using criteria's
Hi all,

I am new to Maven , i downloaded the zip file and followed the instructions given in th website, but when i run the command
mvn archetype:generate i get the following error. Any help or advice on this

C:\Documents and Settings\cm>mvn -e archetype:generate
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
this realm = plexus.core
urls[0] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-2.0.9-uber.jar
urls[1] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/archetype-common-2.0-alph
urls[2] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/archetype-common-2.0-alph
urls[3] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/archetype-common-2.0-alph
urls[4] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-ant-plugin-2.1.jar
urls[5] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-ant-plugin-2.1-java
urls[6] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-ant-plugin-2.1-sour
urls[7] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-archetype-creator-1
urls[8] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-archetype-creator-1
urls[9] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-archetype-creator-1
urls[10] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-archetype-plugin-2
urls[11] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-archetype-plugin-2
urls[12] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-archetype-plugin-2
urls[13] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-assembly-plugin-2.
urls[14] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-assembly-plugin-2.
urls[15] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-assembly-plugin-2.
urls[16] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-changelog-plugin-2
urls[17] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-changelog-plugin-2
urls[18] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-changelog-plugin-2
urls[19] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-changes-plugin-2.0
urls[20] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-changes-plugin-2.0
urls[21] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-changes-plugin-2.0
urls[22] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-checkstyle-plugin-
urls[23] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-checkstyle-plugin-
urls[24] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-checkstyle-plugin-
urls[25] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-clean-plugin-2.2.j
urls[26] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-clean-plugin-2.2-j
urls[27] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-clean-plugin-2.2-s
urls[28] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-compiler-plugin-2.
urls[29] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-compiler-plugin-2.
urls[30] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-dependency-plugin-
urls[31] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-dependency-plugin-
urls[32] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-dependency-plugin-
urls[33] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-deploy-plugin-2.3.
urls[34] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-deploy-plugin-2.3-
urls[35] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-deploy-plugin-2.3-
urls[36] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-eclipse-plugin-2.5
urls[37] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-eclipse-plugin-2.5
urls[38] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-eclipse-plugin-2.5
urls[39] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-install-plugin-2.2
urls[40] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-install-plugin-2.2
urls[41] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-install-plugin-2.2
urls[42] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-jar-plugin-2.2.jar

urls[43] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-jar-plugin-2.2-jav
urls[44] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-jar-plugin-2.2-sou
urls[45] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-javadoc-plugin-2.4
urls[46] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-javadoc-plugin-2.4
urls[47] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-javadoc-plugin-2.4
urls[48] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-scm-plugin-1.0.jar

urls[49] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-scm-plugin-1.0-jav
urls[50] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-scm-plugin-1.0-sou
urls[51] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-source-plugin-2.0.
urls[52] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-source-plugin-2.0-
urls[53] = file:/E:/VARSHA/Software/Maven/apache-maven-2.0.9/lib/maven-source-plugin-2.0-
Number of imports: 0
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:mave
n-archetype-plugin:2.0-alpha-3:generate': Unable to find the mojo 'org.apache.maven.plugi
ns:maven-archetype-plugin:2.0-alpha-3:generate' in the plugin 'org.apache.maven.plugins:m
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin mana
ger executing goal 'org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-3:generate'
: Unable to find the mojo 'org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-3:ge
nerate' in the plugin 'org.apache.maven.plugins:maven-archetype-plugin'
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecy
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(Defa
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecyc
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailur
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defaul
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleEx
at org.apache.maven.DefaultMaven.doExecute(
at org.apache.maven.DefaultMaven.execute(
at org.apache.maven.cli.MavenCli.main(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.j
at java.lang.reflect.Method.invoke(
at org.codehaus.classworlds.Launcher.launchEnhanced(
at org.codehaus.classworlds.Launcher.launch(
at org.codehaus.classworlds.Launcher.mainWithExitCode(
at org.codehaus.classworlds.Launcher.main(
Caused by: org.apache.maven.plugin.PluginManagerException: Unable to find the mojo 'org.a
pache.maven.plugins:maven-archetype-plugin:2.0-alpha-3:generate' in the plugin 'org.apach
at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginMa
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecy
... 16 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: U
nable to lookup component 'org.apache.maven.plugin.Mojoorg.apache.maven.plugins:maven-arc
hetype-plugin:2.0-alpha-3:generate', it could not be created
at org.codehaus.plexus.DefaultPlexusContainer.lookup(
at org.codehaus.plexus.DefaultPlexusContainer.lookup(
at org.codehaus.plexus.DefaultPlexusContainer.lookup(
at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginMa
... 18 more
Caused by: org.codehaus.plexus.component.factory.ComponentInstantiationException: Could n
ot instanciate component: role: 'null', implementation: 'org.apache.maven.archetype.mojos
at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(DefaultPlex
at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponent
at org.codehaus.plexus.component.manager.PerLookupComponentManager.getComponent(P
at org.codehaus.plexus.DefaultPlexusContainer.lookup(
... 21 more
Caused by: java.lang.NoClassDefFoundError: org/apache/maven/shared/invoker/MavenInvocatio
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(
at java.lang.Class.getConstructor0(
at java.lang.Class.newInstance0(
at java.lang.Class.newInstance(
... 25 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 40 seconds
[INFO] Finished at: Sun May 04 02:28:10 PDT 2008
[INFO] Final Memory: 19M/52M
[INFO] ------------------------------------------------------------------------
13 years ago
Thanks but i have another doubt. On what factors should i decide the value of the maxActive and initialSize parameters for my application . Could you suggest on this. Our application can have at a time a max of 200 users logged on to it.
Hi ,

We are using a multi threaded approach wherein we are tyring to get connection from the datasource.

But the problem is when all the 12 threads try to get the conncetion at the same time from the datasource, the code is getting hanged. No exception is thrown . How do we solve this?

Is getting connections from a datasource advisable for a multi threaded approach or is there any better alternative?

Please suggest
hi every body ,
we have created an application using struts and we need to create help files for all the modules in the application . Can you please tell me if there is any way to do this in java ,are there any specific api's for it.
Please help me out.
15 years ago
No i have only jdk1.5 installed on my system,i don have any other versions on java. Still this is happening , i don know why
15 years ago
Thanks for telling me the required links, i tried out the following prg, but im getting UnSupportedClassVersionError exception while running the prg. Please tell me why this exception is coming and how to rectify it.

following is the prg

import org.apache.poi.hssf.usermodel.*;

public class XLTrial
public static void main(String args[])throws IOException
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("new sheet");

// Create a row and put some cells in it. Rows are 0 based.
HSSFRow row = sheet.createRow((short)0);
// Create a cell and put a value in it.
HSSFCell cell = row.createCell((short)0);

// Write the output to a file
FileOutputStream fileOut = new FileOutputStream("workbook.xls");

When i run the prg this is the exception im getting

Exception in thread "main" java.lang.UnsupportedClassVersionError: XLTrial (Unsu
pported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at Source)
at Source)
at$100(Unknown Source)
at$ Source)
at Method)
at Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
15 years ago
i have to design a Gui with some menus, each menu has an associated query. When user clicks on a menu , the associated query gets executed and the results are to be written in a XL sheet. How do i do this, i have to use JSP for the GUI . Can some one please help me out with this.
Its really urgent.
15 years ago