无法解决Glassfish错误

时间:2018-04-20 09:49:19

标签: glassfish oracle-adf

我有使用Jdeveloper 12.2.1.2开发的adf应用程序,我正在Glassfish服务器开源代码5.0.1上部署应用程序(构建java_re-private)。

我已执行的步骤:

  1. 使用Glassfish平台从Jdeveloper编译和创建EAR文件。
  2. 将adf-essential.zip放入Glassfish域名lib文件夹。
  3. 更新Glassfish服务器中的JVM选项。参考Link
  4. 当我部署应用程序时,我得到以下错误。

       Timestamp
    Apr 20, 2018 13:13:19.426
    Log Level
    SEVERE
    Logger
    oracle.jbo.mom.DefObjectEventManager
    Name-Value Pairs
    {levelValue=1000, timeMillis=1524210199426}
    Record Number
    291
    Message ID
    Complete Message
    java.util.ServiceConfigurationError: oracle.jbo.mom.DefObjectListener: Provider oracle.jbo.service.helper.SDOSchemaGenListener could not be instantiated
        at java.util.ServiceLoader.fail(ServiceLoader.java:232)
        at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
        at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
        at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
        at oracle.jbo.mom.DefObjectEventManager.loadListeners(DefObjectEventManager.java:53)
        at oracle.jbo.mom.DefObjectEventManager.<init>(DefObjectEventManager.java:38)
        at oracle.jbo.mom.DefinitionManager.initListener(DefinitionManager.java:377)
        at oracle.jbo.mom.DefinitionManager.initManager(DefinitionManager.java:399)
        at oracle.jbo.uicli.mom.JUMetaObjectManager.initManager(JUMetaObjectManager.java:1475)
        at oracle.jbo.uicli.mom.JUMetaObjectManager.<init>(JUMetaObjectManager.java:97)
        at oracle.jbo.uicli.mom.JUMetaObjectManager.getJUMom(JUMetaObjectManager.java:369)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at oracle.adfinternal.view.faces.config.rich.FacesDatabindingConfigurator._installFacesBindingDefFactory(FacesDatabindingConfigurator.java:286)
        at oracle.adfinternal.view.faces.config.rich.FacesDatabindingConfigurator._setupAdfDatabindingForJsf(FacesDatabindingConfigurator.java:136)
        at oracle.adfinternal.view.faces.config.rich.FacesDatabindingConfigurator.init(FacesDatabindingConfigurator.java:48)
        at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.init(GlobalConfiguratorImpl.java:469)
        at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.init(RegistrationFilter.java:59)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.init(TrinidadFilterImpl.java:126)
        at org.apache.myfaces.trinidad.webapp.TrinidadFilter.init(TrinidadFilter.java:54)
        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:267)
        at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:123)
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4982)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:5626)
        at com.sun.enterprise.web.WebModule.start(WebModule.java:540)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:918)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:685)
        at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2044)
        at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1690)
        at com.sun.enterprise.web.WebApplication.start(WebApplication.java:107)
        at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
        at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
        at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:540)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:536)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:535)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:566)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:558)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:557)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1465)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:110)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1847)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1723)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:254)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:232)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:276)
        at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:134)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)
        at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:200)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)
        at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:268)
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)
        at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)
        at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)
        at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:377)
        at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316)
        at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
        at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:463)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:168)
        at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
        at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
        at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:242)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:539)
        at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:593)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573)
        at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.NoClassDefFoundError: commonj/sdo/helper/HelperContext
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
        at java.lang.Class.getConstructor0(Class.java:3075)
        at java.lang.Class.newInstance(Class.java:412)
        at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
        ... 98 more
    Caused by: java.lang.ClassNotFoundException: commonj.sdo.helper.HelperContext
        at com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:865)
        at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:742)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 103 more
    

1 个答案:

答案 0 :(得分:0)

搜索commonj.sdo.helper.HelperContext后,您的应用程序中似乎缺少ADF类。

将Zip文件添加到lib目录将无济于事,您需要将其解压缩并确保添加JAR文件。 (请注意,在您指定的链接中,它会告诉您在步骤4中解压缩zip文件。)

将这样的库添加到GlassFish的更好方法是使用asadmin命令,如下所示:

./asadmin add-library /path/to/my/library.jar

可能是zip存档中有很多JAR文件,因此链接中的说明只是为您提供了最快捷的解决方案。