Poonam Kadu

Ranch Hand
+ Follow
since Jul 21, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Poonam Kadu

Hi Friends,

I have declared a UDT(User Defined Types) say CustomType in SQL server 2008.I m using this Data type as an IN parameter for a Stored
procedure.I want to call this procedure from a java class.
To do this i have done the following:
created a class called CustomType which implements SQLData



My main java class looks like this:


when i run this code i get the following exception:

com.microsoft.sqlserver.jdbc.SQLServerException: This operation is not supported.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.NotImplemented(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.setTypeMap(Unknown Source)
at com.mindcraft.test.Proc2Test.msmsqlTest(Proc2Test.java:97)
at com.mindcraft.test.Proc2Test.main(Proc2Test.java:22)



This exception occurs at con.setTypeMap(map)


My problem is how do i call a store proc of SQL server, whose input parameter is a custom Database type?
How do i map the a pojo with custom database type of SQL server 2008 and send that to the stored proc ?
Does sql server 2008 jdbc driver implement Connection.setTypeMap() method?


cheers,
Poonam.
Hi ,
Using Struts pager,index and logic iterate tags i could display a collection ,along with page navigation links at the top in a jsp.
how do i display page navigation links above and below a collection using Struts paging tags ?

cheers,
Poonam
13 years ago
Hi Friends,
A couple of weeks back i written some code to send email using smtp.gmail.com .And it was working fine
But now when i executed the same code it throws the following exception :

Exception in thread "main" org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Unknown SMTP host: smtp.gmail.com;
nested exception is:
java.net.UnknownHostException: smtp.gmail.com
at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:419)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:342)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:357)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:346)
at com.mcs.mailer.SpringMailer.sendMail(SpringMailer.java:66)
at com.mcs.mailer.EmailCompTest.main(EmailCompTest.java:20)
Caused by: javax.mail.MessagingException: Unknown SMTP host: smtp.gmail.com;
nested exception is:
java.net.UnknownHostException: smtp.gmail.com


I have set the following properties :
<property name="host" value="smtp.gmail.com"/>
<!-- smtp.mail.yahoo.com-->
<property name="port" value="587"/>

when i did nslookup i got this
>nslookup smtp.gmail.com
DNS request timed out.
timeout was 2 seconds.
*** Can't find server name for address 121.242.180.190: Timed out
DNS request timed out.
timeout was 2 seconds.
*** Can't find server name for address 121.242.180.211: Timed out
*** Default servers are not available
Server: UnKnown
Address: 121.242.180.190

DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to UnKnown timed-out

What could be the possible problem?I mean is there something wrong with the 'smtp.gmail.com' or some network settings like firewall or something....
Please advice.

Cheers,
Poonam.
14 years ago
Hi Guys,
Thanks for your quick response,but its still not working
I am posting a simplified version of my problem:

struts-config.xml


ActionForm1.java


TestAction1.java


testcheck.jsp



TestAction2.java


The entry point is type /TestCheck1.do in the browser it invokes TestAction1.java action,populates TestForm1.java and forwards the request to testcheck.jsp.Inside testcheck.jsp ,when the user hits submit button it invokes TestAction2.java Action.TestForm1.java is in session scope and has been tied to both the Action classes.


Hope this example will make my problem more clear.
Thanks,
Poonam
14 years ago
Hi Guys,
Thanks for your quick response,but its still not working
I am posting a simplified version of my problem:

struts-config.xml


ActionForm1.java


TestAction1.java


testcheck.jsp



TestAction2.java


The entry point is type /TestCheck1.do in the browser it invokes TestAction1.java action,populates TestForm1.java and forwards the request to testcheck.jsp.Inside testcheck.jsp ,when the user hits submit button it invokes TestAction2.java Action.TestForm1.java is in session scope and has been tied to both the Action classes.


Hope this example will make my problem more clear.
Thanks,
Poonam
14 years ago
Hi,
I guess its not the same problem.i dont get any null values in the next action...but i get values which were displayed before the next action was invoked.I don't know how to capture the checkbox checked/unchecked value in the boolean variable email,sms in basic element of the collection property of the formbean.
Thanks,
Poonam
14 years ago
Hi David,
Yes it does displays the way i want ...it looks something like a table with its last two cols as checkboxes.The checkboxes are checked/unchecked using the values from the formbean property.But when i check /uncheck and click on submit , it shows the old values of the checkbox in the new Action class . Why doesn't it show the updated values?
Sorry for the unnecesary code included.

Thanks,
Poonam
14 years ago
Hi Friends,
I have been facing this problem since a couple of days...
I have a FormBean whose one the property is a collection of a type of objects.Using the formbean , logic:iterate and html:checkbox i could display the content in the jsp... but in the same jsp when the user changes the checboxes (check/uncheck) ...the values don't reflect in the next action..Also my form bean is in session scope...






I am expecting this to happen:
when the user checks/unchecks ...the email/sms property inside the Category bean which is the basic element of the memberAlertList ArrayList (and memberAlertList is a property of the form bean ListMemberAlertsForm) should get set...

Please advice ...

Thanks and regards
Poonam.
14 years ago
Hi,
Will
VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, "com/mcs/mailer/registration-confirmation.vm", model) work if the vm file contains an image.

Thanks,
Poonam .
14 years ago
Hi Jeanne,
I guess it's not prohibitting to send external mails because using my org's mailid i can send mail to gmail mailID's.
correct me if i am wrong..
Thanks,
Poonam.
14 years ago
Hi Mukhi,
Its not a web application so i will not be able to use ServletContext .I 've tried almost all options for the path of the image file but none worked . The html text content is visible but the image is not...

Thanks,
Poonam
14 years ago
In the .vm file i have referenced the image file as src="/EmailCompo/src/com/mcs/mailer/img123.jpg"

Thanks
Poonam.
14 years ago
Hi,
I have the following problem:
I've used Velocity to create email templates.In one of these templates i've text + image(inline) content.In the received email the text is visible but the image is not.I guess there is some issue with the path to the image file,but couldn't figure it out.My .vm file look something like this:

registration-confirmation.vm


Also following is addtional information :
EmailCompo is the name of my application

image file location is :EmailTest/src/com/mcs/mailer/img123.jpg

vm file location : EmailTest/src/com/mcs/mailer/reg-con.vm

Cheers,
Poonam
14 years ago
Hi Friends,
i've succeeded in sending emails using spring framework email component, within my organisation's email id's.But what are the additional points i need to take care of if i have to send a mail to say a gmail id?I got the following error when i tried to send mail from my org's id to my gmail id.

Failed message 1:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 554 Relay rejected for policy reasons.

please advice.

cheers,
Poonam
14 years ago
HI,
I was trying out a simple example of isErrorPage and errorPage ...follwing is the code

TestJSP1.jsp



ErrorHandler.jsp



When i execute TestJSP1.jsp for the first time ,it seems as if the exception is not thrown and Hello World is printed...then when i refresh the same page, exception is thrown and 'Sorry there was an error.Please try again!!!' is printed...Why didn't TestJSP1.jsp throw an exception when executed for the first time itself?

cheers,
Poonam.
14 years ago
JSP