Win a copy of High Performance Python for Data Analytics this week in the Python forum!

vinay kumar

Ranch Hand
+ Follow
since Sep 23, 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 vinay kumar

Yes. I am running the client (a web project ) and ejb (ejb project) on the same Glassfish server. I am using eclipse and configured the projects correctly. I am able to access the Session bean created on ejb project from the client project.

I couldn't figure it out still. please help.
Thanks Marcos for reply. But I still have get the following error

com.sun.enterprise.InjectionException: Exception attempting to inject Res-Ref-Env-Property: jdbc/vinayDB@javax.sql.DataSource@ resolved as: jndi: java:jdbc/vinayDB@res principal: null@mail: null

when I use

I created the JDBCResource with name "jdbc/vinayDB". I couldn't figure it out where Im going wrong.


I am using Glassfish 2.1 app server. I set up a JDBC Resource with the name 'jdbc/myDB'.

And I used @Resource annotation to inject the resource in my ejb (ejb3) as below:

I didn't mention anything in deployment descriptor as I am using ejb3 with annotations.

Now, when I access this ejb from the client, I am getting the following error:

"com.sun.enterprise.InjectionException: Exception attempting to inject Res-Ref-Env-Property: jdbc/myDB@javax.sql.DataSource@ resolved as: jndi: jdbc/myDB@res principal: null@mail: null
No Runtime properties
Database Vendor : null"

Can you please tell me where I am going wrong.

Glad to let you know that i have cleared IBM 142 with 77%. Not a great percentage.. but satisfied with the accomplishment.

This forum really helped me to go in right direction while preperation. Thanks to you all guys..

Assuming you need this using xslt, use keys as below:

Define a key
<xsl:key name="EventKey" match="/element/event" use="../component"/>

Now use the key to get the event nodes using component
key('EventKey','WhatEverThecomponent') returns all the event nodes

If you have any xml editor like stylus studio or XML SPY there is an option to generate Schema/DTD from xml document.

Ooh.. I had some text before xml declaration.

Thanks william.. It is working now..


I am transforming an xml using xsl in java. Getting 'ERROR: Content is not allowed in prolog.' Here is the code. xml and xsl are two string variables which read from corresponding xml and xsl files.

Please help.

Hi guyz,

I have taken sample test and got 50% off voucher for test142. Is anybody here to attend this exam in Nov!!? Looking for ppl to share any meterial..


here is the code.

(replace greaterthan symbol in if condition with ampersandGTsemicolon )

output of above code: country Short Name

[ October 02, 2006: Message edited by: vinay kumar ]
Store the translated node into an xml document and retrive it to copy into destination document (while translation) using document() function.

For eg. to copy your translated doc(stored in trans.xml) to an element 'A'
<xsl:copy-of select="document('c:/x/trans.xml')"/>
Or if your tobe copied node and other elements (into which you want to copy) exist in the same file (during same tranlation), put the tobe copied node in a variable and use <xsl:copy-of select="$var"/> where ever needed.

If it isn't make sense, please give your problem with code. I will try to answer..


Already translated node can be accessed by giving absolute xpath (start from root tag like /Root/Child) while translating other node. But remember that you can access data of the source tree but not the target tree while translation process.

<b> holds value '10' but not '100'.

In <xsl:template match="b">, if you want to know what the translated 'a' contains, you obviously need to check if
sachin scored a century or not.

[ September 28, 2006: Message edited by: vinay kumar ]
Sorry.. I have given b element declaration wrong (Excuse me please, I dont have validation tool here): Take this

There is no such xs:root construct in xsd. To make an element 'X' as root of the document, simply include all your elements in 'X' declaration.

In the above xsd document 'b' is made as root element.