Jboss 4.2.2.GA could not start deployment of a .war because a java.lang.ArrayStoreException
gauchoproluanco Feb 22, 2010 10:45 AMHi everybody!
I have deployed one of my apps with the audit capability provided by the envers project. Everything was going fine until I tried to develop a listener of my own.
I have these configuration for my event listeners:
<
property name="eventListeners">
<map>
<entry key="post-insert">
<bean class="es.tragsatec.ait.oviedo.audit.AuditRevisionListener"></bean>
</entry>
<entry key="post-update">
<bean class="org.hibernate.envers.event.AuditEventListener"></bean>
</entry>
<entry key="post-delete">
<bean class="org.hibernate.envers.event.AuditEventListener"></bean>
</entry>
</map>
</property>
I'm using the next libraries:
<
dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>2.5.6</version>
</dependency>
<
dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
</dependency>
<dependency> <groupId>org.jboss.envers</groupId> <artifactId>jboss-envers</artifactId> <version>1.2.2.GA</version> </dependency> < dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>3.3.1.GA</version> </dependency> The source code of my listener is: package import import import public public void newRevision(Object revisionEntity) { AuditRevisionEntity are = (AuditRevisionEntity) revisionEntity; Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); are.setUsername(authentication.getName()); } } And the cource code of my entity: package import import import import import import import import @ Entity @ RevisionEntity(AuditRevisionListener.class) public @Id @GeneratedValue @RevisionNumber private int id; @RevisionTimestamp private long timestamp; private String username; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public int getId() { return id; } public void setId(int id) { this.id = id; } public long getTimestamp() { return timestamp; } public void setTimestamp(long timestamp) { this.timestamp = timestamp; } @Transient public Date getDate() { return new Date(this.getTimestamp()); } ...equals(Object), hahscode()... } The problem is when Jboss (4.2.2.GA) tried to deployed the app it can't because is getting a java.lang.ArrayStoreException: Configuration.java:1678) Could anybody give me any suggestion? Thank's in advance, Luis