rs应用程序集成时面临的java问题

cetgtptt  于 2021-07-03  发布在  Java
关注(0)|答案(0)|浏览(297)
[2020-12-14T10:51:28.701+0000] [glassfish 4.1] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=44 _ThreadName=admin-listener(1)] [timeMillis: 1607943088701] [l
evelValue: 800] [[
  project-enterprise-5.4-SNAPSHOT-4177 was successfully deployed in 128,245 milliseconds.]]

[2020-12-14T10:51:28.770+0000] [glassfish 4.1] [WARNING] [] [org.glassfish.jersey.internal.Errors] [tid: _ThreadID=44 _ThreadName=admin-listener(1)] [timeMillis: 160794
3088770] [levelValue: 900] [[
  The following warnings have been detected: HINT: A HTTP GET method, public void com.company.package.rest.resources.LogonResource.ssoLogonWithRedirectURL(java.lang.St
ring,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.io.IOException, returns a void type. It can be intentional and perfectly
fine, but it is a little uncommon that GET method returns always "204 No Content".
HINT: A HTTP GET method, public void com.company.package.rest.resources.LogonResource.ssoLogonRedirect(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpSer
vletResponse) throws java.io.IOException, returns a void type. It can be intentional and perfectly fine, but it is a little uncommon that GET method returns always "204
 No Content".
HINT: A HTTP GET method, public void com.company.package.rest.resources.LogoffResource.doSLO(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletRespon
se) throws java.lang.Exception, returns a void type. It can be intentional and perfectly fine, but it is a little uncommon that GET method returns always "204 No Conten
t".
]]

[2020-12-14T10:51:35.317+0000] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=31 _ThreadName=Thread-9] [timeMillis: 1607943095317] [levelValue: 1000] [[
  log4j:WARN No appenders could be found for logger (org.apache.jackrabbit.ocm.mapper.model.MappingDescriptor).]]

[2020-12-14T10:51:35.317+0000] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=31 _ThreadName=Thread-9] [timeMillis: 1607943095317] [levelValue: 1000] [[
  log4j:WARN Please initialize the log4j system properly.]]

[2020-12-14T11:00:55.089+0000] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=30 _ThreadName=Thread-9] [timeMillis: 1607943655089] [levelValue: 1000] [[
  [http-listener-1(2)] ERROR c.r.r.rest.resources.LogonResource - An error has occurred trying to refresh the access token. [JsonObject parameters value has been null]]
]

[2020-12-14T11:08:46.635+0000] [glassfish 4.1] [WARNING] [AS-EJB-00056] [javax.enterprise.ejb.container] [tid: _ThreadID=165 _ThreadName=Thread-33] [timeMillis: 1607944
126635] [levelValue: 900] [[
  A system exception occurred during an invocation on EJB FCMInitializer, method: public com.google.firebase.FirebaseApp com.company.package.firebase.FCMInitializer.ge
tApp()]]

[2020-12-14T11:08:46.638+0000] [glassfish 4.1] [WARNING] [] [javax.enterprise.ejb.container] [tid: _ThreadID=165 _ThreadName=Thread-33] [timeMillis: 1607944126638] [lev
elValue: 900] [[

javax.ejb.EJBException
        at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:748)
        at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:698)
        at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:503)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4566)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2074)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2044)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
        at com.sun.proxy.$Proxy307.getApp(Unknown Source)
        at com.company.package.firebase.__EJB31_Generated__FCMInitializer__Intf____Bean__.getApp(Unknown Source)
        at com.company.package.firebase.FCMService.sendAndGetResponse(FCMService.java:61)
        at com.company.package.firebase.FCMService.access$100(FCMService.java:24)
        at com.company.package.firebase.FCMService$1.run(FCMService.java:38)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;C)V
        at com.google.common.io.BaseEncoding$Alphabet.<init>(BaseEncoding.java:458)
        at com.google.common.io.BaseEncoding$Base64Encoding.<init>(BaseEncoding.java:940)
        at com.google.common.io.BaseEncoding.<clinit>(BaseEncoding.java:322)
        at com.google.api.client.util.Base64.decodeBase64(Base64.java:101)
        at com.google.api.client.util.PemReader.readNextSection(PemReader.java:97)
        at com.google.api.client.util.PemReader.readFirstSectionAndClose(PemReader.java:126)
        at com.google.auth.oauth2.ServiceAccountCredentials.privateKeyFromPkcs8(ServiceAccountCredentials.java:333)
        at com.google.auth.oauth2.ServiceAccountCredentials.fromPkcs8(ServiceAccountCredentials.java:316)
        at com.google.auth.oauth2.ServiceAccountCredentials.fromJson(ServiceAccountCredentials.java:189)
        at com.google.auth.oauth2.GoogleCredentials.fromStream(GoogleCredentials.java:166)
        at com.google.auth.oauth2.GoogleCredentials.fromStream(GoogleCredentials.java:133)
        at com.company.package.firebase.FCMInitializer.initialize(FCMInitializer.java:34)
        at com.company.package.firebase.FCMInitializer.getApp(FCMInitializer.java:48)
        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.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
        at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:55)
        at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
        at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
        at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
        ... 7 more
]]

[2020-12-14T11:08:46.642+0000] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=165 _ThreadName=Thread-9] [timeMillis: 1607944126642] [levelValue: 1000] [[
  Exception in thread "Thread-33"]]

[2020-12-14T11:08:46.645+0000] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=165 _ThreadName=Thread-9] [timeMillis: 1607944126645] [levelValue: 1000] [[
  javax.ejb.EJBException
        at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:748)
        at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:698)
        at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:503)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4566)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2074)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2044)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
        at com.sun.proxy.$Proxy307.getApp(Unknown Source)
        at com.company.package.firebase.__EJB31_Generated__FCMInitializer__Intf____Bean__.getApp(Unknown Source)
        at com.company.package.firebase.FCMService.sendAndGetResponse(FCMService.java:61)
        at com.company.package.firebase.FCMService.access$100(FCMService.java:24)
        at com.company.package.firebase.FCMService$1.run(FCMService.java:38)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;C)V
        at com.google.common.io.BaseEncoding$Alphabet.<init>(BaseEncoding.java:458)
        at com.google.common.io.BaseEncoding$Base64Encoding.<init>(BaseEncoding.java:940)
        at com.google.common.io.BaseEncoding.<clinit>(BaseEncoding.java:322)
        at com.google.api.client.util.Base64.decodeBase64(Base64.java:101)
        at com.google.api.client.util.PemReader.readNextSection(PemReader.java:97)
        at com.google.api.client.util.PemReader.readFirstSectionAndClose(PemReader.java:126)
        at com.google.auth.oauth2.ServiceAccountCredentials.privateKeyFromPkcs8(ServiceAccountCredentials.java:333)
        at com.google.auth.oauth2.ServiceAccountCredentials.fromPkcs8(ServiceAccountCredentials.java:316)
        at com.google.auth.oauth2.ServiceAccountCredentials.fromJson(ServiceAccountCredentials.java:189)
        at com.google.auth.oauth2.GoogleCredentials.fromStream(GoogleCredentials.java:166)
        at com.google.auth.oauth2.GoogleCredentials.fromStream(GoogleCredentials.java:133)
        at com.company.package.firebase.FCMInitializer.initialize(FCMInitializer.java:34)
        at com.company.package.firebase.FCMInitializer.getApp(FCMInitializer.java:48)
        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.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
        at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:55)
        at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
        at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
        at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
        ... 7 more]]

我使用了以下依赖项来实现该功能:

<dependency>
    <groupId>com.google.firebase</groupId>
    <artifactId>firebase-admin</artifactId>
    <version>6.14.0</version>
</dependency>
<dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    <version>30.0-jre</version>
</dependency>

我试过不同版本的Guava,但都不管用。我不断地得到java.lang.nosuchmethoderror,这些错误适用于使用不同版本guava的不同类。
我曾尝试将firebase管理版本从7.1.0降低到6.14.0,但没有任何区别。我不确定我能不能降低到这一点,因为较低的版本不包含多播消息类,我已经用过了。
有人能帮我解决这个问题吗?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题