Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 8 Dec 2009 07:31:24 -0000 Issue 8954

user-digest-help

2009-12-08


Author LoginPost Reply

user Digest 8 Dec 2009 07:31:24 -0000 Issue 8954

Topics (messages 204125 through 204127):

Re: SQL ExcuteQuery
 204125 by: Vishnu Vyasan Nelliparmbil
 204126 by: Saeed Iqbal

Exception while registering "AnnotationValidationInterceptor" Class in JBOSS 5.1.0 GA...
 204127 by: Muthu Velappan

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

----------------------------------------------------------------------


Attachment: user_204125.ezm (zipped)
Move your sql before the prepared statement.
Sql =" sql = "UPDATE tbl_content_admin_accounts SET CA_PASSWORD = ?
WHERE ROW_ID = ?";
pstmtname = conn.prepareStatement(sql);

pstmtname.setString(1, "123456");
pstmtname.setString(2, UserID);

pstmtname.executeQuery();

This will work for sure... BTB Remember this is strictly a struts
mailing list.

Best Regards
Vishnu NV

-----Original Message-----
From: Avlesh Singh [mailto:avlesh@(protected)]
Sent: Tuesday, December 08, 2009 9:10 AM
To: Struts Users Mailing List
Subject: Re: SQL ExcuteQuery

Use #executeUpdate instead.

Cheers
Avlesh

On Tue, Dec 8, 2009 at 11:37 AM, Nguyen Xuan Son <yamacom@(protected)>
wrote:

> sorry saini but i dont see any different from your answer
> thank you
>
> 2009/12/8 Sushim Saini <sushimsaini@(protected)>
>
> > hi Nguyen Xuan Son
> > use
> > pstmtname.executeQuery() instead of pstmtname.executeQuery();
> >
> > On Tue, Dec 8, 2009 at 11:29, Nguyen Xuan Son <yamacom@(protected)>
wrote:
> >
> > > dear all
> > > I've written
> > > Connection conn = null;
> > > PreparedStatement pstmtname = null;
> > > pstmtname = conn.prepareStatement(sql);
> > > sql = "UPDATE tbl_content_admin_accounts SET CA_PASSWORD = ?
WHERE
> > ROW_ID
> > > =
> > > " + UserID;
> > > pstmtname.setString(1, "123456");
> > > pstmtname.executeQuery();
> > >
> > > there is no error appear but nothing is changed in the database
> > > do you have any suggestion?
> > > thank you very much
> > >
> > > --
> > >
=======================================================================
> > > Ritsumeikan University, Asia JinZai Project
> > > Master of Information Science
> > > Nguyen Xuan Son
> > >
> > > Add     : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18
> > > ShiteiHaimu
> > > Rien, Room 103
> > > Tel/Fax : 81-(0)90-3976 2246
> > > Email   : nr0003xx@(protected)
> > > Mobile  : 81-(0)90-3976 2246       URL :
http://www.ritsumei.jp
> > >
=======================================================================
> > >
> >
> >
> >
> > --
> > --
> > Sushim Saini
> >
>
>
>
> --
>
=======================================================================
> Ritsumeikan University, Asia JinZai Project
> Master of Information Science
> Nguyen Xuan Son
>
> Add     : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18
> ShiteiHaimu
> Rien, Room 103
> Tel/Fax : 81-(0)90-3976 2246
> Email   : nr0003xx@(protected)
> Mobile  : 81-(0)90-3976 2246       URL : http://www.ritsumei.jp
>
=======================================================================
>


Attachment: user_204126.ezm (zipped)
I dont see you make database connection like this for example.

conn = DriverManager.getConnection

("jdbc:mysql://your_host:3306/dbName","dbUser","dbPass");



On Tue, Dec 8, 2009 at 10:59 AM, Nguyen Xuan Son <yamacom@(protected):

> dear all
> I've written
> Connection conn = null;
> PreparedStatement pstmtname = null;
> pstmtname = conn.prepareStatement(sql);
> sql = "UPDATE tbl_content_admin_accounts SET CA_PASSWORD = ? WHERE ROW_ID
> =
> " + UserID;
> pstmtname.setString(1, "123456");
> pstmtname.executeQuery();
>
> there is no error appear but nothing is changed in the database
> do you have any suggestion?
> thank you very much
>
> --
> =======================================================================
> Ritsumeikan University, Asia JinZai Project
> Master of Information Science
> Nguyen Xuan Son
>
> Add     : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18
> ShiteiHaimu
> Rien, Room 103
> Tel/Fax : 81-(0)90-3976 2246
> Email   : nr0003xx@(protected)
> Mobile  : 81-(0)90-3976 2246       URL : http://www.ritsumei.jp
> =======================================================================
>



--
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer

Attachment: user_204127.ezm (zipped)
Hi,



I got a weird issue in my test environment today. So far, we have been using
Tomcat 6.0.14 as our web server and everything works fine. Today, I moved
that to JBOSS 5.1.0 GA for testing purpose and I got an exception trace as
pasted below. It says that exception in registering
"org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor"
class. I don't understand why, I have the same jar files as used in tomcat
environment. Can anyone help me out on how to clear this issue? I'm using
Struts 2.1.2 for this project, If this problem is addressed in next version
for either struts or jboss, do let me know I will try to upgrade it too.





12:49:01,886 INFO [STDOUT] 2009-12-08 12:49:01,870 ERROR
(CommonsLogger.java:error:28) - Caught Exception while registering
Interceptor class
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor

Caught Exception while registering Interceptor class
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor -
interceptor -
vfszip:/E:/BIS/JBOSS/jboss-5.1.0.GA/server/default/deploy/Gemini.war/WEB-INF
/lib/struts2-core-2.1.2.jar/struts-default.xml:143:127

   at
com.opensymphony.xwork2.ObjectFactory.buildInterceptor (ObjectFactory.java:20
0)

   at
com.google.inject.struts2.GuiceObjectFactory.superBuildInterceptor(GuiceObje
ctFactory.java:139)

   at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.getDelega
te(GuiceObjectFactory.java:156)

   at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:229)

   at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack
.java:456)

   at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:227)

   at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(Con
versionErrorInterceptor.java:124)

   at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:229)

   at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack
.java:456)

   at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:227)

   at
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(St
aticParametersInterceptor.java:104)

   at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:229)

   at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack
.java:456)

   at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:227)

   at
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInt
erceptor.java:208)

   at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:229)

   at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack
.java:456)

   at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:227)

   at
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDr
ivenInterceptor.java:88)

   at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:229)

   at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack
.java:456)

   at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:227)

   at
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingIn
terceptor.java:130)

   at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:229)

   at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack
.java:456)

   at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:227)

   at
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareIn
terceptor.java:137)

   at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Method
FilterInterceptor.java:86)

   at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:229)

   at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack
.java:456)

   at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:227)

   at
com.bis.web.framework.AuditingInterceptor.intercept(AuditingInterceptor.java
:80)

   at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:229)

   at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack
.java:456)

   at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:227)

   at
com.bis.transaction.TransactionActionInterceptor$1.executeTransaction(Transa
ctionActionInterceptor.java:60)

   at
com.bis.transaction.TransactionManager.executeTransaction(TransactionManager
.java:115)

   at
com.bis.transaction.TransactionActionInterceptor.intercept(TransactionAction
Interceptor.java:54)

   at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:229)

   at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack
.java:456)

   at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:227)

   at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Parame
tersInterceptor.java:170)

   at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Method
FilterInterceptor.java:86)

   at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:229)

   at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack
.java:456)

   at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:227)

   at
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletCon
figInterceptor.java:164)

   at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:229)

   at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack
.java:456)

   at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:227)

   at
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nIntercepto
r.java:143)

   at
com.google.inject.struts2.GuiceObjectFactory$LazyLoadedInterceptor.intercept
(GuiceObjectFactory.java:171)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:230)

   at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionI
nvocation.java:229)

   at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTi

12:49:01,886 INFO [STDOUT] merStack.java:456)





Thanks in Advance.



~Muthu

©2008 gg3721.com - Jax Systems, LLC, U.S.A.