facebook

log4j configuration error [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #210448 Reply

    cconti02
    Member

    Hi.
    I’m trying to get Hibernate and JSF working with my current web project. I run mac os x, mysql, and tomcat 5. I just added Hibernate to my project and now when i attempt to run the Tomcat 5 server from within myEclipse the server starts but my project’s context fails due to a log4j error. I have no intention of logging anything in my project and i know this is the side-effect of the automated includes, but being that i’ve never used log4j I don’t know how to configure it and now can’t get started on my project. Any suggestions? I’d be happy with either not using log4j or just getting it to work, whichever is less of a headache. The specific error i get is that log4j cannot find an appender, so I’m assuming I’d just make this file- put it somewhere, and then tell log4j where it is. I have no idea how to do this on its own and less of one integrating it w/ the whole myEclipse system. Any suggestions?

    Cheers,
    Chris

    #210536

    Scott Anderson
    Participant

    Chris,

    Does the Tomcat instance start and run your application properly from the command line?

    #210540

    cconti02
    Member

    Well, it turned out the log4j fix was putting a log4j.properties file with a “default” configuration that i just pulled from some site (it was four lines or so) into my src folder. Log4j now doesn’t give me any errors.

    It turns out there was a bigger error in getting my site not to start. I want to use the myFaces jsf implementation instead of the standard jsf implementation. To do this, i removed the jsf-api and jsf-impl jar from the myeclipse preferences and told it to include the myFaces jar. I also changed my web.xml entry for to look the myfaces listener. However, tomcat is still looking for the following class: com.sun.faces.config.ConfigureListener and not starting up. I can’t deploy my project because of this error and I need to be finished by next friday. As mentioned before, I also enabled hibernate, so maybe one of those classes is looking for com.sun.faces.config.ConfigureListener?

    #210543

    Scott Anderson
    Participant

    To do this, i removed the jsf-api and jsf-impl jar from the myeclipse preferences and told it to include the myFaces jar.

    Does myFaces.jar include the jsf API? I can see changing out the actual implementation, but the API is the spec so it either needs to be left there or included in myFaces.jar.

    I also changed my web.xml entry for to look the myfaces listener.

    By modifying something that looks like the following?

    
     <listener>
    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    </listener>
    

    However, tomcat is still looking for the following class: com.sun.faces.config.ConfigureListener and not starting up

    Please make sure that if you’re using Packaged deployment that you’ve manually redeployed the application. With either type, check the contents of the deployed web.xml file to ensure that your change to the listener is present.

    I also enabled hibernate, so maybe one of those classes is looking for com.sun.faces.config.ConfigureListener?

    Sorry, but the those modules don’t share any common code or libraries at all. Additionally, there’s nothing in MyEclipse that references com.sun.faces.config.ConfigureListener. It’s only contained in the jsf-impl.jar we add to JSF projects.

    #210559

    snpe
    Member

    You have to add all libraries from myeclipse distribution (I don’t know your version and it depned form version)

    Are you try dploy myfaces-examples ?

    regards

    #210579

    cconti02
    Member

    Well, the REAL problem was getting myFaces to work.
    I just opened a new project and added jsf capabilites but with the following changes:
    removed jsf-api.jar and jsf-impl.jar
    and added myfaces.jar along w/ the jstl 1.1 jars

    Now my project deploys to my local tomcat server just fine. I checked the web.xml files on the old project and they had the right listener, so I guess this one goes up to the J2EE demi-gods. Either way, the simple fix was just starting a new project and bringing over my working files. Although this worked fine for a small project, I doubt its much help to someone who already has something large working. Then again, I also doubt someone who has a large project working is about to switch frameworks just to take advantage of a few myFaces custom components. Thanks for the help.
    Cheers,
    Chris

    #210581

    Scott Anderson
    Participant

    Chris,

    Thanks for the followup. Glad you’re up and running.

    #210587

    snpe
    Member

    advantage myfaces isn’t a few custom components, only (new myfaces have great components – tree, html list, javascript menu, but is not only custom components)

    – jsf ri have more bugs than myfaces
    – myfaces team resolve bug quicker
    – you can now use myfaces components with JSF RI , too

    regards

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: log4j configuration error [Closed]

You must be logged in to post in the forum log in