• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

depolying servlet on weblogic server domain

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 12
Netbeans IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 256
Netbeans IDE Firefox Browser Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
shraddha sawant
Greenhorn
Posts: 12
Netbeans IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I used 1.7 to compile and my weblogic's java version is 1.4.
 
Ramakanta Sahoo
Ranch Hand
Posts: 256
Netbeans IDE Firefox Browser Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 12
Netbeans IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 256
Netbeans IDE Firefox Browser Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic