File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes depolying servlet on weblogic server domain Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "depolying servlet on weblogic server domain" Watch "depolying servlet on weblogic server domain" New topic
Author

depolying servlet on weblogic server domain

mukesh yadav
Greenhorn

Joined: Feb 14, 2004
Posts: 1
Hi,
i am having problem in deploying servlet on weblogic server.
when i deployed my servlet on Examples server.i am getting response back from the servlet,
but if i try to deploy the same servlet in some other domain and server,it is not responding.
i have made entries in the web.xml and placed my servlet class under the web-inf/classes/ folder,still not getting any ressponse from servlet.
where else i need to make entries to make the servlet working.
can someone help me?
Owee Nicolas
Ranch Hand

Joined: Jun 16, 2002
Posts: 49
Hi mukesh,
What version of Weblogic Server are you using? Are you able to run static HTML files from the domain and server you set up? This is to check if Weblogic can accept HTTP request. Also, how are you deploying the servlet to your server? If you are only dropping the servlet on the directory while the server is running, make sure that you have enabled Auto-deploy. Please refer to Servlet Fast Track for details on servlet deployment.
Hope that helps.


Owee<br />SCJP 1.4
Vasantha Prabha
Ranch Hand

Joined: Oct 02, 2003
Posts: 108
Hi,
I two have similar problem.Iam using weblogic 81
I would like to use my servlet as my client and invoke the Statefull bean
My servlet client is in root examples\servlets
My EJB component in examples\StatfullBean
How should I config the build.xml file to make my servlet
invoke the bean.
When I import the Bean Component package in my servlet it is
accepting the package
import examples.StatfullBean.*;
but when I use like as below
import examples.StatefullBean.HelloHome calling the home interface
it is not accepting.It is giving the error HelloHome not found while
I try to build it.
Can anyone help me
Regards,
Sangeetha


Regards,Vasantha<p>Great minds discuss ideas. Average minds discuss events. Small minds discuss people.
shraddha sawant
Greenhorn

Joined: Sep 06, 2011
Posts: 12

I am new to weblogic server. i am using 9.0 version of it.
I was trying to deploy a web app on weblogic which gives following error.
"Error 500--Internal Server Error

javax.servlet.ServletException: [HTTP:101249][weblogic.servlet.internal.WebAppServletContext@1a9e627 - name: 'myapp2diff', context-path: '/myapp2diff']: Servlet class a.SumServlet for servlet sum could not be loaded because the requested class was not found in the classpath C:\bea\weblogic90\samples\domains\wl_server\autodeploy\myapp2diff\WEB-INF\classes.
java.lang.UnsupportedClassVersionError: a/SumServlet : unsupported classversion 51.0.
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:512)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:224)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3022)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1925)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1848)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1288)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
"

But same application runs well if deployed in tomcat 7.0.
Is there any default directory for weblogic like webapps in tomcat? Should there be any change in web.xml file for weblogic? Does weblogic requires any weblogic.xml files for deployment? please help.(Means i couldn't get exact information whether this file is required for weblogic 9.0). i am not using any IDE software.
Rather i was unable to configure weblogic for myeclipse. This problem i will solve later.


shraddhasav
Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 254

shraddha sawant wrote:I am new to weblogic server. i am using 9.0 version of it.
I was trying to deploy a web app on weblogic which gives following error.
"Error 500--Internal Server Error

javax.servlet.ServletException: [HTTP:101249][weblogic.servlet.internal.WebAppServletContext@1a9e627 - name: 'myapp2diff', context-path: '/myapp2diff']: Servlet class a.SumServlet for servlet sum could not be loaded because the requested class was not found in the classpath C:\bea\weblogic90\samples\domains\wl_server\autodeploy\myapp2diff\WEB-INF\classes.
java.lang.UnsupportedClassVersionError: a/SumServlet : unsupported classversion 51.0.
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:512)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:224)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3022)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1925)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1848)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1288)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
"

But same application runs well if deployed in tomcat 7.0.
Is there any default directory for weblogic like webapps in tomcat? Should there be any change in web.xml file for weblogic? Does weblogic requires any weblogic.xml files for deployment? please help.(Means i couldn't get exact information whether this file is required for weblogic 9.0). i am not using any IDE software.
Rather i was unable to configure weblogic for myeclipse. This problem i will solve later.



Check which Java version is used to compile your application and which Java is running in weblogic server.

Check below unsupported classversion

Regards, Ricky
Oracle Weblogic 10g Certified Expert TechPaste.Com
shraddha sawant
Greenhorn

Joined: Sep 06, 2011
Posts: 12

Yes, I used 1.7 to compile and my weblogic's java version is 1.4.
Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 254

shraddha sawant wrote:Yes, I used 1.7 to compile and my weblogic's java version is 1.4.


Compile your code in same 1.4 or below version java or else upgrade weblogic java version same or higher than the java used to compile your code. it will work.

Example:
Code Compile Java | Weblogic Java
--------------------------------------------------------------
1.4 | >= 1.4 - WORK
1.4 | <1.4 - FAIL
1.7 | >=1.7 - WORK
1.7 | <1.7 - FAIL

Lower Version | same or Higher version - WORK
higher version | lower version - FAIL
shraddha sawant
Greenhorn

Joined: Sep 06, 2011
Posts: 12

Thank you for replying. i downloaded latest version weblogic 12 and but i had to uninstall jdk 1.7 and now working with 1.6. (as weblogic 12 uses 1.6).
Finally, after 2 days of trial and error, my weblogic server is finally configured.
actually their minimum requirement in 1.6. (as mentioned in the readme file) so, i thought it would work on 1.7, but it DIDN'T.same error persisted.
So does 1.6 is exact requirement or what, i didn't understand?
When they say
This version of WLS requires JDK 1.6 as a minimum. Ensure that you have the proper JDK version installed and ready

then what does that mean? higher versions are compatible or lower versions? please clarify, i am not getting.
(I tried with 1.7, same error persisted (unsupported classversion))
Has anyone tried weblogic with lower java version(for compilation) than that of "server's" java version?
Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 254

For that reason weblogic 12 is not certified on 1.7 yet.
Ideally Java is backward compatible but as you know each new version adds new functionality and deprecates old methods and functions.

See below thread to make 1.7 working in weblogic 12

http://docs.oracle.com/cd/E24329_01/doc.1211/e24492/jdk7.htm
 
 
subject: depolying servlet on weblogic server domain