如何将jar添加到Oracle 10.3.5的类路径中......正如我所理解的,文档(自述文件)中存在一个错误(或不正确的信息),指出放在$ DOMAIN_HOME/lib目录中的任何jar文件将动态添加到类路径...但在10.3.3的真实文档中,它声明这些文件不再被添加到类路径...
所以在这里我试图找出 - 如何将jar添加到类路径...我已经尝试更改commonEnv.sh并且我正在寻找setDomainEnv.sh(但是暂时找不到它)并且没有这些东西已经成功地将这个jar添加到类路径中......
我的问题是我将数据源添加到我的服务器......我正在尝试将DB2 jar添加到环境中以便可以使用...有趣的是,在$ DOMAIN_HOME/lib中添加jar后我在尝试测试与数据库的连接时能够摆脱管理控制台中的连接错误...而且一切似乎都有效但现在我得到了一个类定义错误...
]] Root cause of ServletException.
java.lang.NoClassDefFoundError: com/ibm/db2/jcc/DB2Connection
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:630)
at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Connection
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
Truncated. see log file for complete stacktrace
Run Code Online (Sandbox Code Playgroud)
还有什么可以尝试 - 我搜索了一些答案,但看起来所有这些都是陈旧的和过时的......
我收到错误:
org.hibernate.TypeMismatchException:为类BEntity提供了错误类型的id.预期:班级BEntity,获得班级AEntity
public class BEntity implements Serializable{
@Id
@Column(name = "NUM")
private String num;
@Id
@Column(name = "INIT")
private String init;
@Column(name = "V_CNT")
private Integer vcnt;
//{{{some column omitted}}}//
}
public class AEntity implements Serializable{
@Id
@Column(name = "NUM")
private String num;
@Id
@Column(name = "INIT")
private String init;
@OneToOne
@PrimaryKeyJoinColumns({
@PrimaryKeyJoinColumn(name="NUM", referencedColumnName="NUM"),
@PrimaryKeyJoinColumn(name="INIT", referencedColumnName="INIT")
})
private BEntity bEntity;
}
Run Code Online (Sandbox Code Playgroud)
HQL查询:
String queryString = "FROM AEntity AS A " +
"LEFT JOIN A.bEntityAS B " +
"WHERE A.INIT||A.NUM IN …Run Code Online (Sandbox Code Playgroud) 我在我的网络服务器上部署了一个应用程序,现在我试图在Web服务器上另外一个应用程序,我得到一个BeanAlreadyExistsException.我想这可能是因为我在两个不同的项目中有两个同名的bean.所以我从服务器中删除了第一个项目 - 但是这没有用 - 我在部署第二个应用程序时仍然得到了这个异常.
这是堆栈跟踪:
####<Jun 29, 2012 11:35:47 AM EDT> <Warning> <Deployer> <GAATLITISDAU88W> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1340984147265> <BEA-149004> <Failures were detected while initiating deploy task for application 'jwds0002.ear'.>
####<Jun 29, 2012 11:35:47 AM EDT> <Warning> <Deployer> <GAATLITISDAU88W> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1340984147265> <BEA-149078> <Stack trace for message 149004
weblogic.management.DeploymentException: Unmarshaller failed
at weblogic.application.internal.EarDeploymentFactory.findOrCreateComponentMBeans(EarDeploymentFactory.java:193)
at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:48)
at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:110)
at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:76)
at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:89) …Run Code Online (Sandbox Code Playgroud) 我试图以通用方式比较两个不同对象的字段值.我有一个函数(如下所示),它接收两个对象,然后获取字段,然后比较循环中的字段,如果它们不相同,则将字段添加到列表中 - 这是正确的方法吗?
public void compareFields(Object qa, Object qa4) throws FieldsNotEqualException
{
Field[] qaFields = qa.getClass().getFields();
Field[] qa4Fields = qa4.getClass().getFields();
for(Field f:qaFields)
{
for(Field f4:qa4Fields)
{
if(f4.equals(f))
{
found = true;
break;
}
else
{
continue;
}
}
}
if(!found)
{
report.add(/*some_formatted_string*/) //some global list
throw new FieldsNotEqualException();
}
}
Run Code Online (Sandbox Code Playgroud)
我在谷歌搜索,我看到C#有一个PropertyInfo类 - Java有这样的东西吗?还有,有办法做f.getFieldValue()- 我知道没有这样的方法,但也许有另一种方式???
我正在使用前向声明,现在我收到一个错误,指的是使用前向声明的类...所以fInstance forward声明fConfig然后是Helper类(一个名称空间 - 用于全局访问函数) - 得到t
fConfig.h
#ifndef FCONFIG_H
#define FCONFIG_H
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <sstream>
#include <string>
#include <cstring>
#include <sys/types.h>
#include <fcntl.h>
#include "JWDSFork.h"
//#include "fInstance.h"
using namespace std;
class fConfig
{
private:
pid_t pid, w;
public:
pid_t cPid;
string name;
int group;
int instanceId;
int numInstance;
int tries;
bool reply;
bool debug;
bool service;
bool currentlyRunning;
time_t startTime;
time_t endTime;
string path;
fConfig();
virtual ~fConfig();
void start();
string intToString(int);
char* stringToChar(string);
};
#endif // …Run Code Online (Sandbox Code Playgroud) java ×4
oracle ×2
weblogic ×2
annotations ×1
c++ ×1
field ×1
hibernate ×1
reflection ×1
servlets ×1
weblogic11g ×1