Log4j classpath problems
Hi.
I wrote a message driven bean and deployed it succesfully to bea. now i am trying
to incorporate log4j.
my bean compiles fine. to use log4j, i have imported org/apache/log4j/*
but when i try to deploy to bea, i get errors saying :
Unable to deploy EJB: vemMessageBean.jar from vemMessageBean.jar:
java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator
at com.mgb.vem.beans.VEMMessageBean.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39) ....
i have tried placing log4j.jar in my applications directory...that didnt work.
I tried editing my domain's setEnv to point to weblogic81/common/lib/log4j
that didnt work
Can someone help me ? What am i doing wrong ?
thanks
nish
Hi.
I wrote a message driven bean and deployed it succesfully to bea. now i am trying
to incorporate log4j.
my bean compiles fine. to use log4j, i have imported org/apache/log4j/*
but when i try to deploy to bea, i get errors saying :
Unable to deploy EJB: vemMessageBean.jar from vemMessageBean.jar:
java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator
at com.mgb.vem.beans.VEMMessageBean.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39) ....
i have tried placing log4j.jar in my applications directory...that didnt work.
I tried editing my domain's setEnv to point to weblogic81/common/lib/log4j
that didnt work
Can someone help me ? What am i doing wrong ?
thanks
nish
Similar Messages
-
Weblogic 10.0 and Log4j classpath problem
My applications were working fine in WLS 9 but when I upgaded to WLS 10 I started getting log4j configuration and resource finding errors.
Basically, if I do a "Logger.class.getClassLoader().getResourceAsStream(file)" I get a null pointer excep. bec. the classloader can't find the file that's packed within the EAR.
Log4j.jar is in my web-inf/lib folder. I also tried putting it in APP-INF/lib to no avail
Note: In WLS 9.2, there is a log4j jar in BEA_HOME/common/lib and a wllog4j in BEA_HOME/server/lib. So.... it looks like the log4j jar was in the classpath before too. So, not sure what's going on with 10.0
Any insight into this would be greatly appreciated.
Edited by mariorod at 05/15/2008 2:47 PMThanks!
I tried using the same log4j version that WLS10 uses (log4j 1.2.13) and ....... it still didn't work!
From reading the URL that you stated above, it looks like if log4j 1.2.13 exists in WEB-INF/lib and the WLS modules dir, then WLS will still load the log4j classes from the SYSTEM CP rather than from the web app CP.....
That seems to explain why even after updating my lib to use the same jar, it still can't find a resource in the web app..
Is this assumption correct/wrong?
Any other ideas anyone?
Edited by mariorod at 05/16/2008 8:33 AM -
i am here stuck..
my dir structure is
c:\my\xxx\yyy\zzz
i have a code ...
package xxx.yyy.zzz;
class A
// some code
}i have compiled sucessfully and put the clsss file into c:\my\xxx\yyy\zzz folder.
now i want to import it in another class
like...
package xxx.yyy; // note this
import xxx.yyy.zzz.*; // note this
class B
// some code
// creating instance of class A here
}question is how do i compile and run it ?
i am at c:\my---> what should be the command to compile and run the above code?
plz give me the explicit command so that i can test and verify . i have given the dir structure.
i have tried several ways but got class not found exception and errors . i know its a classpath problem but i could not figure out what should i type at the c:\my prompt.
can u give exact command to run and compile the above code in steps ?
thanxquestion is how do i compile and run it ?You don't with that code. You've defined class A to have "package visibility," meaning it can't be used from outside its package. You should declare it with public visibility instead, like "public class A {...".
Once you change that, use these commands to compile and run:c:\my\>javac xxx/yyy/zzz/A.java
c:\my\>javac xxx/yyy/B.java
c:\my\>java xxx.yyy.B -
Classpath Problem (Using JSAPI)
Hi,
I using IBM Via Voice as a the implementation of the JSAPI on my system. I've downloaded the speech for java pack from IBM Alphaworks and put it in the directory of
c:\ibmjs
This gives you access to the speech packages for utilisation in your programs so I should be able to import javax.speech in my programs. However the system doesn't see these classes.
Heres my Autoexec...
path=%path%;c:\jdk1.3.1_01\bin;c:\ibmjs\lib;
CLASSPATH=%CLASSPATH%;c:\ibmjs\lib\ibmjs.jar;
I presume the whole thing is just a classpath problem, does anybody have any idea from the above paths where I am going wrong?i guess you have to put some of ibm's dll files coming with speech for java in the path (not classpath). it's not sufficient to have the directories in the path.
anyway, there come's an installation manual with speech for java which explaines all that. -
Fragment Bundle Classpath problems
Does anyone have any tips for solving classpath problems in fragment bundles? I'm getting a no-class-def that I can't explain.
I've used maven to create a fragment, hosted by com.day.crx.sling.server, to create a custom login. It needs to call a web service, so I've included httpclient-4.2.3.jar. I can see this jar listed on the deployed fragment's Bundle-ClassPath, via the osgi>bundle console. When I inspect the bundle that maven created, I can find this jar contained in the bundle jar, in the directory specified in the Bundle-ClassPath. I even oppened the httpclient jar to ensure that the offending class (org/apache/http/client/HttpClient) is there.
This is the first fragment that I've tried to build. Is there something I don't know about how they load classes?
Does anyone have any tips or tricks on solving osgi classpath problems? I read that felix has some tools, but I haven't found any documentation about them.I'm still not sure why the classes didn't load, but I have a solution to my problem - don't try to include the jars in the fragment bundle. I tracked down osgi-ready versions of the libraries that I needed and and installed them.
-
Another simple classpath problem question
Hi All
Yes I know, there are a lots of questions about this matter, but I couldn't found a solution to my problem.
I have a simple program:
public class prueba {
public static void main(String[] args) {
System.out.println("Ahi va...");
}placed in /tmp/javier/prueba.java
After compiled, I've tried to run it from / and then problems started:
cd /
java /tmp/javier/prueba
Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
I said, ok...it could be a classpath problem...then:
java -cp /tmp/javier/ /tmp/javier/prueba
Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba
Damn, another try...
java -cp .:/tmp/javier/ /tmp/javier/prueba
Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
Jesus Christ....may be the last slash....
java -cp .:/tmp/javier /tmp/javier/prueba
Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
Oh...no.... may be classpath to java classes..
java -cp .:/usr/java/j2sdk1.4.2_01/lib/jre/:/tmp/javier/ /tmp/javier/prueba
Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
Well, I don't know why this error happens....
Please, could somebody help me !!!
Thanks in advance...
<jl>It's not too early to start following the Sun coding
conventions for Java:
http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.
tmlHi
thanks for your reply.
Yes, I agree. I use conventions with my programs. But my real problem was with a real application and then I did quickly this simple code to help others to understand the problem and give a fast reply...
Let me know if that works. (It was fine on my
machine.) - MODYes it works fine, thanks.... and Damn...Murphys law again, the only option I didn't tried is the solution to my problem... :)
Thanks again... -
Classpath problems in EAR packaging?
I try to access an EJB from a JSP. The JSP resides in web.war and the bean is in ejb.jar, and both of these are packaged together in an ear.
I get a compile error when I try opening a JSP. I've had this problem in all my attempts to use my bean classes from JSP.
My browser reports that the compiler cannot find the beans package. I have servlets within the war-file that are able to find the beans package, but the JSPs aren't.
My ear-file contains 3 files
ejb.jar
web.war
META-INF\MANIFEST.MF
The manifest classpath points to ejb.jar and web.war
My guess is that this has something to do with the way this is deployed by GlassFish.
The application is deployed in the
domains\mydomain\applications\j2ee-apps\myear\
This directory contains the expanded files:
ejb_jar\
web_war\
META-INF
So the Java classes under web_war\ are able to see the Java classes under ejb_jar\ (i.e. my servlets)
However; when GlassFish creates Java files from the JSPs and then tries to compile them, these files are placed under
domains\mydomain\generated\jsp\j2ee-apps\myear\web_war\org\apache\jsp\jsp
This might be correct for all I know, but apparently the compiler is unable to find the Java classes located under the mydomain\applications\.. directory when compiling classes located under the mydomain\generated\.. directory. There are no other files from my ear anywhere in the "generated" directory.
So to me this seems to be some kind of classpath problem, as the compiler cannot find the needed files.
Does this make any sense to anyone?
PS
In my ear, the JSPs are placed in the web.war. The war file looks like this:
jsp\
myjsp.jsp
META-INF
MANIFEST.MF
WEB-INF
web.xml
lib\
mylib.jarThanks
\\MariusMarius,
If you want communicate the bean you have to do following things.
. Create a factory for the correct protocol
. Obtain a Home
. Use the Home to create stubs to the remote object
So you want to call the Home and Remote interfaces to access the bean. When you run the client program, it will create the remote object that time it has to search the Home and Remote interfaces. So you have included those files for references in following location
WEB-INF/classes
-- <Home Interface File Name>.class
-- <Remote Interface File Name>.class
Or
WEB-INF/lib
-- <Bean Jar file name>.jar
I think you will understand.
-Mani -
again classpath problem.... i have tried to solve it in many ways but all failed. here is one
instance of my effort which did not give me success.
i have a FOLDER > c:/com/abc/def/ijk
and files......
MyClass.java
==============
package com.abc.def.ijk
class MyClass
// blah
// blah
}c:\com\abc\def\ijk>javac MyClass.java ===>compiled fine and created a class file.
and also one more file.....
OneMoreClass.java
=================
import com.abc.def.ijk.MyClass
class OneMoreClass
// blah
// blah
}c:\com\abc\def\ijk>javac OneMoreClass.java ===> Error!!! package com.abc.def.ijk does not exist !!!!
how can i solve it ?yea, this works....eariler i also usued to do this
way. but this time i forgot.
by the way, why individually it did not work !!!.Because you were in the package directory itself, and the classpath was set to the cwd, so java was looking for package directories at this level.
and also when i specify directly by
c:\com\abc\def\ijk
javac -classpath c:\com\abc\def\ijk\MyClass
OneMoreClass.java ...it does not work!!.
STRANGE! why ?Because by stating the package directory as classpath, you do the same as explained above. Stay out of package directories, stay one level above them, don't regard them as common directories. When declaring classpaths, don't mention package directories but the directories that contain them. -
JDBC and Classpath problems on OpenVMS
Hello,
I'm working on an OpenVMS server and I got a simpler Java application that needs to establish a connection to an Oracle database, the application works perfectly well on Windows but when I moved to OpenVMS I got some problems with the oracle driver.
I believe I�m using the correct driver, I already checked on the oracle site according to my java version (1.4.2) and my database version (oracle 9i 9.2.0.7.0)
This is the error:
$java -jar miss.jar "DnBProcess"
About to start loading parameters for the MISS Proxy.
Successfully load parameters for the MISS Proxy.
About to load interface settings for DnBProcess
Settings for DnBProcess succesffully loaded.
About to load interface DnBProcess
About to start loading parameters for DnB Interface.
Successfully load parameters for DnB Interface.
Interface DnBProcess succesffully loaded.
About to execute interface DnBProcess
Connecting to the database...
java.lang.NoClassDefFoundError: oracle/jdbc/OracleDriver
at miss.DnBProcess.ExecuteQueryToFile(DnBProcess.java:85)
at miss.DnBProcess.Execute(DnBProcess.java:178)
at miss.Proxy.ExecuteInterface(Proxy.java:160)
at miss.Proxy.main(Proxy.java:207)
I know is a classpath problem, and my classpath on VMS looks like this:
define JAVA$CLASSPATH .,SYS$COMMON:[JAVA$142.LIB]TOOLS.JAR,SYS$COMMON:[JAVA$142.LIB]DT.JAR,SYS$COMMON:[JAVA$142.JRE.LIB]RT.JAR, USER1:[MONTEALEGRE.TEST.LIBS]OJDBC14.JAR,USER1:[MONTEALEGRE.TEST.MISS.LIBS]OJDBC14.JAR,[]
As you can see I added the �ojdbc14.jar� in different folders but my application seems not to find it.
Does anyone know how to set the classpath properly on VMS? Or maybe give me some tips that could lead me to find a solution to this problem.
Thanks.
Ileana.I would try googling for OpenVMS classpath. Unfortunatley the first result is this thread but there are a bunch of resources from IBM and HP listed and maybe they can help you.
-
Help classpath problem j2sdk1.4.2_04
help classpath problem j2sdk1.4.2_04
how can i run the java program with specify the file location
such as :
-----this one is fine ok and return HelloWorld.class-----
[root@localhost root]javac /serverData/studentAC/s001/HelloWorld.java
-----but this one cause exception-----
[root@localhost root]java /serverData/studentAC/s001/HelloWorld
-----result-----
Exception in thred "main" java.lang.NoClassDefFoundError: /serverData/studentAC/s001/HelloWorld
[root@localhost root]
I have tried a lot of classpath setting:
I just want to compile and run the java program without specify the classpath only !! please help !!! and give suggest !! if you have this exp!!
# ---1
#PATH=/usr/java/j2sdk1.4.2_04/bin:$PATH:$HOME/bin:./
#export PATH
#export JAVA_HOME=/usr/java/j2sdk1.4.2_04/
#export #CLASSPATH=/usr/java/j2sdk1.4.2_04/lib/tools.jar:/usr/java/j2sdk1.4.2_04/jre/lib/rt.jar:./
# ---2
#set java environment
# Java Setup Section START
export JAVA_HOME="/usr/java/j2sdk1.4.2_04"
export JRE="$JAVA_HOME/jre"
export CLASSPATH="$JAVA_HOME/lib:$JRE/lib:$JAVA_HOME/lib/tools.jar:."
export PATH="$PATH:$JAVA_HOME/bin"
# Java Setup Section END
# ---3
#PATH=$PATH:/usr/java/j2sdk1.4.2_04/bin
#JAVA_HOME=/usr/java/j2sdk1.4.2_04/
#export PATH
# ---4
# Java Setup Section START
#JAVA_HOME=/usr/java/j2sdk1.4.2_04
#export JAVA_HOME
#CLASSPATH=$CLASSPATH:/usr/java/j2sdk1.4.2_04/lib:/usr/java/j2sdk1.4.2_04/jre/lib:./
#export CLASSPATH
#PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
#export PATH
# Java Setup Section END
# ---5
#export PATH=$PATH:/usr/java/j2sdk1.4.2_04/bin
#export JAVA_HOME=/usr/java/j2sdk1.4.2_04
#export CLASSPATH=/usr/java/j2sdk1.4.2_04/lib:$CLASSPATH:.
# ---6
#====================================================
#export JAVA_HOME=/usr/java/j2sdk1.4.2_04
#export PATH=$JAVA_HOME/bin:$PATH
#export CLASSPATH=/usr/java/j2sdk1.4.2_04/lib:$CLASSPATH
#====================================================I think this will work. java -classpath /serverData/studentAC/s001 HelloWorld
-
RollingFileAppender/Log4J question (problem with reading logging)
Hi everyone,
I've got a question about log4j.
I'm working with an application that generates a lot of logging. When I'm trying to figure out problems in the application it's hard to read the log files because they get updated/overwritten all the time.
The mechanism of the RollingFileAppender of log4j is that when the maximum file size is reached a new log file is created with <filename>.1 and the name of every file that already existed is increased with 1.
So when I try to read my logfiles they get overwritten while I'm reading it because the application generates a new logfile sometimes 4 times per minute. That's very annoying, so what I would like to have is that everytime a new logfile is created it's number is increased with 1 until a maximum of files and then start over.
I've been trying to find this mechanism somewhere but can't find it. The DailyRollingFileAppender kinda does what I want but you can't set a maximum of files and I can't have that because of the space available on the server.
Does anyone know how to solve this?I've got a question about log4j.
I'm working with an application that generates a lot
of logging. When I'm trying to figure out problems in
the application it's hard to read the log files
because they get updated/overwritten all the time.
The mechanism of the RollingFileAppender of log4j is
that when the maximum file size is reached a new log
file is created with <filename>.1 and the name of
every file that already existed is increased with 1.
So when I try to read my logfiles they get
overwritten while I'm reading it because the
e application generates a new logfile sometimes 4
times per minute. That's very annoying, so what I
would like to have is that everytime a new logfile is
created it's number is increased with 1 until a
maximum of files and then start over.That's not Log4J's problem. That's your problem for treating log files like production data. Maybe you need to use something else, like writing this supposedly persistent data to a database.
I've been trying to find this mechanism somewhere but
can't find it. The DailyRollingFileAppender kinda
does what I want but you can't set a maximum of files
and I can't have that because of the space available
on the server.What stops you from introducing another periodic process, to purge old log files? That's what most would do. -
Log4j RollingFileAppender problem
We are having problems using the RollingFileAppender in a Weblog 7 application.
We are noticing that there are missing backups on our server. Here is the log4j
configuration file:
===========================================
#set the level of the root logger at debug and define the appender
log4j.rootLogger=DEBUG, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=logs/WB.log
#size the log file at 10MB
log4j.appender.R.MaxFileSize=10MB
# Keep ten backup files
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c -> %m%n
#turn off logging for the apache classes
log4j.logger.org.apache=OFF
==============================================
One other thing we noticed was that Weblogic appears to open the base log file
as soon as the server is started. It does not relinquish control of the file.
Is this the case?
The directory of our server looks like this today:
WB.log
WB.log.9
WB.log.10
Any help is appreciated.
Thanks,
WillI've got a question about log4j.
I'm working with an application that generates a lot
of logging. When I'm trying to figure out problems in
the application it's hard to read the log files
because they get updated/overwritten all the time.
The mechanism of the RollingFileAppender of log4j is
that when the maximum file size is reached a new log
file is created with <filename>.1 and the name of
every file that already existed is increased with 1.
So when I try to read my logfiles they get
overwritten while I'm reading it because the
e application generates a new logfile sometimes 4
times per minute. That's very annoying, so what I
would like to have is that everytime a new logfile is
created it's number is increased with 1 until a
maximum of files and then start over.That's not Log4J's problem. That's your problem for treating log files like production data. Maybe you need to use something else, like writing this supposedly persistent data to a database.
I've been trying to find this mechanism somewhere but
can't find it. The DailyRollingFileAppender kinda
does what I want but you can't set a maximum of files
and I can't have that because of the space available
on the server.What stops you from introducing another periodic process, to purge old log files? That's what most would do. -
I'm trying to find out the status of the servicegen classloading problem
(specifying a classpath in a servicegen task causes class cast exceptions).
We are currently using the workaround described in this group which is
putting the weblogic jars in the system classpath. This workaround is very
unwieldy in our build environment. Is there any estimate on when the
problem will be fixed?And was it? I am using 7.0sp4 and am getting classpath problems in servicegen.
The problem I am having is that the type generation fails to find any of the weblogic
utility classes, sug as weblogic.xml.schema.binding.util.runtime.PropertyInfo
(and many many others)
"Neal Yin" <[email protected]> wrote:
This will be fixed in 7.0sp3 and 8.1sp1.
Thanks,
-Neal
"John Horner" <[email protected]> wrote in message
news:[email protected]..
I'm trying to find out the status of the servicegen classloading problem
(specifying a classpath in a servicegen task causes class castexceptions).
We are currently using the workaround described in this group whichis
putting the weblogic jars in the system classpath. This workaroundis
very
unwieldy in our build environment. Is there any estimate on when the
problem will be fixed? -
Log4j classpath setting in weblogic server 8.1
Hi,
I placed all my properties files outside ear file in the folder C:\bea\user_projects\domains\xyz\config . I changed classpath setting in startweblogic.cmd as follows
set CLASSPATH=%WEBLOGIC_CLASSPATH%;%POINTBASE_CLASSPATH%;%JAVA_HOME%\jre\lib\rt.jar;%WL_HOME%\server\lib\webservices.jar;./config;%CLASSPATH%;When i run my application, these properties are getting picked up and logs comming up in the spcified folder I have done this in windows platform.
When i tried the same in unix box, by keeping properties files in separate folder and including that folder in classpath of startManagedWebLogic.cmd. Here is my classpath settings that i have modified
$/data/weblogic/app_properties/log4j.properties:$/data/weblogic/app_properties/download.properties:Problem here is i am not able to get the logs updated,even though my application is running fine.
Can you any one please tell me am i missing anything.
Thanks,
RamHi,
I placed all my properties files outside ear file in the folder C:\bea\user_projects\domains\xyz\config . I changed classpath setting in startweblogic.cmd as follows
set CLASSPATH=%WEBLOGIC_CLASSPATH%;%POINTBASE_CLASSPATH%;%JAVA_HOME%\jre\lib\rt.jar;%WL_HOME%\server\lib\webservices.jar;./config;%CLASSPATH%;When i run my application, these properties are getting picked up and logs comming up in the spcified folder I have done this in windows platform.
When i tried the same in unix box, by keeping properties files in separate folder and including that folder in classpath of startManagedWebLogic.cmd. Here is my classpath settings that i have modified
$/data/weblogic/app_properties/log4j.properties:$/data/weblogic/app_properties/download.properties:Problem here is i am not able to get the logs updated,even though my application is running fine.
Can you any one please tell me am i missing anything.
Thanks,
Ram -
Classpath problem in exploded ear
I'm having problems deploying an application in a new environment. We deploy Mercury.ear as an exploded ear under
Windows in a single-server domain without any problem.
I am tasked with setting up a WL cluster as the first step in our cluster certification/testing (under Linux/RedHat ASE 3.0).
We are using WL 8.1. SP2. This should be a relatively trivial task, but I must be missing something obvious,
because I've been banging my head on it the last couple of days.
Basically, I have two WL managed servers, ClusterMember1 and ClusterMember2 and an admin server AdminServer created in a WL domain.
All servers start normally (when no applications are deployed to the managed servers).
I have appended our entire config.xml to the end of this post, but here is the relevant <Application> section:
<Application Name="Mercury"
Path="/root/bea/user_projects/domains/clusterdomain/applications/Mercury"
StagingMode="nostage" TwoPhase="true">
<EJBComponent Name="MercuryEJB.jar" Targets="ClusterMember1" URI="MercuryEJB.jar"/>
<WebAppComponent Name="Apollo" Targets="ClusterMember1" URI="MercuryWeb.war"/>
<ConnectorComponent Name="SpectraConnector.rar"
Targets="ClusterMember1" URI="SpectraConnector.rar"/>
</Application>
I am only attempting to deploy to managed server ClusterMember1 at this time.
When I attempt to start ClusterMember1:
./startManagedWebLogic.sh ClusterMember1 http://localhost:9001 &
It starts up, syncs with the admin server, and then attempts to deploy the Mercury application. I get the following exception when it attempts to start the Mercury application:
<Feb 1, 2006 10:07:55 AM CST> <Error> <HTTP> <BEA-101216> <Servlet: "context" failed to preload on startup in Web application: "Apollo".
javax.servlet.ServletException: Error registering bean with name 'ApolloSessionManager' defined in URL [file:/root/bea/user_projects/domains/clusterdomain/applications/Mercury/mercuryresources.jar/resources/xml/springconfig/Service-DAO-config.xml]: Class that bean class [com.sg.sims.mercury.apolloweb.service.processor.ApolloSessionManager] depends on not found; nested exception is java.lang.NoClassDefFoundError: com/sg/sims/mercury/apolloweb/service/processor/ApolloSessionManager
at weblogic.servlet.internal.ServletStubImpl.createServlet()Ljavax/servlet/Servlet;(ServletStubImpl.java:985)
{...snipped...}
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'ApolloSessionManager' defined in URL [file:/root/bea/user_projects/domains/clusterdomain/applications/Mercury/mercuryresources.jar/resources/xml/springconfig/Service-DAO-config.xml]: Class that bean class [com.sg.sims.mercury.apolloweb.service.processor.ApolloSessionManager] depends on not found; nested exception is java.lang.NoClassDefFoundError: com/sg/sims/mercury/apolloweb/service/processor/ApolloSessionManager
at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinition(Lorg/w3c/dom/Element;Ljava/lang/String;)Lorg/springframework/beans/factory/config/BeanDefinition;(DefaultXmlBeanDefinitionParser.java:366)
{...snipped...}
Caused by: java.lang.NoClassDefFoundError: com/sg/sims/mercury/apolloweb/service/processor/ApolloSessionManager
at java.lang.Class.forName(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;(Unknown Source)
at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition(Ljava/lang/String;Ljava/lang/String;Lorg/springframework/beans/factory/config/ConstructorArgumentValues;Lorg/springframework/beans/MutablePropertyValues;Ljava/lang/ClassLoader;)Lorg/springframework/beans/factory/support/AbstractBeanDefinition;(BeanDefinitionReaderUtils.java:50)
{...snipped...}
Clearly, Spring can't find the ApolloSessionManager class (or one of its dependent classes, the error message is somewhat unclear in places).
However, the ApolloSessionManager.class file is there, under the mercurybusiness.jar directory (with package structure).
// from ${DOMAIN_HOME}/applications/Mercury:
ls -la mercurybusiness.jar/com/sg/sims/mercury/apolloweb/service/processor/ApolloSessionManager
-rw-r--r-- 1 root root 7162 Jan 31 17:20 mercurybusiness.jar/com/sg/sims/mercury/apolloweb/service/processor/ApolloSessionManager.class
mercurybusiness.jar (in turn) is present in the MercuryEJB.jar MANIFEST.MF file:
// ${DOMAIN_HOME}/applications/Mercury/MercuryEJB.jar/META-INF/MANIFEST.MF:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.1
Created-By: 1.4.2_05-b04 (Sun Microsystems Inc.)
Class-Path: mercurycommon.jar mercuryresources.jar mercurybusiness.jar mercuryserviceflow.jar mercuryutils.jar spectraconnector.rar {...snipped...}
The same situation appears for the classes that ApolloSessonManager depends on: MercuryLogger (a log4j wrapper) and the HTTPClient.jar classes
(e.g. Cookie, etc), except 3rd party jars are listed in the MANIFEST.MF of MercuryEJB.jar but are not exploded.
There is no weblogic-application.xml file to override the default classloader hierarchy, so my understanding
is that everything in the application should share a single classloader.
So I am at a loss to understand why classes in MercuryWeb.war can not load classes in dependent jars of MercuryEJB.jar.
As a note, if I add /root/bea/user_projects/domains/clusterdomain/applications/Mercury/mercurybusiness.jar to the CLASSPATH variable in startManagedWebLogic.sh,
this error disappears of course, and it barfs on the next application class it can't find (in one of the other exploded jars that MercuryEJB.jar depends on.
Can someone help point out what I may be missing?
Chris Goodacre
// config.xml
<?xml version="1.0" encoding="UTF-8"?>
<Domain ConfigurationVersion="8.1.5.0" Name="clusterdomain">
<Server Cluster="SIMS_TEST_CLUSTER_1" ListenAddress=""
ListenPort="9001" Name="AdminServer" NativeIOEnabled="true"
ReliableDeliveryPolicy="RMDefaultPolicy" ServerVersion="8.1.5.0">
<SSL Enabled="false" HostnameVerificationIgnored="false"
IdentityAndTrustLocations="KeyStores" Name="AdminServer"/>
</Server>
<WSReliableDeliveryPolicy DefaultRetryCount="10"
DefaultTimeToLive="60000" Name="RMDefaultPolicy" Store="FileStore"/>
<Security Name="clusterdomain"
PasswordPolicy="wl_default_password_policy"
Realm="wl_default_realm" RealmSetup="true"/>
<EmbeddedLDAP
CredentialEncrypted="{3DES}dMeE/vNpCcbjzOMZGfNeShv5VFZuQ=" Name="clusterdomain"/>
<SecurityConfiguration
CredentialEncrypted="{3DES}jFRG5NzABP8IAJa5M/PNNRCtZYaqkc2zUTYjlysL+md+TAgZw6IfgCjzzre4e7p5gyJEt+0UkPXNleN0QtW7Ef"
Name="clusterdomain" RealmBootStrapVersion="1"/>
<Realm FileRealm="wl_default_file_realm" Name="wl_default_realm"/>
<FileRealm Name="wl_default_file_realm"/>
<PasswordPolicy Name="wl_default_password_policy"/>
<JMSConnectionFactory DefaultDeliveryMode="Non-Persistent"
JNDIName="jms/ConnectionFactory" Name="ConnectionFactory" Targets="AdminServer"/>
<JMSFileStore Directory="rmfilestore" Name="FileStore"/>
<JMSServer Name="WSStoreForwardInternalJMSServerAdminServer"
Store="FileStore" Targets="AdminServer">
<JMSQueue CreationTime="1123128740234"
JNDIName="jms.internal.queue.WSStoreForwardQueue"
JNDINameReplicated="false" Name="WSInternaljms.internal.queue.WSStoreForwardQueueAdminServer"/>
<JMSQueue CreationTime="1123128740390"
JNDIName="jms.internal.queue.WSDupsEliminationHistoryQueue"
JNDINameReplicated="false" Name="WSInternaljms.internal.queue.WSDupsEliminationHistoryQueueAdminServer"/>
<JMSQueue CreationTime="1123128837453" JNDIName="jms/MenuQueue"
Name="MenuQueue" StoreEnabled="false"/>
<JMSQueue CreationTime="1123128864296"
JNDIName="jms/MenuXMLQueue" Name="MenuXMLQueue" StoreEnabled="false"/>
<JMSQueue CreationTime="1123128892343"
JNDIName="jms/DataSyncQueue" Name="DataSyncQueue" StoreEnabled="false"/>
<JMSQueue CreationTime="1123128915421"
JNDIName="jms/LoginRefreshQueue" Name="LoginRefreshQueue" StoreEnabled="false"/>
<JMSQueue CreationTime="1123128937046"
JNDIName="jms/ProfileQueue" Name="ProfileQueue" StoreEnabled="false"/>
<JMSQueue CreationTime="1123128957125"
JNDIName="jms/ReportsQueue" Name="ReportsQueue" StoreEnabled="false"/>
</JMSServer>
<Cluster Name="SIMS_TEST_CLUSTER_1"/>
<Server Cluster="SIMS_TEST_CLUSTER_1" ExpectedToRun="false"
ListenPort="9999" Name="ClusterMember1" ServerVersion="8.1.5.0">
<ServerDebug Name="ClusterMember1"/>
<SSL IdentityAndTrustLocations="KeyStores" Name="ClusterMember1"/>
<KernelDebug Name="ClusterMember1"/>
<Log Name="ClusterMember1"/>
<ServerStart Name="ClusterMember1"
PasswordEncrypted="{3DES}TC7nfOvKF0xwJB/f+tyYwQ==" Username="toolbox"/>
<WebServer Name="ClusterMember1"/>
<COM Name="ClusterMember1"/>
<IIOP Name="ClusterMember1"/>
<JTAMigratableTarget Name="ClusterMember1" UserPreferredServer="ClusterMember1"/>
<JTARecoveryService Name="ClusterMember1"/>
</Server>
<MigratableTarget Cluster="SIMS_TEST_CLUSTER_1"
Name="ClusterMember1 (migratable)"
Notes="This is a system generated default migratable target for a server. Do not delete manually." UserPreferredServer="ClusterMember1"/>
<Server Cluster="SIMS_TEST_CLUSTER_1" ExpectedToRun="false"
ListenPort="9998" Name="ClusterMember2" ServerVersion="8.1.5.0">
<ServerDebug Name="ClusterMember2"/>
<SSL IdentityAndTrustLocations="KeyStores" Name="ClusterMember2"/>
<KernelDebug Name="ClusterMember2"/>
<Log Name="ClusterMember2"/>
<ServerStart Name="ClusterMember2"
PasswordEncrypted="{3DES}TC7nfOvKF0xwJB/f+tyYwQ==" Username="toolbox"/>
<WebServer Name="ClusterMember2"/>
<COM Name="ClusterMember2"/>
<IIOP Name="ClusterMember2"/>
<JTAMigratableTarget Name="ClusterMember2" UserPreferredServer="ClusterMember2"/>
<JTARecoveryService Name="ClusterMember2"/>
</Server>
<MigratableTarget Cluster="SIMS_TEST_CLUSTER_1"
Name="ClusterMember2 (migratable)"
Notes="This is a system generated default migratable target for a server. Do not delete manually." UserPreferredServer="ClusterMember2"/>
<JDBCConnectionPool DriverName="com.sybase.jdbc2.jdbc.SybDriver"
Name="MercuryJDBCConnPool"
PasswordEncrypted="{3DES}Enwr7V6DdUk="
Properties="user=dbuser;url=jdbc:sybase:Tds:10.15.3.66:4100/ENT_60_DEV;networkProtocol=Tds;portNumber=4100;userName=dbuser;databaseName=ENT_60_DEV;serverName=10.15.3.66"
Targets="SIMS_TEST_CLUSTER_1" TestTableName="SQL SELECT 1" URL="jdbc:sybase:Tds:10.15.3.66:4100/ENT_60_DEV"/>
<JDBCDataSource JNDIName="jdbc/MercuryDS" Name="MercuryDS"
PoolName="MercuryJDBCConnPool" Targets="SIMS_TEST_CLUSTER_1"/>
<MigratableTarget Cluster="SIMS_TEST_CLUSTER_1"
Name="AdminServer (migratable)"
Notes="This is a system generated default migratable target for a server. Do not delete manually." UserPreferredServer="AdminServer"/>
<Application Name="Mercury"
Path="/root/bea/user_projects/domains/clusterdomain/applications/Mercury"
StagingMode="nostage" TwoPhase="true">
<EJBComponent Name="MercuryEJB.jar" Targets="ClusterMember1" URI="MercuryEJB.jar"/>
<WebAppComponent Name="Apollo" Targets="ClusterMember1" URI="MercuryWeb.war"/>
<ConnectorComponent Name="SpectraConnector.rar"
Targets="ClusterMember1" URI="SpectraConnector.rar"/>
</Application>
</Domain>
////////////////////////////////////////////////////////////Sorry, I don't have the response to your question.
But I'd like to know how youmake your servlet and your applet communicate.
I'm building a web site using both applets and servlet. And I nned to make them communicate. I'm trying to use RMI but I get many problems.
Can I know Which solution you have chosen for applet-servlet communication ?
Thank's.
Maybe you are looking for
-
I thought I'd post about my experience and thoughts on my new 24" iMac. I know when I'm thinking of buying something new, it's always helpful to read or talk to others who already have that equipment. I have had the iMac for a week now and one word p
-
plz help me in this,who know about this..
-
Extension.xml and cue cards - Webcenter on Snow Leopard
Hi, I have installed JDeveloper 11.1.1.5.0 on my MacBook Pro (OSX 10.6.7). It installed smoothly after (1) I set up the environment.plist to establish JAVA_HOME (2) I set up and tested a symlink to rt.jar to match the "IBM" java structure expected by
-
Hi all, i am working on dynamic alv using grid. after processing i want blank or can say clear all editable fields in display after processing functionality. i have used refresh_display and free method of class cl_gui but alv display is coming as it
-
Oracle parsing SQL with Hibernate
Hi, I build an J2EE application using framework Hibernate. After auditing DBA on any scenario from my soft, I note all request SQL executed are parsed. Same request, using "bind variable", so identical, is parse as many time it execute (ratio 1/1)...