Sun Application Server 8 and Log4j

In ...\sun\ApplicationServer\domains\domain1\lib\ext, you will find log4j.jar . This, being the extension directory will place log4j.jar high up in the classloader hierarchy.
Suppose I have a 2 EARs to be deployed, each containing a WAR and a EJB JAR. All use log4j and naturally, each will have either log4j.properties or log4j.xml . Say only file logging is configured and all log to different file each.
Now the problem: since lib/ext/log4j.jar is always the one to be used, the first log4j.properties or log4j.xml to be used will rule over the rest and all logging across WARs and EJBJARs will be to the SAME file!
In sun-web.xml, can configure <class-loader> element to not to delegate to parent classloaders (havent tried it). But this does not solve the problem because there seems to be no way to configure likewise for EJBJAR! So even if can place log4j.jar in WEB-INF/lib for WAR and able to log to WAR-specified destinaton file, all the EJBJARs across all EARs will still be using lib/ext/log4j.jar and log to SAME file!
So I have removed lib/ext/log4j.jar . Am I missing out something here? Any insights?
Thanks.

I'm having the same problem....
But I do not have a log4j.jar file under lib/ext. In fact, that path is empty.
I posted my issue under a different forum (Java Enterprise System - General Discussion)
http://forum.java.sun.com/thread.jspa?threadID=5171613
thread is titled: JES5 and log4j inconsistencies from 2005Q4 with multiple web application
Any ideas? I'm offering 10 duke dollars for an answer on my original post.

Similar Messages

  • Sun application server 9 and jndi

    I have just started to learn to use EJB and am trying to deploy my first app. I have created a simple stateless bean and am trying to call it from a servlet which I have also deployed.
    This is the code I am using to try and obtain the bean from the servlet.
    Context initialContext = new InitialContext();
    Object ref = initialContext.lookup("java:comp/env/ejb/EntityFacade");
    EntityFacadeRemote entity = (EntityFacadeRemote) PortableRemoteObject.narrow(ref, EntityFacadeRemote.class);This is my stateless bean
    @Stateless
    @EJB(mappedName="ejb/EntityFacade", name="ejb/EntityFacade", beanInterface=EntityFacadeRemote.class, beanName="EntityFacadeBean")
    public class EntityFacadeBean implements EntityFacadeRemote
        public void processOrder(OrderEntity order)
             // process order code
    }The problem is that I keep getting a NameNotFoundException
    Caused by: javax.naming.NameNotFoundException: No object bound to name java:comp/env/ejb/EntityFacade
         at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:751)
         at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:156)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:307)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)And I have no idea why. Any help would very greatful.
    Thanks

    after a painful amount of digging and experimenting I finally found the solution.
    So all those with the same problem or just curious simply get rid of the @EJB annotation off the bean
    @Stateless
    public class EntityFacadeBean implements EntityFacadeRemote
    .......and lookup the FQN of the remote object on the InitialContext
    Context initialContext = new InitialContext();
    Object ref = initialContext.lookup(EntityFacadeRemote.class.getName());
    EntityFacadeRemote entity = (EntityFacadeRemote) PortableRemoteObject.narrow(ref, EntityFacadeRemote.class);

  • Unable to Start Sun Application Server PE8

    Hi
    I have installed Sun Application Server PE8 and jdk1.5.0_04. On starting the server through net beans, I'm getting the following error.
    C:/Progra~1/Java/jdk1.5.0_04/jre/lib/tools.jar;C:/Sun/AppServer/lib/appserv-rt.jar;C:/Sun/AppServer/lib\activation.jar;C:/Sun/AppServer/lib\admin-cli.jar;C:/Sun/AppServer/lib\appserv-admin.jar;C:/Sun/AppServer/lib\appserv-cmp.jar;C:/Sun/AppServer/lib\appserv-ext.jar;C:/Sun/AppServer/lib\appserv-jstl.jar;C:/Sun/AppServer/lib\appserv-upgrade.jar;C:/Sun/AppServer/lib\commons-launcher.jar;C:/Sun/AppServer/lib\commons-logging.jar;C:/Sun/AppServer/lib\dom.jar;C:/Sun/AppServer/lib\j2ee-svc.jar;C:/Sun/AppServer/lib\j2ee.jar;C:/Sun/AppServer/lib\jax-qname.jar;C:/Sun/AppServer/lib\jaxr-api.jar;C:/Sun/AppServer/lib\jaxr-impl.jar;C:/Sun/AppServer/lib\jaxrpc-api.jar;C:/Sun/AppServer/lib\jaxrpc-impl.jar;C:/Sun/AppServer/lib\jmxremote.jar;C:/Sun/AppServer/lib\jmxremote_optional.jar;C:/Sun/AppServer/lib\jsf-api.jar;C:/Sun/AppServer/lib\jsf-impl.jar;C:/Sun/AppServer/lib\mail.jar;C:/Sun/AppServer/lib\relaxngDatatype.jar;C:/Sun/AppServer/lib\rmissl.jar;C:/Sun/AppServer/lib\saaj-api.jar;C:/Sun/AppServer/lib\saaj-impl.jar;C:/Sun/AppServer/lib\xalan.jar;C:/Sun/AppServer/lib\xercesImpl.jar;C:/Sun/AppServer/lib\xsdlib.jar;C:/Sun/AppServer/lib/install/applications/jmsra/imqjmsra.jar;C:/Sun/AppServer/imq/lib/jaxm-api.jar;C:/Sun/AppServer/imq/lib/fscontext.jar;C:/Sun/AppServer/lib/ant/lib/ant.jar
    com.sun.enterprise.server.PEMain
    start
    display
    native
    Unrecognized option: -client
    JVMCI123: Unable to parse 1.2 format supplied options - rc=-6
    Regds - Nishant

    Hi
    I have installed Sun Application Server PE8 and jdk1.5.0_04. On starting the server through net beans, I'm getting the following error.
    C:/Progra~1/Java/jdk1.5.0_04/jre/lib/tools.jar;C:/Sun/AppServer/lib/appserv-rt.jar;C:/Sun/AppServer/lib\activation.jar;C:/Sun/AppServer/lib\admin-cli.jar;C:/Sun/AppServer/lib\appserv-admin.jar;C:/Sun/AppServer/lib\appserv-cmp.jar;C:/Sun/AppServer/lib\appserv-ext.jar;C:/Sun/AppServer/lib\appserv-jstl.jar;C:/Sun/AppServer/lib\appserv-upgrade.jar;C:/Sun/AppServer/lib\commons-launcher.jar;C:/Sun/AppServer/lib\commons-logging.jar;C:/Sun/AppServer/lib\dom.jar;C:/Sun/AppServer/lib\j2ee-svc.jar;C:/Sun/AppServer/lib\j2ee.jar;C:/Sun/AppServer/lib\jax-qname.jar;C:/Sun/AppServer/lib\jaxr-api.jar;C:/Sun/AppServer/lib\jaxr-impl.jar;C:/Sun/AppServer/lib\jaxrpc-api.jar;C:/Sun/AppServer/lib\jaxrpc-impl.jar;C:/Sun/AppServer/lib\jmxremote.jar;C:/Sun/AppServer/lib\jmxremote_optional.jar;C:/Sun/AppServer/lib\jsf-api.jar;C:/Sun/AppServer/lib\jsf-impl.jar;C:/Sun/AppServer/lib\mail.jar;C:/Sun/AppServer/lib\relaxngDatatype.jar;C:/Sun/AppServer/lib\rmissl.jar;C:/Sun/AppServer/lib\saaj-api.jar;C:/Sun/AppServer/lib\saaj-impl.jar;C:/Sun/AppServer/lib\xalan.jar;C:/Sun/AppServer/lib\xercesImpl.jar;C:/Sun/AppServer/lib\xsdlib.jar;C:/Sun/AppServer/lib/install/applications/jmsra/imqjmsra.jar;C:/Sun/AppServer/imq/lib/jaxm-api.jar;C:/Sun/AppServer/imq/lib/fscontext.jar;C:/Sun/AppServer/lib/ant/lib/ant.jar
    com.sun.enterprise.server.PEMain
    start
    display
    native
    Unrecognized option: -client
    JVMCI123: Unable to parse 1.2 format supplied options - rc=-6
    Regds - Nishant

  • Eclipse Europa with Sun Application Server 9

    Does anyone know if Europa supports version 9.0_01 of the Sun Application Server? And, if so, how to get it setup?
    In Europa, I see the following, perhaps one of these is the one I should choose?
    Sun Application Server 8.1
    Sun Application Server 8.2
    GlassFish V1 Java EE 5
    GlassFish V2 Java EE 5
    GlassFish V3
    Many thanks in advance!

    Another Update:
    So I tried Glassfish V1, and it appears to be the best fit so far. Still trying to get it all up and running though, not sure I am having too much luck as I gets errors every time it tries to deploy new versions of my application, but I suppose it is progress:)
    Think I am on the right track - thanks anyhow!

  • Sun Java Application Server, Apache and OS X

    I have a couple questions that I was hoping someone could help me out with.
    Background info. I'm running OS X 10.4, the default OS X install of apache HTTP server and I've installed NetBeans with Sun Application Server.
    I'd like to configure the application server to work with apache. My general understanding of the process is that you generate some sort of plug in within the application server and then deploy that plugin to your webserver. This plugin determines what request the webserver will pass to the application server. My issue is that I've not done this before so I'm unsure how to actually do this and I've not had much luck finding any document. My guess is that I'm not familiar enough with the commonly used terms for this sort of thing, thus resulting in poor searches.
    Any help would be appreciated.
    Thanks,
    Josh

    We do have Load Balancing Plugin for Apache Web Server as part of our Enterprise Edition software, not part of our Platform Edition.
    Currently Enterprise Edition is not supported on MacOS.

  • Can't  fix error 404 in sun application server 8 2005Q1 and need help......

    i am using sun application server 8 2005Q1.........
    i an getting the err 404(requested resources not available......)
    I have did the following:
    the following are my files
    employeedetails.java(which implements the servlet class)
    findemployee.html(which gets the employee id)
    1.First I have designed the interface with URL as
    http://localhost:1050(which is my port no)/emp_details/servlet/EmployeeDetails
    2.Then I have coded the servlet with class name as EmployeeDetails
    3.I have compiled it in the following manner:
    e:\>path=%path%;c:\j2sdk1.4.2_12\bin;
    e:\>set classpath=%classpath%;e:\sun\Appserver\lib\j2ee.jar;
    e:\>javac e:\Employee\EmployeeDetails.java
    It compiled successfully without any errors
    4.Then I have started the sun application server
    5.I have also opened the deploy tool
    6.In that,
    New->Application
    the application wizard opens.......
    then I browsed and given the new application name as e:\Employee\EmployeeDetails.jar
    The application display name appears as EmployeeDetails
    7.It also appears at the left end of the tree structure
    8.Then I opened the New->Web Component
    the web component wizard appears
    9.I have clicked next
    10.In that panel I have chosen the option
    Create new WAR Module in application
    I have given the WAR display name as Emp
    11.Then in the bottom I have clicked the option 'edit contents'
    12.The edit contents pane opens.......
    13.In that I have selected EmployeeDetails.class and FindEmployee.html and clicked 'Add'
    14.It gets added in the content pane
    15.Then I have chosen the component type as Servlet
    16.In the next wizard ,the servlet class name,web component name and display name,everything
    is given as EmployeeDetails
    17.With this I have finished the web component wizard
    18.Then the context root name is given as emp_details and saved
    19.Then I have chosen the Tools->deploy
    20.In that wizard,
    I have typed the admin user name and pswd
    21.It gets deployed successfully.
    22.Then I have opened th browser and typed the following URL
    http://localhost:1050/emp_details/FindEmployee.html
    23.The html form appears.....
    24.I have kept oracle as my backend with datasource name Mine
    and in the servlet I have changed the datasource name with user name and pswd scott & tiger
    25.But when i click the submit button,it gives the error
    http status 404 -/emp_details/servlet/EmployeeDetails
    the requested resource not available
    anybody who knows the anwser plz reply me soon and help me to get rid of this error..........................

    Your code looks fine. Unless you actually made a typo in the URL I can't explain this problem. To verify this I even copied your web.xml and the SimpleServlet without any changes to my playground environment and it ran just flawlessly at http://localhost:8080/playground/servlets/HelloWorld
    To exclude things, have you tried another applicationserver (Tomcat 6? Glassfish? Jetty?) or maybe another OS?

  • JSP and the Sun Application Server. Is it really nessecary?

    Downloaded Creater 2, and love it. I really didn't realize how easy JSP is. Though I would be interested in knowing: Does the Sun Application Server needs to be running in order to use JSP.
    Talking to my Hosting Provider, they have a plan in which JSP is included but the Sun Application Server is not. If I decide to get their JSP Hosting plan, do I truly need the Application Server to run my JSP forms and all the other great things that Creater 2 has to offer?
    Thanks in Advance!
    Josef

    No you don't. You're app will run in any JEE server like Tomcat, Jetty, JBoss, Jonas, etc. If you are using EJBs, however, the server you choose must have EJB support.

  • Sun one application server packging and deploying

    peace be up on you ,
    i am using sun application server , i have create an ejb class , home and remote interfaces
    also a client class and an jsp file to access this ejb, but i don't know how to use the applilcation server to backge them and to test them after deployment

    You can refer to the following link to get the appserver documentation.
    http://developers.sun.com/prodtech/appserver/reference/docs/index.html
    Alternatively you can use netbeans IDE to develop J2EE applications. It is very simple to write, package and deploy J2EE applications using netbeans.
    You can download netbeans from-
    http://www.netbeans.org/downloads/index.html or from
    http://java.sun.com/j2ee/1.4/download.html

  • Install both Sun Application server and Jboss application server- Can I?

    Dear all,
    I am programmer and want to test for something.
    Is it possible to install sun application server and jboss application server in the same computer (Windows XP Professional)?
    Is there any special attention I need to take?

    I am programmer and want to test for something.Allowed.
    Is it possible to install sun application server and jboss application server in the same computer (Windows XP Professional)?Why do you think it may not be possible ?
    Is there any special attention I need to take?just the way the URL is populated.

  • Sun Application Server 9.0 and Creator

    I am using the webui.jar and other libraries from Creator in applications that will be deployed on Sun Application Server 9.0. These applications worked fine on Sun Application Server 8.2 When I try to deploy them on 9.0, they will work except code in the init() methods does not get executed. However, code in the prerender() methods does still get executed. Can anyone help me out with this problem?
    Luke

    I belive this thread applies: http://swforum.sun.com/jive/thread.jspa?threadID=95755

  • JBoss 4 to Sun Application Server...where to start

    Hi there...
    I'm charged with making sure my company's product, which has mostly been running on JBoss, works w/ Sun Application Server.
    I've been trying to use the Migration Tool with poor results...I know some of it is because it's for JBoss 3 and not 4....
    giving it the entire .EAR for our product tells me that it doesn't handle webservices...diving into the EAR's JAR containing our services and removing webservices.xml gives the same result of various permutations of putting in source code / xml leads , namely it runs and then freezes with
    DefaultValidationEventHandler: [FATAL_ERROR]: Premature end of file.
    Location:
    DefaultValidationEventHandler: [ERROR]: Unexpected element {}:ejb-local-ref
    Location:
    back on the console I launched the UI from
    To possibly oversimplify, I copied out some of the most relevant .xml we have,
    ejb-jar.xml
    jboss.xml
    jbosscmp-jdbc.xml
    jboss-web.xml
    web.xml
    and put them in a single directory...now the Migration tool runs, leaves most of the files unchanged, and for our ejb-jar.xml it fails, and says
    Unknown error.
    EjbJar is Null
    Admittedly our ejb-jar.xml is handcrafted and maybe suspect, but still.
    So I guess right now I'm not too optimistic about this tool.
    Some of the problem is my understanding of what all goes in an EAR in terms of DD is weak. I'm trying to smarten up, but haven't found a good description of "these are the typical DD files for Sun Application Server", with examples or precise descriptions of the contents...and the migration tool doesn't get to the point where it's making some of the files i expected based on
    http://java.sun.com/j2ee/tools/migration/doc/JBOSS3.0_S1AS7.html
    (for example sun-cmp-mappings.xml doesn't appear anywhere in the AppServer\docs directory... )
    Any pointers or advice appreciated...

    There is an article, while it is for Application Server 7, it still could be useful:
    http://developers.sun.com/prodtech/javatools/jsenterprise/reference/docs/jse7/jse7_jboss_plugin.html

  • How to configure oracle thin drivers for SUN APPLICATION SERVER

    hi all,
    I am working with EJB with oracle as back-end. I wants to know how to configure oracle thin drivers for the SUN APPLICATION SERVER. Please explain me breifly.
    Advanced thanks to all the replies.
    with regards,
    /kumaraswamy.n

    Kumaraswamy,
    Did you try searching the Internet? Here are the results of my Internet search:
    http://tinyurl.com/zo4gk
    And one of the first hits in the list was this:
    Deploying to a Sun Java System Application Server
    Good Luck,
    Avi.

  • How can I call a Stateless-EJB3  from MBeans in Sun Application Server 9.1?

    Hi,
    I have some jobs running as Timer-Service-EJB in Sun Application Server 9.1. The Timer will be startet by a Lifecycle-Modul and it works fine.
    I have also some MBeans running in the same App-Server which should start or stop the Timer-Services by invoking dedicated methods
    in the Timer-Service-EJB.
    InitialContext ctx = new InitialContext();
    MyJob job = (MyJob) ctx.lookup("ejb/MyJob");
    job.startTimer();But I get the following error;
    javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.enterprise.naming.SerialInitContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.enterprise.naming.SerialInitContextFactory]
    ..... Why is it impossible to get an reference of the SerialInitContextFactory? The appserv-rt.jar is in the classpath of the Appserver ( installdir/lib ).
    Following the Sun Application Server 9.1 Developer Guide, I tried to copy the dependent classes (including appserv-rt.jar ) into domain-dir/lib.
    But I got the same error.
    Any ideas?
    Thanks,
    Stefan

    Hi Santanu,
    You need to write SoapHandler in order to pass username and pwd. You will need 2 classes namely HeaderHandlerResolver & SoapHandler. This is how i do in in my JAX-WS clients. I generate stubs and then attach handler to webserviceinterface
    PFA HeaderHandlerResolver.java and SoapHandler.java you would attach soap handler something like this in your code i have never done this via ADF so not sure.
    HeaderHandlerResolver soapHandlerResolver = new HeaderHandlerResolver();
    docInfo.setHandlerResolver(soapHandlerResolver);
    In SoapHandler class you will mention username and pwd like this
    soapMessageContext.put(BindingProvider.USERNAME_PROPERTY,"username");
    soapMessageContext.put(BindingProvider.PASSWORD_PROPERTY,"pwd");
    Regards,
    Amol Gavali

  • Sun Application Server 8.1 remote deplyment database connection

    I use the deploy to Remote server to deply a project to Sun Application Server 8.1. When i try to connect to the database I get connection error
    javax.servlet.ServletException: javax.faces.FacesException: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Access denied for user ''@'testserver.com' (using password: YES)
    it seems it doesnt pick the User from the Connection pull settings. The settings at the server seem correct.
    This works fine when i deply to Application server 8.0 that comes with the Sun creator

    The user is correct and it does work from 8.0/
    The server doesnt pick the username from the
    configuration
    the error message says use '' emptyWhat "configuration" are you referring to? Do you mean the way that you have the 8.1 server set up?
    Since you cannot ping, then there is something wrong with the configuration on the 8.1 server.
    Why don't you remove the connection pool and start over from scratch and cut/paste the settings from the 8.0 app server over. Then make sure you can ping once everything is set up.
    Also, where is the 8.1 box located? Are you sure it has access to the database that you are trying to reach?
    You might try posting this to the App Server forum as it really isn't a Creator problem.

  • Sun Application Server 9.1_02 + Sun RFID Software 3.0 + Postgres8.3?

    Hi all
    I am working on some RFID-related project. I need to capture, fiter and then perform some other tasks on the data sensed by RFID readers, all in Java. So I choose Sun's software. There was no luck when I was trying to configure my system to work with Sun's software. Hope you experienced could do me a favor and help me out. Thanks in advance. Here are details.
    In the installation guide of Sun Java System RFID Software 3.0, it says, to install RFID information server, Sun Java System Application Server Platform Edition 8.1 2005Q2 UR2 and PostgreSQL 8.0.4 are needed.
    For the following 2 reasons:
    1 PostgreSQL 8.0.4 is now not available to download on www.postgresql.org;
    2 I think later version of PostgreSQL or Sun Application Server should be compatible to their earlier versions
    I tried the following combination other than those stated in the installation guide:
    1 PostgreSQL 8.3;
    2 Sun Java System Application Server 9.1_02, bound with Sun Java Application Platform SDK Update 5;
    3 Sun Java System RFID Software 3.0
    Then, the application server successfully communicates with PostgreSQL, demonstrated by "ping success" through the connection pool built in application server's admin console.
    The RFID information server communicates successfully with PostgreSQL, demonstrated by deploying RFID information server database successfully in PostgreSQL.
    But, instructed by the installation guide, when I tried to validate my RFID information server installation by typing "http://localhost:8080/epcis" in the browser, the application server reported "the resource is not available".
    I looked into many other internet resources and instructions about this, but no luck at all. I am now really, really stuck. Hope you could do me this favor. Thanks.
    PS:
    1 PostgreSQL8.3 is available on http://www.postgresql.org/download/
    2 Sun Java System Application Server is available on http://java.sun.com/javaee/downloads/index.jsp
    3 Sun Java System RFID Software and the installation guide are available on https://sun-rfid.dev.java.net/SJS_RFID_Software.html
    4 Operation System is Windows XP

    Would be a great idea to open-source the Sun RFID project, since the project is inactive over the last tree years.
    Seems that this project have a great architecture, but the techonolgy is outdated ...
    We have another open source initiave (google for Aspire RFID), but seems that this project still imature ...
    Comercial options includes ALE Server, and Sendra Solutions (but I didn't evaluated these)
    Mario Prado-Brazil

Maybe you are looking for

  • Supported Graphics Card?

    I am considering upgrading from Final Cut Express HD to Final Cut Pro X. My MacBook pro is a few years old, and so I've been checking carefully to see about compatability. Can anyone tell me for sure whether or not this graphics card is supported: NV

  • Major iPad 2 problem maybe dead......

    First let me say I have all the latest updates on my iPad and Macbook 10.6.8 and iTunes 11 so I know that is not the problem. Over the past few days my iPad 2 has been randomly shutting down when it was not being used. Sometimes it would do it in a f

  • How to check the AIR runtime version?

    How can I check the AIR runtime version that is currently installed on the machine? Is there a properties file stored in the "Documents and Settings" Folder or something like that? Thanks in advance! Maik

  • Enable Related Files Setting on Dreamweaver CC reset on restart.

    Hello, I am running Dreamweaver CC on OS X Mountain Lion and everytime I try to set Enable Related Files to false and Dreamweaver restarts, the setting is checked on again. I have uninstalled and reinstalled DW, I've fixed my disk permissions, I have

  • Date & Time incorrect

    When my Mac has been in sleep mode or shut down, the clock freezes. When logged in the clock runs but on the incorrect time. Date & Time is set to update automatically will only correct when the Date & Time folder is opened from System Preferences. A