小编qwe*_*rty的帖子

Netbeans调试器在Class.java.getDeclaredConstructors处停止

我正在尝试使用glassfish服务器3.1在netbeans 7.2.1中调试Web应用程序.调试以前工作正常.

但Netbeans调试器突然开始打印此消息:

Thread admin-thread-pool-4848(2) stopped at Class.java.getDeclaredConstructors0.
Run Code Online (Sandbox Code Playgroud)

调试器在该行停止,就好像那里有一个断点,并且在这一行:

 res = Reflection.filterFields(this, getDeclaredFields0(publicOnly));
 in method private Field[] privateGetDeclaredFields(boolean publicOnly)
Run Code Online (Sandbox Code Playgroud)

如果我按一个按钮继续,它会在同一点再次停止几次,并且部署会持续很长时间,直到它失败并显示消息

Deployment error: Deployment timeout has exceeded.
Run Code Online (Sandbox Code Playgroud)

我知道这不是太多的信息,但也许有人暗示它可能与什么有关?

java debugging netbeans

4
推荐指数
1
解决办法
1978
查看次数

java.lang.ClassFormatError:在类文件中不是本机或抽象的方法中的Absent Code属性javax/persistence/PersistenceException

我是JavaEE的新手.

我使用glassfish服务器3.1在NETBEANS 7.2.1中创建了企业应用程序项目.

当我尝试清理和构建时,我得到以下错误

An annotation processor threw an uncaught exception.
Consult the following stack trace for details.
java.lang.ClassFormatError: Absent Code attribute in method that is not native or          abstract in class file javax/persistence/PersistenceException
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2317)
at java.lang.Class.getDeclaredField(Class.java:1899)
at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.findDeclaredField(PrivilegedAccessHelper.java:62)
at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getField(PrivilegedAccessHelper.java:216)
at org.eclipse.persistence.internal.helper.Helper.getField(Helper.java:934)
at org.eclipse.persistence.internal.descriptors.InstanceVariableAttributeAccessor.initializeAttributes(InstanceVariableAttributeAccessor.java:100)
at org.eclipse.persistence.mappings.DatabaseMapping.preInitialize(DatabaseMapping.java:1284)
at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.preInitialize(AbstractDirectMapping.java:965)
at org.eclipse.persistence.oxm.mappings.XMLDirectMapping.preInitialize(XMLDirectMapping.java:433)
at …
Run Code Online (Sandbox Code Playgroud)

glassfish java-ee netbeans-7

3
推荐指数
1
解决办法
7163
查看次数

复合主键定义在jdbc中不起复合作用

我正在使用apache derby jdbc(在netbeans 7.2.1中)我想创建具有复合主键的表(这样只有这4列值的组合是唯一的,并且它们中的每一个的值分别不是唯一的)

Create table MovieScreens(
NameM  varchar(255) NOT NULL UNIQUE,
DateS DATE NOT NULL UNIQUE,
Hall NUMERIC NOT NULL  UNIQUE,
HourS NUMERIC  NOT NULL  UNIQUE,
SEATSFREE  varchar (500) NOT NULL,
FOREIGN KEY (Hall) REFERENCES Halls(Hall),
FOREIGN KEY (NameM) REFERENCES MoviesDetails(NAMEM),
**primary key (NameM , DateS,Hall,HourS)**
)
Run Code Online (Sandbox Code Playgroud)

但似乎每个定义为主键的列本身都是主键,而不是复合键的一部分.当我尝试插入仅由这些值之一不同的行时,我收到错误:

Error code -1, SQL state 23505: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index .
Run Code Online (Sandbox Code Playgroud)

据我所知netbeans使用MySQL数据库,这应该是MySQL的正确语法,还是我错了? …

sql derby

2
推荐指数
1
解决办法
767
查看次数

标签 统计

debugging ×1

derby ×1

glassfish ×1

java ×1

java-ee ×1

netbeans ×1

netbeans-7 ×1

sql ×1