log4j is not working on solaris 10 - log4j

I am creating a SOA application in which i configured log4j. I deployed the application on windows , then log4j is working fine, log file is creating on the specified file as well as log is printing on console. But when i deployed the same application on Solaris neither log file is generated nor logs are generated on console. And i not getting any warning or error. I am putting log4j.properties file in classpath.
I am stuck in this problem since last three days, but not getting any resolution.
I am using the following configuration
1) log4j-1.2.17.jar
2) weblogic 10.3.6.0
Your help will be very helpful.
Thanx
Ankur jain

Go to admin console and check the servers setting regarding logs:

Thanx Cris for reply,
My prob has resolved, there was a little mistake that i have done.
I had put log4j.jar in weblogic domain lib as well as application lib. when i delete the jar from weblogic domain lib and restarted the server. Log file had generated.
Thanx
Ankur jain

Related

wildfly 20 doesn't log with log4j. Which factors Can be involved for that?

I have two environment development(local) and other QA environment, In the last is a cluster with two nodes.
The problem came with the deploy in QA environment I can't see the log in the server, but locally print console logging without problem.
I'm sure that module structure is the same in both environments, and my configure is in the classpath with xml file.
Which aspect can influence in this difference?
Local print logging console server and QA enviroment dont do it.
I was able to solve this, I checked the server in the development environment, it's a domain configuration and for this reason it did not show the application log in the user wizard, due to application conditions only the applications write to the .log file, at start I was not allowed to check this domain log directory, but after I check this by command line my app log file is right there
I'll hope to help someone else

nopCommerce Caching nop.web Issue

I have my websites running on nopCommerce. The Site is hosted on a private server on IIS.
Here we have only used nopCommerce core files for caching and have not used any other mechanism.
The problem I am facing is, Randomly nopweb.dll is replaced with an older version of the file and it causes site down.
The Issue gets resolved by just replacing the Nop.Web.dll from the backup folder or new dll of that.
I have read many articles but have not found any solution for that yet.
Thanks in advance.
I faced a same issue for nopCommerce3.4 where the new Nop.Web.dll replaced by the old Nop.Web.dll after a certain time of period. I got a solution by following Clear GAC
Enable stdout log from web.config file and then check logs from application root folder > Logs.
Open the latest log file(or when your site is down) and find an error log with fail group.
this log will show you the exact error message.

Azure App Service - Spring Boot application stuck on startup

I host Spring Boot web applications as Azure App Services, however one of the seems to be stuck in a loop on startup. The application is not accessible and it looks like it restarts every half a minute. There are no errors in the logs and restarting the App Service didn't help either.
Does someone have an idea why it is happening or how I could fix it?
Thanks in advance.
Sometimes the jar will take more time to start with the default startup command. It could be because it scannes the file system for configuration files since it uses -cp command to start the jar.
java -cp app.jar org.springframework.boot.loader.JarLauncher
I fixed this issue by providing a startup command in the AppService->Configuration->General Settings->Startup command
java -jar <path_of_jar>
Altenatevely you can check the container logs also Please refer the link below.
[https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs]
If you are logging into a file, then you can SSH[Azure portal->AppService-> left side there is an SSH option ] to the container and tail the logs directly, but sometimes it is very hard to get into a container using ssh since it is not starting properly.
Your application.properties should have:
logging.level=DEBUG
logging.level.org.springframework=DEBUG
logging.file=/home/LogFiles/boot.log
boot.log should give you more on what to hunt down next.
I finally managed to fix the problem. On default the App Service configuration was set up to use Jetty as web container instead of Tomcat. Probably the service tried to validate that the Jetty is up and running and since it wasn't the service kept restarting.
Once I set the configuration to Tomcat the issue was solved.

Portlet not getting deployed

I have this strange problem at which I have spent stupid amount of time.
To build my portlet, I haven't used sdk and I am using my own ant script do the job. It works all well till this wierd situation.
I am basically using a lot class from portal-service.jar to change role settings etc. When I include it in my build path and deploy it again. It doesn't get deployed. On shell it shows the deployment, below is the log:
Copying 1 file to C:\liferay-portal\tomcat-6.0.29\webapps\ch1_HelloWorld
Deleting directory C:\liferay-portal\tomcat-6.0.29\temp\20121016060846753
06:08:47,887 INFO [PortletAutoDeployListener:81] Portlets for C:\liferay-portal\tomcat-6.0.29\deploy\ch1_HelloWorld.war copied successfully.
Deployment will start in a few seconds.
16 Oct, 2012 6:08:56 AM org.apache.catalina.startup.HostConfig checkResources
INFO: Reloading context [/ch1_HelloWorld]
That's it! Later it doesnt show (as it does normally) that the portlet is available to use. In browser, under the "add tab", the option is never shown. What can be the issue for this. The portlet is a simple hello world portlet that access role information
I am basically using a lot class from portal-service.jar to change role settings etc. When I include it in my build path and deploy it again. It doesn't get deployed. On shell it shows the deployment, below is the log:
Did you put portal-service.jar to WEB-INF/lib? If so remove it from there and add it to some other (my_project/lib) directory than add it to build path.
Also make sure that after deployment portal-service.jar is not in your deployed WEB-INF/lib.
Better yet, first undeploy than redeploy.
Is this properly set in your liferay-display.xml ?
<display>
<category name="yourCategoryUnderAddMenu">
<portlet id="yourPortletId"></portlet>
</category>
</display>
Late answer, but maybe it will help someone:
- just shutdown your server;
- delete the portlet from the "webapps" tomcat folder;
- you should delete "temp" and "work" folders content;
- restart your server and deploy your portlet.
Everything should be OK.
I do not know why this happens, but I encounter this problem many times and fix it with the same solution.
Bye!
This is normally the case when the auto.deploy.dest.dir is pointing to the wrong place. Firstly, i came to realise the common mistake is to make this point to liferay_home/deploy which is not correct. This property specifies the destination of exploded files. For tomcat, it would be the webapps directory e.g. /opt/liferay-portal-6.2-ce-ga2/tomcat-7.0.42/webapps
In other words, tomcat, on receiving the exploded files,carries on. In your case, tomcat was never realising any changes.
Delete the old war from the webapps, and put your new war manually in the Deploy folder.
It looks like you might be deploying by copying it to the webapps folder, instead of the deploy?
go to plugins-sdk folder.
open build.userName.properties (In my case name of file is build.asif.properties)
open it..
add the below line
auto.deploy.dir = D:\\nWorkSpace\\liferay-portal-6.2.0-ce-ga1\\deploy
"D:\nWorkSpace\liferay-portal-6.2.0-ce-ga1\deploy" is the path of my deploy direcotory.
where nWorkSpace is my workspace. My problem is resolve.
I tried all of the above solutions but my issue was not resolved on a Liferay 6.2 EE sp2 bundle.
I was finally able to resolve portlet deployment issue by cleaning all the portlet xml files except the ROOT.xml from the Tomcat home/conf/Catalina/localhost folder.
This tip above was provided on the following post - how ever the blog post no longer exits and had to find in the archives below with google search in case someone is interested. It saved me hours of effort.
https://www.liferay.com/community/forums/-/message_boards/message/2124111
http://archive-ro.com/page/754918/2012-11-26/http://blog.ropardo.ro/2010/08/09/liferay-deployment-will-start-in-a-few-seconds-and-how-to-realy-start/

IIS not able to locate the web.config

I have a deployed a web application in IIS. Which used to work without any issues. Recently i have shifted that web application to another machine, Here is the problem. Once i setup the Webapplication when i opened the default document in IIS im getting the File not found error as following
Internal Server Error
\?\C:\inetpub\wwwroot\application\web.config
I have no clue why the IIS is not able to find the web.config. The file is present in the path C:\inetpub\wwwroot\application\web.config but the IIS is looking in the path \?\C:....
Please let me know how to resolve this??
Firstly this is documented on support.microsoft.com so I would suggest that anyone who has this issue read this first as it covers a number of solutions which I won't
Now from personal experience I encountered this error after setting up a new development machine. What I had forgotten to do was install the Url Rewrite 2.0 IIS module. Sadly the IIS error gives absolutely no idea that this is the actually issue.
Therefore to solve this issue investigate the system.webServer setting in our web.config and ensure that you have installed all the iis modules that you use. I did this by systematically removing elements from my web.config until I came across the cause.
In my case, I was running ASP .NET Core website so I had to install .Net Core Runtime from
https://dotnet.microsoft.com/download/dotnet-core/current/runtime
I know it's old post but I resolved the same issue as follows:
If you are using TFS and you are getting this problem then Reason is ".vs" file is not excluded from commit.
Because of that ".vs\config\applicationhost.config" gets the local version of another user/Developer.
To Solve the error, First open that file Update Physical path inside "" xml tag.
Also ask user to exclude this folder from TFS to prevent future issues.
If you are getting mysql localhost error. What I will do will work for you.
Control Panel(View by: Large Icons) >> Programs and Features >>
(Usually upper left corner) Turn Windows Features on or off >>
Internet Information Services >> Web Management Tools and World Wide Web Services
After Restart.

Resources