This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes log4j:ERROR Could not read configuration file from URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "log4j:ERROR Could not read configuration file from URL" Watch "log4j:ERROR Could not read configuration file from URL" New topic
Author

log4j:ERROR Could not read configuration file from URL

Mark Uppeteer
Ranch Hand

Joined: Mar 02, 2004
Posts: 159

Hello Guys,
I have a J2ee application client that wants to connect over the internet to
my application server (jboss), now I have changed the protocol to http and on localhost it works, but my first test over the internet gives me the following error:
java -Djava.naming.provider.url=jnp://xx.xx.xxx.xxx:8080 -Djava.naming.factory.initial=org.jnp.int
erfaces.NamingContextFactory -Djava.security.policy=file:rmi.policy -jar MoehahaEXE.jar
log4j:ERROR Could not read configuration file from URL [jar:file:/C:/myclient/MoehahaEXE.jar!/log4j.prop
erties].
java.util.zip.ZipException: Het systeem kan het opgegeven bestand niet vinden
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.<init>(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown Sour
ce)
....

and log4j.properties is in my jar file.
I didn't ask for it, it is just put in there by JBuilderX.
I just want this to work with or without loggin.
Can I just delete the log4j.properties file to get past this error ?
thnx


I know where my towel is. (SCJP 5, OCPJWCD)
[Free Quiz Tips for a fun night with friends or family] Flash games
Mark Uppeteer
Ranch Hand

Joined: Mar 02, 2004
Posts: 159

Hello,
just posting the answer in case its usefull to NE1.
Just putting the log4j.jar file in the same directory as my jar was solved the problem in that way that the program now only complains on the fact that log4j is not initialized correctly, which is right because I did not put anything in my code about log4j.
Anyway, at least my program doesn't crash on it anymore...
grtz,
themuppeteer
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: log4j:ERROR Could not read configuration file from URL
 
Similar Threads
java.util.ZipException
Jar hell concerning log4j
log4j:ERROR Could not read configuration file
Jar File question
Need Help To Resolve Error