Pivotal server log messages not show in Spring tools suite - java

I am working on Spring web MVC. I am using Spring tools suite and pivotal server. I did not found any server log messages in STS. Console only show the server startup message. I want to view all the server message, error and exceptions. Currently I am unable to view any server error messages and errors.
The console is showing the message like this-
Nov 19, 2016 1:08:21 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1312 ms
Nov 19, 2016 1:08:26 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5332 ms

i see the question is old but I came across the same issue just now and didn't want to let this one go unanswered ;)
I found an solution from pivotal themselves. But it has a little typo in it: The first line in the logging.properties is
handlers= java.util.logging.ConsoleHandler.level= INFO
but should rather be just
handlers= java.util.logging.ConsoleHandler
This should do the trick.
And if you would still want to keep the default catalina, localhost, etc. files of the tcServer additional to the console output you can modify or copy the logging.properties file found inside of your tcServer - base instance ({pivotal-tc-server-folder}/base-instance/conf/).
Here are many configurations but the one concerning the console output, which is otherwise only in the catalina-{date}.log is in the line
.handlers = 1catalina.org.apache.juli.AsyncFileHandler
just change it to
.handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler
and you'll have both: logs and console output.
Best regards,
Uwe

Related

Not able to deploy Cloud end point backend module

I am working on an android project which uses data from Google data store. For this I have JSP & Servlet based admin module which will be used to upload data. To read data from Android client application I have cloud entry points.
Thus, I have created a module comprising of JSP, servlets, and cloud entry points. This is working fine with local dev server. Able to access data through android app.
Now, trying to deploy the module to Google App Engine. But getting following error:
SEVERE: Endpoints configuration not updated. The app returned an
error when the Google Cloud Endpoints server attempted to communicate
with it.
What could be missing here?
Let me know if anymore information needed regarding this issue.
Please help me in this regard.
Full trace:
/usr/lib/jvm/java-8-oracle/bin/java -Dfile.encoding=UTF-8 -classpath /root/.gradle/appengine-sdk/appengine-java-sdk-1.9.18/lib/appengine-tools-api.jar com.google.appengine.tools.admin.AppCfg --application=rotary-bidar-01 --version=1 --oauth2 --oauth2_client_secret=***** --oauth2_client_id=***** --oauth2_refresh_token=***** update /mnt/4CF2AADEF2AACC10/Projects/Rotary_Bidar/AndroidApplication/RotaryBidar/server/build/exploded-app
Reading application configuration data...
Jan 16, 2016 11:28:59 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed /mnt/4CF2AADEF2AACC10/Projects/Rotary_Bidar/AndroidApplication/RotaryBidar/server/build/exploded-app/WEB-INF/appengine-web.xml
Jan 16, 2016 11:28:59 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed /mnt/4CF2AADEF2AACC10/Projects/Rotary_Bidar/AndroidApplication/RotaryBidar/server/build/exploded-app/WEB-INF/web.xml
Beginning interaction for module default...
0% Created staging directory at: '/tmp/appcfg5838290850638628913.tmp'
5% Scanning for jsp files.
8% Compiling jsp files.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /tmp/1452967141068-0/org/apache/jsp/admin_jsp.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Jan 16, 2016 11:29:10 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed /tmp/appcfg5838290850638628913.tmp/WEB-INF/web.xml
20% Scanning files on local disk.
25% Initiating update.
28% Cloning 13 static files.
31% Cloning 50 application files.
40% Uploading 2 files.
52% Uploaded 1 files.
61% Uploaded 2 files.
68% Initializing precompilation...
73% Sending batch containing 2 file(s) totaling 1KB.
90% Deploying new version.
95% Will check again in 1 seconds.
98% Will check again in 2 seconds.
99% Will check again in 4 seconds.
99% Will check again in 8 seconds.
99% Will check again in 16 seconds.
99% Will check again in 32 seconds.
99% Endpoints configuration not updated. The app returned an error when the Google Cloud Endpoints server attempted to communicate with it.
Jan 16, 2016 11:30:32 PM com.google.appengine.tools.admin.AppVersionUpload checkEndpointsServingStatusResult
99% See the deployment troubleshooting documentation for more information: https://developers.google.com/appengine/docs/java/endpoints/test_deploy#troubleshooting_a_deployment_failure
SEVERE: Endpoints configuration not updated. The app returned an error when the Google Cloud Endpoints server attempted to communicate with it.
99% Ignoring Endpoints failure and proceeding with update.
99% Closing update: new version is ready to start serving.
99% Uploading index definitions.
Update for module default completed successfully.
Success.
Cleaning up temporary files for module default...

Wildfly JSF resources: err_invalid_chunked_encoding

My customer web application is currently on an AWS-EC2 Linux instance, running WildFly 8.2.0.Final "Tweek".
I'm not using Apache or other web servers, just accessing the application server on port 8080 (the system is forwarding to 8080 all traffic on port 80).
Application works fine everywhere, but yesterday I found a very weird issue on one of my customer's browsers. However, it's not related to the browser, because I already tried installing Firefox and Chrome, in addition to IE, and the problem is still there. The client OS is Win8.1.
The CSS and JS files are not loaded by the browser: Chrome prints this message in the console:
ERR_INVALID_CHUNKED_ENCODING
However, if I click on the file and 'Open link in new tab', I can actually see the file's content!
My static files are JSF resources, for example:
/javax.faces.resource/primefaces.css.htm?ln=primefaces&v=5.1
Response headers are, for example:
Content-Type:application/javascript
Date:Fri, 27 Mar 2015 16:32:51 GMT
ETag:W/"312861-1427473269000"
Expires:Fri, 03 Apr 2015 16:32:51 GMT
Last-Modified:Fri, 27 Mar 2015 16:21:09 GMT
I saw the content-length is also zero, which I suppose is the cause for the problem.
How to find out more info on that? What's the solution for that type of error? Thanks

Glassfish - Application name is already in use

I’ve come to an hold with my programing because I’m getting an error from glassfish. I’m using NetBeans IDE 7.3 for this project. And I’ve built a simple program which runs over the web(jsp file etc). But I keep on getting the weirdest error display from glassfish. I’ve searched the internet for my solution and found people posting similar things, but I never seem actually manage to fix it because I don’t really understand the post which I’ve read.
So what is the error that I get at startup? First time I run it I get this from the Output
Starting GlassFish Server 3.1.2
GlassFish Server 3.1.2 is running.
In-place deployment at C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\build\web
Initializing...
deploy?
DEFAULT=C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\build\web&name=ÄrendeWebApplication&contextroot=/_rendeWebApplication&force=true failed on GlassFish Server 3.1.2
Error occurred during deployment: null. Please see server.log for more details.
C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\nbproject\build-impl.xml:1038: The module has not been deployed.
See the server log for details.
The actually name of the project is ÄrendeWebApplication and sure it’s a weird name for some people.
Well anyhow I tried to run the application again just to make sure it’s not something spooky going on, and I got a totally different error message.
In-place deployment at
C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\build\web
Initializing...
deploy?
DEFAULT=C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\build\web&name=Ärende
WebApplication&contextroot=/_rendeWebApplication&force=true failed on GlassFish Server 3.1.2
Error occurred during deployment: Application name ÄrendeWebApplication is already in use.
Please pick a different name.. Please see server.log for more details.
C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\nbproject\build-impl.xml:1038: The module has not been deployed.
See the server log for details.
Alright so this is the weirdest part since it’s complaining that the name of my application is already in use? So I thought first it could perhaps be something with the database, but went to see the “Java DB Database Process” and it seemed fine, will post it too just in case
Fri Jun 07 11:01:10 CEST 2013 : Security manager installed using the Basic server security policy.
Fri Jun 07 11:01:11 CEST 2013 : Apache Derby Network Server - 10.8.2.2 - (1181258) started and ready to accept connections on port 1527
So the database is not the problem “I Believe” so I went later to check on the Glassfish server 3.1.2 and I found some warning messages which read
WARNING: Multiple [2] JMX MBeanServer instances exist, we will use the server at index [0] : [com.sun.enterprise.v3.admin.DynamicInterceptor#297b0d9d].
WARNING: JMX MBeanServer in use: [com.sun.enterprise.v3.admin.DynamicInterceptor#297b0d9d] from index [0]
WARNING: JMX MBeanServer in use: [com.sun.jmx.mbeanserver.JmxMBeanServer#572b43d] from index [1]
INFO: EJB5181:Portable JNDI names for EJB ÄrendeDao: [java:global/ÄrendeWebApplication/ÄrendeDao!com.Ärende.dao.ÄrendeDaoLocal, java:global/ÄrendeWebApplication/ÄrendeDao]
INFO: WEB0671: Loading application [ÄrendeWebApplication] at [/_rendeWebApplication]
SEVERE: The log message is empty or null. Please log an issue against the component in the logger field.
And here is where I’ve tried different things, well I thought it first complained about the name, it’s alredy in use right…. So I deleted the application and moved it to another place on my hard drive and well, I wouldn’t be posting this if it worked. Then I started considering that perhaps the database was something wrong with, I went to the console admin in glassfish to check the connection and the Ping and showed me that it worked as it should. Also perhaps important information is that I’ve connected glassfish through MySQL, but I hardly believe that this is the problem. I then stumbled across someone saying that you could force “redeploy via Eclipse” well first problem here is that I’m not using Esclipse and second problem is I’ve searched A LOT to find if there is a “Force redeploy in NetBeans” and that is not the easiest task in life. So I believe this is perhaps my last stop hopefully and maybe someone here could help me out.
here are some steps you can try:
Fix your projects name :3
If your problem is the one the question title suggests, undeploy your application first, then redeploy. You can easily undeploy and force redeploy in the Glassfish Admin Gui (http://localhost:4848).
If your application still does not work, update your question with proper formatted log messages of the actual problem.

How to remove errors UnsupportedOperationException and Possible memory leak

I have been searching a lot but have not found a perfect one which can help me to solve this problem.
I have web services and am generating the stub using JAX-WS.
To access the methods of web services I have wriiten a class in which all the methods are static like
public static String getLocation()
{
//call to the web service
}
I am specifying static because I want to confirm this is not the root cause of my problem.
Now when I am checking the logs in the Tomcat directory the catilina log shows some thins like this...This error is occured when I Startup or shutdown the tomcat server
Mar 18, 2010 11:13:07 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: stop: Stopping web application at '/testWeb'
Mar 18, 2010 11:13:07 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [leakingThread] but has failed to stop it. This is very likely to create a memory leak.
Another error I am seeing is
SEVERE: Unable to determine string representation of value of type [com.sun.xml.stream.writers.XMLStreamWriterImpl]
java.lang.UnsupportedOperationException
at com.sun.xml.stream.writers.XMLStreamWriterImpl.entrySet (XMLStreamWriterImpl.java:2134)
at java.util.AbstractMap.toString(AbstractMap.java:478)
at org.apache.catalina.loader.WebappClassLoader.clearThreadLocalMap(WebappClassLoader.java:2433)
at org.apache.catalina.loader.WebappClassLoader.clearReferencesThreadLocals(WebappClassLoader.java:2349)
at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1921)
at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1833)
at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:740)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4920)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:936)
Please can any one help me to clear these errors.
Thanks in advance.
My diagnossis: you have a Map implementation in a thread local, and this map doesn't support the operation entrySet, which is triggered by Map#toString. To be precise, your exception is thrown from this line of code in com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.
Tomcat's code that clears the thread local is quite unfortunately written to unconditionally call toString on objects just to be able to log them if the debug level is on.
If you can't get rid of using a thread-local for this, you may have quite some trouble working around this problem.
Your thread leak, by the way, is very probably the result of failed cleanup due to the above error.

log4j property error

I have an application which uses log4j to send its log via syslog to a central logging application. Although the log4j is successful in sending the app messages, the messages themselves do not have the syslog header (containing the time stamp, host name, etc.).
I am trying to figure out how can I append the syslog header to each log line from the application.
Below is my configuration
log4j.logger.com.axeda.esrs=INFO, SYSLOG log4j.appender.SYSLOG=org.apache.log4j.net.SyslogAppender
log4j.appender.SYSLOG.layout=org.apache.log4j.PatternLayout
log4j.appender.SYSLOG.layout.ConversionPattern=%d{ISO8601}: %m%n log4j.appender.SYSLOG.SyslogHost=syslog_destination
log4j.appender.SYSLOG.Facility=LOCAL0
log4j.appender.SYSLOG.FacilityPrinting=false
I added the following property to the conf.:
log4j.appender.SYSLOG.Header=true
But after restarting the process, I get the following error in the log file:
log4j:WARN No such property [header] in org.apache.log4j.net.SyslogAppender
Can you please tell me how I can add the syslog header into each log event.
log sample currently in use without the syslog header: <134>2012-11-02 16:22:30,451: EMC Policy Manager Audit: Fri Nov 02 16:22:30 CEST 2012, CK0000000, System, Remote Session 5171112upPI4v4Hp3FrHJbSOxiHZ7aEp3crZNwngP8ZrLw625 started on device CK292603612 with model Symmetrix-GW by remote user 00000 from enterprise servicelinkcluster at Fri Nov 02 16:19:52 CEST 2012
Thanks!
I think header's H must be small... So property name must be log4j.appender.SYSLOG.header=true.
By Looking at the class file, it looks header is a property of the class http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/net/SyslogAppender.html. So while defining properties we start them with LOWER_CHAR... You can give it a try...
Are you using an old log4j version? The header property on SyslogAppender was added in 1.2.15. I saw the same warning you're getting while I was configuring an existing system to log to Papertrail, and I found that something in my build process was pulling in an older log4j version.

Categories

Resources