找不到类,来自Weblogic 9.2的异常 [英] Class not found Exception from Weblogic 9.2

查看:210
本文介绍了找不到类,来自Weblogic 9.2的异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的JSF项目工作区中,我有一个Java项目 A 和一个使用Java项目的Weblogic EJB项目 B .

In my JSF project workspace, I have a Java project A and a Weblogic EJB project B that uses the Java project.

生成EAR时,我可以看到EAR中以及A,B项目的jar以及工作区中其他项目的jar.

On generating the EAR I can see that the jar for Project A and B are there in the EAR as well as that of other projects in the workspace.

但是,在尝试从B中的A访问班级时,我发现班级未找到异常.

However, on trying to access class from A in B i am getting a class not found exception.

Ejb项目 B 具有managedbean/dao/ejb/delegate,此时EJB根本没有被调用.实例化了受管bean,然后从另一个操作调用中,从发生问题的类所在的位置调用method(loadWorklist).

The Ejb Project B has the managedbean/dao/ejb/delegate and at this point the EJB is not getting called at all. The managedbean is instantiated and from another action call I am calling the method(loadWorklist) from where the offending class is called.

我缺少任何特定设置吗?

Is there any specific setting I am missing?

请注意,这是在UNIX服务器的weblogic 9.2中作为EAR部署的. 在运行时,所有必需的jar都将从EAR内部加载,只有项目A中的类丢失了.

Note this is deployed as EAR in weblogic 9.2 in UNIX server. All required jars are loaded from inside the EAR at runtime only the classes in project A is missing.

错误的堆栈跟踪:

javax.faces.FacesException: Error calling action method of component with id worklistForm:_idJsp131
        at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
        at javax.faces.component.UICommand.broadcast(UICommand.java:109)
        at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
        at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
        Truncated. see log file for complete stacktrace
javax.faces.el.EvaluationException: Exception while invoking expression #{worklistManagedBean.loadWorklist}
        at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
        at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
        at javax.faces.component.UICommand.broadcast(UICommand.java:109)
        at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
        Truncated. see log file for complete stacktrace
java.lang.NoClassDefFoundError: com/tcs/nextgen/workflow/util/WorkflowUtil
        at com.ultimatix.nextgen.worklist.managedbean.WorklistManagedBean.loadWorklist(WorklistManagedBean.java:36)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        Truncated. see log file for complete stacktrace

耳朵结构:

EAR
|
|-META-INF
|-library1.jar
|-library2.jar
|-A.jar
|-B.jar

由于这是现有的旧版应用程序,因此jar不在APP-INF/lib中.

Since this is an existing legacy app, jars are not in APP-INF/lib.

推荐答案

如果模块B使用模块A中的类,则必须在模块MANIFEST.MF的类路径中声明模块A. c1>.该文件中的类路径条目是相对的,因此,由于模块处于同一级别,因此可以仅指定A.jar.其他通用库可以放在APP-INF/lib中,并将自动添加到类路径中.但是,这是WebLogic特定的行为.

If module B uses classes from module A, then module A must be declared in the class path in the MANIFEST.MF of module B. The class path entries in this file is relative, so since the modules are at the same level, you can just specifiy A.jar. Other common libraries can be put in APP-INF/lib and will be automatically added to the class path. This however, is WebLogic specific behaviour.

这篇关于找不到类,来自Weblogic 9.2的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆