Seam on Weblogic 10.3.2: Possible classloader problem?

Hi all,
I have a problem deploying a Seam 2.2.0.GA application on WebLogic 10.3.2. I use JRockit 1.6.0_14, Richfaces 3.2.0.GA and Facelets 1.1.14 and the Server is deployed on Windoes XP 32bit. The application has the following structure:
application.ear
|--> APP-INF
| |--> classes
| |--> lib (all jar dependencies go here, including the WAR dependencies, EJB module dependencies)
|-->META_INF
| |--> application.xml
| |--> data-sources.xml
| |--> MANIFEST.MF
| |--> weblogic.xml
| |--> weblogic-application.xml
|--> jboss-seam-2.2.0.GA.jar (is an EJB module)
|--> myEjbModule1.jar
|--> myEjbModule2.jar
|--> myEjbModule3.jar
|--> myEjbModule4.jar
|--> myWar.war (NO libraries in WEB-INF/lib, finds everything in EAR/lib)
JBoss Seam is an EJB module. and is declared as such in application.xml. Everything is OK, since the application loads correctly. The jar contains a faces.config registering the SeamPhaseListener on JSF, so that Seam actually works.
Problems start when I try to enable the debug page of Seam. In order to do this, one must include in the classpath the jboss-seam-debug.jar (in APP-INF/lib or EAR/lib, here I am using the first). This jar has its own faces.config, which registers the Seam*Debug*PhaseListener on JSF, so that it catches debug requests.
When deploying WITH jboss-seam-debug.jar, the application does not appear, but ONLY the debug page with the following exception (stacktrace at the end):
Exception during request processing:
Caused by java.lang.IllegalStateException with message: "No phase id bound to current thread (*make sure you do not have two SeamPhaseListener instances installed*)"
This probably signifies a classloader issue. So, I have two questions:
1. Has anyone deployed JBoss Seam on WenLogic WITH the debug page? If yes, is the structure of my project correct?
2. Is there a way to debug the classloading of WebLogic? What I would find helpful would be to see what happens that registers the SeamPhaseListener more than one times.
Note: When "JBoss-izing" the same EAR (remove hibernate jars, which are provided by JBoss, and move all libraries from EAR/lib to EAR root), the application loads correctly. BOTH the application AND the debug page appear correctly.
Edited by: user6410241 on Mar 24, 2010 8:14 AM
Edited by: user6410241 on Mar 24, 2010 8:26 AM

The problem was the name of the Seam EJB module. Changing the jar to jboss-seam.jar, everything worked. This issue does not appear on JBoss 4.2.3.GA, where I also tested.
Edited by: deadlock_gr on Jun 10, 2010 9:55 AM
Edited by: deadlock_gr on Jun 10, 2010 9:56 AM

Similar Messages

  • Add JBoss seam to weblogic server workshop

    hello,
    i would like to use JBoss seam with weblogic workshop, but i dont know how to do that.
    if any one know steps to do that ?
    thanks a lot.

    which version of workshop you are using to installed Jboss server to your IDE.

  • SAP-Basis System: 1 possible network problems detected - check tracefile

    Dear Gurus,
    I am getting this error in syslog in MMC for ECC 6.0 on windows with db2.
    SAP-Basis System: > 1 possible network problems detected - check tracefile and adjust.
    Regards
    Rao.

    hi,
    can you look at this
    [http://sapbasisnotes.blogspot.com/2009/05/sap-startup-problems-in-windows.html]
    Regards,
    Muralidhar

  • PortableRemoteObject ClassLoader problems in pe8.1

    Hi, I'm in the process of porting a Sun Java Application Server 7 to 8.1 PE and I'm running into ClassLoader problems when I make remote calls into the server. The situation is a little odd in that I've exported a PortableRemoteObject from the BootstrapServlet (too many reasons to go into detail, but it all worked in 7 just fine). Most of the calls I make into the remove server work fine, exception I get ClassNotFound exceptions in the strangest places. For example, I have a SearchCriteria class that I pass as a parameter. It makes it to the server. But, its inner class, Constraint which is static and Serializable, gets a ClassNotFoundException. So I made it Externalizable and finally figured out what was going on.
    The SearchCriteria class loader was set to the WebappClassLoader. But the ObjectInput of readObject was set to AppClassLoader. Now why the AppClassLoader could find SearchCriteria and not its nested class, I do not know.
    So my question is, is there any way to tell the ORB to use the WebappClassLoader instead of the AppClassLoader?

    More information. If I update the calling threads class loader to be the same as the objects class loader, the unaccessible classes can be loaded.
      public void readExternal(ObjectInput in)  throws IOException, ClassNotFoundException
        Thread.currentThread().setContextClassLoader(getClass().getClassLoader());Does this make sense? Seems so out of place.

  • XML fetch failed -- possibly a problem with AvXml.dll or its permissions

    When attempting to access the Status Monitor I receive the following error message:
    XML fetch failed -- possibly a problem with AvXml.dll or its permissions.
    Check that the "AvXml" virtual directory settings in IIS have proper permissions and allow execute access.
    I've tried all combos of security on the IIS directory. What am I missing?

    Hi Lindborg
    I have that problem with version 4.0 (X), it is due?, As I fix?.
    Unity I have a failover cluster, I have several problems, sometimes not let me delete mailbox, I can retrieve messages.
    thanks for any help you can provide.
    Regard

  • Basis System: 2 possible network problems detected - check tracefile

    Hi Experts,
    I have installed a a Netweaver 7.01 when i start the server throught MMC
    first the dispatcher show the message as unable to reach teh message server
    but where as message server is running successfully.
    after few seconds it shows the status Stopped
    Below is my trace please help me to solve this issue.
    Thanks,
    Veeru.
    trc file: "dev_disp", trc level: 1, release: "700"
    sysno      00
    sid        NSP
    systemid   560 (PC with Windows NT)
    relno      7000
    patchlevel 0
    patchno    95
    intno      20050900
    make:      multithreaded, ASCII, optimized
    pid        3892
    Wed Jan 14 05:46:37 2009
    kernel runs with dp version 224(ext=109) (@(#) DPLIB-INT-VERSION-224)
    length of sys_adm_ext is 360 bytes
    SWITCH TRC-HIDE on ***
    ***LOG Q00=> DpSapEnvInit, DPStart (00 3892) [dpxxdisp.c   1239]
         shared lib "dw_xml.dll" version 95 successfully loaded
         shared lib "dw_xtc.dll" version 95 successfully loaded
         shared lib "dw_stl.dll" version 95 successfully loaded
         shared lib "dw_gui.dll" version 95 successfully loaded
         shared lib "dw_mdm.dll" version 95 successfully loaded
    rdisp/softcancel_sequence :  -> 0,5,-1
    use internal message server connection to port 3900
    Wed Jan 14 05:46:39 2009
    WARNING => DpNetCheck: NiHostToAddr(www.doesnotexist0121.qqq.nxst) took 2 seconds
    Wed Jan 14 05:46:44 2009
    WARNING => DpNetCheck: NiAddrToHost(1.0.0.0) took 5 seconds
    ***LOG GZZ=> 2 possible network problems detected - check tracefile and adjust the DNS settings [dpxxtool2.c  5355]
    MtxInit: 30000 0 0
    DpSysAdmExtInit: ABAP is active
    DpSysAdmExtInit: VMC (JAVA VM in WP) is not active
    DpIPCInit2: start server >Veeru_NSP_00                            <
    DpShMCreate: sizeof(wp_adm)          6328     (904)
    DpShMCreate: sizeof(tm_adm)          3605136     (17936)
    DpShMCreate: sizeof(wp_ca_adm)          1200     (60)
    DpShMCreate: sizeof(appc_ca_adm)     1200     (60)
    DpCommTableSize: max/headSize/ftSize/tableSize=500/8/528040/528048
    DpShMCreate: sizeof(comm_adm)          528048     (1048)
    DpSlockTableSize: max/headSize/ftSize/fiSize/tableSize=0/0/0/0/0
    DpShMCreate: sizeof(slock_adm)          0     (96)
    DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
    DpShMCreate: sizeof(file_adm)          0     (72)
    DpShMCreate: sizeof(vmc_adm)          0     (1280)
    DpShMCreate: sizeof(wall_adm)          (22440/34344/56/100)
    DpShMCreate: sizeof(gw_adm)     48
    DpShMCreate: SHM_DP_ADM_KEY          (addr: 04ED0040, size: 4205552)
    DpShMCreate: allocated sys_adm at 04ED0040
    DpShMCreate: allocated wp_adm at 04ED1A28
    DpShMCreate: allocated tm_adm_list at 04ED32E0
    DpShMCreate: allocated tm_adm at 04ED3310
    DpShMCreate: allocated wp_ca_adm at 052435A0
    DpShMCreate: allocated appc_ca_adm at 05243A50
    DpShMCreate: allocated comm_adm at 05243F00
    DpShMCreate: system runs without slock table
    DpShMCreate: system runs without file table
    DpShMCreate: allocated vmc_adm_list at 052C4DB0
    DpShMCreate: allocated gw_adm at 052C4DF0
    DpShMCreate: system runs without vmc_adm
    DpShMCreate: allocated ca_info at 052C4E20
    DpShMCreate: allocated wall_adm at 052C4E28
    MBUF state OFF
    DpCommInitTable: init table for 500 entries
    Wed Jan 14 05:46:50 2009
    EmInit: MmSetImplementation( 2 ).
    MM global diagnostic options set: 0
    <ES> client 0 initializing ....
    <ES> InitFreeList
    <ES> block size is 1024 kByte.
    Using implementation view
    <EsNT> Memory Reset disabled as NT default
    ERROR => <EsNT> NTGetBaseAddress failed, no free region [esnti.c      1450]
    Error 15 while initializing OS dependent part.
    ERROR => DpEmInit: EmInit (1) [dpxxdisp.c   9556]
    ERROR => DpMemInit: DpEmInit (-1) [dpxxdisp.c   9485]
    DP_FATAL_ERROR => DpSapEnvInit: DpMemInit
    DISPATCHER EMERGENCY SHUTDOWN ***
    increase tracelevel of WPs
    NiWait: sleep (10000ms) ...
    NiISelect: timeout 10000ms
    NiISelect: maximum fd=1
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Wed Jan 14 05:47:00 2009
    NiISelect: TIMEOUT occured (10000ms)
    dump system status
    Workprocess Table (long)               Tue Jan 13 21:47:00 2009
    ========================
    No Ty. Pid      Status  Cause Start Err Sem CPU    Time  Program  Cl  User         Action                    Table
    ERROR => DpRqTxt: bad rqtype -1 [dpxxrq.c     785]
    0 ?         -1 Free          no      0   0             0                                                             
    ERROR => DpRqTxt: bad rqtype -1 [dpxxrq.c     785]
    1 ?         -1 Free          no      0   0             0                                                             
    ERROR => DpRqTxt: bad rqtype -1 [dpxxrq.c     785]
    2 ?         -1 Free          no      0   0             0                                                             
    ERROR => DpRqTxt: bad rqtype -1 [dpxxrq.c     785]
    3 ?         -1 Free          no      0   0             0                                                             
    ERROR => DpRqTxt: bad rqtype -1 [dpxxrq.c     785]
    4 ?         -1 Free          no      0   0             0                                                             
    ERROR => DpRqTxt: bad rqtype -1 [dpxxrq.c     785]
    5 ?         -1 Free          no      0   0             0                                                             
    ERROR => DpRqTxt: bad rqtype -1 [dpxxrq.c     785]
    6 ?         -1 Free          no      0   0             0                                                             
    Dispatcher Queue Statistics               Tue Jan 13 21:47:00 2009
    ===========================
    --------++++--
    +
    Typ
    now
    high
    max
    writes
    reads
    --------++++--
    +
    NOWP
    0
    0
    2000
    0
    0
    --------++++--
    +
    DIA
    0
    0
    2000
    0
    0
    --------++++--
    +
    UPD
    0
    0
    2000
    0
    0
    --------++++--
    +
    ENQ
    0
    0
    2000
    0
    0
    --------++++--
    +
    BTC
    0
    0
    2000
    0
    0
    --------++++--
    +
    SPO
    0
    0
    2000
    0
    0
    --------++++--
    +
    UP2
    0
    0
    2000
    0
    0
    --------++++--
    +
    max_rq_id          0
    wake_evt_udp_now     0
    wake events           total     0,  udp     0 (  0%),  shm     0 (  0%)
    since last update     total     0,  udp     0 (  0%),  shm     0 (  0%)
    Dump of tm_adm structure:               Tue Jan 13 21:47:00 2009
    =========================
    Term    uid  man user    term   lastop  mod wp  ta   a/i (modes)
    Workprocess Comm. Area Blocks               Tue Jan 13 21:47:00 2009
    =============================
    Slots: 20, Used: 0, Max: 0
    --------++--
    +
    id
    owner
    pid
    eyecatcher
    --------++--
    +
    NiWait: sleep (5000ms) ...
    NiISelect: timeout 5000ms
    NiISelect: maximum fd=1
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Wed Jan 14 05:47:05 2009
    NiISelect: TIMEOUT occured (5000ms)
    DpHalt: shutdown server >Veeru_NSP_00                            < (normal)
    DpJ2eeDisableRestart
    Switch off Shared memory profiling
    ShmProtect( 57, 3 )
    ShmProtect(SHM_PROFILE, SHM_PROT_RW
    ShmProtect( 57, 1 )
    ShmProtect(SHM_PROFILE, SHM_PROT_RD
    DpWakeUpWps: wake up all wp's
    Stop work processes
    Terminate gui connections
    wait for end of work processes
    not attached to the message server
    cleanup EM
    EsCleanup ....
    EmCleanup() -> 0
    Es2Cleanup: Cleanup ES2
    Wed Jan 14 05:47:06 2009
    ***LOG Q05=> DpHalt, DPStop ( 3892) [dpxxdisp.c   10333]
    Good Bye .....

    Hi Eric,
    Actually in my NSP_DVEBMS00_VEERU thePHYS_MEMSIZE  is set to 128
    So.....
    Do i need to change in the here below file.....:
    If yes wht shall i change it to ?
    Template for ABAP SID_INSTANCE_HOST
    SAPSYSTEMNAME = NSP
    SAPGLOBALHOST = Veeru
    SAPSYSTEM = 00
    INSTANCE_NAME = DVEBMGS00
    DIR_EXECUTABLE = C:\SAP\NSP\SYS\exe\run
    DIR_CT_RUN = C:\SAP\NSP\SYS\exe\run
    Instance runs without sapmnt saploc shares
    DIR_INSTANCE = C:\SAP\NSP\DVEBMGS00
    DIR_INSTALL = C:\SAP\NSP\SYS
    DIR_HOME = $(DIR_INSTANCE)\work
    DIR_GLOBAL = C:\SAP\NSP\SYS\global
    PHYS_MEMSIZE = 128
    rdisp/wp_no_dia = 3
    rdisp/wp_no_btc = 1
    icm/server_port_0 = PROT=HTTP,PORT=80$$
    SAP Messaging Service parameters are set in the DEFAULT.PFL
    ms/server_port_0 = PROT=HTTP,PORT=81$$
    rdisp/wp_no_enq = 1
    rdisp/wp_no_vb = 1
    rdisp/wp_no_spo = 1
    rdisp/enqname = Veeru_NSP_00
    rdisp/myname = Veeru_NSP_00
    abap/buffersize = 100000
    alert/MONI_SEGM_SIZE = 0
    enque/table_size = 2000
    rspo/local_print/method = 2
    rsdb/ntab/entrycount = 5000
    rsdb/ntab/ftabsize = 3000
    rsdb/ntab/sntabsize = 100
    rsdb/ntab/irbdsize = 1000
    rsdb/cua/buffersize = 500
    rsdb/obj/buffersize = 2048
    rsdb/obj/max_objects = 500
    rsdb/otr/buffersize_kb = 1000
    rsts/ccc/cachesize = 6000000
    rtbb/buffer_length = 500
    rtbb/max_tables = 50
    sap/bufdir_entries = 200
    zcsa/installed_languages = ED
    zcsa/presentation_buffer_area = 350000
    zcsa/calendar_area = 300000
    zcsa/table_buffer_area = 3000000
    zcsa/db_max_buftab = 500
    ztta/roll_area = 1000000
    ztta/diag_area = 128000
    ztta/dynpro_area = 150000
    ztta/cua_area = 250000
    rdisp/PG_SHM = 100
    rdisp/ROLL_SHM = 100
    rdisp/autoabaptime = 0
    rdisp/bufrefmode = sendoff,exeoff
    rdisp/wp_ca_blk_no = 20
    rdisp/appc_ca_blk_no = 20
    rdisp/max_wprun_time = 300
    icm/min_threads = 5
    icm/max_threads = 10
    icm/max_conn = 20
    icm/host_name_full = localhost
    mpi/total_size_MB = 10
    auth/new_buffering = 1
    sapgui/user_scripting = TRUE
    ssf/name = SAPSECULIB
    ssf/ssfapi_lib = $(DIR_CT_RUN)\sapsecu.dll
    sec/libsapsecu = $(DIR_CT_RUN)\sapsecu.dll
    login/create_sso2_ticket = 2
    login/accept_sso2_ticket = 1
    login/ticket_only_to_host = 1
    rsdb/dbid = NSP
    dbs/ada/schema = SAPNSP

  • Possible conflict/problem if using edk 5.2.0 with plumtree portal 5-0-3 and collaboration v4.0.1?

    Hi,
    We are using plumtree portal v5-0-3 and collaboration v-4.0.1. I have to create a portlet where users can use it to submit a request for a collaboration project to be created. Searching through Plumtree Developer Center, there are documents that show me how to create a collaboration project using edk library. The edk that comes with plumtree portal v5-0-3 doesn't contain the api(s) that I need (for example, com.plumtree.remote.prc.collaboration.project.*). However, the edk 5.2.0 does contain these api(s).
    Are there any possible conflicts/problems if I use the edk 5.2.0 with our existing plumtree portal v5-0-3 and collaboration v4.0.1? If there are, is there any other way that I could get to these api(s) somehow to create collaboration projects?
    Thank you in advance for helping!

    Thank you so much for responding so quickly!
    Is there any api or way that I could use to create a collaboration project without using the Project Explorer? In our scenario, after a user uses the portlet that I describe earlier in the original disscussion message to request the creation of a project, an admin will take a look at the request and click a button to have the project created. This button will somehow trigger some scripts or codes instead of the admin using the Project Explorer to create the project.
    Thanks again for your help!

  • Weblogic 12c, is it possible to migrate Oracle forms and reports (legacy)

    Hi Guys
    Is it possible to host Oracle forms & reports based application using Weblogic Server 12c? The documentations do not exclusively confirm the same, other than the ability to use applications in cloud. We are planning to move to web, as we are running into multiple issues with client/server (6i) applications on both Windows 7/8 OS
    regards,
    raj

    Hi Raj,
    These are the steps I did for our OAS upgrade in an xterm session :
    Installed weblogic 10.3.4 software (replace this with 10.3.[5/6]) (do not create domain,, just install the software) remember to user OFA for your pathing, it will help if you start using more middleware products /u01/oracle/Middleware for example would be the middleware home with wlserver_10.3 beneath that
    Install install forms & reports again software only (if you go down the PFRD route, you have to install the 11.1.1.2.0 install and then patch to 11.1.1.4.0 and patch again to 11.1.1.6.0 (install takes 80 minutes, each patch about 50 minutes) for the install you choose all software
    setup you environment have your jave home set (use jdk 1.6.0 u24 - 33 ) you might get issues trying to use java 7 (thats a seperate upgrade process)
    cd $ORACLE_HOME/bin (this would be /u01/oracle/Middleware/<install of binaries path>/bin)
    ./config.sh &
    choose your domain name wisely the default is classic_domain, I changed ours to FormsReports (what ever you chose will appear in your file path and process paths)
    admin user and passowrd etc..
    for the software config select all and un-select the discoverer and portal option leave everything else (we do deployed realtime compilation from source controlled libaries so we have installed the compilers also)
    the config.sh once your get to the configure summary, will create your node manager, weblogic domain, AdminServer, WLS_FORMS and WLS_REPORTS managed servers, once the configure completes and exits you'll be able to http://localhost:7001/console
    You'll need the below info to restart the JVM's the installers starts each jvm by the scripts located below (with no nodemanager setup)
    your .profile settings will need the PATHS for $ORACLE_HOME/bin, $JAVA_HOME/bin setting as well asn your /usr bin settings, LD_LIBRARY_PATH will need $ORACLE_HOME/lib, $JAVA_HOME/lib
    also create aliases for your domain home $domain_dir = /u01/oracle/Middleware/user_projects/domains/classic_domain under the bin directory will be the startweblogic script and start manageded servers scripts (manual) i'll leave the fun of automation up for you :) there are enough blogs and 3 different ways of doing it, the node manager startup script is in $WLS_HOME/server/bin
    to configure your forms.cfg, httpd.conf etc you will find all those in
    $mwHOME/instance/config (or whatever you had your instance path set to), the forms.cfg and default.env files are DEEP down the root 7 or 8 sub directories down so make a symlink once you locate it) you can reuse most of your default.env and forms.cfg settings form your 6i install
    and good luck
    the above is pretty much what i did if you want step by step guides again there are enough blogs you can google to cover installing, configuring, autostartup(node manager setup)
    Remember to Patch the bsu (BEA Smart Update with version 3.30 so you can apply CPU weblogic patches, theres one for JAN 2013 for 11.1.1.6.0) weblogic does not use OPatch regardless of what the readme file says :)
    Edit: Almost forgot your opmn services, in your profile set ORACLE_INSTANCE=$mwHOME/instance (/u01/oracle/Middleware/instance) then you can run opmnctl (add $ORACLE_HOME/opmn/bin to path)
    opmnctl status
    Processes in Instance: PFRD_Inst
    --------------------------------------------------------------+---------
    ias-component | process-type | pid | status
    --------------------------------------------------------------+---------
    emagent_PFRD_Inst | EMAGENT | 29078 | Alive
    RptSvr_hostname_PFRD_Inst | ReportsServerComp~ | 29075 | Alive
    webcache1 | WebCache-admin | 29073 | Alive
    webcache1 | WebCache | 29074 | Alive
    ohs1 | OHS | 29072 | Alive
    remember your opmn services look after the apache server and webcache if these aren't running you r will get forms/reports errors, like backend bridge failure if ohs is down, or nothing displayed 404 errors if webcache is down
    Mark
    Edited by: 992409 on 02-Apr-2013 09:44

  • WEB-INF/lib WEB-INF/classes ClassLoader problem

    I have observed that in WL 8.1, a class in a jar deployed in WEB-INF/lib does not have the ability to access a resource deployed in WEB-INF/classes. Is this the intended behavior to not have WEB-INF/lib and WEB-INF/classes in the same ClassLoader? If so, is there a way to configure this behavior to give permission to classes loaded in WEB-INF/lib to the ClassLoader that has WEB-INF/classes?
              thanks,
              Kenneth Shin

    Are you really certain that's what's happening? Is it possible the jar file stored in WEB-INF/lib isn't found elsewhere in the CLASSPATH, perhaps by a higher-level classloader? You might consider setting "prefer-web-inf-classes" to true in your weblogic.xml file, to ensure that the jars in WEB-INF/lib are being used instead of from somewhere else.

  • Apache fop classloading problem in EAR file

    HI,
    I am deploying a big EAR in WL 6.1 on solaris and I am bundling FOP 1.20.3
    within it, I am
    also including avalon 4.0 and logkit 1.0 jars within it as they are needed by
    fop.jar. Whenever I
    try to construct a "Driver()" class I get a NoClassDefFoundError on the org.apache.framework.logger.Loggable
    interface that it needs. The strange thing is that when I do the following :
    try {
    ClassLoader cl = this.getClass().getClassLoader();
    cl.loadClass("org.apache.avalon.framework.logger.Loggable"); // .........this
    works OK
    // the following .... fails with NoClassDefFoundError on Loggable
    org.apache.fop.apps.Driver d = new org.apache.fop.apps.Driver();
    } catch (Throwable t) {
    cat.error("failed:", t);
    It DOES work when I put the necessary jars on the server startup class path,
    however it would obviously be
    better to be able to bundle the 3rd party jars within my EAR ....... I know this
    seems like it would be a general
    weblogic classloader question - but I have had no problems with any other 3rd
    party jars that are similar to
    this one.
    Has anyone else had these kinds of problems ?
    Cheers,
    Brian.

    Dear Brian,
    It looks to me like org.apache.fop.apps.Driver might be doing a
    Class.forName() for the Loggable class. If Class.forName() does not pass a
    specific classloader, the system classpath loader is used; which is why it
    works when you put the classes on the system classpath.
    Best regards,
    Timothy Potter
    Senior Software Engineer
    eCommerce Server Division
    BEA Systems, Inc.
    "Brian Dowd" <[email protected]> wrote in message
    news:3c8c9ba0$[email protected]..
    >
    HI,
    I am deploying a big EAR in WL 6.1 on solaris and I am bundling FOP1.20.3
    within it, I am
    also including avalon 4.0 and logkit 1.0 jars within it as they are neededby
    fop.jar. Whenever I
    try to construct a "Driver()" class I get a NoClassDefFoundError on theorg.apache.framework.logger.Loggable
    interface that it needs. The strange thing is that when I do thefollowing :
    >
    try {
    ClassLoader cl = this.getClass().getClassLoader();
    cl.loadClass("org.apache.avalon.framework.logger.Loggable"); //.........this
    works OK
    // the following .... fails with NoClassDefFoundError on Loggable
    org.apache.fop.apps.Driver d = new org.apache.fop.apps.Driver();
    } catch (Throwable t) {
    cat.error("failed:", t);
    It DOES work when I put the necessary jars on the server startup classpath,
    however it would obviously be
    better to be able to bundle the 3rd party jars within my EAR ....... Iknow this
    seems like it would be a general
    weblogic classloader question - but I have had no problems with any other3rd
    party jars that are similar to
    this one.
    Has anyone else had these kinds of problems ?
    Cheers,
    Brian.

  • Classloader problem with exploded EAR

    I'm trying to un-jar an EAR file and then un-jar the EJB jars within EAR and putting
    all the EJB and other classes from those jar files in the main application directory
    like application/com/abc/***. I have few WARs within EAR but I'm trying not to
    explode (un-jar) those. One of the WAR file has a JSP page and a depentent java
    class within it but when I try to use that JSP, I'm getting "java.lang.NoClassDefFoundError"
    exception. Any ideas?
    Is there a better/standard way to explode an EAR for development purposes?

    I had similar problem today with an EAR application using EclipseLink 1.0.1 on WebLogic Server 10.3.
    The stack trace looks a little different,
    java.lang.NoClassDefFoundError: org/eclipse/persistence/internal/jpa/deployment/DirectoryArchive$1
    at org.eclipse.persistence.internal.jpa.deployment.DirectoryArchive.init(DirectoryArchive.java:89)
    at org.eclipse.persistence.internal.jpa.deployment.DirectoryArchive.<init>(DirectoryArchive.java:73)
    at org.eclipse.persistence.internal.jpa.deployment.DirectoryArchive.<init>(DirectoryArchive.java:55)
    at org.eclipse.persistence.internal.jpa.deployment.ArchiveFactoryImpl.createArchive(ArchiveFactoryImpl.java:75)
    at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.findPersistenceArchives(PersistenceUnitProcessor.java:184)
    at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initialize(JPAInitializer.java:132)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:104)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:64)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:84)
    but the cause is the same: instances of JPA provider were cached in javax.persistence.Persistence which is loaded in WLS system classloader.
    When EAR is redeployed, the EclipseLink jar located in the EAR is reloaded but the cached instance is not updated.
    The reflection workaround did work but there is even simpler workaround: just copy eclipselink.jar (or other JPA provider JARs) into the
    /lib directory of the WLS domain -- the JARs in lib folders are loaded before EAR and would not be redeployed every time.

  • WebLogic 8.1 and Tomcat connection problem

    I am using Tomcat 4.0.6 for my JSPs and WebLogic for my EJBs.
    Everything worked fine under WebLogic 6.1 but I am trying
    to upgrade to WebLogic 8.1 and it is not working.
    I can also connect to WebLogic 8.1 from a standalone class
    but not using Tomcat. What is wrong?
    This is the basic code I am using to connect:
    Hashtable ht = new Hashtable(4);
    ht.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    ht.put(Context.PROVIDER_URL,"t3://localhost:7009");
    InitialContext ic = new InitialContext(ht);
    Object obj = ic.lookup("NsbInfoHome");
    NsbInfoHome home = ( NsbInfoHome) PortableRemoteObject.
    narrow(obj, NsbInfoHome.class);
    NsbInfo nsbInfo = home.create();
    NsbMemberPrimaryInfo info = nsbInfo.getMemberPrimaryInfo(1);
    And this is the error
    java.lang.NullPointerException
    at weblogic.rmi.internal.StubGenerator.getStubOnClient(StubGenerator.java:694)
    at weblogic.rmi.internal.StubGenerator.getStubClass(StubGenerator.java:666)
    at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:712)
    at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:699)
    at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:76)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newRootNamingNodeStub(WLInitialContextFactoryDelegate.java:486)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newRemoteContext(WLInitialContextFactoryDelegate.java:449)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:345)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:308)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:234)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:135)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250)
    at javax.naming.InitialContext.init(InitialContext.java:226)
    at javax.naming.InitialContext.<init>(InitialContext.java:202)
    at org.apache.jsp.testWL2$jsp._jspService(testWL2$jsp.java:81)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
    at java.lang.Thread.run(Thread.java:536)
    --------------- nested within: ------------------
    weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Failed to
    generate class for weblogic.jndi.internal.ServerNamingNode_WLStub ] -
    with nested exception:
    [java.lang.NullPointerException]
    at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:716)
    at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:699)
    at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:76)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newRootNamingNodeStub(WLInitialContextFactoryDelegate.java:486)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newRemoteContext(WLInitialContextFactoryDelegate.java:449)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:345)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:308)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:234)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:135)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250)
    at javax.naming.InitialContext.init(InitialContext.java:226)
    at javax.naming.InitialContext.<init>(InitialContext.java:202)
    at org.apache.jsp.testWL2$jsp._jspService(testWL2$jsp.java:81)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
    at java.lang.Thread.run(Thread.java:536)
    Any ideas how to fix this?
    Thanks,
    Dan

    Hi,
    I work under a sligthly different seeting like Dan used (Java Client instead of JSPs, but same context properties), but the problem is exactly the same: weblogic.rmi.internal.StubGenerator.getStubOnClient() results in a NullPointerException.
    What does this method actually do? I provided the weblogic.jar in the client's runtime environment; is it possible that the method asks for something else on the client side that I have to provide (only guessing...)
    PS: I found the error myself. Its the Eclipse 3.0 IDE that won't work together with the factory class of BEA for some obscure reason. Switching to another IDE solved the problem...
    Message was edited by c_web at Dec 1, 2004 6:03 AM

  • ClassLoader problems over IIOP

    I'm currently porting our application from WebSphere to WebLogic and I have got the following issue concerning class loading on the client side:
    org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 211 completed: Maybe
         at com.sun.corba.se.impl.logging.ORBUtilSystemException.valuehandlerReadException(ORBUtilSystemException.java:6500)
         at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1045)
         at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:253)
         at com.j2fe.general.interfaces._RegistryBeanRemote_Stub.getFacade(Ljava.lang.String;)Lcom.j2fe.general.HibernateFacade;(Unknown Source)
         at com.j2fe.ui.base.model.GSApplication.setAdditionalFacadeProxies(GSApplication.java:505)
         at com.j2fe.ui.base.model.GSApplicationServerConnectionParser$1.run(GSApplicationServerConnectionParser.java:289)
         at javax.security.auth.Subject.doAs(Subject.java:337)
         at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:118)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.j2fe.ui.base.model.GSApplicationServerConnectionParser.createApplication(GSApplicationServerConnectionParser.java:320)
         at com.j2fe.ui.base.jobs.ConnectAndParseJob.run(ConnectAndParseJob.java:97)
         at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
    Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
         at com.sun.corba.se.impl.io.ObjectStreamClass.readResolve(ObjectStreamClass.java:316)
         at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:403)
         at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:327)
         at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:293)
         at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
         ... 10 more
    Caused by: java.lang.reflect.InvocationTargetException
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.sun.corba.se.impl.io.ObjectStreamClass.readResolve(ObjectStreamClass.java:314)
         ... 14 more
    Caused by: java.lang.ClassNotFoundException
         at weblogic.iiop.ProxyDesc.readResolve(ProxyDesc.java:47)
         ... 17 more
    Caused by: java.lang.IllegalArgumentException: interface com.j2fe.general.HibernateFacade is not visible from class loader
         at java.lang.reflect.Proxy.getProxyClass(Proxy.java:345)
         at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:564)
         at weblogic.iiop.ProxyDesc.readResolve(ProxyDesc.java:45)
         ... 17 more
    Is it a problem for WebLogic to transfere Proxy classes over IIOP? The com.j2fe.general.HibernateFacade-interface is available on client side and can be loaded by the application class loader (which is an Eclipse application).
    The strange thing is that it's possible to do a Class.forName with that class immediately before and after the EJB-call which should get that proxy class from the server.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Thomas Brandl <> writes:
    Proxy is only supported in 9.x, this looks like a trace from 8.1
    andy
    I'm currently porting our application from WebSphere to WebLogic and I have got the following issue concerning class loading on the client side:
    org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 211 completed: Maybe
         at com.sun.corba.se.impl.logging.ORBUtilSystemException.valuehandlerReadException(ORBUtilSystemException.java:6500)
         at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1045)
         at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:253)
         at com.j2fe.general.interfaces._RegistryBeanRemote_Stub.getFacade(Ljava.lang.String;)Lcom.j2fe.general.HibernateFacade;(Unknown Source)
         at com.j2fe.ui.base.model.GSApplication.setAdditionalFacadeProxies(GSApplication.java:505)
         at com.j2fe.ui.base.model.GSApplicationServerConnectionParser$1.run(GSApplicationServerConnectionParser.java:289)
         at javax.security.auth.Subject.doAs(Subject.java:337)
         at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:118)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.j2fe.ui.base.model.GSApplicationServerConnectionParser.createApplication(GSApplicationServerConnectionParser.java:320)
         at com.j2fe.ui.base.jobs.ConnectAndParseJob.run(ConnectAndParseJob.java:97)
         at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
    Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
         at com.sun.corba.se.impl.io.ObjectStreamClass.readResolve(ObjectStreamClass.java:316)
         at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:403)
         at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:327)
         at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:293)
         at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
         ... 10 more
    Caused by: java.lang.reflect.InvocationTargetException
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.sun.corba.se.impl.io.ObjectStreamClass.readResolve(ObjectStreamClass.java:314)
         ... 14 more
    Caused by: java.lang.ClassNotFoundException
         at weblogic.iiop.ProxyDesc.readResolve(ProxyDesc.java:47)
         ... 17 more
    Caused by: java.lang.IllegalArgumentException: interface com.j2fe.general.HibernateFacade is not visible from class loader
         at java.lang.reflect.Proxy.getProxyClass(Proxy.java:345)
         at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:564)
         at weblogic.iiop.ProxyDesc.readResolve(ProxyDesc.java:45)
         ... 17 more
    Is it a problem for WebLogic to transfere Proxy classes over IIOP? The com.j2fe.general.HibernateFacade-interface is available on client side and can be loaded by the application class loader (which is an Eclipse application).
    The strange thing is that it's possible to do a Class.forName with that class immediately before and after the EJB-call which should get that proxy class from the server.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • EAR classloader problem

    Hi,
    I am having a trouble while deploying two ears. I have one war file, which refers a certain java project. I have created a replica of this war file and have done some chnages so that I can have a separate set of portlets using the same code base.
    While these war files run fine when deployed separately (one ear per war), they create problem if both are run at once & I get ClassCastException. The possible reason is:
    - applicationA puts ClassA in session
    - applicationA is loaded properly
    - applicationB is trying to load, it searches for a particular attribute in session, which is available (kept by appA), and tries to type-cast it, resulting in ClassCaseException.
    My question is:
    1) What I am trying to achieve, is it do-able?
    2) If yes, why the session / context is shared among the two ear files.
    3) Does it have to do with classloader? I have changed the classloader mode to Parent_Last for all 4( both ear and both war).
    I am using RAD 6.0.1 and WPS 5.1.
    Please help. I am stuck since last two weeks :-(

    I faced a similar problem in WAS 5.1.
    Open your Enterprise application[YOUR deployed ear in your WAS admin console]
    Change WAR ClassLoader policy to application rather than module.
    That should hopefully solve your issue.

  • Classloader problem

    Hi,
    I am having a trouble while deploying two ears. I have one war file, which refers a certain java project. I have created a replica of this war file and have done some chnages so that I can have a separate set of portlets using the same code base.
    While these war files run fine when deployed separately (one ear per war), they create problem if both are run at once & I get ClassCastException. The possible reason is:
    - applicationA puts ClassA in session
    - applicationA is loaded properly
    - applicationB is trying to load, it searches for a particular attribute in session, which is available (kept by appA), and tries to type-cast it, resulting in ClassCaseException.
    My question is:
    1) What I am trying to achieve, is it do-able?
    2) If yes, why the session / context is shared among the two ear files.
    3) Does it have to do with classloader? I have changed the classloader mode to Parent_Last for all 4( both ear and both war).
    I am using RAD 6.0.1 and WPS 5.1.
    Please help. I am stuck since last two weeks :-(

    Let me try to shed some light on this:
    a) The reason why you're getting the s.o.p results you're seeing is because you're executing them from the old thread. If you were to execute the second s.o.p from the new thread without setting the class loader as suggested, you wouldn't get the same result. Just try that if you find some time.
    b) The ContextClassLoader is a "tricky" thing. It's actually a singleton mechanism that delegates the actual class loading to the appropriate class loader based on the execution context. OC4J has overloaded the mechanism of finding the right class loader based on execution context. The reason you always need to set the context class loader for new user threads in OC4J lies in the following JDK problem:
    When a new thread is created, the JDK attempts to set its context class loader to that of its "parent" (the thread that created it):
    Thread parent = currentThread();
    this.contextClassLoader = parent.contextClassLoader;
    What it should do is:
    this.contextClassLoader = parent.getContextClassLoader();
    The OC4J thread that is running (the "parent" in this case), is a subclass of Thread that has overridden the getContextClassLoader() method. That override does not return the base class field called "contextClassLoader", but does a lookup to find the correct loader. This lookup depends on other thread state. That thread state is not present on the new thread, so there is no way for the new thread to get the right loader.
    In any case, if you always follow the simple step of setting the context class loader for new threads as discussed earlier in this thread, then you should not see this issue.
    Hope this helps explain things!
    -lars

Maybe you are looking for