pravin gajbhiye

Greenhorn
+ Follow
since Aug 20, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by pravin gajbhiye

Hi

I have installed
jdk1.6
tomcat 6.0.35
and
eclipse-jee-juno-win32-x86_64


i also add tomcatPluginV32 in eclips.

in window 7 64 bit
Sometime it show tomcat Home Page but sometime not.
but when I create simple project in jsp
and run it, tomcat started but get 404 error.
Also in

C:\Program Files\Apache Software Foundation\apache-tomcat-6.0.35-windows-x64\apache-tomcat-6.0.35\work\Catalina\localhost

There is no my struts application.
4 years ago
when i added some more jar files
commons-beanutils.jar
commons-fileupload.jar
commons-lang.jar
commons-validator.jar
jakarta-oro.jar
jsp-api.jar
servlet-api.jar
struts-legacy.jar

, now i am getting issue
org.apache.jasper.JasperException: java.lang.NullPointerException
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:538)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

java.lang.NullPointerException
org.apache.jsp.index_jsp._jspInit(index_jsp.java:37)
org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:164)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:340)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
===========================
I eclips

SEVERE: Parsing error processing resource path
java.net.UnknownHostException: jakarta.apache.org
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1006)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
19 May, 2013 10:50:29 AM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet action as unavailable
19 May, 2013 10:50:29 AM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /StrutsHelloWord threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource path
at org.apache.struts.action.ActionServlet.handleConfigException(ActionServlet.java:1035)
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1012)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
19 May, 2013 10:50:29 AM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
19 May, 2013 10:50:29 AM org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
19 May, 2013 10:50:29 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 537 ms
19 May, 2013 10:50:30 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at org.apache.jsp.index_jsp._jspInit(index_jsp.java:37)
at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:164)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:340)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
at java.lang.Thread.run(Unknown Source)
4 years ago

Hi
I am getting the issue: org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBean
Please give me a help to solve this issue.
web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>StrutsHelloWord</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet
</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

</web-app>

struts-config.xml:

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">

<struts-config>
<form-beans>
<form-bean name="LoginForm" type="com.form.LoginForm" />
</form-beans>


<global-exceptions>
</global-exceptions>
<global-forwards></global-forwards>

<action-mappings>
<action path="/login" name="LoginForm" validate="true" input="/index.jsp" type="com.action.LoginAction">
<forward name="success" path="/welcome.jsp" />
<forward name="failure" path="/index.jsp" />
</action>
</action-mappings>


<message-resources parameter="resource.MessageResource"></message-resources>

</struts-config>

I have added the following jar files
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
struts.jar
4 years ago
Thanks Jesper...


Actually I don't know which jar files are needed .
I am reffering the link http://blog.sencide.com/2011/03/hibernate-tutorial-for-beginners.html. for learning basic application.
I have downloaded hibernate-release-4.1.9.Final .
But it dosn't have the files
1) cglib-2.2.2.jar
2)commons-collections-3.2.1.jar
3)jta-1.1.jar
So i downloaded these saperatly and add these as external jar files.


hibernate-release-4.1.9.Final contains
antlr-2.7.7
dom4j-1.6.1
hibernate-commons-annotations-4.0.1.Final
hibernate-core-4.1.9.Final
hibernate-jpa-2.0-api-1.0.1.Final
javassist-3.17.1-GA
jboss-logging-3.1.0.GA
jboss-transaction-api_1.1_spec-1.0.0.Final

I also downloaded
slf4j-1.7.2 folder which contains jars.
hibernate3.jar
mysql-connecter-java5.1.jar
and it.

Is there any problems with my setup?

Please give me a proper set configuration.
Thank you very much for your reply.
Hi
I just started reading Hibernate
and did one application.
But I got error..
[main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.2.GA
[main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
[main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
[main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
[main] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
[main] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
Initial SessionFactory creation failed.org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
Exception in thread "main" java.lang.ExceptionInInitializerError
at HibernateUtil.buildSessionFactory(HibernateUtil.java:15)
at HibernateUtil.<clinit>(HibernateUtil.java:6)
at Test.addUser(Test.java:59)
at Test.main(Test.java:18)
Caused by: org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1542)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1476)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
at HibernateUtil.buildSessionFactory(HibernateUtil.java:10)
... 3 more
Caused by: org.dom4j.DocumentException: www.hibernate.org Nested exception: www.hibernate.org
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1532)
... 6 more

I am using:

hibernate-release-4.1.9.Final
slf4j-1.7.2

Please anybody help me , I am new for Hibernate
Hey tarun

Iaam getting same problem with jdbc connection
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
but its work in debug mode.

I have installed
Java6
MySQL Server 5.1
mysql-connector-java-5.1.22 to create datasourse Name.

System configuration
windows 7 win 64

please help me..
what kind of driver i have to installe. please give a link if you have.
Hi

first i m not able to create datasource using the sql server in System Dsn.
so i have install connecter mysql-connector-java-5.1.15.
And i have create datasource by using option" Mysql odbc 3.51 Driver" in sys dsn.
So it will create successfully.
Initialy I could do practice using these only.
But now i m getting exception "java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid string or buffer length"

My System configuration is :
Windows7, win 64

MySQL Server 5.1
Connector ODBC 3.51
java >> jdk1.6.0_35, jre6
tomcat>> apache-tomcat-6.0.35-windows-x64.

Please help , i m stuck here from last tow days.
Thans in advance.
HI
I am doing practice in core java.
I have set java path=C:\Program Files\Java\jdk1.7.0_03\bin;
CLASSPATH=C:\Program Files\Java\jdk1.7.0_03\bin;

JAVA_HOME=C:\Program Files\Java\jdk1.7.0_03

And write tow simple classes..
When I compiled Home1.java , it is not giving any error but when i compiled Message.java its giving error...

============
when i complie message getting error..

Please help me..
5 years ago
Finally I got expected result. Thax to all.Its resolved now.
5 years ago
JSP
Above problem is resolved. but result.jsp which is calling from servlet using RequestDispatcher view=request.getRequestDispatcher("result.jsp");
to show output. but showing blank screen.
In adress bar it shows address http://localhost:8080/Beer-v1/BeerSelect.do instead of http://localhost:8080/Beer-v1/result.jsp
5 years ago
JSP
Hi
Now I am reffering HeadFirst for servlet and Jsp .
I have created here Beer-v1 project.
here i have created one servlet class, one module i.e. plain java class, and one html form.
I am taking the output or response on the screen through servlet by using PrintWriter.So its working properly.
But when i used jsp for response by calling the jsp file from servlet its giving error.I have compiled the servlet after calling jsp file.It gets compiled properly.
but thrwing the error >>>> The requested resource (/Beer-v1/result.jsp) is not available.
I have put jsp and html files in Beer-v1 folder.
web.xml > WEB-INF
.class files in classes/com.example.model and classes/com.example.model.

But the one thing is that I saved html file in Beer-v1 folder, i observed that the type of file is Html, but i saved jsp file then the type file is text.
5 years ago
JSP