vinay kumar

Ranch Hand
+ Follow
since Sep 23, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
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.

thanks
vinay
Hi,

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.

Thanks
Vinay
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..

vinay.
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

vinay
(vinay.l@tcs.com)
If you have any xml editor like stylus studio or XML SPY there is an option to generate Schema/DTD from xml document.

vinay.
Ooh.. I had some text before xml declaration.

Thanks william.. It is working now..

vinay.
Hi,

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.

thanks,
vinay
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..

mailto vinay.lakkam@axa-insurance.co.uk

cheers
vinay.
Tushar,
here is the code.



(replace greaterthan symbol in if condition with ampersandGTsemicolon )

output of above code: country Short Name

Cheers
vinay
[ 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'
<A>
<xsl:copy-of select="document('c:/x/trans.xml')"/>
</A>
.....
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..

vinay.
Scott,

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.

Cheers,
vinay.
[ 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.

Thanks
vinay.