No Output in the log file generated by logback [duplicate] - windows

I have tomcat6 installed on my Windows desktop for testing purpose. At the moment nothing is added to the webapps folder, just the normal tomcat start up. Following log files are produced:
catalina.2011-12-24.log
host-manager.2011-12-24.log
jakarta_service_20111224.log
localhost.2011-12-24.log
manager.2011-12-24.log
stderr_20111224.log
stdout_20111224.log
My problem is simple, I want these logs [stdout included] to be rolled and compressed on the basis of defined size limit.
I have read about logback and its capabilities to roll and compress files with defined policies, but I have not been able to make it work for me. I have copied following jars in $TOMCAT_HOME/lib directory:
logback-access-1.0.0.jar
logback-classic-1.0.0.jar
logback-core-1.0.0.jar
Some sites suggested these libs should be added as well:
jul-to-slf4j-1.6.4.jar
slf4j-api-1.6.4.jar
I have tried copying logback.xml in $TOMCAT_HOME/conf and $TOMCAT_HOME/lib, but unable to make it work.
I would really appreciate if someone can help me with this, best could provide me with a logback.xml and jars/xml location where these files should be copied to make it work.
P.S. I have not deployed any webapp in the tomcat, it just the basic tomcat setup.

I think this tutorial can help. Tomcat 6 works only with log....0.9.30.jar or lower. Tomcat + SLF4J + Logback

Related

java.io.FileNotFoundException: Source 'D:\JBoss\EAP-7.0.0\bin\content\eArsiv.war\WEB-INF\lib\lept4j-1.2.3.jar\win32-x86-64' does not exist

I was developing an application with Spring Boot and using tess4j for OCR process.
It was jar packaging and working well.
I just changed packaging to war and deployed to jBoss EAP7.Now i am getting "Source 'D:\JBoss\EAP-7.0.0\bin\content\eArsiv.war\WEB-INF\lib\lept4j-1.2.3.jar\win32-x86-64' does not exist" error and TessAPI cant be initialized.
Normally there is no folder as content under bin folder but anyway i have created subfolders under bin folder but still no chance.
How can i handle this case?
Many thanks in advance!
Cheers,
Murat

jboss-as-maven-plugin: which directory does command "jboss-as:deploy" deploy an .ear to?

I am running jboss 7.1, maven 3, and a java ee6 application that generates an .ear
I am doing a mvn clean package jboss:as-deployand Jboss-as-maven-plugin 1.5 does its thing--I can view my app using http://localhost:8080...
just fine, but I want to know where the actual .ear is being put.
It is not in my jboss7.../standalone/deployments folder. So where is it? My app is obviously running in jboss 7.1 just fine, but I can't find the .ear file. I know that there is an .ear in Eclipse's 'target' directory, but that wasn't produced by jboss-as-maven-plugin is it? I hope you can understand my confusion--don't all .ear files need to be in the deployments directory? I also do see my .ear file inside my hidden .m2/repository directory, but does this have any interaction with jboss-as-maven-plugin? Maybe there is some hidden sym-linking between my Eclipse project's 'target' directory and the jboss7.1 standalone/deployment directory?
p.s. I am used to using a hard-deploy option with the other plugin jboss-maven that requires you to say jboss:hard-deploy which just copies the .ear to your deployments folder. Then jboss would pick up the new .ear and redeploy automatically. I get the sense that jboss-as-maven-plugin is the preferred plugin so that's why I am bothering.
The jboss-as-maven-plugin uses the deployment API so it doesn't copy the file to the deployments directory for the scanner to pick it up. It deploys just as if you deployed it from the web console or via CLI. The files should be located somewhere in the $JBOSS_HOME/standalone/data/ directory.
You're welcome to open an issue, for a discussion around it at least. I'm not sure how I feel about adding a goal for it, but here isn't the place to discuss that :)

TOMCAT 7 not deploying war

I have developed a Dynamic Java Project with Eclipse which involves web services(RESTful). After completion I tried to run my project Tomcat 7 runtime of Eclipse IDE, it works fine. I am able to access all my web services.
But, when I created a WAR file out of my project by right-clicking on project and exporting it to WAR file and placed .war file in Tomcat 7's webapps folder. Started the tomcat by running startup.bat, it throws below exceptions and I am not able t access any web service:
I have placed all the required jar files in lib folder of Tomcat.
Exception fixing docBase for context [/Books] (Books is my war file name)
Failed to create work directory [{CATALINA_HOME}\work\Catalina\localhost\Books]
Failed to create destination directory to copy resources.
Could anyone please let me know what I am missing??
Thanks in advance.
Regards,
Piyush
The failed to create "work directory" error can occur if the work folder does not exist in the tomcat7 folder.
Also this error can be caused by tomcat not having sufficient permissions to read, write and execute in the tomcat7 directory.
The issue is because, tomcat is not finding your web.xml location in the classpath.
Do below steps:
Right click on web project-->Properties-->Deployment Assembly--> Add your classpath to web.xml(src/main/webapp) in my case.

Setting osgi.configuration.area breaks my Equinox OSGI app

I have an application which uses Equinox as an osgi framework for a while now. Until now I used the system property osgi.install.area to specify where my bundles are like so
${osgi.install.area}/
plugins/
org.eclipse.osgi_3.7.0.v20110613.jar
... my app bundles
Equinox then automatically uses ${osgi.install.area}/configuration as the configuration area.
Everything works fine.
Now I need to move the configuration area out of ${osgi.install.area} because that may be read-only and I thought it was as simple as setting ${osgi.configuration.area} to a suitable path but when I do this the application no longer starts and I have the following stack trace in the logs:
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:150)
...
The path is used because at that location the log file is created and a directory "org.eclipse.osgi".
Paths to bundles are referenced in my config.ini like so:
osgi.bundles=de.mycomp.app-0.6.0.20121116-1834.jar#start, ...
The error message does not really give a hint where to look. It must be something rather simple but I am rather clueless at the moment.
Thanks in advance,
Robert
I tested changing the configuration area an existing osgi app and it worked, with the following argument below in the .ini file in the root of the install. Are you sure you are setting the config param correctly like this:
-Dosgi.configuration.area=c:\mytest
After doing that and running the app again, it created the folder and a new configuration.
Here is a copy of my .ini file that works, also it's important that osgi params come after and vm args.
-loglevel=trace
-vmargs
-Dosgi.configuration.area=c:\mytest
-Dorg.osgi.service.http.port=8094
-Declipse.ignoreApp=true
-Dosgi.noShutdown=true
-Dequinox.ds.print=true

How To Setup Logback with Tomcat 6 on Windows

I have tomcat6 installed on my Windows desktop for testing purpose. At the moment nothing is added to the webapps folder, just the normal tomcat start up. Following log files are produced:
catalina.2011-12-24.log
host-manager.2011-12-24.log
jakarta_service_20111224.log
localhost.2011-12-24.log
manager.2011-12-24.log
stderr_20111224.log
stdout_20111224.log
My problem is simple, I want these logs [stdout included] to be rolled and compressed on the basis of defined size limit.
I have read about logback and its capabilities to roll and compress files with defined policies, but I have not been able to make it work for me. I have copied following jars in $TOMCAT_HOME/lib directory:
logback-access-1.0.0.jar
logback-classic-1.0.0.jar
logback-core-1.0.0.jar
Some sites suggested these libs should be added as well:
jul-to-slf4j-1.6.4.jar
slf4j-api-1.6.4.jar
I have tried copying logback.xml in $TOMCAT_HOME/conf and $TOMCAT_HOME/lib, but unable to make it work.
I would really appreciate if someone can help me with this, best could provide me with a logback.xml and jars/xml location where these files should be copied to make it work.
P.S. I have not deployed any webapp in the tomcat, it just the basic tomcat setup.
I think this tutorial can help. Tomcat 6 works only with log....0.9.30.jar or lower. Tomcat + SLF4J + Logback

Resources