Problems loading Servlet in WAR deployment
I'm deploying a servlet using a war file. I am able to deploy the war under
both WebLogic 6.0 sp2 and WebLogic 6.1 beta. However, when I try to access
the servlet from a browser I get the following error:
[java] <Aug 7, 2001 2:49:13 PM CDT> <Error> <HTTP>
<[WebAppServletContext(1
287677,Alert-weblogic60,/Alert-weblogic60)] Error loading servlet:
'AlertEventLi
stenerServlet'
[java] java.lang.NoClassDefFoundError: org/apache/log4j/Category
[java] at
com.agea.alert.servlet.AlertEventListenerServlet.<init>(Alert
EventListenerServlet.java:25)
[java] at java.lang.Class.newInstance0(Native Method)
[java] at java.lang.Class.newInstance(Class.java:237)
[java] at
weblogic.servlet.internal.ServletStubImpl.createServlet(Servl
etStubImpl.java:641)
[java] at
weblogic.servlet.internal.ServletStubImpl.createInstances(Ser
vletStubImpl.java:619)
[java] at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(Serv
letStubImpl.java:564)
[java] at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletS
tubImpl.java:344)
[java] at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servl
etStubImpl.java:240)
[java] at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servl
etStubImpl.java:200)
[java] at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(
WebAppServletContext.java:2279)
[java] at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletR
equestImpl.java:1923)
[java] at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
[java] at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
[java] >
Obviously the problem is that the servlet can't load the
org.apache.log4j.Category class. However, I have included the log4j.jar
file (which contains the org.apache.log4j.Category class) in the war under
WEB-INF/lib. Why isn't the classloader picking it up?
Thanks for the help,
Tim
Did you make sure that:
org/apache/log4j/Category
is in the server's classpath?
"Timothy O'Hara" <[email protected]> wrote in message
news:[email protected]...
> I'm deploying a servlet using a war file. I am able to deploy the war
under
> both WebLogic 6.0 sp2 and WebLogic 6.1 beta. However, when I try to
access
> the servlet from a browser I get the following error:
>
> [java] <Aug 7, 2001 2:49:13 PM CDT> <Error> <HTTP>
> <[WebAppServletContext(1
> 287677,Alert-weblogic60,/Alert-weblogic60)] Error loading servlet:
> 'AlertEventLi
> stenerServlet'
> [java] java.lang.NoClassDefFoundError: org/apache/log4j/Category
> [java] at
> com.agea.alert.servlet.AlertEventListenerServlet.<init>(Alert
> EventListenerServlet.java:25)
> [java] at java.lang.Class.newInstance0(Native Method)
> [java] at java.lang.Class.newInstance(Class.java:237)
> [java] at
> weblogic.servlet.internal.ServletStubImpl.createServlet(Servl
> etStubImpl.java:641)
> [java] at
> weblogic.servlet.internal.ServletStubImpl.createInstances(Ser
> vletStubImpl.java:619)
> [java] at
> weblogic.servlet.internal.ServletStubImpl.prepareServlet(Serv
> letStubImpl.java:564)
> [java] at
> weblogic.servlet.internal.ServletStubImpl.getServlet(ServletS
> tubImpl.java:344)
> [java] at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servl
> etStubImpl.java:240)
> [java] at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servl
> etStubImpl.java:200)
> [java] at
> weblogic.servlet.internal.WebAppServletContext.invokeServlet(
> WebAppServletContext.java:2279)
> [java] at
> weblogic.servlet.internal.ServletRequestImpl.execute(ServletR
> equestImpl.java:1923)
> [java] at
> weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
>
> [java] at
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> [java] >
>
> Obviously the problem is that the servlet can't load the
> org.apache.log4j.Category class. However, I have included the log4j.jar
> file (which contains the org.apache.log4j.Category class) in the war under
> WEB-INF/lib. Why isn't the classloader picking it up?
>
> Thanks for the help,
> Tim
>
>
Similar Messages
-
Unable to deploy a simple servlet using WAR file on Oracle9iAS v9.0.3
Hi All,
I am facing problem while deploying a simple servlet using WAR file on Oracle 9i App Server.
I have installed Oracle9iAS J2EE and Web Cache v9.0.3 on Windows 2000 server.
It includes:
- Oracle HTTP Server
- Oracle9iAS Containers for J2EE
- Oracle9iAS Web Cache
- Oracle Enterprise Manager
The release of installed Oracle9iAS is Release 2 (9.0.3)
I referred following link to Deploy Applications Using WAR file:
http://otn.oracle.com/products/ias/daily/sept12.html
As mentioned in this documentation I have followed following steps to deploy WAR file:
1] I have created a war file by name SimpleServlet.war. In SimpleServlet.war, there is a servlet by name Simple which prints time at which servlet was accessed.
2] I have modified <ora9ias_home>\j2ee\home\config\application.xml and added following web module entry:
<web-module id="SimpleServlet" path="../../home/applications/SimpleServlet.war" />
3] To make this module accessible from over the web, I have modified file
<ora9ias_home>\j2ee\home\config\default-web-site.xml and added following entry:
<web-app application="SimpleServlet" name="SimpleServlet" root="/SimpleServlet"/>
4] I saved both the files and started Oracle HTTP Server and accessed page as below:
http://<server>:7777/SimpleServlet/Simple
where Simple is servlet in SimpleServlet.war file.
In the browser, The page cannot be found is shown to user. I have verified that SimpleServlet.war is extracted to SimpleServlet folder under <ora9ias_home>\j2ee\home\applications folder. I found that Simple.class is stored under WEB-INF/classes folder and web.xml contains correct entry for url pattern for servlet Simple.
What else could be the problem? Am I placing the war file in wrong place or modifying application.xml or default-web-site.xml in a wrong directory?
This is very urgent. Please help me with your valuable comments on this.
Thanks in advance.
Regards,
SandeshHi All,
I am facing problem while deploying a simple servlet
using WAR file on Oracle 9i App Server.
I have installed Oracle9iAS J2EE and Web Cache v9.0.3
on Windows 2000 server.
It includes:
- Oracle HTTP Server
- Oracle9iAS Containers for J2EE
- Oracle9iAS Web Cache
- Oracle Enterprise Manager
The release of installed Oracle9iAS is Release 2
(9.0.3)
I referred following link to Deploy Applications
Using WAR file:
http://otn.oracle.com/products/ias/daily/sept12.html
As mentioned in this documentation I have followed
following steps to deploy WAR file:
1] I have created a war file by name
SimpleServlet.war. In SimpleServlet.war, there is a
servlet by name Simple which prints time at which
servlet was accessed.
2] I have modified
<ora9ias_home>\j2ee\home\config\application.xml and
added following web module entry:
<web-module id="SimpleServlet"
path="../../home/applications/SimpleServlet.war" />
3] To make this module accessible from over the web,
I have modified file
<ora9ias_home>\j2ee\home\config\default-web-site.xml
and added following entry:
<web-app application="SimpleServlet"
name="SimpleServlet" root="/SimpleServlet"/>
4] I saved both the files and started Oracle HTTP
Server and accessed page as below:
http://<server>:7777/SimpleServlet/Simple
where Simple is servlet in SimpleServlet.war file.
In the browser, The page cannot be found is shown to
user. I have verified that SimpleServlet.war is
extracted to SimpleServlet folder under
<ora9ias_home>\j2ee\home\applications folder. I found
that Simple.class is stored under WEB-INF/classes
folder and web.xml contains correct entry for url
pattern for servlet Simple.
What else could be the problem? Am I placing the war
file in wrong place or modifying application.xml or
default-web-site.xml in a wrong directory?
This is very urgent. Please help me with your
valuable comments on this.
Thanks in advance.
Regards,
SandeshHave you restarted you http server and then tried to load it again? Are you using the right port; maybe you have to use port 7778? Check you server settings in the http server instance. Also check your url binding of you application at Farm > Application Server: infrastructurehost > OC4J_instance > Application: appname > Web Module: modulename
Good luck!
rgds Thomas -
Problem in loading the jaxrpc war file - URGENT
hi
i am getting the exception when i tried to load the jaxrpc war file in JWSDP2.0 version.
please see the following exception.
javax.servlet.ServletException
at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.init(JAXRPCServletDelegate.java:50)
at com.sun.xml.rpc.server.http.JAXRPCServlet.init(JAXRPCServlet.java:40)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:919)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:811)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3288)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3468)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:545)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:256)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:739)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:381)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:780)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:339)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1194)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:705)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1186)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:339)
at org.apache.catalina.core.StandardService.start(StandardService.java:496)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:699)
at org.apache.catalina.startup.Catalina.start(Catalina.java:497)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:397)
at org.apache.catalina.startup.Catalina.process(Catalina.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
[ERROR] http - -null <javax.servlet.ServletException>
thanx in advance
~prasadYes, that's true, but I think that happens because you deploy the web service in a non public area as your home directory. If you put it in a public area, your service should have 'running' status.
Pedro Salazar.
This is not a solution but I am posting this because
this might help in guessing the cause of the error.
I had similar problem. When I installed JWSDP, I
copied the hello example from the tutorial example to
my home directory. I also copied the "common"
directory which is required by the build.xml.
(common/target.xml is included in build.xml).
Then I ran "ant build" and "ant install". I made
required change in the "build.properties" in the
"common" directory. But after this when I do "ant
list" it shows me all the services running but this
hello server as stopped.
Then I copied the war file of the service (generated
using "ant package") to the <JWSDP_HOME>/webapps. Then
"ant list" showed me the hello service as running. I
don't know why this is happening.
regards
Pankaj -
Unable to deploy a simple servlet using WAR file
Hi All,
I am facing problem while deploying a simple servlet using WAR file on Oracle 9i App Server.
I have installed Oracle 9i App Server. I referred following link to Deploy Applications Using WAR file:
http://otn.oracle.com/products/ias/daily/sept12.html
As mentioned in this documentation I have followed following steps to deploy WAR file:
1] I have created a war file by name SimpleServlet.war. In SimpleServlet.war, there is a servlet by name Simple which prints time at which servlet was accessed.
2] I have modified <ora9ias_home>\j2ee\home\config\application.xml and added following web module entry:
<web-module id="SimpleServlet" path="../../home/applications/SimpleServlet.war" />
3] To make this module accessible from over the web, I have modified file
<ora9ias_home>\j2ee\home\config\default-web-site.xml and added following entry:
<web-app application="SimpleServlet" name="SimpleServlet" root="/SimpleServlet"/>
4] I saved both the files and started Oracle HTTP Server and accessed page as below:
http://<server>:7777/SimpleServlet/Simple
where Simple is servlet in SimpleServlet.war file.
In the browser, The page cannot be found is shown to user. I have verified that SimpleServlet.war is extracted to SimpleServlet folder under <ora9ias_home>\j2ee\home\applications folder. I found that Simple.class is stored under WEB-INF/classes folder and web.xml contains correct entry for url pattern for servlet Simple.
What else could be the problem? Am I placing the war file in wrong place or modfiying application.xml or default-web-site.xml in a wrong directory?
This is very urgent. Please help me with your valuable comments on this.
Thanks in advance.
Regards,
SandeshHi Juliana,
Thanks a lot for your suggestion.
I am sorry if I have posted this message to a wrong forum. This is first time I am posting a message to OTN. I will resend message to J2EE forum as per you suggestion.
Meanwhile, please note information you asked for is as below:
I installed Oracle9iAS J2EE and Web Cache v9.0.3 on Windows 2000 server.
It includes:
- Oracle HTTP Server
- Oracle9iAS Containers for J2EE
- Oracle9iAS Web Cache
- Oracle Enterprise Manager
The release of installed Oracle9iAS is Release 2 (9.0.3)
Please do reply at the earliest.
Once again thanks and look forward to hear from you.
Regards,
Sandesh -
ok this is really confusing and annoying!!! I have a .war file (servlet + jsps
+ descriptor) packaged up in the correct way, I have checked the docs like 100
times.. the problem is, I'm running win NT and when I create the war file I'm
executing 'jar' on a directory structure..
WEB-INF/classes
WEB-INF/web.xml
*.jsp
But when I view the resulting .war file in winzip, I see this..
WEB-INF/classes/all classes.....
web-inf/web.xml
where on earth is this lowercase web-inf coming from ??
as a result when i deploy this war file, it deploys fine and the init() method
of the servlet is called, however when i try to access the servlet via it's alias
(specified in web.xml) it can't be found.
The exact same files work when used as an exploded directory (DefaultWebApp),
and can be accessed via the alias.
The MS-DOS name of the directory is WEB-INF so I simply can't understand where
the "extra" lower case
directory web-inf is coming from........
Am I correct in assuming the lowercase web-inf is the problem ?? I'm not 100%
sure cos the weblogic
console can read & edit this xml file.
Has anyone else experienced WAR deployment on windows problems like this? I'd
love to get my hands on a unix box but my company suffer from unix-phobia :/
any thoughts/suggestions/solutions greatly appreciated,
thanks,
sd
Explorer in Windows has an option to allow all upper case, for example.
Peace,
Cameron Purdy
Tangosol, Inc.
Clustering Weblogic? You're either using Coherence, or you should be!
Download a Tangosol Coherence eval today at http://www.tangosol.com/
"SD" <[email protected]> wrote in message
news:[email protected]...
>
> I'm sorry but I don't understand what you mean by..
>
> >Case will mess you up. Set your explorer options so NT isn't constantly
> >"fixing" your case.
>
>
> under 'options' in windows Explorer I don't see anything
> to with case ??
>
> Also - are there any war files around that I can just
> get and install and access via their servlet-mapping just
> as a sanity check for my weblogic installation ??
> I can't get ANY servlet (in a war file) to be accessed via
> it's servlet mapping. :( But these servlet mappings can
> be seen and edited via the weblogic console.
>
> thanks,
> sd
>
> >"SD" <[email protected]> wrote in message
> >news:[email protected]...
> >>
> >> ok this is really confusing and annoying!!! I have a .war file
(servlet
> >+ jsps
> >> + descriptor) packaged up in the correct way, I have checked the docs
> >like
> >100
> >> times.. the problem is, I'm running win NT and when I create the war
> >file
> >I'm
> >> executing 'jar' on a directory structure..
> >>
> >> WEB-INF/classes
> >> WEB-INF/web.xml
> >> *.jsp
> >>
> >> But when I view the resulting .war file in winzip, I see this..
> >>
> >> WEB-INF/classes/all classes.....
> >> web-inf/web.xml
> >>
> >> where on earth is this lowercase web-inf coming from ??
> >> as a result when i deploy this war file, it deploys fine and the init()
> >method
> >> of the servlet is called, however when i try to access the servlet
> >via
> >it's alias
> >> (specified in web.xml) it can't be found.
> >>
> >> The exact same files work when used as an exploded directory
> >(DefaultWebApp),
> >> and can be accessed via the alias.
> >>
> >> The MS-DOS name of the directory is WEB-INF so I simply can't
understand
> >where
> >> the "extra" lower case
> >> directory web-inf is coming from........
> >>
> >> Am I correct in assuming the lowercase web-inf is the problem ?? I'm
> >not
> >100%
> >> sure cos the weblogic
> >> console can read & edit this xml file.
> >>
> >> Has anyone else experienced WAR deployment on windows problems like
> >this?
> >I'd
> >> love to get my hands on a unix box but my company suffer from
unix-phobia
> >:/
> >>
> >> any thoughts/suggestions/solutions greatly appreciated,
> >> thanks,
> >> sd
> >>
> >
> >
>
-
Has anyone successfully deployed servlets using WAR file?I think I did everything right. The WAR file was deployed. But I can't accesss it.
I use .war files for deploying servlets in WLS 6.0 - they are much easier
than exploded dirs...
Usually, when I have a problem accessing the servlet once deployed, it's
almost always the deployment descriptor.
"Randy" <[email protected]> wrote in message
news:3b311258$[email protected]..
> Has anyone successfully deployed servlets using WAR file?I think I did
everything right. The WAR file was deployed. But I can't accesss it.
-
hello everybody,
i deployed the one .war file which contains 1 servlet and another 10 simple classes.i
deployed using the console and everything shows fine.the servlet mapping everything
seems to be perfect.but when i run the application nothing happens.i restared
the server.
thanks for helping.
sada
You will have to be more clear on what is happening.
With you description, I assume that it is working fine in exploded format. There
are couple of things that can go wrong on war deployment.
1) Check your war file contents. Path of the contents should not include the war
file name.
For eg: /wstt/WEB-INF/classes/com/util/Sample.class
if above is the fully qualified path of a class and if your war file name is wstt
then war file should conatin the path as
/WEB-INF/classes/com/util/Sample.class
2) Check your Target cluster/server in your console for the war file.
I hope this helps.
- Albert
"sada" <[email protected]> wrote:
>
>hello everybody,
>i deployed the one .war file which contains 1 servlet and another 10
>simple classes.i
>deployed using the console and everything shows fine.the servlet mapping
>everything
>seems to be perfect.but when i run the application nothing happens.i
>restared
>the server.
>
>thanks for helping.
>sada
>
-
Problem in Servlet Compilation & Deployment
Hi Friends,
I have problem regarding Servlet Compilation & Deployment.
At the time of compilation gives error message "import javax.servlet.* is not a recognize package.
My J2ee Server gives FATAL Error it says it should be work on JDK1.2 or later.
My JDK is :-j2sdk1.4.2_04
MY J2EE Server is:-j2sdkee1.2.1
My Servlet Runner is:-JSDK2.0
My Java Enviorment is:- Version 1.5.0 (build 1.5.0_04-b05)
Path setting is:-
Class Path=C:\j2sdk1.4.2_04\lib;C:\j2sdkee1.2.1\lib\j2ee.jar;C:\JSDK2.0\lib
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=DCL-04
ComSpec=C:\WINNT\system32\cmd.exe
Please help me and give the desired result as soon as you all can
Your's Harish
ThanksAt the time of compilation gives error message "import javax.servlet.* is not a recognize package.You have to include servlet.jar or j2ee.jar in the classpath when compiling.
My JDK is :-j2sdk1.4.2_04
My Java Enviorment is:- Version 1.5.0 (build 1.5.0_04-b05)Why are the versions of your JDK and Java runtime environment different? Why are you not using Java 5 to compile and run everything?
Class Path=C:\j2sdk1.4.2_04\lib;C:\j2sdkee1.2.1\lib\j2ee.jar;C:\JSDK2.0\libIf this is an environment variable, it should be "classpath", not "Class Path" with a space in between. -
Unable to load servlet class specified in the module.
Hi,
Hope that I am in the right Forum to ask this question.
I tried to develop basic servlet example as specified in http://java.sun.com/developer/onlineTraining/J2EE/Intro2/servlet/servlet.html.
When I create WAR file in Deployment tool I get the following error. How can I rectify this?
Thank you very much for any help.
Regards,
Indika
Error :
Unable to load servlet class specified in the module.
Please contact online help for assistance.
java.lang.UnsupportedClassVersionError : bonus/controller/BonusCalculationServlet (Unsupported major.minor version 49.0)Hi Yohan_co,
I haven't used Application Server 8.2, but I think the problem is because the jdk that AS is using is previous to the jdk that your are using to compile your source files.
I hope that it helps you.
Regards -
Weblogic 6.0 sp2: War deployment not working !!
Hi,
I'm using weblogic 6.0 sp2, and it seems as though the war deployment is not
working. My war consists of jsps, images, and under the WEB-INF/classes
directory, Struts classes (i.e. Form and Action classes). When I try to run
a jsp, i get the following error :
<Jul 30, 2001 11:48:10 AM PDT> <Error> <HTTP>
<[WebAppServletContext(4655498,ati
nera)] Root cause of ServletException
javax.servlet.jsp.JspException: Exception creating bean of class
com.atinera.log
in.web.LoginForm: java.lang.ClassNotFoundException:
com.atinera.login.web.LoginF
orm
But if you look in the war, that class is in there.
What gives ?
Thanks,
JamieThat's right - ActionServlet does Class.forName(actionClass) to load action
class, and this uses ClassLoader which loaded the current class (ActionServlet)
ClassLoaders always delegate to their parent before attempting to load
the class themselves, so it wasn't working until you moved struts.jar to your
WEB-INF/lib.
BTW, Struts doc mentions this problem:
lib/struts.jar - This JAR file contains all of the Java classes included
in Struts. It should be copied into the WEB-INF/lib directory of your web
application. WARNING - If you are going to be hosting multiple Struts based
applications on the same servlet container, you will be tempted to place the
struts.jar file into the shared repository supported by your container. Be
advised that this will like cause you to encounter ClassNotFoundException
problems unless all of your application classes are stored in the shared
repository.
Jamie Tsao <[email protected]> wrote:
So I found the solution to this problem, but it doesn't really make sense to
me.
I originally had struts.jar outside of the WAR file, but in my CLASSPATH.
Weblogic was able to load Strut's ActionServlet (controller), but when the
ActionServlet was looking for the LoginForm (which was inside the WAR), it
couldn't find it.
I solved the problem by putting struts.jar inside the WAR (under
WEB-INF/lib) instead that other directory. Now it works cause apparently
ActionServlet is now in the same classloader as LoginForm, the classloader
which loaded the WAR.
I'm confused because original way should have worked since the classloader
that loaded struts.jar from outside the war is the parent classloader for
the classloader that loaded the WAR. did that make any sense ?
anyone know why ?
thanks,
jamie
"Jamie Tsao" <[email protected]> wrote in message
news:[email protected]...
Hi,
I'm using weblogic 6.0 sp2, and it seems as though the war deployment isnot
working. My war consists of jsps, images, and under the WEB-INF/classes
directory, Struts classes (i.e. Form and Action classes). When I try torun
a jsp, i get the following error :
<Jul 30, 2001 11:48:10 AM PDT> <Error> <HTTP>
<[WebAppServletContext(4655498,ati
nera)] Root cause of ServletException
javax.servlet.jsp.JspException: Exception creating bean of class
com.atinera.log
in.web.LoginForm: java.lang.ClassNotFoundException:
com.atinera.login.web.LoginF
orm
But if you look in the war, that class is in there.
What gives ?
Thanks,
Jamie
Dimitri -
Failed to load servlet Class: org.apache.jasper.servlet.JspServlet
I am evaluating Weblogic 12c and is stuck in deployment of an application.
My application is locally developed and is working fine in Oracle Glassfish. I have install glassfish and deploy application multiple time.
In weblogic I can deploy the application successfully and the state= Prepared while Health=OK.
When I access applicaiton from web browser, it says:
Error 503--Service Unavailable
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.5.4 503 Service Unavailable
The server.log is having messages similar to following:
When processing WebService module 'SHMA'. Failed to load servlet Class: org.apache.jasper.servlet.JspServlet
Ignoring: unable to load class:java.lang.ClassNotFoundException: org.apache.jasper.servlet.JspServlet at: weblogic.xml.schema.binding.util.ClassUtil.loadClass(ClassUtil.java:76)
Jun 4, 2013 5:59:36 PM com.sun.xml.ws.model.JavaMethodImpl freeze
WARNING: Input Action on WSDL operation RegisterOperation and @Action on its associated Web Method registerOperation did not match and will cause problems in dispatching the requests
Any idea about how to fix this??
Application is working fine in Glassfish 3.2
I am having RHEL6-3 x86 with JDK 1.6u45 for Bea Weblogic 12c.
ThanksProbably not the right forum. But you have the honour of being the first person to ask a specific WebLogic Server question here.
The BEA dev-2-dev site still seems to be active. Try here hunting for a category here: http://forums.bea.com/index.jspa
-steve- -
Problem loading applet from tomcat
I am facing a problem loading the batik applet from tomcat. I have placed all the jar files of batik in ROOT directory in tomcat. Along with the folder containing the batik applet. Still i receive the following exception when trying to load the html page containing batik applet.
Applet tag in html page is:
<applet codebase = "." code="batik_applet.BatikApplet.class" name="myApplet" width="1600" height="1200" hspace="0" vspace="0" align="middle" archive="batik-swing.jar,batik-gvt.jar,batik-bridge.jar,xml-apis-ext.jar,batik-css.jar,batik-util.jar,batik-dom.jar,batik-svg-dom.jar,batik-anim.jar,batik-awt-util.jar,batik-codec.jar,batik-ext.jar,batik-extension.jar,batik-gui-util.jar,batik-parser.jar,batik-script.jar,batik-svggen.jar,batik-transcoder.jar,batik-xml.jar,js.jar,pdf-transcoder.jar,xalan-2.6.0.jar,xerces_2_5_0.jar,xml-apis.jar">
</applet>
I already have a folder named batik_applet containing BatikApplet.class in the ROOT directory.
========Exception===========
network: Connecting http://localhost:8080/servlet/batik_applet/BatikApplet.class with proxy=DIRECT
network: Connecting http://localhost:8080/servlet/batik_applet/BatikApplet.class with cookie "JSESSIONID=1A75299B77372108560B4DF8DC65A3A6"
network: Connecting http://localhost:8080/servlet/batik_applet/BatikApplet/class.class with proxy=DIRECT
network: Connecting http://localhost:8080/servlet/batik_applet/BatikApplet/class.class with cookie "JSESSIONID=1A75299B77372108560B4DF8DC65A3A6"
load: class batik_applet.BatikApplet.class not found.
java.lang.ClassNotFoundException: batik_applet.BatikApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
basic: Exception: java.lang.ClassNotFoundException: batik_applet.BatikApplet.class
Any help would be appreciated.Assuming that your applet is not in a jar file (don't see a value for archive)
you have a file callsed ProcessStatus.class in a folder WEB-INF\classes relative to
the location of the jsp file.
So if the jsp file is in
myJSPFileFolder
the class should be in:
myJSPFileFolder\WEB-INF\classes
If you want to see when the jre is trying to load and where it it trying to load it from you
can inspect a full trace, to turn the full trace on (windows) you can start the java console, to be found here:
C:\Program Files\Java\j2re1.4...\bin\jpicpl32.exe
In the advanced tab you can fill in something for runtime parameters fill in this:
-Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect
if you cannot start the java console check here:
C:\Documents and Settings\userName\Application Data\Sun\Java\Deployment\deployment.properties
I think for linux this is somewhere in youruserdir/java (hidden directory)
add or change the following line:
javaplugin.jre.params=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
for 1.5:
deployment.javapi.jre.1.5.0.args=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
The trace is here:
C:\Documents and Settings\your user\Application Data\Sun\Java\Deployment\log\plugin...log
I think for linux this is somewhere in youruserdir/java (hidden directory)
The trace should show something like :
Caused by: java.io.FileNotFoundException: http://server/location/filename.class (The system cannot find the path specified) -
Loading Servlet Error - Websphere
Hi,
I have deployed a application in WebSphere v.4. when I am starting the Application, It is giving below error. Wht is cause pls help. Urgent.
Error:
Servlet Error-[UpDelScoreSheetServlet]: Failed to load servlet: java.lang.NoClassDefFoundError: java/lang/CharSequence
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java(Compiled Code))
at java.beans.Beans.instantiate(Beans.java:233)
at java.beans.Beans.instantiate(Beans.java:77)
at com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:141)
at com.ibm.servlet.engine.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:325)
at com.ibm.servlet.engine.webapp.WebApp.loadServletManager(WebApp.java:1217)
at com.ibm.servlet.engine.webapp.WebApp.init(WebApp.java:145)
at com.ibm.servlet.engine.srt.WebGroup.loadWebApp(WebGroup.java:259)
at com.ibm.servlet.engine.srt.WebGroup.init(WebGroup.java:168)
at com.ibm.servlet.engine.ServletEngine.addWebApplication(ServletEngine.java:856)
at com.ibm.ws.runtime.WebContainer.install(WebContainer.java:36)
at com.ibm.ws.runtime.Server.startModule(Server.java:617)
at com.ibm.ejs.sm.active.ActiveModule.startModule(ActiveModule.java:511)
at com.ibm.ejs.sm.active.ActiveModule.startAction(ActiveModule.java:355)
at com.ibm.ejs.sm.active.ActiveObject.startObject(ActiveObject.java:722)
at com.ibm.ejs.sm.active.ActiveObject.start(ActiveObject.java:131)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ejs.sm.agent.AdminAgentImpl.activeObjectInvocation(AdminAgentImpl.java:93)
at com.ibm.ejs.sm.active.ActiveObject.invokeContainedObject(ActiveObject.java:525)
at com.ibm.ejs.sm.agent.AdminAgentImpl.activeObjectInvocation(AdminAgentImpl.java:110)
at com.ibm.ejs.sm.agent.AdminAgentImpl.invokeActiveObject(AdminAgentImpl.java:62)
at com.ibm.ejs.sm.agent._AdminAgentImpl_Tie._invoke(_AdminAgentImpl_Tie.java:73)
at com.ibm.CORBA.iiop.ExtendedServerDelegate.dispatch(ExtendedServerDelegate.java:532)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:2395)
at com.ibm.CORBA.iiop.OrbWorker.run(OrbWorker.java:186)
at com.ibm.ejs.oa.pool.ThreadPool$PooledWorker.run(ThreadPool.java:104)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:138)Hi
Sounds like you wrote your code against JDK 1.4.2 but WebSphere is probably running on 1.3.x (can't remember exactly what WAS 4 run on)
So although your code compiled, WAS doesn't know what CharSequence is because it only became part of the java.lang package in 1.4.x
I suggest you change your JDK down to the version used in WAS because you'll probably find other problems that you weren't expecting due to the difference in JDK versions.
-Rich -
Hi, there:
we have deployed our application in EAR format in \config\mydomain\applications.
This EAR contains one ejb.jar and one web.war. I can access a servlet after I
deployed the EAR file into weblogic 6.1 sp1. However, if I redeploy this EAR file
from within weblogic console. I got the following error when I revisit that servlet
again.
<Jan 17, 2002 9:30:41 PM PST> <Error> <HTTP> <[WebAppServletContext(1485918,plat
form,/platform)] Error loading servlet: 'EbuController'
java.lang.NoClassDefFoundError
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
pl.java:665)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub
Impl.java:643)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
mpl.java:588)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
java:368)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:242)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2456)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
<Jan 17, 2002 9:30:41 PM PST> <Error> <HTTP> <[WebAppServletContext(1485918,plat
form,/platform)] Error loading servlet: "EbuController"
java.lang.NoClassDefFoundError
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
pl.java:665)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub
Impl.java:643)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
mpl.java:588)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
java:368)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:242)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2456)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Your help is highly appreciated!
Jerry
Hi, there:
we have deployed our application in EAR format in \config\mydomain\applications.
This EAR contains one ejb.jar and one web.war. I can access a servlet after I
deployed the EAR file into weblogic 6.1 sp1. However, if I redeploy this EAR file
from within weblogic console. I got the following error when I revisit that servlet
again.
<Jan 17, 2002 9:30:41 PM PST> <Error> <HTTP> <[WebAppServletContext(1485918,plat
form,/platform)] Error loading servlet: 'EbuController'
java.lang.NoClassDefFoundError
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
pl.java:665)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub
Impl.java:643)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
mpl.java:588)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
java:368)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:242)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2456)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
<Jan 17, 2002 9:30:41 PM PST> <Error> <HTTP> <[WebAppServletContext(1485918,plat
form,/platform)] Error loading servlet: "EbuController"
java.lang.NoClassDefFoundError
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
pl.java:665)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub
Impl.java:643)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
mpl.java:588)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
java:368)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:242)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2456)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Your help is highly appreciated!
Jerry
-
Error loading servlet because a ClassNotFoundError
Hi,
I send a request to a servlet named "ControlAcceso".
The WebLogic server prints:
Error loading servlet: 'ControlAcceso'
java.lang.NoClassDefFoundError: gov/co/ssp/suin/ejb/ServiciosAutenticacionHome
at gov.co.ssp.suin.web.ControlAcceso.init(ControlAcceso.java:23)
I have an EJB that has a home interface named gov.co.ssp.suin.ejb.ServiciosAutenticacionHome;
the file ServiciosAutenticacionHome.class is located in a directory named /gov/co/ssp/suin/ejb
in a sui_ejb.jar file and in a sui_web.war file.
Besides, I put the sui_ejb.jar in the CLASSPATH of WebLogic Server in the setEnv.cmd
file.
A piece of code of the ControlAcceso.java servlet follows:
package gov.co.ssp.suin.web;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import javax.naming.*;
import gov.co.ssp.suin.ejb.ServiciosAutenticacionHome ;
import gov.co.ssp.suin.ejb.ServiciosAutenticacion ;
import gov.co.ssp.suin.comun.* ;
import gov.co.ssp.suin.ejb.ServiciosAutenticacionHome ;
public class ControlAcceso extends HttpServlet {
ServiciosAutenticacion servAutenticacion;
HttpSession session ;
* Initialize global variables
public void init(ServletConfig config) throws ServletException {
super.init(config);
try{
Context ctx = new InitialContext();
ServiciosAutenticacionHome home = (ServiciosAutenticacionHome) ctx.lookup("ServiciosAutenticacion.ServiciosAutenticacionHome");
servAutenticacion = home.create();
} catch ( java.rmi.RemoteException re ) {
System.out.println("ControlAcceso.init: Excepcion RemoteException: ####
" + re.getMessage() );
throw new ServletException(re);
catch (javax.naming.NamingException ne) {
System.out.println("ControlAcceso.init: Excepcion NamingException: ####
" + ne.getMessage() );
javax.naming.Name name = ne.getRemainingName();
for (Enumeration e = name.getAll() ; e.hasMoreElements() ;) {
System.out.println(e.nextElement());
throw new ServletException(ne);
catch(Exception e){
System.out.println("ControlAcceso.init: #######" + e.getMessage() );
throw new ServletException(e);
Any help is really appreciated.
Regards.
- Ricardo De la Rosa (Colombia)
[NoClassDefFoundError.txt]You're welcome. Glad to help.
Regards,
Slava Imeshev
"Ricardo De la Rosa" <[email protected]> wrote in message
news:[email protected]...
>
Slava,
Thank you very much.
Your answer (and clues) were the solution to my problem.
Best regards from Colombia !
- Ricardo.
"Slava Imeshev" <[email protected]> wrote:
Hi Ricardo,
NoClassDefFoundError means that though the classloader
has been able to find ServiciosAutenticacionHome, it's not
been able to locate supporting classes or interfaces used by
ServiciosAutenticacionHome. Make sure your ejb-jar contains
all necessary classes.
Regards,
Slava Imeshev
"Ricardo De la Rosa" <[email protected]> wrote in message
news:[email protected]...
Hi,
I send a request to a servlet named "ControlAcceso".
The WebLogic server prints:
Error loading servlet: 'ControlAcceso'
java.lang.NoClassDefFoundError:gov/co/ssp/suin/ejb/ServiciosAutenticacionHome
at
gov.co.ssp.suin.web.ControlAcceso.init(ControlAcceso.java:23)
>>>
I have an EJB that has a home interface namedgov.co.ssp.suin.ejb.ServiciosAutenticacionHome;
the file ServiciosAutenticacionHome.class is located in a directorynamed
/gov/co/ssp/suin/ejb
in a sui_ejb.jar file and in a sui_web.war file.
Besides, I put the sui_ejb.jar in the CLASSPATH of WebLogic Serverin the
setEnv.cmd
file.
A piece of code of the ControlAcceso.java servlet follows:
package gov.co.ssp.suin.web;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import javax.naming.*;
import gov.co.ssp.suin.ejb.ServiciosAutenticacionHome ;
import gov.co.ssp.suin.ejb.ServiciosAutenticacion ;
import gov.co.ssp.suin.comun.* ;
import gov.co.ssp.suin.ejb.ServiciosAutenticacionHome ;
public class ControlAcceso extends HttpServlet {
ServiciosAutenticacion servAutenticacion;
HttpSession session ;
* Initialize global variables
public void init(ServletConfig config) throws ServletException {
super.init(config);
try{
Context ctx = new InitialContext();
ServiciosAutenticacionHome home = (ServiciosAutenticacionHome)ctx.lookup("ServiciosAutenticacion.ServiciosAutenticacionHome");
servAutenticacion = home.create();
} catch ( java.rmi.RemoteException re ) {
System.out.println("ControlAcceso.init: Excepcion
RemoteException:
" + re.getMessage() );
throw new ServletException(re);
catch (javax.naming.NamingException ne) {
System.out.println("ControlAcceso.init: Excepcion
NamingException:
" + ne.getMessage() );
javax.naming.Name name = ne.getRemainingName();
for (Enumeration e = name.getAll() ; e.hasMoreElements() ;) {
System.out.println(e.nextElement());
throw new ServletException(ne);
catch(Exception e){
System.out.println("ControlAcceso.init: #######" + e.getMessage());
throw new ServletException(e);
Any help is really appreciated.
Regards.
- Ricardo De la Rosa (Colombia)
Maybe you are looking for
-
Problem with creation of site (SMWP)
Hi All I am currently working on SAP SRM 7.0 , middleware settings for master data replication from SAP ECC to SRM. I am facing a strange issue. when I try to create a site for backend ECC system in transaction SMWP. When I click on site attributes f
-
Which iPad would be suitable for me?
NEED HELP CHOOSING! Hi, I am currently a student in school and I plan to get the iPad to use it as a file holder and an enterntainment device. I have a laptop and I was planning on using it as a desktop, while using the iPad to hold word files and di
-
Read CLOB(sql instruction) and execute his content
Hi; I have a clob in table that contains few instructions of sql(text in clob is sql instruction delimited by '/sql' for each one). I want to create o procedure to load the clob ,parse it; and execute the instruction contains in him by the following
-
Tools keep turning into the Hand Move tool
all of a sudden I am having a problem with my tools turning into the hand move tool, no matter which tool I use. I moved the Wacom pen 5 feet away (this moving away seemed to fix it before but not now). Any suggestions? Bob
-
Hi Has anyone else lost their internet banking as a result of Safari 5? I have been told I need to reinstall the operating system and only being a MAC user for about a week am very irked. Luddite54