More than one value of type [net.sf.jasperreports.engine.JRDataSource] found
I getting this exception while using a subreport in my jasper report and trying to pass a datasource for my subreport. Datasource for report is ‘datasource’ and datasource for subreport is ‘pardatasource’.
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalArgumentException: More than one value of type [net.sf.jasperreports.engine.JRDataSource] found org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:488) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:431) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) com.ccclogic.core.filter.SessionTimeoutFilter.doFilter(SessionTimeoutFilter.java:127)
rpm command – can’t create transaction lock
In case if you are getting error on running rpm command e.g.
$ rpm -e jdk-wrapper-1.5.0_15-1.gdg.noarch error: can't create transaction lock on /var/lib/rpm/__db.000
javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS
I am getting exception while sending mail using JavaMail APIs. Mail properties are as
mail.transport.protocol = smtp mail.smtp.host = mailHost mail.smtp.port = 25 mail.smtp.auth = true
The exception I am getting while sending email
Exception in thread "main" javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS command first m1sm949464nzf
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
at example.SendMailUsingAuthentication.postMail(SendMailUsingAuthentication.java:77)
at example.SendMailUsingAuthentication.main(SendMailUsingAuthentication.java:35)
java.sql.SQLException: Closed Connection
Caused by: java.sql.SQLException: Closed Connection: next at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:185) at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:123) at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:610) at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:584) at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:101) at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:78) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
Installing mysql in linux
To install mysql type following command in terminal
$ sudo apt-get install mysql-server
When installation is done, you may want to setup password for root
sudo mysqladmin -u root -h localhost password 'test' sudo mysqladmin -u root -h hostname password 'test'
Replace hostname and ‘test’ with your actually hostname and desired
<< Back to Setting up j2ee developer environment …
Installing tomcat in ubuntu/linux
Download tomcat from http://tomcat.apache.org
Go to the directory where you have downloaded apache-tomcat-6.0.18.tar.gz
$ cd $ tar xvzf apache-tomcat-6.0.14.tar.gz
Move tomcat to ~/opt directory
sudo mv apache-tomcat-6.0.18 ~/opt/tomcat
Now you can start tomcat by executing startup.sh script located in tomcat/bin directory.
<< Back to Setting up j2ee developer environment …
Installing eclipse in ubuntu/linux
Download eclipse from http://www.eclipse.org/downloads/
Make an opt directory in user’s home directory
$ mkdir ~/opt
Go to the directory where you have downloaded eclipse
$ tar -xvf eclipse-SDK-3.4.1-linux-gtk.tar.gz && mv eclipse ~/opt
Make a bin folder in user’s home directory
$ mkdir ~/bin
Next create an executable for Eclipe at ~/bin/eclipse
$ vi ~/bin/eclipse
Add the following lines in this file
export MOZILLA_FIVE_HOME="/usr/lib/mozilla/" export ECLIPSE_HOME="$HOME/opt/eclipse" $ECLIPSE_HOME/eclipse $*
Finally make script executable
$ chmod +x ~/bin/eclipse
You can now execute that file to start up Eclipse.
<< Back to Setting up j2ee developer environment ...
Installing JDK in ubuntu/linux
To install jdk6.0 type the following command in terminal window
$ sudo apt-get install sun-java6-jdk
Provide password for root. It will show you agreement. Select and wait for installation to be completed.
We should set JAVA_HOME environment variable after successful installation of jdk.
$ vi ~/.bashrc
Insert following line in above file
export JAVA_HOME=/usr/lib/jvm/java-6-sun
<< Back to Setting up j2ee developer environment ...
Setting up j2ee developer environment in ubuntu/linux
A java developer machine has following most frequent tools in his machine.
1. Sun JDK 6.0
2. Eclispe 3.4
3. Tomcat 6.X
4. MySql 5
5. Apache 2
Currently above are the popular versions, please update version if a newer version is available. Also, I have tried to list down all the necessary links and commands so that you can save time in finding these links or commands.
if you find something missing, please post a comment.
See Servlet Spec 2.3, section 9.7.2
validateJarFile(C:\jboss\server\default\.\tmp\deploy\tmp49777abc-exp.war\WEB-INF\lib\servlet.jar) – jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class