I have been using play framework 2.2.4 version. While executing particular action getting NullPointerException, If its from my code I can fix it but it has come from play library.
could someone help on this??
# action #
public static Result getOverViewPage(final String errorMsg){
String autoBillStatusMsg = "";
//business logic is here
Logger.info("Final Auto-pay status message : "+autoBillStatusMsg);
return ok(rave_customer_index.render());
}
We are able to see the above logger statement. But after that we are getting NullPointerException
Exception StackTrace
INFO | jvm 1 | 2015/09/18 15:15:24 | [info] application - Final
Auto-pay status message :
INFO | jvm 1 | 2015/09/18 15:15:24 | [error] play - Cannot invoke
the action, eventually got an error: java.lang.NullPointerException
INFO | jvm 1 | 2015/09/18 15:15:24 | [error] application - INFO
| jvm 1 | 2015/09/18 15:15:24 | INFO | jvm 1 | 2015/09/18
15:15:24 | ! #6nfm0a093 - Internal server error, for (GET) [/] ->
INFO | jvm 1 | 2015/09/18 15:15:24 |
INFO | jvm 1 | 2015/09/18 15:15:24 |
play.api.Application$$anon$1: Execution
exception[[NullPointerException: null]]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
play.api.Application$class.handleError(Application.scala:296)
~[com.typesafe.play.play_2.11-2.3.2.jar:2.3.2]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
play.api.DefaultApplication.handleError(Application.scala:402)
[com.typesafe.play.play_2.11-2.3.2.jar:2.3.2]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320)
[com.typesafe.play.play_2.11-2.3.2.jar:2.3.2]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320)
[com.typesafe.play.play_2.11-2.3.2.jar:2.3.2]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
scala.Option.map(Option.scala:145)
[org.scala-lang.scala-library-2.11.1.jar:na] INFO | jvm 1 |
2015/09/18 15:15:24 |
Caused by: java.lang.NullPointerException: null
INFO | jvm 1 | 2015/09/18 15:15:24 | at
java.net.URLEncoder.encode(URLEncoder.java:205) ~[na:1.7.0_21]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
play.api.mvc.CookieBaker$$anonfun$3.apply(Http.scala:427)
~[com.typesafe.play.play_2.11-2.3.2.jar:2.3.2]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
play.api.mvc.CookieBaker$$anonfun$3.apply(Http.scala:426)
~[com.typesafe.play.play_2.11-2.3.2.jar:2.3.2]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
~[org.scala-lang.scala-library-2.11.1.jar:na]
INFO | jvm 1 | 2015/09/18 15:15:24 | at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
~[org.scala-lang.scala-library-2.11.1.jar:na]
DEBUG | wrapperp | 2015/09/18 15:15:25 | send a packet PING : ping
INFO | jvm 1 | 2015/09/18 15:15:26 | WrapperManager Debug:
Received a packet PING : ping
INFO | jvm 1 | 2015/09/18 15:15:26 | WrapperManager Debug: Send a
packet PING : ping
Related
I'm trying to aggregate data based on timestamp. Basically I'd like to create an array for each day.
So lets say I've a query like so:
SELECT date(task_start) AS started, task_start
FROM tt_records
GROUP BY started, task_start
ORDER BY started DESC;
The output is:
+------------+------------------------+
| started | task_start |
|------------+------------------------|
| 2021-08-30 | 2021-08-30 16:45:55+00 |
| 2021-08-29 | 2021-08-29 06:47:55+00 |
| 2021-08-29 | 2021-08-29 15:41:50+00 |
| 2021-08-28 | 2021-08-28 12:59:20+00 |
| 2021-08-28 | 2021-08-28 14:50:55+00 |
| 2021-08-26 | 2021-08-26 20:46:44+00 |
| 2021-08-24 | 2021-08-24 16:28:05+00 |
| 2021-08-23 | 2021-08-23 16:22:41+00 |
| 2021-08-22 | 2021-08-22 14:01:10+00 |
| 2021-08-21 | 2021-08-21 19:45:18+00 |
| 2021-08-11 | 2021-08-11 16:08:58+00 |
| 2021-07-28 | 2021-07-28 17:39:14+00 |
| 2021-07-19 | 2021-07-19 17:26:24+00 |
| 2021-07-18 | 2021-07-18 15:04:47+00 |
| 2021-06-24 | 2021-06-24 19:53:33+00 |
| 2021-06-22 | 2021-06-22 19:04:24+00 |
+------------+------------------------+
As you can see the started column has repeating dates.
What I'd like to have is:
+------------+--------------------------------------------------+
| started | task_start |
|------------+--------------------------------------------------|
| 2021-08-30 | [2021-08-30 16:45:55+00] |
| 2021-08-29 | [2021-08-29 06:47:55+00, 2021-08-29 15:41:50+00] |
| 2021-08-28 | [2021-08-28 12:59:20+00, 2021-08-28 14:50:55+00] |
| 2021-08-26 | [2021-08-26 20:46:44+00] |
| 2021-08-24 | [2021-08-24 16:28:05+00] |
| 2021-08-23 | [2021-08-23 16:22:41+00] |
| 2021-08-22 | [2021-08-22 14:01:10+00] |
| 2021-08-21 | [2021-08-21 19:45:18+00] |
| 2021-08-11 | [2021-08-11 16:08:58+00] |
| 2021-07-28 | [2021-07-28 17:39:14+00] |
| 2021-07-19 | [2021-07-19 17:26:24+00] |
| 2021-07-18 | [2021-07-18 15:04:47+00] |
| 2021-06-24 | [2021-06-24 19:53:33+00] |
| 2021-06-22 | [2021-06-22 19:04:24+00] |
+------------+--------------------------------------------------+
I need a query to achieve that. Thank you.
You can use array_agg()
SELECT date(task_start) AS started, array_agg(task_start)
FROM tt_records
GROUP BY started
ORDER BY started DESC;
If you want a JSON array, rather than a native Postgres array, use jsonb_agg() instead
Here is the stdout
[lzhou#localhost script]$ perl dbauthtest_server.pl You are loading Catalyst::Engine::HTTP explicitly.
This is almost certainly a bad idea, as Catalyst::Engine::HTTP has been removed in this version of Catalyst.
Please update your application's scripts with:
catalyst.pl -force -scripts MyApp
to update your scripts to not do this. [debug] Debug messages enabled [debug] Statistics enabled [warn] You are running an old script!
Please update by running (this will overwrite existing files):
catalyst.pl -force -scripts DBAuthTest
or (this will not overwrite existing files):
catalyst.pl -scripts DBAuthTest
[debug] Loaded Config "/home/lzhou/ä¸è¼ /def-guide-to-catalyst-master/4439/catalyst-book-code/Chapter_6/DBAuthTest/dbauthtest.conf" [debug] Loaded plugins: .--------------------------------------------------------------------------------. | Catalyst::Plugin::ConfigLoader 0.34 | '--------------------------------------------------------------------------------'
[debug] Loaded PSGI Middleware: .--------------------------------------------------------------------------------. | Catalyst::Middleware::Stash | | Plack::Middleware::HTTPExceptions | | Plack::Middleware::RemoveRedundantBody 0.06 | | Plack::Middleware::FixMissingBodyInRedirect 0.12 | | Plack::Middleware::ContentLength | | Plack::Middleware::MethodOverride 0.20 | | Plack::Middleware::Head | '--------------------------------------------------------------------------------'
[debug] Loaded Request Data Handlers: .--------------------------------------------------------------------------------. | application/json | | application/x-www-form-urlencoded | '--------------------------------------------------------------------------------'
[debug] Loaded dispatcher "Catalyst::Dispatcher" [debug] Loaded engine "Catalyst::Engine" [debug] Found home "/home/lzhou/ä¸è¼ /def-guide-to-catalyst-master/4439/catalyst-book-code/Chapter_6/DBAuthTest" [debug] Loaded components: .---------------------------------------------------------------------+----------. | Class | Type |
+---------------------------------------------------------------------+----------+ | DBAuthTest::Controller::AuthUsers | instance | | DBAuthTest::Controller::Root | instance | | DBAuthTest::Model::AuthDB | instance | | DBAuthTest::Model::AuthDB::Roles | class | | DBAuthTest::Model::AuthDB::UserRoles | class | | DBAuthTest::Model::AuthDB::Users | class | | DBAuthTest::View::Web | instance | '---------------------------------------------------------------------+----------'
[debug] Loaded Private actions: .----------------------+--------------------------------------+------------------. | Private | Class | Method |
+----------------------+--------------------------------------+------------------+ | /end | DBAuthTest::Controller::Root | end | | /default | DBAuthTest::Controller::Root | default | | /authusers/profile | DBAuthTest::Controller::AuthUsers | profile | | /authusers/base | DBAuthTest::Controller::AuthUsers | base | | /authusers/add | DBAuthTest::Controller::AuthUsers | add | | /authusers/user | DBAuthTest::Controller::AuthUsers | user | '----------------------+--------------------------------------+------------------'
[debug] Loaded Path actions: .---------------------------------------+----------------------------------------. | Path | Private |
+---------------------------------------+----------------------------------------+ | /... | /default | '---------------------------------------+----------------------------------------'
[debug] Loaded Chained actions: .---------------------------------------+----------------------------------------. | Path Spec | Private |
+---------------------------------------+----------------------------------------+ | /authusers/add | /authusers/base (0) | | | => /authusers/add (0) | | /authusers/*/profile | /authusers/base (0) | | | -> /authusers/user (1) | | | => /authusers/profile (0) | '---------------------------------------+----------------------------------------'
[info] DBAuthTest powered by Catalyst 5.90124
But when i visit http://localhost:3000/ , connection is refused . it appears that there is no server running.
I'm using apache archiva and when I upload an artifact into any repository it does not reflect in the repository. It doesn't get saved anywhere. Basically nothing happens. What could the problem be?
Logs:
INFO | jvm 1 | 2014/11/26 19:20:10 | java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: java.nio.file.Files.copy(Ljava/nio/file/Path;Ljava/nio/file/Path;[Ljava/nio/file/CopyOption;)Ljava/nio/file/Path;
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:324)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:240)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:239)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:213)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:131)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:266)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:191)
INFO | jvm 1 | 2014/11/26 19:20:10 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:242)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.server.Server.handle(Server.java:370)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
INFO | jvm 1 | 2014/11/26 19:20:10 | at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
INFO | jvm 1 | 2014/11/26 19:20:10 | at java.lang.Thread.run(Thread.java:732)
The file upload using archiva is totally non-intuitive, it took me about two hours to finally work it out:
Fill in the form
Click the Choose File button and find your .jar
Click Start Upload button
IMPORTANT!!!! Then click the Save Files button (don't ask why this extra button is needed)
We are running JBoss 7.1.1 Final. We run Jgroup channel and send Messages over it. In org.jgroups.Message we set our custom objects which are present inside jars in lib of our ear.
our ear depends on module called pam "Dependencies: pam" and pam module add dependacy of jgroups
Now when we try to send and receive messages we are getting following exceptions
INFO | jvm 1 | 2013/04/22 14:17:42 | 14:17:42,447 SEVERE [org.jgroups.protocols.pbcast.NAKACK] (Incoming-8,PAM_Cluster_009bab72-bd07-4a97-993f-307f0161cd93,6ea3721c-4e05-4d4c-b0de-d0e17acdbaf0) couldn't deliver message [dst: <null>, src: ba1438dc-c17d-4dca-b30d-62bd4d755b3d (3 headers), size=859 bytes]: java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: com.pam.automation.server.GlobalDBNotification from [Module "org.jgroups:main" from local module loader #6f991ccf (roots: C:\Jboss7\node1\standalone\..\modules)]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.Message.getObject(Message.java:379) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at com.pam.automation.server.ClusterViewChangeListener.processMessagage(ClusterViewChangeListener.java:119) [clusterservices-snapshot.jar:4.2]
INFO | jvm 1 | 2013/04/22 14:17:42 | at com.pam.automation.server.ClusterViewChangeListener$1.receive(ClusterViewChangeListener.java:84) [clusterservices-snapshot.jar:4.2]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.JChannel.invokeCallback(JChannel.java:758) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.JChannel.up(JChannel.java:719) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1026) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.pbcast.STATE_TRANSFER.up(STATE_TRANSFER.java:178) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.FRAG2.up(FRAG2.java:181) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.pbcast.GMS.up(GMS.java:881) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:244) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.UNICAST.up(UNICAST.java:332) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:730) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:559) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.BARRIER.up(BARRIER.java:126) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:140) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.FD.up(FD.java:273) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:282) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.MERGE2.up(MERGE2.java:205) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.Discovery.up(Discovery.java:355) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.TP.passMessageUp(TP.java:1174) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1722) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1699) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | Caused by: java.lang.ClassNotFoundException: com.pam.automation.server.GlobalDBNotification from [Module "org.jgroups:main" from local module loader #6f991ccf (roots: C:\Jboss7\node1\standalone\..\modules)]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.lang.Class.forName(Class.java:264) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:622) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1593) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:498) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at javax.management.Notification.readObject(Notification.java:370) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:991) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369) [rt.jar:1.7.0_01]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.util.Util.objectFromByteBuffer(Util.java:416) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | at org.jgroups.Message.getObject(Message.java:376) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO | jvm 1 | 2013/04/22 14:17:42 | ... 26 more
Currently to solve this problem we have added jgroup jar inside lib of our ear.
Is there any other way to solve this type of serialization problem?
The module.xml file for the org/jgroups/main module is missing a dependency, in this case the module or .jar file which contains the GlobalDBNotification class. Add the missing dependency and the error will go away.
I'm testing out sending email through my vps and I've run into a problem when it comes to sending a secure mail through SMTPS. SMTP and POP3 functions work, as the email is successfully sent. SMTPS doesn't.
I setup a simple test (JSP) page to send off an email. The code is provided below.
Transport t = null;
try {
String SMTPS = "mydomainname.com";
String Username = "maindomainemail";
String Password = "myhiddenpassword";
InternetAddress from = new InternetAddress("mrsmith#mydomainname.com", "Bob Smith");
Properties props = new Properties();
props.setProperty("mail.smtps.auth", "true");
props.put("mail.smtps.host", "mydomainname.com");
String protocol = "smtps";
Session ssn = Session.getInstance(props, null);
ssn.setDebug(true);
t = ssn.getTransport(protocol);
t.connect(SMTPS,Username,Password);
InternetAddress to = new InternetAddress("mypersonalemail#hotmail.com", "Tom Smith");
String subject = "testing email";
String newBody = "message body of email";
// Create the message
Message msg = new MimeMessage(ssn);
msg.setFrom(from);
msg.addRecipient(Message.RecipientType.TO, to);
msg.setSubject(subject);
msg.setContent(newBody, "text/html");
t.sendMessage(msg, msg.getAllRecipients());
t.close();
}//try
catch (MessagingException mex) {
mex.printStackTrace(); }
catch(Exception e) {}
On my vps, I had to follow instructions to setup secure smtp.
After running the jsp test page, I'm getting the following exceptions in my tomcat log file.
INFO | jvm 1 | 2011/01/06 12:29:11 | DEBUG: setDebug: JavaMail version 1.4.1
INFO | jvm 1 | 2011/01/06 12:29:11 | DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc]
INFO | jvm 1 | 2011/01/06 12:29:11 | DEBUG SMTP: useEhlo true, useAuth true
INFO | jvm 1 | 2011/01/06 12:29:11 | DEBUG SMTP: trying to connect to host "mydomainname.com", port 465, isSSL true
INFO | jvm 1 | 2011/01/06 12:29:12 | DEBUG SMTP: exception reading response: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
INFO | jvm 1 | 2011/01/06 12:29:12 | javax.mail.MessagingException: Exception reading response;
INFO | jvm 1 | 2011/01/06 12:29:12 | nested exception is:
INFO | jvm 1 | 2011/01/06 12:29:12 | javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1611)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1369)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
INFO | jvm 1 | 2011/01/06 12:29:12 | at javax.mail.Service.connect(Service.java:288)
INFO | jvm 1 | 2011/01/06 12:29:12 | at javax.mail.Service.connect(Service.java:169)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.jsp.SendEmailViaEappsVPS_005fSMTPS_jsp._jspService(SendEmailViaEappsVPS_005fSMTPS_jsp.java:112)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
INFO | jvm 1 | 2011/01/06 12:29:12 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
INFO | jvm 1 | 2011/01/06 12:29:12 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896)
INFO | jvm 1 | 2011/01/06 12:29:12 | at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
INFO | jvm 1 | 2011/01/06 12:29:12 | at java.lang.Thread.run(Thread.java:595)
INFO | jvm 1 | 2011/01/06 12:29:12 | Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1584)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:168)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:848)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:106)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:877)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1089)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:737)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110)
INFO | jvm 1 | 2011/01/06 12:29:12 | at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
INFO | jvm 1 | 2011/01/06 12:29:12 | at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:88)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1589)
INFO | jvm 1 | 2011/01/06 12:29:12 | ... 26 more
INFO | jvm 1 | 2011/01/06 12:29:12 | Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
INFO | jvm 1 | 2011/01/06 12:29:12 | at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:221)
INFO | jvm 1 | 2011/01/06 12:29:12 | at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:145)
INFO | jvm 1 | 2011/01/06 12:29:12 | at sun.security.validator.Validator.validate(Validator.java:203)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:172)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:320)
INFO | jvm 1 | 2011/01/06 12:29:12 | at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:841)
INFO | jvm 1 | 2011/01/06 12:29:12 | ... 38 more
INFO | jvm 1 | 2011/01/06 12:29:12 | Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
INFO | jvm 1 | 2011/01/06 12:29:12 | at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:236)
INFO | jvm 1 | 2011/01/06 12:29:12 | at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:194)
INFO | jvm 1 | 2011/01/06 12:29:12 | at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:216)
INFO | jvm 1 | 2011/01/06 12:29:12 | ... 43 more
What does this mean? Has anyone seen this type of exception before? What steps do I need to take to fix this problem?
Java is not finding the SSL certification, you need to manually add the host. You need to add server's certification to keystore implying it's your trusted server.
Alternatively, with JavaMail 1.5.2, you can use the 'Socket Factory'-Approach as described in the official SSLNOTES.txt:
JavaMail now includes a special SSL socket factory that can simplify
dealing with servers with self-signed certificates. While the
recommended approach is to include the certificate in your keystore
as described above, the following approach may be simpler in some cases.
The class com.sun.mail.util.MailSSLSocketFactory can be used as a
simple socket factory that allows trusting all hosts or a specific set
of hosts. For example:
MailSSLSocketFactory sf = new MailSSLSocketFactory();
sf.setTrustAllHosts(true);
// or
// sf.setTrustedHosts(new String[] { "my-server" });
props.put("mail.smtp.ssl.enable", "true");
// also use following for additional safety
//props.put("mail.smtp.ssl.checkserveridentity", "true");
props.put("mail.smtp.ssl.socketFactory", sf);
Use of MailSSLSocketFactory avoids the need to add the certificate to
your keystore as described above, or configure your own TrustManager
as described below.