NareshAnkuskani Kumar

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

Recent posts by NareshAnkuskani Kumar

It seems like the @since tage is available at classlevel but not at the method level. Please avoid by previous question concerning versions.
15 years ago
Above in my question i used spring version 2.5 in place of 2.0.5 in the schema declaration.
15 years ago
Hi All,

Currently in my project i was told to use spring-security as a securtiy mechanism.

My project is half way implemented using spring framework 2.0 version.

When i tried to include the spring-security2.0.5 into my project, i face some version conflicts between spring & spring-security frameworks.

Please let me as on today with which version of spring the spring-security framwork is compatable.


[size=18]Following is the exception:[/size]

<Oct 1, 2009 7:37:30 AM CEST> <Error> <HTTP> <BEA-101216> <Servlet: "springapp" failed to preload on startup in Web application: "mcompliance".
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/security.xml]; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.XmlReaderContext.getBeanClassLoader()Ljava/lang/ClassLoader;
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:427)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:357)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:196)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:156)
Truncated. see log file for complete stacktrace
java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.XmlReaderContext.getBeanClassLoader()Ljava/lang/ClassLoader;
at org.springframework.security.config.GlobalMethodSecurityBeanDefinitionParser.validatePresent(GlobalMethodSecurityBeanDefinitionParser.java:46)
at org.springframework.security.config.GlobalMethodSecurityBeanDefinitionParser.registerAnnotationBasedMethodDefinitionSources(GlobalMethodSecurityBeanDefinitionParser.java:103)
at org.springframework.security.config.GlobalMethodSecurityBeanDefinitionParser.parse(GlobalMethodSecurityBeanDefinitionParser.java:56)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:78)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1147)
Truncated. see log file for complete stacktrace
>

Following are the namespaces i tried downloading spring-security 2.0 & 2.0.5 :

<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.5.xsd">

<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">

Thanks in advance.



Regards,
Naresh.
15 years ago
In maven we use maven_opts to pass parameters to the Java VM.

E.g. : set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000

I am aware of the -D option. It is used to send the java system property. What exactly '-X' option represent?

I am aware of the -Xms, -Xmx options which are used to set the heap size.

In the above example what exaclty the line/point "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" represent or what is does?

Thanks in advance.

Regards,
Naresh.
15 years ago
Hi all,

i am using spring with hibernate. During this process while executing the query

StringBuffer hqlQuery = new StringBuffer();
hqlQuery.append("select emp from EMP emp where ");
hqlQuery.append("emp.name = ?");
return this.getHibernateTemplate().find(hqlQuery.toString(),firstName);

i am facing the problem mentioned below.

org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQLConversion to internal representation not successfully

please can anY one help me in sorting this out?
Can any we suggest me the book to follow for spring MVC which makes use of annotations?

Thanks in advance
Naresh.
Thanks Mark and others.
Using autowiring mechanism i am planning to establish relationships among the object.

if i annote a property with "@autowired" then should i have to declare the corresponding bean in applicationcontext.xml file.

please let me know.
Hi i am new to spring2.5 web mvc which uses annotations. I am making use of annotations to configure a controller and handler methods.

In springs documents i found the list of valid parameters that can be passed to the method handler, of which one is HttpServletRequest.

I had implemented the controller as below

@Controller
@RequestMapping("/Controller")
public class Controller
{
@RequestMapping(method = RequestMethod.POST)
public void importData(@ModelAttribute Bean bean,HttpServletRequest request,Errors error) {


}//end of importData method
}//end of class declaration.

The above code results in the following exception
java.lang.IllegalStateException: Errors/BindingResult argument declared without preceding model attribute. Check your handler method signature!

I want to use 'request' object as part of the handler method.How i can proceed with this.
Thanks for the reply
16 years ago
I am new to DBUnit library, please clarify me regarding the below statements at the earliest:

According to my knowledge dbunit is mainly used in setting up the proper test data in the database, before execution of a particular test case/suite.

My Question: Is DBUnit an in-memory database (or) can we setup DBunit as an in memory database?
16 years ago
I heard that like tomcat, jetty is the product from apache.

Is Jetty a web/application server?

Can i use jetty with other application servers?

what is so special about jetty?

Thanks in advance.

Regards,
Naresh.
16 years ago
I am new to webservices. Could any one help me in finding the right book in the market to start with.

Also if possible let me know the author/publishers name.

Regards,
Naresh.
16 years ago
Hi Cameron McKenzie,

Thanks a lot for your valuable input and advice.

Regards,
Naresh.
16 years ago
I developed a web application which calls the methods that are part of some third party jar file. I am able to run the application successfully without any issues in APACHE-TOMCAT web server.
When the same web application created as a WAR file and deployed in the websphere application server, i am facing an exception (java.lang.NoSuchMethodError) when a method that is part of the third party jar file is called.

Can you give me any suggestions. What makes it go wrong in case of websphere application server?
16 years ago