Not able to connect to HBase from Windows - hadoop

I am trying to run a HBase Java Client Program from Windows.
All I have is 1) A Java Program without any compiler error
2) hbase-site.xml
(No other HDFS or HBase config files I have. Only the above one.)
When I run the program I get the following error-given in the last block. Do I miss something?
Both I am giving here.
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hbase.zookeeper.quorum</name>
<value>IP Address1,IPAddress2,IPAddress3</value>
</property>
</configuration>
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.util.Bytes;
import java.io.IOException;
public class HConnect
{
public static void main(String[] args)
{
try
{
Configuration aConfig = HBaseConfiguration.create();
HTable aTable = new HTable(aConfig, "TestTable");
byte[] aRowKey = Bytes.toBytes("RowKey1");
Put aPut = new Put(aRowKey);
byte[] aColFamily = Bytes.toBytes("ColumnFamily1");
byte[] aColumn = Bytes.toBytes("Column1");
byte[] aColumnVal = Bytes.toBytes("ColumnValue1");
aPut.add(aColFamily, aColumn, aColumnVal);
aTable.put(aPut);
aTable.close();
}
catch(IOException aException_in)
{
System.out.println("");
}
}
}
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Sep 27, 2013 3:16:13 PM org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper <init>
INFO: The identifier of this process is 7948#sisavip5-600b
Sep 27, 2013 3:16:15 PM org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper retryOrThrow
WARNING: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/hbaseid
Sep 27, 2013 3:16:15 PM org.apache.hadoop.hbase.util.RetryCounter sleepUntilNextRetry
INFO: Sleeping 2000ms before retry #1...
Sep 27, 2013 3:16:18 PM org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper retryOrThrow
WARNING: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/hbaseid
Sep 27, 2013 3:16:18 PM org.apache.hadoop.hbase.util.RetryCounter sleepUntilNextRetry
INFO: Sleeping 4000ms before retry #2...
Sep 27, 2013 3:16:22 PM org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper retryOrThrow
WARNING: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/hbaseid
Sep 27, 2013 3:16:22 PM org.apache.hadoop.hbase.util.RetryCounter sleepUntilNextRetry
INFO: Sleeping 8000ms before retry #3...
Sep 27, 2013 3:16:31 PM org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper retryOrThrow
WARNING: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/hbaseid
Sep 27, 2013 3:16:31 PM org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper retryOrThrow
SEVERE: ZooKeeper exists failed after 3 retries
Sep 27, 2013 3:16:31 PM org.apache.hadoop.hbase.zookeeper.ZKUtil checkExists
WARNING: hconnection Unable to set watcher on znode (/hbase/hbaseid)
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/hbaseid

I did not have core-site.xml and later I had some connectivity issues
to the HDFS name node. Once I solved these I am able to insert data.
Also I resolved the following dependencies while I developed the client program that inserts data into HBase:
commons-lang-2.6
commons-logging-1.1.3
slf4j-1.7.5
protobuf-java-2.4.0a .

Related

Microsoft Graph Proxy and Bypass SSL

Im using the below :
Java 8
microsoft-graph : 2.10.0
microsoft-graph-auth : 0.2.0
okhttp : 3.14.9
I want to fetch data from Intune using Microsoft Graph API, want to use proxy and also bypass SSL (for testing). As per documentation, i have used the OKHttpClient. Used the OkHttpClient for configuring the proxy, sslSocketFactory and hostnameVerifier but it is no working.
final ClientCredentialProvider authProvider = new ClientCredentialProvider(this.clientId, this.scopes, this.clientSecret, this.tenantId, NationalCloud.Global);
final TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
#Override
public X509Certificate[] getAcceptedIssuers() {
return new X509Certificate[0] {};
}
#Override
public void checkServerTrusted(final X509Certificate[] arg0, final String arg1)
throws CertificateException {
}
#Override
public void checkClientTrusted(final X509Certificate[] arg0, final String arg1)
throws CertificateException {
}
} };
final SSLContext sslContext = SSLContext.getInstance("SSL");
sslContext.init(null, trustAllCerts, new java.security.SecureRandom());
// Create an ssl socket factory with our all-trusting manager
final SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
final OkHttpClient httpClient = HttpClients.createDefault(new ICoreAuthenticationProvider() {
#Override
public Request authenticateRequest(final Request request) {
return request;
}
}).newBuilder().proxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress(this.proxyHost, this.proxyPort)))
.sslSocketFactory(sslSocketFactory, (X509TrustManager) trustAllCerts[0]).hostnameVerifier(new HostnameVerifier() {
#Override
public boolean verify(final String arg0, final SSLSession arg1) {
return true;
}
}).build();
final IHttpProvider httpProvider = DefaultClientConfig.createWithAuthenticationProvider(authProvider)
.getHttpProvider(httpClient);
final IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider(authProvider)
.httpProvider(httpProvider).buildClient();
IUserCollectionPage page = graphClient.users().buildRequest().get();
I get the below errors:
org.apache.oltu.oauth2.common.exception.OAuthSystemException: java.net.UnknownHostException: login.microsoftonline.com
at org.apache.oltu.oauth2.client.URLConnectionClient.execute(URLConnectionClient.java:108)
at org.apache.oltu.oauth2.client.OAuthClient.accessToken(OAuthClient.java:65)
at org.apache.oltu.oauth2.client.OAuthClient.accessToken(OAuthClient.java:55)
at org.apache.oltu.oauth2.client.OAuthClient.accessToken(OAuthClient.java:71)
at com.microsoft.graph.auth.confidentialClient.ClientCredentialProvider.getAccessTokenNewRequest(ClientCredentialProvider.java:102)
at com.microsoft.graph.auth.confidentialClient.ClientCredentialProvider.getAcccessToken(ClientCredentialProvider.java:67)
at com.microsoft.graph.auth.confidentialClient.ClientCredentialProvider.authenticateRequest(ClientCredentialProvider.java:49)
at com.microsoft.graph.http.CoreHttpProvider.sendRequestInternal(CoreHttpProvider.java:395)
at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:220)
at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:200)
at com.microsoft.graph.http.BaseCollectionRequest.send(BaseCollectionRequest.java:92)
at com.microsoft.graph.requests.extensions.UserCollectionRequest.get(UserCollectionRequest.java:72)
at com.hsbc.gme.test.graph_test.App.main(App.java:114)
Caused by: java.net.UnknownHostException: login.microsoftonline.com
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1283)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1258)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
at org.apache.oltu.oauth2.client.URLConnectionClient.setRequestBody(URLConnectionClient.java:124)
at org.apache.oltu.oauth2.client.URLConnectionClient.execute(URLConnectionClient.java:91)
... 12 more
Mar 14, 2021 11:30:17 PM com.microsoft.graph.logger.DefaultLogger logError
SEVERE: CoreHttpProvider[send] - 220Graph service exception Error code: InvalidAuthenticationToken
Mar 14, 2021 11:30:17 PM com.microsoft.graph.logger.DefaultLogger logError
SEVERE: CoreHttpProvider[send] - 220Error message: CompactToken parsing failed with error code: 80049217
Mar 14, 2021 11:30:17 PM com.microsoft.graph.logger.DefaultLogger logError
SEVERE: CoreHttpProvider[send] - 220
Mar 14, 2021 11:30:17 PM com.microsoft.graph.logger.DefaultLogger logError
SEVERE: CoreHttpProvider[send] - 220GET https://graph.microsoft.com/v1.0/users
Mar 14, 2021 11:30:17 PM com.microsoft.graph.logger.DefaultLogger logError
SEVERE: CoreHttpProvider[send] - 220SdkVersion : graph-java/v2.10.0
Mar 14, 2021 11:30:17 PM com.microsoft.graph.logger.DefaultLogger logError
SEVERE: CoreHttpProvider[send] - 220Authorization : [PII_REDACTED]
Mar 14, 2021 11:30:17 PM com.microsoft.graph.logger.DefaultLogger logError
SEVERE: CoreHttpProvider[send] - 220
Mar 14, 2021 11:30:17 PM com.microsoft.graph.logger.DefaultLogger logError
SEVERE: CoreHttpProvider[send] - 220
Mar 14, 2021 11:30:17 PM com.microsoft.graph.logger.DefaultLogger logError
SEVERE: CoreHttpProvider[send] - 220401 : Unauthorized
Mar 14, 2021 11:30:17 PM com.microsoft.graph.logger.DefaultLogger logError
SEVERE: CoreHttpProvider[send] - 220[...]
Mar 14, 2021 11:30:17 PM com.microsoft.graph.logger.DefaultLogger logError
SEVERE: CoreHttpProvider[send] - 220
Mar 14, 2021 11:30:17 PM com.microsoft.graph.logger.DefaultLogger logError
SEVERE: CoreHttpProvider[send] - 220[Some information was truncated for brevity, enable debug logging for more details]
Mar 14, 2021 11:30:17 PM com.microsoft.graph.logger.DefaultLogger logError
SEVERE: Throwable detail: com.microsoft.graph.http.GraphServiceException: Error code: InvalidAuthenticationToken
Error message: CompactToken parsing failed with error code: 80049217
GET https://graph.microsoft.com/v1.0/users
SdkVersion : graph-java/v2.10.0
Authorization : [PII_REDACTED]
401 : Unauthorized
[...]
[Some information was truncated for brevity, enable debug logging for more details]
Exception in thread "main" com.microsoft.graph.http.GraphServiceException: Error code: InvalidAuthenticationToken
Error message: CompactToken parsing failed with error code: 80049217
GET https://graph.microsoft.com/v1.0/users
SdkVersion : graph-java/v2.10.0
Authorization : [PII_REDACTED]
401 : Unauthorized
[...]
[Some information was truncated for brevity, enable debug logging for more details]
at com.microsoft.graph.http.GraphServiceException.createFromConnection(GraphServiceException.java:496)
at com.microsoft.graph.http.CoreHttpProvider.handleErrorResponse(CoreHttpProvider.java:503)
at com.microsoft.graph.http.CoreHttpProvider.sendRequestInternal(CoreHttpProvider.java:423)
at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:220)
at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:200)
at com.microsoft.graph.http.BaseCollectionRequest.send(BaseCollectionRequest.java:92)
at com.microsoft.graph.requests.extensions.UserCollectionRequest.get(UserCollectionRequest.java:72)
at com.hsbc.gme.test.graph_test.App.main(App.java:114)
Note : If i use https.proxyHost and https.proxyPort then the proxy works, however how can i make it working with the OkHttpClient. Also need a way to bypass SSL

XA Transaction broken in jBPM+jBoss during Oracle to SQL Server migration

Recently started a migration of a large Java EE application from Oracle 12c to MS SQL Server 2016. Most functionality has been smoke tested to work OK including the Quartz Scheduler, basic JMS functions, Hibernate and EJBs working ok, etc. One weird issue has stalled progress so hoping someone might have a suggestion.
The jBPM console works to be able to log in and start/suspend/stop tasks. There is an situation that always triggers an error. The jBPM task can be signaled from with the console and it starts perfectly, but once the first task is finished and the application code tries to signal the token to move to the next task, the code always crashes with an error.
This code was working of course connected to Oracle with the xa-datasource configured.
The error: (full stacktrace)
2017-10-13 16:03:31,463 [WorkManager(2)-19] DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
2017-10-13 16:03:31,464 [WorkManager(2)-19] DEBUG [org.hibernate.util.JDBCExceptionReporter] Cannot open connection [???]
org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -71740de1:d47b:59e10d94:f5 status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -71740de1:d47b:59e10d94:f5 status: ActionStatus.ABORT_ONLY >)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
at org.hibernate.loader.Loader.doQuery(Loader.java:673)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1860)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3044)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:395)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:375)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
at org.jbpm.db.GraphSession.getToken(GraphSession.java:338)
at org.jbpm.JbpmContext.getToken(JbpmContext.java:286)
at ca.gnb.medicare.process.handling.ProcessUtilBean.signal(ProcessUtilBean.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
at ca.gnb.medicare.service.interceptors.PeristenceContextInterceptor.intercept(PeristenceContextInterceptor.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:240)
at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210)
at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84)
at com.sun.proxy.$Proxy155.signal(Unknown Source)
at ca.gnb.medicare.service.util.AbstractServiceActivator.onMessage(AbstractServiceActivator.java:143)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
at ca.gnb.medicare.service.interceptors.PeristenceContextInterceptor.intercept(PeristenceContextInterceptor.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:249)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:268)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:138)
at com.sun.proxy.$Proxy169.onMessage(Unknown Source)
at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:178)
at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:906)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
at org.jboss.mq.SpySession.run(SpySession.java:323)
at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:237)
at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:756)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -71740de1:d47b:59e10d94:f5 status: ActionStatus.ABORT_ONLY >
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:319)
I cannot think of how SQL Server affects the transaction.
We also get this error on SQL Server: (full sql dump)
2017-10-11 13:10:53.44 spid61 ***Stack Dump being sent to G:\MedSt\MSSQL13.MEDST\MSSQL\LOG\SQLDump0032.txt
2017-10-11 13:10:53.44 spid61 SqlDumpExceptionHandler: Process 61 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
2017-10-11 13:10:54.15 spid61 External dump process return code 0x20000001.
External dump process returned no errors.
2017-10-11 13:10:54.15 spid61 Error: 18002, Severity: 20, State: 1.
2017-10-11 13:10:54.15 spid61 Exception happened when running extended stored procedure 'xp_sqljdbc_xa_start' in the library 'SQLJDBC_XA.dll'. SQL Server is terminating process 61. Exception type: Win32 exception; Exception code: 0xc0000005.
Code that triggers the error:
#Stateless
public class ProcessUtilBean implements ProcessUtil{
private static Logger log = Logger.getLogger();
#EJB DecrementWorkCounter decrementWorkCounter;
#TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public void signal(long tokenId){
JbpmContext context = null;
try {
context = getJbpmContext();
log.info("attempting to get token (" + tokenId + ")");
Token token;
token = context.getToken(tokenId);
token.signal(); // <-- triggers error
} catch (Exception e) {
e.printStackTrace();
log.severe("Error signalling process " + e.getMessage());
} finally {
context.close();
}
}
There are of course several tons of XML, but I've changed very little. Basically just the datasources have changed, SQL Dialect and copied over the mssql-jdbc2-service.xml from the jboss examples folder.
Here is the jms-ds.xml seeing as the errors somewhat indicate an issue here with JMS:
<?xml version="1.0" encoding="UTF-8"?>
<connection-factories>
<!-- The JMS provider loader -->
<mbean code="org.jboss.jms.jndi.JMSProviderLoader"
name="jboss.mq:service=JMSProviderLoader,name=JMSProvider">
<attribute name="ProviderName">DefaultJMSProvider</attribute>
<attribute name="ProviderAdapterClass">
org.jboss.jms.jndi.JNDIProviderAdapter
</attribute>
<!-- The combined connection factory -->
<attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
<!-- The queue connection factory -->
<attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
<!-- The topic factory -->
<attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
</mbean>
<!-- The server session pool for Message Driven Beans -->
<mbean code="org.jboss.jms.asf.ServerSessionPoolLoader"
name="jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool">
<depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
<attribute name="PoolName">StdJMSPool</attribute>
<attribute name="PoolFactoryClass">
org.jboss.jms.asf.StdServerSessionPoolFactory
</attribute>
</mbean>
<!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->
<tx-connection-factory>
<jndi-name>JmsXA</jndi-name>
<xa-transaction/>
<rar-name>jms-ra.rar</rar-name>
<connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
<config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
<config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
<security-domain-and-application>JmsXARealm</security-domain-and-application>
<max-pool-size>20</max-pool-size>
</tx-connection-factory>
</connection-factories>
Versions:
Java 1.7
jboss 4.2.3.GA
jbpm 3.2.6.sp1
hibernate 3.2.4.sp1
(I know someone will comment, so yes, these are all schedule to be upgraded)
SQL drivers tried so far:
sqljdbc_4.0.2206.100_enu
mssql-jdbc-6.2.1.jre7
mssql-jdbc-6.2.2.jre7
mssql-jdbc-6.3.3.jre7-preview
We followed directions for XA Transactions as posted
If I've missed something important, I'll add it.
** edit **
Finally got some more information from sql driver.
2017-10-18 14:03:31,096 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.TDSReader readBytes
FINEST: TDSReader#370 (ConnectionID:166 ClientConnectionId: a62ad6a5-19e4-4187-83f5-c60a6bb1aaad) Reading 44 bytes from offset 334
2017-10-18 14:03:31,098 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.TDSParser parse
FINEST: TDSReader#370 (ConnectionID:166 ClientConnectionId: a62ad6a5-19e4-4187-83f5-c60a6bb1aaad): logon: Processing TDS_ENV_CHG (0xE3)
2017-10-18 14:03:31,098 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.TDSReader mark
FINEST: TDSReader#370 (ConnectionID:166 ClientConnectionId: a62ad6a5-19e4-4187-83f5-c60a6bb1aaad): Buffering from: com.microsoft.sqlserver.jdbc.TDSReaderMark#6b6611f0
2017-10-18 14:03:31,098 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.TDSReader readBytes
FINEST: TDSReader#370 (ConnectionID:166 ClientConnectionId: a62ad6a5-19e4-4187-83f5-c60a6bb1aaad) Reading 8 bytes from offset 387
2017-10-18 14:03:31,099 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.SQLServerConnection processEnvChange
FINER: ConnectionID:166 ClientConnectionId: a62ad6a5-19e4-4187-83f5-c60a6bb1aaad Network packet size is 8000 bytes
2017-10-18 14:03:31,099 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.TDSReader reset
FINEST: TDSReader#370 (ConnectionID:166 ClientConnectionId: a62ad6a5-19e4-4187-83f5-c60a6bb1aaad): Resetting to: com.microsoft.sqlserver.jdbc.TDSReaderMark#6b6611f0
2017-10-18 14:03:31,099 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.TDSReader readBytes
FINEST: TDSReader#370 (ConnectionID:166 ClientConnectionId: a62ad6a5-19e4-4187-83f5-c60a6bb1aaad) Reading 19 bytes from offset 385
2017-10-18 14:03:31,099 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.TDSParser parse
FINEST: TDSReader#370 (ConnectionID:166 ClientConnectionId: a62ad6a5-19e4-4187-83f5-c60a6bb1aaad): logon: Processing TDS_DONE (0xFD)
2017-10-18 14:03:31,099 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.TDSParser parse
FINEST: TDSReader#370 (ConnectionID:166 ClientConnectionId: a62ad6a5-19e4-4187-83f5-c60a6bb1aaad): logon: Processing EOF
2017-10-18 14:03:31,100 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.SQLServerConnection connectInternal
FINER: ConnectionID:166 ClientConnectionId: a62ad6a5-19e4-4187-83f5-c60a6bb1aaad End of connect
2017-10-18 14:03:31,100 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.SQLServerXAConnection <init>
FINER: Created an internal control connectionConnectionID:166 ClientConnectionId: a62ad6a5-19e4-4187-83f5-c60a6bb1aaad for SQLServerXAConnection:81 Physical connection:ConnectionID:165 ClientConnectionId: 78fd8cb2-78ff-44d7-9cae-e20e6256b37e
2017-10-18 14:03:31,100 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.SQLServerXAConnection <init>
FINER: SQLServerXADataSource:1 user:MEDST3
2017-10-18 14:03:31,100 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.SQLServerXADataSource getXAConnection
FINER: SQLServerXADataSource:1 user:MEDST3SQLServerXAConnection:81
2017-10-18 14:03:31,100 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.SQLServerXADataSource getXAConnection
FINER: SQLServerXADataSource:1 Start get physical connection.
2017-10-18 14:03:31,100 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.SQLServerXADataSource getXAConnection
FINE: SQLServerXADataSource:1 End get physical connection, ConnectionID:165 ClientConnectionId: 78fd8cb2-78ff-44d7-9cae-e20e6256b37e
2017-10-18 14:03:31,100 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.SQLServerXADataSource:1 getXAConnection
FINER: RETURN SQLServerXAConnection:81
2017-10-18 14:03:31,101 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.SQLServerPooledConnection getConnection
FINER: SQLServerXAConnection:81 user:(default).
2017-10-18 14:03:31,101 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.SQLServerPooledConnection getConnection
FINE: SQLServerXAConnection:81 Physical connection, ConnectionID:165 ClientConnectionId: 78fd8cb2-78ff-44d7-9cae-e20e6256b37e
2017-10-18 14:03:31,098 [main] TRACE [org.jboss.web.tomcat.service.WebAppClassLoader] filter name=ca.gnb.medicare.application.claim.manage.SelectServiceProvider$1, exclude=false
2017-10-18 14:03:31,101 [main] DEBUG [org.apache.catalina.loader.WebappClassLoader] Searching local repositories
2017-10-18 14:03:31,101 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.SQLServerPooledConnection getConnection
FINE: SQLServerXAConnection:81 proxy ProxyConnectionID:81 is returned.
2017-10-18 14:03:31,101 [main] TRACE [org.jboss.web.tomcat.service.WebAppClassLoader] findClass(ca.gnb.medicare.application.claim.manage.SelectServiceProvider$1) called
2017-10-18 14:03:31,101 [main] DEBUG [org.apache.catalina.loader.WebappClassLoader] findClass(ca.gnb.medicare.application.claim.manage.SelectServiceProvider$1)
2017-10-18 14:03:31,101 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.SQLServerConnection:165 getTransactionIsolation
FINER: ENTRY
2017-10-18 14:03:31,101 [main] TRACE [org.apache.catalina.loader.WebappClassLoader] findClassInternal(ca.gnb.medicare.application.claim.manage.SelectServiceProvider$1)
2017-10-18 14:03:31,101 [WorkManager(2)-19] INFO [org.hibernate.impl.SessionFactoryImpl] building session factory
2017-10-18 14:03:31,101 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.SQLServerConnection:165 getTransactionIsolation
FINER: RETURN 2 (this is = TRANSACTION_READ_COMMITTED) https://docs.oracle.com/javase/7/docs/api/constant-values.html#java.sql
2017-10-18 14:03:31,101 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.SQLServerConnection:165 isReadOnly
FINER: ENTRY
2017-10-18 14:03:31,101 [WorkManager(2)-19] DEBUG [org.hibernate.impl.SessionFactoryImpl] Session factory constructed with filter configurations : {}
2017-10-18 14:03:31,101 [JCA PoolFiller] ERROR [STDERR] Oct 18, 2017 2:03:31 PM com.microsoft.sqlserver.jdbc.SQLServerConnection:165 isReadOnly
FINER: RETURN false
**EDIT
Response from Microsoft:
Upon checking with my escalation we found that timeout value basically range a integer value which is basically a unsigned short.
So the maximum XA Timeout value is 65,535.
** /EDIT
So the issue to this specific issue turns out to be an overly high timeout value.
Either the original devs thought 333.33 hours was needed for batch processing or they just picked the number 1,200,000 seconds by random. Oracle didn't care. SQL Server SQLJDBC_XA.DLL does. I haven't found a documented maximum yet, but lowering the value solves the issue.
I've reposted the complete example code from here for completeness, but it's the 1,200,000 value here that is the culprit:
#PoolClass(value=org.jboss.ejb3.StrictMaxPool.class, maxSize=20, timeout=1200000)
#MessageDriven(
mappedName=ClaimsBatchInstigatorBean.QUEUE_NAME,
activationConfig={
#ActivationConfigProperty(
propertyName="destination",
propertyValue=ClaimsBatchInstigatorBean.QUEUE_NAME
),
#ActivationConfigProperty(
propertyName="destinationType",
propertyValue="javax.jms.Queue"
),
#ActivationConfigProperty(
propertyName = "transactionTimeout",
propertyValue = "1200000"
),
#ActivationConfigProperty(
propertyName="maxSession",
propertyValue="15"
)
}
)
Minimal code to reproduce:
package com.******.test;
import java.net.Inet4Address;
import java.sql.*;
import java.util.Random;
import javax.transaction.xa.*;
import javax.sql.*;
import com.microsoft.sqlserver.jdbc.*;
public class testXA {
public static void main(String[] args) throws Exception {
// Create variables for the connection string.
String prefix = "jdbc:sqlserver://";
String serverName = "******";
int portNumber = ******;
String databaseName = "******";
String user = "******";
String password = "******";
String connectionUrl = prefix + serverName + ":" + portNumber
+ ";databaseName=" + databaseName + ";user=" + user + ";password=" + password;
try {
// Establish the connection.
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection con = DriverManager.getConnection(connectionUrl);
// Create a test table.
Statement stmt = con.createStatement();
try {
stmt.executeUpdate("DROP TABLE XAMin");
}
catch (Exception e) {
}
stmt.executeUpdate("CREATE TABLE XAMin (f1 int, f2 varchar(max))");
stmt.close();
con.close();
// Create the XA data source and XA ready connection.
SQLServerXADataSource ds = new SQLServerXADataSource();
ds.setUser(user);
ds.setPassword(password);
ds.setServerName(serverName);
ds.setPortNumber(portNumber);
ds.setDatabaseName(databaseName);
XAConnection xaCon = ds.getXAConnection();
con = xaCon.getConnection();
con.setAutoCommit(false);
// Get a unique Xid object for testing.
XAResource xaRes = null;
Xid xid = null;
xid = XidImpl.getUniqueXid(1);
// Get the XAResource object and set the timeout value.
xaRes = xaCon.getXAResource();
// xaRes.setTransactionTimeout(0); <-- no error
// xaRes.setTransactionTimeout(30000); <-- no error
xaRes.setTransactionTimeout(1200000); //<--- error!
// Perform the XA transaction.
System.out.println("Write -> xid = " + xid.toString());
xaRes.start(xid,XAResource.TMNOFLAGS);
PreparedStatement pstmt =
con.prepareStatement("INSERT INTO XAMin (f1,f2) VALUES (?, ?)");
pstmt.setInt(1,1);
pstmt.setString(2,xid.toString());
pstmt.executeUpdate();
// Commit the transaction.
xaRes.end(xid,XAResource.TMSUCCESS);
xaRes.commit(xid,true);
// Cleanup.
con.close();
xaCon.close();
// Open a new connection and read back the record to verify that it worked.
con = DriverManager.getConnection(connectionUrl);
ResultSet rs = con.createStatement().executeQuery("SELECT * FROM XAMin");
rs.next();
System.out.println("Read -> xid = " + rs.getString(2));
rs.close();
con.close();
}
// Handle any errors that may have occurred.
catch (Exception e) {
e.printStackTrace();
}
}
}
class XidImpl implements Xid {
public int formatId;
public byte[] gtrid;
public byte[] bqual;
public byte[] getGlobalTransactionId() {return gtrid;}
public byte[] getBranchQualifier() {return bqual;}
public int getFormatId() {return formatId;}
XidImpl(int formatId, byte[] gtrid, byte[] bqual) {
this.formatId = formatId;
this.gtrid = gtrid;
this.bqual = bqual;
}
public String toString() {
int hexVal;
StringBuffer sb = new StringBuffer(512);
sb.append("formatId=" + formatId);
sb.append(" gtrid(" + gtrid.length + ")={0x");
for (int i=0; i<gtrid.length; i++) {
hexVal = gtrid[i]&0xFF;
if ( hexVal < 0x10 )
sb.append("0" + Integer.toHexString(gtrid[i]&0xFF));
else
sb.append(Integer.toHexString(gtrid[i]&0xFF));
}
sb.append("} bqual(" + bqual.length + ")={0x");
for (int i=0; i<bqual.length; i++) {
hexVal = bqual[i]&0xFF;
if ( hexVal < 0x10 )
sb.append("0" + Integer.toHexString(bqual[i]&0xFF));
else
sb.append(Integer.toHexString(bqual[i]&0xFF));
}
sb.append("}");
return sb.toString();
}
// Returns a globally unique transaction id.
static byte [] localIP = null;
static int txnUniqueID = 0;
static Xid getUniqueXid(int tid) {
Random rnd = new Random(System.currentTimeMillis());
txnUniqueID++;
int txnUID = txnUniqueID;
int tidID = tid;
int randID = rnd.nextInt();
byte[] gtrid = new byte[64];
byte[] bqual = new byte[64];
if ( null == localIP) {
try {
localIP = Inet4Address.getLocalHost().getAddress();
}
catch ( Exception ex ) {
localIP = new byte[] { 0x01,0x02,0x03,0x04 };
}
}
System.arraycopy(localIP,0,gtrid,0,4);
System.arraycopy(localIP,0,bqual,0,4);
// Bytes 4 -> 7 - unique transaction id.
// Bytes 8 ->11 - thread id.
// Bytes 12->15 - random number generated by using seed from current time in milliseconds.
for (int i=0; i<=3; i++) {
gtrid[i+4] = (byte)(txnUID%0x100);
bqual[i+4] = (byte)(txnUID%0x100);
txnUID >>= 8;
gtrid[i+8] = (byte)(tidID%0x100);
bqual[i+8] = (byte)(tidID%0x100);
tidID >>= 8;
gtrid[i+12] = (byte)(randID%0x100);
bqual[i+12] = (byte)(randID%0x100);
randID >>= 8;
}
return new XidImpl(0x20003, gtrid, bqual);
}
}

i am getting issue while start tomcat server

I am new to jersey multi part. While i am starting the tomcat server getting issue.
#POST
#Path("/uploadImagesUsingJersey")
#Consumes(MediaType.MULTIPART_FORM_DATA)
#Produces("text/plain")
public Response uploadImages(#FormDataParam("file") InputStream uploadedInputStream,
#FormDataParam("file") FormDataContentDisposition fileDetail) throws IOException{
String uploadedFileLocation = (String) session.getServletContext().getAttribute("ProfilePhotoPath");
uploadedFileLocation=uploadedFileLocation+236+"/"+fileDetail.getName();
writeToFile(uploadedInputStream, uploadedFileLocation);
String output = "File uploaded to : " + uploadedFileLocation;
employeeVO=new EmployeeInformationVO();
employeeVO=(EmployeeInformationVO) CacheAction.getById(EmployeeInformationVO.class,236);
employeeVO.setPhotoPath(236+"/"+fileDetail.getFileName());
int result=CacheAction.commonAddOrUpdate(employeeVO);
return Response.status(200).entity(result).build();
}
I am using this kind Of jar:
1)jersey-multipart-1.8-ea03.jar
2)mimepull-1.8-sources.jar
3)jersey-server-1.8.jar
4)jersey-bundle-1.8.jar
And i am getting this kind of issue:
INFO: Provider classes found:
class com.owlike.genson.ext.jaxrs.GensonJsonConverter
Nov 13, 2016 10:45:15 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.8 06/24/2011 12:39 PM'
Nov 13, 2016 10:45:17 PM com.sun.jersey.spi.inject.Errors processErrorMessages
SEVERE: The following errors and warnings have been detected with resource and/or provider classes:
SEVERE: Missing dependency for method public javax.ws.rs.core.Response com.hrm.jersey.action.MyServiceAction.uploadImages(java.io.InputStream,com.sun.jersey.core.header.FormDataContentDisposition) throws java.io.IOException at parameter at index 0
SEVERE: Missing dependency for method public javax.ws.rs.core.Response com.hrm.jersey.action.MyServiceAction.uploadImages(java.io.InputStream,com.sun.jersey.core.header.FormDataContentDisposition) throws java.io.IOException at parameter at index 1
SEVERE: Method, public javax.ws.rs.core.Response com.hrm.jersey.action.MyServiceAction.uploadImages(java.io.InputStream,com.sun.jersey.core.header.FormDataContentDisposition) throws java.io.IOException, annotated with POST of resource, class com.hrm.jersey.action.MyServiceAction, is not recognized as valid resource method.
Nov 13, 2016 10:45:17 PM org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
com.sun.jersey.spi.inject.Errors$ErrorMessagesException

Web.xml still missing when deploying a Spring Boot RESTful Web Service to Tomcat

I am trying to deploy a RESTful Web Service built with Spring Boot into a Tomcat instance, with little success.
My software configuration is as follows: my computer is a Mac running OS X Yosemite 10.10.3, with Oracle Java JDK 8 1.8.0_45, Gradle 2.4 and Apache Tomcat 7.0.47. I use IntelliJ IDEA 14.1.4 as development platform.
I started by following this guide and I got a jar that initiates an embedded container which works as expected. Then I followed the document about converting a Spring Boot JAR Application to a WAR linked at the end of the other guide. I followed the instructions in Section 59.4 "Packaging executable jar and war files" and then those in the Section 74.1 "Create a deployable war file". According to the posts of a few other members of this site who were facing the same problem (here, here, here and here, just to name a few), I should be able now to create a create a WAR and deploy it on my Tomcat. Unfortunately, this is not the case.
The project contains the following 3 Java files: Application.java, Greeting.java and GreetingController.java. The first is as follows:
package hello;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.context.annotation.Configuration;
#Configuration
#EnableAutoConfiguration
#SpringBootApplication
public class Application extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
#Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Application.class);
}
}
The second file contains the following:
package hello;
public class Greeting {
private final long id;
private final String content;
public Greeting(long id, String content) {
this.id = id;
this.content = content;
}
public long getId() {
return id;
}
public String getContent() {
return content;
}
}
And, finally, the latter file is:
package hello;
import java.util.concurrent.atomic.AtomicLong;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
#RestController
public class GreetingController {
private static final String template = "Hello, %s!";
private final AtomicLong counter = new AtomicLong();
#RequestMapping("/hello")
public Greeting greeting(#RequestParam(value="name", defaultValue="World") String name) {
return new Greeting(counter.incrementAndGet(), String.format(template, name));
}
}
The project also contains the following build.gradle file:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.4.RELEASE")
}
}
apply plugin: 'war'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'spring-boot'
sourceCompatibility = 1.8
targetCompatibility = 1.8
war {
baseName = 'rest'
// version = '0.1.0'
}
repositories {
mavenLocal()
mavenCentral()
}
configurations {
providedRuntime
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
testCompile("junit:junit")
}
Now, if I run the task "gradle war", I generate a WAR file of about 8 Mb. I can successfully deploy it to my local Tomcat, but when I point my browser to http://localhost:8080/rest/hello?name=World I got a blank page rather than the page with the expected JSON. If I run the task "gradle build" or "gradle bootRepackage", I get both a JAR and a WAR and their original versions. I'm mentioning these commands because I haven't seen them anywhere and they might be useful to know. The original versions are both around 8 Mb in size, while the JAR and the WAR of 12 Mb. If I deploy both WARs, I get no error messages but, again, no results in the browser. Somebody here suggested that the web.xml could be missing, and in fact no WAR actually contained such a file. I am saying so because my Tomcat is not very recent and for some reason I thought Spring Boot had to automatically create a web.xml out of the code and annotations above.
As suggested by #dunni in the comments, here are my Tomcat log files. First of all, catalina.log:
giu 24, 2015 10:35:01 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /usr/local/apache-tomcat-7.0.47/webapps/rest.war
Then localhost.log:
giu 24, 2015 10:35:02 AM org.apache.catalina.core.ApplicationContext log
INFO: Spring WebApplicationInitializers detected on classpath: [org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration#4dfaba52]
And finally manager.log:
giu 24, 2015 10:34:43 AM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
giu 24, 2015 10:34:44 AM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
giu 24, 2015 10:35:02 AM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
The above content is what I get after deploy the WAR. Nothing changes if I subsequently try to connect to http://localhost:8080/, http://localhost:8080/rest/, http://localhost:8080/rest/hello or http://localhost:8080/rest/hello?name=World.
What is going on? What am I missing? Can you please explain me what is the problem and what have I to do to successfully deploy this toy service on Tomcat? Many thanks in advance.
Since the above logs were not really helpful, I tried to restart the Tomcat daemon and I got something more meaningful. Now I have the following files: catalina.log, catalina.out, host-manager.log (empty), launchd.stderr (empty), launchd.stdout, localhost_access_log.txt (empty), localhost.log and manager.log (empty). catalina.log and catalina.out now contains the following:
giu 24, 2015 11:11:49 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/stefano/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
giu 24, 2015 11:11:49 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
giu 24, 2015 11:11:49 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
giu 24, 2015 11:11:49 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 666 ms
giu 24, 2015 11:11:49 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
giu 24, 2015 11:11:49 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
giu 24, 2015 11:11:49 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /usr/local/apache-tomcat-7.0.47/webapps/Plakko.war
giu 24, 2015 11:11:51 AM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [574] milliseconds.
giu 24, 2015 11:11:51 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /usr/local/apache-tomcat-7.0.47/webapps/rest.war
giu 24, 2015 11:11:52 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/apache-tomcat-7.0.47/webapps/docs
giu 24, 2015 11:11:52 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/apache-tomcat-7.0.47/webapps/host-manager
giu 24, 2015 11:11:53 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/apache-tomcat-7.0.47/webapps/manager
giu 24, 2015 11:11:53 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/apache-tomcat-7.0.47/webapps/ROOT
giu 24, 2015 11:11:53 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
giu 24, 2015 11:11:53 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
giu 24, 2015 11:11:53 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3349 ms
launchd.stdout contains:
Wed Jun 24 11:11:48 CEST 2015
Starting Tomcat
Waiting for 89105
And localhost.log contains:
giu 24, 2015 11:11:52 AM org.apache.catalina.core.ApplicationContext log
INFO: Spring WebApplicationInitializers detected on classpath: [org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration#2d5eb959]
If I try to consume the Web Service, localhost_access_log.txt is updated with:
217.20.22.194 - - [24/Jun/2015:11:23:16 +0200] "GET / HTTP/1.1" 200 11444
217.20.22.194 - - [24/Jun/2015:11:23:19 +0200] "GET /rest/ HTTP/1.1" 404 5
217.20.22.194 - - [24/Jun/2015:11:23:19 +0200] "GET /rest/hello HTTP/1.1" 404 5
217.20.22.194 - - [24/Jun/2015:11:23:20 +0200] "GET /rest/hello?name=World HTTP/1.1" 404 5
Since I have the feeling that these logs are not really helpful, I tried to shutdown and startup Tomcat. In this case I find something interesting in catalina.log and catalina.out. The former:
giu 24, 2015 11:36:56 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /usr/local/apache-tomcat-7.0.47/webapps/rest.war
giu 24, 2015 11:36:59 AM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/rest]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.NoSuchMethodError: java.lang.reflect.Parameter.isNamePresent()Z
at org.springframework.core.StandardReflectionParameterNameDiscoverer.getParameterNames(StandardReflectionParameterNameDiscoverer.java:56)
at org.springframework.core.PrioritizedParameterNameDiscoverer.getParameterNames(PrioritizedParameterNameDiscoverer.java:65)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:182)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1139)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1042)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry$OptimizedBeanTypeRegistry.getFromFactory(BeanTypeRegistry.java:320)
at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.get(BeanTypeRegistry.java:162)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:158)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:147)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:119)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:94)
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:45)
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:102)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:190)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:148)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:124)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:318)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:239)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:606)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:462)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.context.web.SpringBootServletInitializer.run(SpringBootServletInitializer.java:117)
at org.springframework.boot.context.web.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:108)
at org.springframework.boot.context.web.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:68)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5423)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 10 more
giu 24, 2015 11:36:59 AM org.apache.catalina.startup.HostConfig deployWAR
SEVERE: Error deploying web application archive /usr/local/apache-tomcat-7.0.47/webapps/rest.war
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/rest]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
And the latter catalina.out:
giu 24, 2015 11:36:56 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /usr/local/apache-tomcat-7.0.47/webapps/rest.war
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.2.4.RELEASE)
2015-06-24 11:36:59.019 INFO 89274 --- [ost-startStop-1] o.s.boot.SpringApplication : Starting application on Mac-mini-di-Stefano.local with PID 89274 (/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/spring-boot-1.2.4.RELEASE.jar started by stefano in /usr/local/apache-tomcat-7.0.47/bin)
2015-06-24 11:36:59.047 INFO 89274 --- [ost-startStop-1] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext#34a13c2b: startup date [Wed Jun 24 11:36:59 CEST 2015]; root of context hierarchy
2015-06-24 11:36:59.648 INFO 89274 --- [ost-startStop-1] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/classes/, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/aopalliance-1.0.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/classmate-1.0.0.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/hibernate-validator-5.1.3.Final.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/jackson-annotations-2.4.0.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/jackson-core-2.4.6.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/jackson-databind-2.4.6.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/jboss-logging-3.1.3.GA.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/jcl-over-slf4j-1.7.12.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/jul-to-slf4j-1.7.12.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/log4j-over-slf4j-1.7.12.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/logback-classic-1.1.3.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/logback-core-1.1.3.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/slf4j-api-1.7.12.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/snakeyaml-1.14.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/spring-aop-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/spring-beans-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/spring-boot-1.2.4.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/spring-boot-autoconfigure-1.2.4.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/spring-boot-starter-1.2.4.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/spring-boot-starter-logging-1.2.4.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/spring-boot-starter-web-1.2.4.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/spring-context-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/spring-core-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/spring-expression-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/spring-web-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/spring-webmvc-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.47/webapps/rest/WEB-INF/lib/validation-api-1.1.0.Final.jar]
2015-06-24 11:36:59.663 ERROR 89274 --- [ost-startStop-1] o.s.boot.SpringApplication : Application startup failed
java.lang.NoSuchMethodError: java.lang.reflect.Parameter.isNamePresent()Z
at org.springframework.core.StandardReflectionParameterNameDiscoverer.getParameterNames(StandardReflectionParameterNameDiscoverer.java:56)
at org.springframework.core.PrioritizedParameterNameDiscoverer.getParameterNames(PrioritizedParameterNameDiscoverer.java:65)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:182)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1139)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1042)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry$OptimizedBeanTypeRegistry.getFromFactory(BeanTypeRegistry.java:320)
at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.get(BeanTypeRegistry.java:162)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:158)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:147)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:119)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:94)
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:45)
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:102)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:190)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:148)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:124)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:318)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:239)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:606)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:462)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.context.web.SpringBootServletInitializer.run(SpringBootServletInitializer.java:117)
at org.springframework.boot.context.web.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:108)
at org.springframework.boot.context.web.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:68)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5423)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
By looking at these logs, I have the feeling that something is failing in the auto-magical process of Spring but unfortunately I don't know what and how to fix it. Any help?
What version of java are you using? The gradle file indicates you intend to use java 8, but this error indicates you are not...
java.lang.NoSuchMethodError: java.lang.reflect.Parameter.isNamePresent()
The Parameter class was not introduced until java 8. What version of java is your tomcat using?

Creating PrimeFaces metergauge chart without #PostConstruct annotation

I need to retrieve data from spring jpa data to an managed bean class, which creates an MeterGaugeChartView. When I call the values from injected Spring bean within an #PostConstruct method I get java.lang.NullPonterException. When I remove the annotation, then I get the error below.
java.lang.NullPointerException
org.primefaces.component.chart.renderer.MeterGaugeRenderer.encodeData(MeterGaugeRenderer.java:33)
Below is my code and the full stack...
package ch.business.quickline.controller;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.ViewScoped;
import org.primefaces.model.chart.MeterGaugeChartModel;
import org.springframework.stereotype.Component;
import ch.business.quickline.viewservice.MitarbeiterGlobalService;
#ManagedBean
#Component
#ViewScoped
public class MeterGaugeChartView implements Serializable {
private MeterGaugeChartModel masterBewertungenIndividual;
private MeterGaugeChartModel selbstBewertungenIndividual;
private MeterGaugeChartModel masterBewertungenGlobal;
private MeterGaugeChartModel selbstBewertungenGlobal;
#ManagedProperty("#{mitarbeiterGlobalService}")
private MitarbeiterGlobalService mitarbeiterGlobalService;
public void init() {
createMeterGaugeModels();
}
public MeterGaugeChartModel getMasterBewertungenIndividual() {
return masterBewertungenIndividual;
}
public MeterGaugeChartModel getSelbstBewertungenIndividual() {
return selbstBewertungenIndividual;
}
public MeterGaugeChartModel getMasterBewertungenGlobal() {
return masterBewertungenGlobal;
}
public MeterGaugeChartModel getSelbstBewertungenGlobal() {
return selbstBewertungenGlobal;
}
private MeterGaugeChartModel initMeterGaugeModel() {
List<Number> intervals = new ArrayList<Number>() {{
add(1);
add(2);
add(3);
add(4);
add(5);
}
};
return new MeterGaugeChartModel(5, intervals);
}
public void createMeterGaugeModels() {
masterBewertungenIndividual = initMeterGaugeModel();
//masterBewertungenIndividual.setTitle("Masterbewertungen");
masterBewertungenIndividual.setGaugeLabel("Skill");
masterBewertungenIndividual.setValue(mitarbeiterGlobalService.getMasterBewertungIndividualAverage());
selbstBewertungenIndividual = initMeterGaugeModel();
//selbstBewertungenIndividual.setTitle("Selbstbewertungen");
selbstBewertungenIndividual.setGaugeLabel("Interesse");
selbstBewertungenIndividual.setValue(mitarbeiterGlobalService.getSelbstBewertungIndividualAverage());
masterBewertungenGlobal = initMeterGaugeModel();
//masterBewertungenGlobal.setTitle("Masterbewertungen");
masterBewertungenGlobal.setGaugeLabel("Skill");
masterBewertungenGlobal.setValue(mitarbeiterGlobalService.getMasterBewertungGlobalAverage());
selbstBewertungenGlobal = initMeterGaugeModel();
//selbstBewertungenGlobal.setTitle("Selbstbewertungen");
selbstBewertungenGlobal.setGaugeLabel("Interesse");
selbstBewertungenGlobal.setValue(mitarbeiterGlobalService.getSelbstBewertungGlobalAverage());
}
}
package ch.business.quickline.viewservice;
import java.math.BigDecimal;
import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import ch.business.quickline.domain.MitarbeiterSkill;
import ch.business.quickline.service.MitarbeiterService;
import ch.business.quickline.service.MitarbeiterSkillService;
#ManagedBean(name = "mitarbeiterGlobalService")
#Component
#ApplicationScoped
public class MitarbeiterGlobalService {
#Autowired
private MitarbeiterService mitarbeiterService;
#Autowired
private MitarbeiterSkillService mitarbeiterSkillService;
private BigDecimal masterBewertungIndividualAverage;
private BigDecimal selbstBewertungIndividualAverage;
private Double masterBewertungGlobalAverage;
private Double selbstBewertungGlobalAverage;
public void init() {
masterBewertungIndividualAverage = mitarbeiterService.findByMitarbeiterId(1).getMitarbeiterMasterBewertungDurchschnitt();
selbstBewertungIndividualAverage = mitarbeiterService.findByMitarbeiterId(1).getMitarbeiterSelbstBewertungDurchschnitt();
masterBewertungGlobalAverage = retrieveMasterBewertungGlobalAverage();
selbstBewertungGlobalAverage = retrieveSelbstBewertungGlobalAverage();
}
public BigDecimal getMasterBewertungIndividualAverage() {
return masterBewertungIndividualAverage;
}
public void setMasterBewertungIndividualAverage(BigDecimal masterBewertungIndividualAverage) {
this.masterBewertungIndividualAverage = masterBewertungIndividualAverage;
}
public BigDecimal getSelbstBewertungIndividualAverage() {
return selbstBewertungIndividualAverage;
}
public void setSelbstBewertungIndividualAverage(
BigDecimal selbstBewertungIndividualAverage) {
this.selbstBewertungIndividualAverage = selbstBewertungIndividualAverage;
}
public Double getMasterBewertungGlobalAverage() {
return masterBewertungGlobalAverage;
}
public void setMasterBewertungGlobalAverage(Double masterBewertungGlobalAverage) {
this.masterBewertungGlobalAverage = masterBewertungGlobalAverage;
}
public Double getSelbstBewertungGlobalAverage() {
return selbstBewertungGlobalAverage;
}
public void setSelbstBewertungGlobalAverage(Double selbstBewertungGlobalAverage) {
this.selbstBewertungGlobalAverage = selbstBewertungGlobalAverage;
}
public Double retrieveMasterBewertungGlobalAverage() {
Double sum = 0.0;
for (MitarbeiterSkill skill : mitarbeiterSkillService.findAll()) {
sum = sum + skill.getMasterBewertung();
}
return sum / mitarbeiterSkillService.findAll().size();
}
public Double retrieveSelbstBewertungGlobalAverage() {
Double sum = 0.0;
for (MitarbeiterSkill interest : mitarbeiterSkillService.findAll()) {
sum = sum + interest.getSelbstBewertung();
}
return sum / mitarbeiterSkillService.findAll().size();
}
}
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<ui:composition template="/templates/default/template.xhtml">
<ui:define name="content">
<ui:insert>
<div class="ui-grid">
<div class="ui-grid-row">
<div class="ui-grid-col-6">
<p:chart type="metergauge" model="#{meterGaugeChartView.masterBewertungenGlobal}" style="width:400px;height:250px" />
</div>
<div class="ui-grid-col-6">
<p:chart type="metergauge" model="#{meterGaugeChartView.selbstBewertungenGlobal}" style="width:400px;height:250px" />
</div>
</div>
</div>
<div class="ui-grid ui-grid-responsive">
<div class="ui-grid-row">
<div class="ui-grid-col-6">
<p:dataList value="#{rankingDataList.mitarbeiterMasterBewertungRangliste}" var="mitarbeiter" type="ordered">
<f:facet name="header">
Top Mitarbeiter nach Masterbewertung
</f:facet>
#{mitarbeiter.mitarbeiterVorname}
#{mitarbeiter.mitarbeiterNachname}:
#{mitarbeiter.mitarbeiterMasterBewertungDurchschnitt}
</p:dataList>
</div>
<div class="ui-grid-col-6">
<p:dataList value="#{rankingDataList.mitarbeiterSelbstBewertungRangliste}" var="mitarbeiter" type="ordered">
<f:facet name="header">
Top Mitarbeiter nach Selbstbewertung
</f:facet>
#{mitarbeiter.mitarbeiterVorname}
#{mitarbeiter.mitarbeiterNachname}:
#{mitarbeiter.mitarbeiterSelbstBewertungDurchschnitt}
</p:dataList>
</div>
</div>
</div>
</ui:insert>
</ui:define>
</ui:composition>
</html>
Apr 25, 2015 12:10:21 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:skillmanager' did not find a matching property.
Apr 25, 2015 12:10:21 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Server version: Apache Tomcat/7.0.59
Apr 25, 2015 12:10:21 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Server built: Jan 28 2015 15:51:10 UTC
Apr 25, 2015 12:10:21 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Server number: 7.0.59.0
Apr 25, 2015 12:10:21 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: OS Name: Linux
Apr 25, 2015 12:10:21 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: OS Version: 3.13.0-24-generic
Apr 25, 2015 12:10:21 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Architecture: amd64
Apr 25, 2015 12:10:21 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Java Home: /usr/lib/jvm/java-8-oracle/jre
Apr 25, 2015 12:10:21 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: JVM Version: 1.8.0_40-b25
Apr 25, 2015 12:10:21 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: JVM Vendor: Oracle Corporation
Apr 25, 2015 12:10:21 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: CATALINA_BASE: /home/fanatik/Documents/workspace-sts-3.6.3.SR1/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
Apr 25, 2015 12:10:21 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: CATALINA_HOME: /home/fanatik/apache-tomcat-7.0.59
Apr 25, 2015 12:10:21 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Command line argument: -Dcatalina.base=/home/fanatik/Documents/workspace-sts-3.6.3.SR1/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
Apr 25, 2015 12:10:21 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Command line argument: -Dcatalina.home=/home/fanatik/apache-tomcat-7.0.59
Apr 25, 2015 12:10:21 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Command line argument: -Dwtp.deploy=/home/fanatik/Documents/workspace-sts-3.6.3.SR1/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps
Apr 25, 2015 12:10:21 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Command line argument: -Djava.endorsed.dirs=/home/fanatik/apache-tomcat-7.0.59/endorsed
Apr 25, 2015 12:10:21 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMATION: Command line argument: -Dfile.encoding=UTF-8
Apr 25, 2015 12:10:21 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFORMATION: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Apr 25, 2015 12:10:21 AM org.apache.coyote.AbstractProtocol init
INFORMATION: Initializing ProtocolHandler ["http-bio-8080"]
Apr 25, 2015 12:10:21 AM org.apache.coyote.AbstractProtocol init
INFORMATION: Initializing ProtocolHandler ["ajp-bio-8009"]
Apr 25, 2015 12:10:21 AM org.apache.catalina.startup.Catalina load
INFORMATION: Initialization processed in 706 ms
Apr 25, 2015 12:10:21 AM org.apache.catalina.core.StandardService startInternal
INFORMATION: Starting service Catalina
Apr 25, 2015 12:10:21 AM org.apache.catalina.core.StandardEngine startInternal
INFORMATION: Starting Servlet Engine: Apache Tomcat/7.0.59
Apr 25, 2015 12:10:22 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFORMATION: validateJarFile(/home/fanatik/Documents/workspace-sts-3.6.3.SR1/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/skillmanager/WEB-INF/lib/el-api-2.2.1-b04.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
Apr 25, 2015 12:10:25 AM org.apache.catalina.startup.TaglibUriRule body
INFORMATION: TLD skipped. URI: http://mojarra.dev.java.net/mojarra_ext is already defined
Apr 25, 2015 12:10:25 AM org.apache.catalina.startup.TaglibUriRule body
INFORMATION: TLD skipped. URI: http://java.sun.com/jsf/core is already defined
Apr 25, 2015 12:10:25 AM org.apache.catalina.startup.TaglibUriRule body
INFORMATION: TLD skipped. URI:
http://java.sun.com/jsf/html
is already defined
Apr 25, 2015 12:10:25 AM org.apache.catalina.core.StandardContext addApplicationListener
INFORMATION: The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
Apr 25, 2015 12:10:25 AM org.apache.catalina.core.ApplicationContext log
INFORMATION: Spring WebApplicationInitializers detected on classpath: [ch.business.quickline.config.WebAppInitializer#12297d72]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/fanatik/Documents/workspace-sts-3.6.3.SR1/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/skillmanager/WEB-INF/lib/slf4j-log4j12-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/fanatik/Documents/workspace-sts-3.6.3.SR1/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/skillmanager/WEB-INF/lib/slf4j-simple-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Apr 25, 2015 12:10:25 AM com.sun.faces.config.ConfigureListener contextInitialized
INFORMATION: Mojarra 2.2.0 ( 20130502-2118 https://svn.java.net/svn/mojarra~svn/tags/2.2.0#11930) für Kontext '/skillmanager' wird initialisiert.
Apr 25, 2015 12:10:25 AM com.sun.faces.spi.InjectionProviderFactory createInstance
INFORMATION: JSF1048: PostConstruct/PreDestroy-Annotationen vorhanden. Verwaltete Bean-Methoden, die mit diesen Annotationen markiert sind, lassen die entsprechenden Annotationen verarbeiten.
Apr 25, 2015 12:10:26 AM net.bootsfaces.listeners.AddResourcesListener <clinit>
INFORMATION: net.bootsfaces.listeners.AddResourcesListener ready for use.
Apr 25, 2015 12:10:27 AM org.primefaces.webapp.PostConstructApplicationEventListener processEvent
INFORMATION: Running on PrimeFaces 5.1
Apr 25, 2015 12:10:27 AM org.apache.catalina.core.ApplicationContext log
INFORMATION: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Apr 25, 2015 12:10:31 AM org.apache.coyote.AbstractProtocol start
INFORMATION: Starting ProtocolHandler ["http-bio-8080"]
Apr 25, 2015 12:10:31 AM org.apache.coyote.AbstractProtocol start
INFORMATION: Starting ProtocolHandler ["ajp-bio-8009"]
Apr 25, 2015 12:10:31 AM org.apache.catalina.startup.Catalina start
INFORMATION: Server startup in 9849 ms
Apr 25, 2015 12:10:34 AM com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException
SCHWERWIEGEND: Error Rendering View[/index.xhtml]
java.lang.NullPointerException
at org.primefaces.component.chart.renderer.MeterGaugeRenderer.encodeData(MeterGaugeRenderer.java:33)
at org.primefaces.component.chart.renderer.BasePlotRenderer.render(BasePlotRenderer.java:29)
at org.primefaces.component.chart.ChartRenderer.encodeScript(ChartRenderer.java:95)
at org.primefaces.component.chart.ChartRenderer.encodeEnd(ChartRenderer.java:67)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:894)
at org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:79)
at org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:66)
at org.primefaces.component.layout.LayoutUnitRenderer.encodeEnd(LayoutUnitRenderer.java:49)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:443)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Apr 25, 2015 12:10:34 AM org.apache.catalina.core.StandardWrapperValve invoke
SCHWERWIEGEND: Servlet.service() for servlet [Faces Servlet] in context with path [/skillmanager] threw exception [null] with root cause
java.lang.NullPointerException
at org.primefaces.component.chart.renderer.MeterGaugeRenderer.encodeData(MeterGaugeRenderer.java:33)
at org.primefaces.component.chart.renderer.BasePlotRenderer.render(BasePlotRenderer.java:29)
at org.primefaces.component.chart.ChartRenderer.encodeScript(ChartRenderer.java:95)
at org.primefaces.component.chart.ChartRenderer.encodeEnd(ChartRenderer.java:67)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:894)
at org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:79)
at org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:66)
at org.primefaces.component.layout.LayoutUnitRenderer.encodeEnd(LayoutUnitRenderer.java:49)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:443)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

Resources