Re: Problem using JSP expressin in Struts 2
JSP Expressions are not allowed in the Struts 2 Tag Libs because of security concerns allowing hackers to use JSP EL to inject OGNL into the tags to do bad things. If you don't care about this problem, you can copy the struts .tld file out of the struts.jar file and add rtexprvaluetrue/rtexprvalue to all the attributes, and it will allow you to use EL, at your user's risk. (*Chris*) On Fri, Feb 11, 2011 at 11:26 PM, Ashish Shrivastava ashish@gmail.comwrote: Hi, We are in the process to upgrade our application. Currently our aplication is on *Weblogic: 8.1sp5 Java: 1.4 Struts: 1.2 * We are upgrading it to: *Server: Weblogic 10.3 Java: 1.6.0_5 Current Struts: 2.0.14 *We are facing issue with jsp expression in struts tag. All the expression which uses JSP variable as %=name% are not working and getting error Request time value is not supported. As the application is old and there are lots of pages, this will take lot of time and effort to convert JSP expression to , i just want to know if there is any solution for this problem or we strictly need to use OGNL expression and change all JSPs. Is there any possibility that we can use JSP expression with struts 2.0.14, if not then which is the highest version supported for JSP expression. I tried with Struts 2.0.8 as mentioned in http://struts.apache.org/2.0.14/docs/why-cant-i-use-jstl-style-el-expressions-in-struts-tags.htmllink but it is also giving the same error. Thanks Regards Ashish
Re: Problem using JSP expressin in Struts 2
Thanks a lot Chris. I tried with the option and it is working fine :). We will think about the security risk and decide whether to update or not. But as you mentioned that JSP EL is not supported in struts this mean old JSP applications (which uses scriptlet or JSP EL) either can not be upgraded or it will need huge cost to migrate/re-build the appilcation. Thanks Regards Ashish Shrivastava On Sat, Feb 12, 2011 at 2:16 PM, Chris Pratt thechrispr...@gmail.comwrote: JSP Expressions are not allowed in the Struts 2 Tag Libs because of security concerns allowing hackers to use JSP EL to inject OGNL into the tags to do bad things. If you don't care about this problem, you can copy the struts .tld file out of the struts.jar file and add rtexprvaluetrue/rtexprvalue to all the attributes, and it will allow you to use EL, at your user's risk. (*Chris*) On Fri, Feb 11, 2011 at 11:26 PM, Ashish Shrivastava ashish@gmail.comwrote: Hi, We are in the process to upgrade our application. Currently our aplication is on *Weblogic: 8.1sp5 Java: 1.4 Struts: 1.2 * We are upgrading it to: *Server: Weblogic 10.3 Java: 1.6.0_5 Current Struts: 2.0.14 *We are facing issue with jsp expression in struts tag. All the expression which uses JSP variable as %=name% are not working and getting error Request time value is not supported. As the application is old and there are lots of pages, this will take lot of time and effort to convert JSP expression to , i just want to know if there is any solution for this problem or we strictly need to use OGNL expression and change all JSPs. Is there any possibility that we can use JSP expression with struts 2.0.14, if not then which is the highest version supported for JSP expression. I tried with Struts 2.0.8 as mentioned in http://struts.apache.org/2.0.14/docs/why-cant-i-use-jstl-style-el-expressions-in-struts-tags.htmllink but it is also giving the same error. Thanks Regards Ashish
error while running code of struts2.x and hibernate 3.3: java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I
hi, I am running a simple search of a product via Hibernate on struts code, the code runs fine when i run via a function in public static void main when i run the same code via struts i get the following exception, the code is: public static void main(String[] args) { ProductsDAO pd = new ProductsDAO(); ListProducts l = pd.findByPUrlcomponent(ABC); Products pr = l.get(0); System.out.println(pr.getPId().toString()); } Pl. advice i am using myeclipse, the exception is java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I org.hibernate.hql.ast.HqlSqlWalker.generatePositionalParameter(HqlSqlWalker.java:896) org.hibernate.hql.antlr.HqlSqlBaseWalker.parameter(HqlSqlBaseWalker.java:4819) org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1373) org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4243) org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3725) org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1864) org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:818) org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:604) org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:288) org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:231) org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:254) org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185) org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136) org.hibernate.engine.query.HQLQueryPlan.init(HQLQueryPlan.java:101) org.hibernate.engine.query.HQLQueryPlan.init(HQLQueryPlan.java:80) org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94) org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156) org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135) org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1651) com.eggbods.hibernate.ProductsDAO.findByProperty(ProductsDAO.java:143) com.eggbods.hibernate.ProductsDAO.findByPUrlcomponent(ProductsDAO.java:299) com.eggbods.struts.action.ProductsAction.product(ProductsAction.java:42) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441) com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243) com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252) org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
Re: error while running code of struts2.x and hibernate 3.3: java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I
Chances are you're not running using the same classpath. Dave On Sat, Feb 12, 2011 at 8:20 AM, abhishek jain abhishek.netj...@gmail.com wrote: hi, I am running a simple search of a product via Hibernate on struts code, the code runs fine when i run via a function in public static void main when i run the same code via struts i get the following exception, the code is: public static void main(String[] args) { ProductsDAO pd = new ProductsDAO(); ListProducts l = pd.findByPUrlcomponent(ABC); Products pr = l.get(0); System.out.println(pr.getPId().toString()); } Pl. advice i am using myeclipse, the exception is java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I org.hibernate.hql.ast.HqlSqlWalker.generatePositionalParameter(HqlSqlWalker.java:896) org.hibernate.hql.antlr.HqlSqlBaseWalker.parameter(HqlSqlBaseWalker.java:4819) org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1373) org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4243) org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3725) org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1864) org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:818) org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:604) org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:288) org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:231) org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:254) org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185) org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136) org.hibernate.engine.query.HQLQueryPlan.init(HQLQueryPlan.java:101) org.hibernate.engine.query.HQLQueryPlan.init(HQLQueryPlan.java:80) org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94) org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156) org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135) org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1651) com.eggbods.hibernate.ProductsDAO.findByProperty(ProductsDAO.java:143) com.eggbods.hibernate.ProductsDAO.findByPUrlcomponent(ProductsDAO.java:299) com.eggbods.struts.action.ProductsAction.product(ProductsAction.java:42) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441) com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243) com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252) org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
Re: error while running code of struts2.x and hibernate 3.3: java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I
It looks like there something wrong in your dependencies. Check your classpath (I'm not sure, but at first glance it'd seem the antlr library version). I could be proprably wrong but it not seems a struts problem. Maurizio Cucchiara Il giorno 12/feb/2011 14.20, abhishek jain abhishek.netj...@gmail.com ha scritto: hi, I am running a simple search of a product via Hibernate on struts code, the code runs fine when i run via a function in public static void main when i run the same code via struts i get the following exception, the code is: public static void main(String[] args) { ProductsDAO pd = new ProductsDAO(); ListProducts l = pd.findByPUrlcomponent(ABC); Products pr = l.get(0); System.out.println(pr.getPId().toString()); } Pl. advice i am using myeclipse, the exception is java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I org.hibernate.hql.ast.HqlSqlWalker.generatePositionalParameter(HqlSqlWalker.java:896) org.hibernate.hql.antlr.HqlSqlBaseWalker.parameter(HqlSqlBaseWalker.java:4819) org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1373) org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4243) org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3725) org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1864) org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:818) org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:604) org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:288) org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:231) org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:254) org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185) org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136) org.hibernate.engine.query.HQLQueryPlan.init(HQLQueryPlan.java:101) org.hibernate.engine.query.HQLQueryPlan.init(HQLQueryPlan.java:80) org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94) org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156) org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135) org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1651) com.eggbods.hibernate.ProductsDAO.findByProperty(ProductsDAO.java:143) com.eggbods.hibernate.ProductsDAO.findByPUrlcomponent(ProductsDAO.java:299) com.eggbods.struts.action.ProductsAction.product(ProductsAction.java:42) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441) com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243) com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252) org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
Re: error while running code of struts2.x and hibernate 3.3: java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I
hi, I am using myeclipse , and using its own default classpath. I have two antlr-2.7.2.jar in Struts core libraries and antlr-2.7.6.jar in hibernate core libraries. I tried removing antlr-2.7.2.jar and still the problem persists. thanks abhishek On Sat, Feb 12, 2011 at 7:05 PM, Maurizio Cucchiara maurizio.cucchi...@gmail.com wrote: It looks like there something wrong in your dependencies. Check your classpath (I'm not sure, but at first glance it'd seem the antlr library version). I could be proprably wrong but it not seems a struts problem. Maurizio Cucchiara Il giorno 12/feb/2011 14.20, abhishek jain abhishek.netj...@gmail.com ha scritto: hi, I am running a simple search of a product via Hibernate on struts code, the code runs fine when i run via a function in public static void main when i run the same code via struts i get the following exception, the code is: public static void main(String[] args) { ProductsDAO pd = new ProductsDAO(); ListProducts l = pd.findByPUrlcomponent(ABC); Products pr = l.get(0); System.out.println(pr.getPId().toString()); } Pl. advice i am using myeclipse, the exception is java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I org.hibernate.hql.ast.HqlSqlWalker.generatePositionalParameter(HqlSqlWalker.java:896) org.hibernate.hql.antlr.HqlSqlBaseWalker.parameter(HqlSqlBaseWalker.java:4819) org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1373) org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4243) org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3725) org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1864) org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:818) org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:604) org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:288) org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:231) org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:254) org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185) org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136) org.hibernate.engine.query.HQLQueryPlan.init(HQLQueryPlan.java:101) org.hibernate.engine.query.HQLQueryPlan.init(HQLQueryPlan.java:80) org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94) org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156) org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135) org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1651) com.eggbods.hibernate.ProductsDAO.findByProperty(ProductsDAO.java:143) com.eggbods.hibernate.ProductsDAO.findByPUrlcomponent(ProductsDAO.java:299) com.eggbods.struts.action.ProductsAction.product(ProductsAction.java:42) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441) com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243) com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252) org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
Re: error while running code of struts2.x and hibernate 3.3: java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I
You need to determine which versions you're actually depending on. Are you attempting to do dependency management manually?! Dave On Sat, Feb 12, 2011 at 9:32 AM, abhishek jain abhishek.netj...@gmail.com wrote: hi, I am using myeclipse , and using its own default classpath. I have two antlr-2.7.2.jar in Struts core libraries and antlr-2.7.6.jar in hibernate core libraries. I tried removing antlr-2.7.2.jar and still the problem persists. thanks abhishek On Sat, Feb 12, 2011 at 7:05 PM, Maurizio Cucchiara maurizio.cucchi...@gmail.com wrote: It looks like there something wrong in your dependencies. Check your classpath (I'm not sure, but at first glance it'd seem the antlr library version). I could be proprably wrong but it not seems a struts problem. Maurizio Cucchiara Il giorno 12/feb/2011 14.20, abhishek jain abhishek.netj...@gmail.com ha scritto: hi, I am running a simple search of a product via Hibernate on struts code, the code runs fine when i run via a function in public static void main when i run the same code via struts i get the following exception, the code is: public static void main(String[] args) { ProductsDAO pd = new ProductsDAO(); ListProducts l = pd.findByPUrlcomponent(ABC); Products pr = l.get(0); System.out.println(pr.getPId().toString()); } Pl. advice i am using myeclipse, the exception is java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I org.hibernate.hql.ast.HqlSqlWalker.generatePositionalParameter(HqlSqlWalker.java:896) org.hibernate.hql.antlr.HqlSqlBaseWalker.parameter(HqlSqlBaseWalker.java:4819) org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1373) org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4243) org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3725) org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1864) org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:818) org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:604) org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:288) org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:231) org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:254) org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185) org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136) org.hibernate.engine.query.HQLQueryPlan.init(HQLQueryPlan.java:101) org.hibernate.engine.query.HQLQueryPlan.init(HQLQueryPlan.java:80) org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94) org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156) org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135) org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1651) com.eggbods.hibernate.ProductsDAO.findByProperty(ProductsDAO.java:143) com.eggbods.hibernate.ProductsDAO.findByPUrlcomponent(ProductsDAO.java:299) com.eggbods.struts.action.ProductsAction.product(ProductsAction.java:42) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441) com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243) com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252) org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
Re: error while running code of struts2.x and hibernate 3.3: java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I
no, i am not that experienced in java to do dependency management manually, i just tried removing the library after the probelm just in case it solved thanks abhi On Sat, Feb 12, 2011 at 8:06 PM, Dave Newton davelnew...@gmail.com wrote: You need to determine which versions you're actually depending on. Are you attempting to do dependency management manually?! Dave On Sat, Feb 12, 2011 at 9:32 AM, abhishek jain abhishek.netj...@gmail.com wrote: hi, I am using myeclipse , and using its own default classpath. I have two antlr-2.7.2.jar in Struts core libraries and antlr-2.7.6.jar in hibernate core libraries. I tried removing antlr-2.7.2.jar and still the problem persists. thanks abhishek On Sat, Feb 12, 2011 at 7:05 PM, Maurizio Cucchiara maurizio.cucchi...@gmail.com wrote: It looks like there something wrong in your dependencies. Check your classpath (I'm not sure, but at first glance it'd seem the antlr library version). I could be proprably wrong but it not seems a struts problem. Maurizio Cucchiara Il giorno 12/feb/2011 14.20, abhishek jain abhishek.netj...@gmail.com ha scritto: hi, I am running a simple search of a product via Hibernate on struts code, the code runs fine when i run via a function in public static void main when i run the same code via struts i get the following exception, the code is: public static void main(String[] args) { ProductsDAO pd = new ProductsDAO(); ListProducts l = pd.findByPUrlcomponent(ABC); Products pr = l.get(0); System.out.println(pr.getPId().toString()); } Pl. advice i am using myeclipse, the exception is java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I org.hibernate.hql.ast.HqlSqlWalker.generatePositionalParameter(HqlSqlWalker.java:896) org.hibernate.hql.antlr.HqlSqlBaseWalker.parameter(HqlSqlBaseWalker.java:4819) org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1373) org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4243) org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3725) org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1864) org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:818) org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:604) org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:288) org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:231) org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:254) org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185) org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136) org.hibernate.engine.query.HQLQueryPlan.init(HQLQueryPlan.java:101) org.hibernate.engine.query.HQLQueryPlan.init(HQLQueryPlan.java:80) org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94) org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156) org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135) org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1651) com.eggbods.hibernate.ProductsDAO.findByProperty(ProductsDAO.java:143) com.eggbods.hibernate.ProductsDAO.findByPUrlcomponent(ProductsDAO.java:299) com.eggbods.struts.action.ProductsAction.product(ProductsAction.java:42) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441) com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243) com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252) org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
Re: error while running code of struts2.x and hibernate 3.3: java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I
On Sat, Feb 12, 2011 at 9:39 AM, abhishek jain abhishek.netj...@gmail.com wrote: no, i am not that experienced in java to do dependency management manually, i just tried removing the library after the probelm just in case it solved How are you doing dependency management? Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: error while running code of struts2.x and hibernate 3.3: java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I
On Sat, Feb 12, 2011 at 8:12 PM, Dave Newton davelnew...@gmail.com wrote: On Sat, Feb 12, 2011 at 9:39 AM, abhishek jain abhishek.netj...@gmail.com wrote: no, i am not that experienced in java to do dependency management manually, i just tried removing the library after the probelm just in case it solved How are you doing dependency management? hi, I am not doing any dependency management, i am just relying on myeclipse, what is the best way, Pl. clear my doubts, thanks abhi
Re: error while running code of struts2.x and hibernate 3.3: java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I
On Sat, Feb 12, 2011 at 10:58 AM, abhishek jain abhishek.netj...@gmail.com wrote: I am not doing any dependency management, i am just relying on myeclipse, what is the best way, I'm not sure; I haven't used MyEclipse in some time (but I did for quite awhile; very often worth the (minimal) cost. I would strongly pursue the library conflict idea people have mentioned--perhaps you could ask for support from MyEclipse in determining how to configure it to avoid the conflict, or at least they could point you in the right direction if it's not an issue directly related to MyEclipse. Do you know if you're working with a Maven-based project or not? Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: error while running code of struts2.x and hibernate 3.3: java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I
On Sat, Feb 12, 2011 at 9:47 PM, Dave Newton davelnew...@gmail.com wrote: On Sat, Feb 12, 2011 at 10:58 AM, abhishek jain abhishek.netj...@gmail.com wrote: I am not doing any dependency management, i am just relying on myeclipse, what is the best way, I'm not sure; I haven't used MyEclipse in some time (but I did for quite awhile; very often worth the (minimal) cost. I would strongly pursue the library conflict idea people have mentioned--perhaps you could ask for support from MyEclipse in determining how to configure it to avoid the conflict, or at least they could point you in the right direction if it's not an issue directly related to MyEclipse. Do you know if you're working with a Maven-based project or not? Dave no, i am not using Maven based project, Also the problem solved when i now used the latest version of antlr jar file thanks for helping abhishek
Re: Problem using JSP expressin in Struts 2
You can use JSP EL just fine (I'd still suggest getting rid of Scriplets, they're just bad mojo), you just can't pass them to the Struts Tags as attributes. You can use your own JSP Tag Libraries (I do), and use EL anywhere on the page with the exception of the s: tag attributes. And there are alternative ways of getting to anything you need using OGNL with the Struts Tags. (*Chris*) On Sat, Feb 12, 2011 at 3:08 AM, Ashish Shrivastava ashish@gmail.comwrote: Thanks a lot Chris. I tried with the option and it is working fine :). We will think about the security risk and decide whether to update or not. But as you mentioned that JSP EL is not supported in struts this mean old JSP applications (which uses scriptlet or JSP EL) either can not be upgraded or it will need huge cost to migrate/re-build the appilcation. Thanks Regards Ashish Shrivastava On Sat, Feb 12, 2011 at 2:16 PM, Chris Pratt thechrispr...@gmail.com wrote: JSP Expressions are not allowed in the Struts 2 Tag Libs because of security concerns allowing hackers to use JSP EL to inject OGNL into the tags to do bad things. If you don't care about this problem, you can copy the struts .tld file out of the struts.jar file and add rtexprvaluetrue/rtexprvalue to all the attributes, and it will allow you to use EL, at your user's risk. (*Chris*) On Fri, Feb 11, 2011 at 11:26 PM, Ashish Shrivastava ashish@gmail.comwrote: Hi, We are in the process to upgrade our application. Currently our aplication is on *Weblogic: 8.1sp5 Java: 1.4 Struts: 1.2 * We are upgrading it to: *Server: Weblogic 10.3 Java: 1.6.0_5 Current Struts: 2.0.14 *We are facing issue with jsp expression in struts tag. All the expression which uses JSP variable as %=name% are not working and getting error Request time value is not supported. As the application is old and there are lots of pages, this will take lot of time and effort to convert JSP expression to , i just want to know if there is any solution for this problem or we strictly need to use OGNL expression and change all JSPs. Is there any possibility that we can use JSP expression with struts 2.0.14, if not then which is the highest version supported for JSP expression. I tried with Struts 2.0.8 as mentioned in http://struts.apache.org/2.0.14/docs/why-cant-i-use-jstl-style-el-expressions-in-struts-tags.htmllink but it is also giving the same error. Thanks Regards Ashish
Struts2-OSGI, Simple Question
hi al anyone can explain, a simple vision or direction if we wanna to use Struts2-OSGI Plugins got this URL http://struts.apache.org/2.1.8.1/docs/osgi-plugin.html but still dunno how to use it, do we can use struts2-plugins or action modularity on top of it? F - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org