Home Tutorialhelp Comment as Longxing mentions, the ClassCast errors are due

 
 

Comment

Anthony James
as Longxing mentions, the ClassCast errors are due,
March 27, 2007 at 1:46 AM

as Longxing mentions, the ClassCast errors are due to duplicate EJB classes. Basically, you do not need the EJB classes in your WAR file since they are in the JAR already (at least this is the case for JBoss 4.0.5). I was able to get this example working by commenting out one task within the ant file.

The line to remove is the first 'copy' task in the target named "buildWar". It copies the classes into the War (what we want to avoid).

It looks like this:

<copy todir="${warDir}/WEB-INF/classes">
<fileset dir="${classdir}" includes="**/*.class" />
</copy>


comment it out and the example should work.

cheers,
AJ


View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
Spring Framework Questions

SEVERE: Context [/hospital] startup failed due to previous errors
org.apache.catalina.core.StandardContext start SEVERE: Context [/hospital] startup failed due to previous errors Jan...SEVERE: Context [/hospital] startup failed due to previous errors  Hi my application is hospital i am facing this problem my build.xml file 

EJB Questions

how to install jboss - EJB
how to install jboss  when i installed jboss at startup jboss generating errors . unable to run ejb3 

WebSevices Questions

Jboss related linkage error
Jboss related linkage error  Please check below error when i run in jboss java.lang.LinkageError: loader constraint violation in interface itable... loader (instance of org/jboss/classloader/spi/base/BaseClassLoader 

Java Beginners

errors
that what the errors in above code 

Java Beginners

errors
 

Java Beginners

JBoss - error during deploy - Java Beginners
JBoss - error during deploy  Hello! I've followed your fantastic tutorial about JBoss but I got stucked in exercise 2. I use JBoss AS 5 (don't... the .ear file and it gives errors, both in manual (pasting the file 

Hibernate Questions

How to install Hibernate-3 and jars required for eclipse environment. And is jboss jars are necessary..?
. And is jboss jars are necessary..?  Dear Friends, I have a lot of doubts... required? I am searching in Google so may jars there some are related jboss... for this. And i follow the Hibernate installation procedures. Some errors are coming 

Blog

JBoss Tools 3 Alpha has been released
The first Alpha release of JBoss Tools 3 has been made recently with intials supports for portals including JSF and Seam portals. JBoss Tools is an open.... It will not be supported by Eclipse 3.3.x/WebTools 2.x aka Europa due to the changes made 

Java Beginners

jboss sever
jboss sever  Hi how to configure data source in jboss server and connection pooling Thanks Kalins naik   JBoss Tutorials 

JSP Servlet Questions

jsp-jboss
jsp-jboss  where to keep jsp in jboss 

HTML Questions

check for errors
check for errors  How can I check for errors 

Java Beginners

What is the errors?
What is the errors?  ) while ( c <= 5 ) { product *= c; ++c;   if ( gender == 1 ) cout << "Woman" << endl; else; cout << "Man" << endl;   Post the whole code 

Servlet Interview Questions

compilation errors
() { } } giving errors: 1) WelcomeServlet.java:37: ')' expected 

IDE Questions

how to install jboss drools
how to install jboss drools   how to install jboss drools 

Java Beginners

getting errors
 

Java Magazine Questions

java errors
 

JDBC Questions

com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Communications link failure due to underlying exception
com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Communications link failure due to underlying exception  Hi, In my application...: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Communications link failure due to underlying exception: Tell me how 

Jobs

JBoss Administrator
JBoss Administrator       Position Vacant: JBoss Administrator  Job Description  We are looking for JBoss Administrator to manage the JBoss based 

PHP Questions

types of errors in php
types of errors in php  What are the different types of errors in php 

Java Beginners

JavaFX deployment in Jboss
JavaFX deployment in Jboss  Hi, How to deploy javafx application into JBoss 

JMS Questions

Jboss MQ ConnectionFactory - JMS
Jboss MQ ConnectionFactory  Iam Using jboss-5.0.0.Beta4 my quetion is that iam not able to get Jboss MQ ConnectionFactory object pls any suggest me how to get it on jboss-5.0.0.Beta4 

Java Beginners

about jboss - Java Beginners
about jboss  can you please explain about jboss...how to deploy,where the temp and lock is there...total information about jboss to use in java message services(JMS 

Struts Questions

jboss and struts - Struts
Deploy JBoss and Struts  how to deploy struts 2 applications in jboss 4... the WAR file to the /server/default/deploy folder.   Hello,You...;JBoss_home>/server/default/deploy folder.Jboss will automatically deploy 

Java Beginners

Compiler errors in java
Compiler errors in java  Hi, I used GenerateRDF java file. Am getting errors when i run this code. I used command prompt only. getting errors as no package exist. i followed your instructions properly. Please help me out 

Java Interview Questions

JBoss Unix and Line Separator
JBoss Unix and Line Separator  Hi, I am trying to solve an critical... the run.conf script from jboss I added the parameter -Dline.separator=separator I used \r\n, \015\012 , \0d\0a but none solve my problem, Jboss just understand \r 

JavaMail Questions

James Server and JBoss - JavaMail
James Server and JBoss  Hi Sir/Madam, How to set class path for James server and Jboss servers to run programs with clear examples. Please send the reply very urgent 

Programming Tutorials

What is JBoss
 

JSP Servlet Questions

Servlets errors in same page.
Servlets errors in same page.  How do I display errors list in the same page where a form field exists using servlets...........i.e. without using JSP? Please explain with a simple username password program 

JavaScript Questions

selectoptions errors in java script
selectoptions errors in java script  hi, in my web page when I select the color of the image it displays that particular color but when i again opt the select option it displays errors message. How do I rectify this problem 

JSP Servlet Questions

JBoss and Sevlet - JSP-Servlet
JBoss and Sevlet  I am trying to get familar with JBoss. I package up... IsItWorking /gg/servlets I have JBoss installed and put my gg.war into G... do or change to get this servlet to run on JBoss 4.2.3. Thank you!   

Java Interview Questions

what is the Difference between weblogic and jboss?
what is the Difference between weblogic and jboss?  what is the Difference between weblogic and jboss 

Spring Framework

The errors tag
In this section, you will learn about the errors tag of the Spring form tag library 

JSP Servlet Questions

jsp errors - JSP-Servlet
jsp errors  Hi I got errors when running a jsp file I am giving the file. this is from rose india. I set the class path for 3 jar files i.e.... Now i am getting less errors compared to previous. But I am getting 2 errors 

Java Beginners

Java Program Errors
Java Program Errors  These are the 2 errors which I am getting when executing the java source code extracted from executable jar file The project was not built since its build path is incomplete. Cannot find the class file 

EJB Questions

EJB2.0 in jboss - EJB
EJB2.0 in JBoss  How to Install EJB 2.0 in JBoss  Answer: You do this by using following steps such as :1. import jBoss into Visual Age for Java (VAJ) to develop and debug EJBs using Enterprise Java Beans standard 

Java Beginners

Correct errors - Java Beginners
Correct errors  Identify and correct the errors in the following program: public java Method { public static method1(int n, m) { n += m; xMethod(3. 4); } public static int xMethod(int n) { if (n > 0) return 1 

Struts Questions

Struts - Jboss - I-Report - Struts
Struts - Jboss - I-Report  Hi i am a beginner in Java programming and in my application i wanted to generate a report (based on database) using Struts, Jboss , I Report 

Struts Questions

STRUTS2.0 Validation Errors
the previous field errors persist in the page. For eg:if i am not entering both 

PHP Questions

WHAT ARE THE DIFFERENT TYPES OF ERRORS IN PHP?
WHAT ARE THE DIFFERENT TYPES OF ERRORS IN PHP?  WHAT ARE THE DIFFERENT TYPES OF ERRORS IN PHP 

Struts Questions

Connecting jboss with sql 2005 - Struts
Connecting jboss with sql 2005  Hai, i have project that was developed in struts,backed is sqlserver 2005 and and i am using jboss. I want to connect another database (sqlserver 2005) with my project.could u please help me 

PHP Questions

php display errors
 

Swing AWT

compilation errors - Swing AWT
 

Java Beginners

Java errors - Java Beginners
 

JBoss Server

JBoss Tutorials: Learn JBoss Step by Step
JBoss Tutorials: Learn JBoss Step by Step JBoss or JavaBeans Open Source... known as WildFly. Written in Java , JBoss supports cross platform compatibility... developed by JBoss , presently it is a division of Red Hat. JBoss is open source 

Log4J Questions

Invalid console appender in JBoss console
Invalid console appender in JBoss console  "ERROR: invalid console appender config detected, console stream is looping" The above is the error i am getting while starting the server after deploying the ear file into the jboss. I 

Java Beginners

Java errors when attempting the following.
Java errors when attempting the following.  Give the java errors in attempting the following : 1) performing division operation on string value. 2) redefining base class final method in derived class. 3) defining a method 

IDE Questions

Need urgent help with C++ errors!
Need urgent help with C++ errors!  hi, i'm new to C++ programming. this is my code... i'm using Turbo C++. It's showing so many errors!.. I...() { cout<<"Can somebody fix this?"; } the errors are listed as follows 

Java Interview Questions

which is better server for java applications? apache or jboss?
which is better server for java applications? apache or jboss?  which is better server? apache or jboss 

PHP Tutorial

date_get_last_errors
date_get_last_errors date_get_last_errors alias DateTime::getLastErrors function returns the warnings and errors while parsing a date/time string... about warnings and errors. Example: <?php $date = date_create('asdfasdf 

General

JBoss Application Server
JBoss Application Server          JBoss is an open source Java EE-based application server. JBoss is cross-platform, usable on any operating system that supports Java 

Training

JBoss AS Training
JBoss AS Training     Description of JBoss Application Server  JBoss is a free, open source application... enterprise-class security, and resource management.  Nowdays, the Jboss 

Java Beginners

remopving errors incore java programming
remopving errors incore java programming  sir error in program:-file does not contain class runnable program:- class MyRunnable implements Runnable{ public void run(){ System.out.println("Run"); } public 

Java Beginners

remopving errors incore java programming
remopving errors incore java programming  sir error in program:-file does not contain class runnable program:- class MyRunnable implements Runnable{ public void run(){ System.out.println("Run"); } public 

Java Beginners

remopving errors incore java programming
remopving errors incore java programming  sir error in program:-file does not contain class runnable program:- class MyRunnable implements Runnable{ public void run(){ System.out.println("Run"); } public 

Java Beginners

need to fix errors please help
need to fix errors please help  it does have 2 errors what should i fix? import java.io.*; class InputName static InputStreamReader reader = new InputStreamReader(system.in); static BufferedReader input = new BufferedReader 

JSP Tutorials

Runtime Errors
Runtime Errors          Errors are arised when there is any logic problem with the logic of the program.  In this program we are trying 

JSP Servlet Questions

Display helloworld using servlet in jboss
the following link: http://www.roseindia.net/jboss 

General

Welcome to the Jboss 3.0 Tutorial
Welcome to the Jboss 3.0 Tutorial  ...;  Building Web Application With Ant and Deploying on Jboss 3.0... on the Jboss 3.0 application server. After the completion of this lesson 

Java Beginners

Getting 404 errors - Java Beginners
I received a 404 errors and I identified that the servlet doesn't appear 

Applet Questions

Help please, some strange errors
this errors so i have posted the whole program here. Here i tried to make the monopoly... is causing that run-time errors? Any kind of help will be helpful to me. and let 

Development process Questions

jboss with local entity bean - Development process
jboss with local entity bean  We are using eclipse version 3.4.0 for EJB 2.0 application development ( which has ready plug-in for jboss server 4.2.1GA) and jboss server 4.2.1GA for the deployment. and Jboss is configured 

WebSevices Questions

Attachement in Web Service + EJB 3 + Jboss
Attachement in Web Service + EJB 3 + Jboss  How to send attachements in Web Service using EJB3 with JBoss Application Server 

JSP Servlet Questions

display Helloworld through servlets using jboss
display Helloworld through servlets using jboss  I'm beginner,Can You please Write the code for this.Including WEB.INF   Please visit the following link: http://www.roseindia.net/jboss 

Free Magazine

JBoss Seam - Web 2.0 Applications
JBoss Seam - Web 2.0 Applications           JBoss Seam is a powerful new application framework developed by JBoss, a division of Red Hat for building next 

Free Magazine

JBoss Application Server
JBoss Application Server           Introduction to JBoss Application Server JBoss... management.   Features of JBoss Application Server JBoss 

Development process Questions

how to create a progarame using jboss drools rules
how to create a progarame using jboss drools rules  Using Jboss Drools develop a simple utility which will allow the following http://www.jboss.org/drools/ Assuming that we have a list of Citizens <ID, Name,< 

Java Server Faces Questions

JBoss deployment problem - Java Server Faces Questions
JBoss deployment problem  I have .war file is successfully running with Tomact server 6.0 form eclipse . I have able to start the jboss,but not able to deploy the same .war file which is running @ tomact. Q1:: how to runnin 

Struts Questions

Display Errors using Message Resources - Struts
Display Errors using Message Resources  Hello.. I've a login page where i used applicationresources.properties to display errors for null values and i wrote the condition in formbean. Now i want to show the errors for invalid 

JSP Servlet Questions

Deployment of jsp-servlet in JBoss - JSP-Servlet
Deployment of jsp-servlet in JBoss  hello, I unzipped the JBoss4.0.0. Now, I have saved the web application named "abhi" in the deployment folder . like this E:\JBOSS\jboss-4.0.0\server\default\deploy\abhi After starting 

Flex Questions

Problem in Blazeds with Jboss Clustering ( Mod_JK with SSL )
Problem in Blazeds with Jboss Clustering ( Mod_JK with SSL )  Hi, We are running our flex application in jboss clustering environment with the help... have only one node of JBoss. But once we add one more node to the cluster 

PHP Tutorial

How to show all errors in PHP?
How to show all errors in PHP? I this tutorial I will explain you how you can... all errors in PHP?" by the PHP developers. As it is necessary to see all the errors while developing PHP programs. What change I should make in the code 

Java Server Faces Questions

errors while run - Java Server Faces Questions
errors while run  I,ve download the SimpleHelloByEnteringName jsf intoduntion sample project and tried to run this application following the steps narrated in roseindia jsf tutorial. But i found the fillowing error:(My 

Struts Questions

i am Getting Some errors in Struts - Struts
i am Getting Some errors in Struts   I am Learning Struts Basics,I am Trying examples do in this Site Examples.i am getting lot of errors.Please Help me 

Maven Questions

Moving projects from tomcat-6.0 to jboss 5.0.1 GA
Moving projects from tomcat-6.0 to jboss 5.0.1 GA  Now i am using... tomcat to jboss 5.0.1 GA. What are the things i have to do for using jboss instead... thing in that file for going to jboss? This is my current pom.xml file. < 

General

JBoss Seam - Stitching JSF and EJB3
JBoss Seam - Stitching JSF and EJB3      ... of JBoss, Seam is a component framework that focuses to deliver full-featured... of the code of regular JEE applications. JBoss Seam is a robust JEE 5 framework 

Hibernate Questions

Calling hibernate query list() method generates errors
of the job id from REFRESH to PERSIST, but still the same errors occur. Does cache 

Java Beginners

Coding errors for printing function, please help
Coding errors for printing function, please help  Hello, We, my classmates and I, wrote this software but I ran into problems with printing button. Can someone please take a look and help me to fix this. Although 

JDBC Questions

verify the code and give me the code with out errors
clear the errors and give me correct tutorial for my knowledge improving.pls anyone 

Struts Questions

How to validate a form in action class and forward errors to the jsp in struts?
How to validate a form in action class and forward errors to the jsp in struts?  How to validate a form in action class and forward errors to the jsp in struts 

JSP Servlet Questions

how can i deploy web application on application server(weblogic,jboss)
how can i deploy web application on application server(weblogic,jboss)  I have develop wab application(jsp,servlet)and i can deploy my web application on tomcat easily but i want to deploy on application server(weblogic,jboss 

Development process Questions

deploy stand alone java project in JBoss - Development process
deploy stand alone java project in JBoss  i hv a stand alone java project nad a web project to be run on Jboss. from the web project i am calling... alone java project in JBoss. thanks in advance 

Struts Questions

how to display action errors in jsp which is in a form list
how to display action errors in jsp which is in a form list  My jsp contains list of forms iterating using display:table, each FORM forms a row. I want to display action errors for individual form in the same row 

XML Tutorials

Handling Errors While Parsing an XML File
Handling Errors While Parsing an XML File       This Example shows you how to Handle Errors While... below for Handling Errors:-SAXParserFactory saxpf = SAXParserFactory.newInstance 

Java Beginners

<errors><error><domain>yt:quota</domain><code>too_many_recent_calls</code></error></errors>
 

Java Interview Questions

how to install the jboss application server on windows xp sp2? - Java Interview Questions
how to install the jboss application server on windows xp sp2?  How to install and run the web application on jboss on windows xp sp2 

Framework Questions

not able to deploy application war on JBOSS 6.0 running on linux 5.5
not able to deploy application war on JBOSS 6.0 running on linux 5.5  While deploying a war file on Linux5.5 through jboss 6.0 admin console, its giving me following error javax.servlet.ServletException: Java heap space 

General

Building Web Application With Ant and Deploying on Jboss 3.0
Building Web Application With Ant and Deploying on Jboss 3.0... will show you how to build you web application and install on the Jboss 3.0... jsp, html and servlets in the ear file and deploy on the Jboss 3.0 application 

WebSevices Questions

JBOSS Startup Problem - StandardWrapper.Throwable java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:394)
JBOSS Startup Problem - StandardWrapper.Throwable... am new to Rose India and also new to JBOSS. I have a problem in JBOSS Starting. I am using JBOSS -4.0.5 version, Java JDK 1.6.0_10 and connecting to Sybase 

Hibernate Questions

Any specific log4j statements for Hibernate Envers for showing the Envers related errors
Any specific log4j statements for Hibernate Envers for showing the Envers related errors  We are applying Hibernate Envers for existing hibernate project. If there is any specific errors related to hibernate envers those 

Spring Framework Questions

How to customize property type conversion errors in Spring MVC 3.
How to customize property type conversion errors in Spring MVC 3.  Hi, I have readed "Spring 3 MVC Validation Example" http://www.roseindia.net/tutorial/spring/spring3/web/spring-3-mvc-validation-example.html. In the validation 

Vehicle Tracking Technology

What is WAAS?
. WAAS was therefore developed to account for signal errors due to ionosphere disturbances, time errors, and satellite orbit errors. WAAS is also vital... and rectify errors. The quality of the signals can be up to five times better with WAAS 

Java Server Faces Questions

jsf application war file not running in my jboss 6.0 on linux 5.5
jsf application war file not running in my jboss 6.0 on linux 5.5  17:15:47,647 INFO [config] Initializing Mojarra (1.2_08-b06-FCS) for context '/MFPMSDeployment' 17:15:48,354 INFO [TomcatDeployment] deploy, ctxPath=/ 17 

Java Server Faces Questions

JBoss deployment problem for jsf - Java Server Faces Questions
JBoss deployment problem for jsf  HI all, I am unable to deploy the .war file with richfacess implemnation of jst. Get foolowing eror 2009-09-16 12:58:27,272 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web 

Java Interview Questions

What are the level in Jboss 5 application server to deploy the application
What are the level in Jboss 5 application server to deploy the application  What are the level in Jboss 5 application server to deploy the application   JDK 1.0 (january 23, 1996) oak - Initial release JDK 1.1 

JSP Servlet Questions

JBoss Application Server Start Failed. HTTP Connector port 8080 is already in use.
JBoss Application Server Start Failed. HTTP Connector port 8080 is already in use.  Deployment error: JBoss Application Server Start Failed. HTTP Connector port 8080 is already in use. How can I solve 

J2EE

Building Web Application With Ant and Deploying on Jboss 3.0
 

WebSevices Questions

I had this error while deploying a web services in jboss
 

JSP Servlet Questions

JBoss Application Server Start Failed. HTTP Connector port 8080 is already in use.
JBoss Application Server Start Failed. HTTP Connector port 8080 is already in use.  Deployment error: JBoss Application Server Start Failed. HTTP Connector port 8080 is already in use. How can I solve it? How can I kill 

JSP Servlet Questions

JBoss Application Server Start Failed. HTTP Connector port 8080 is already in use.
JBoss Application Server Start Failed. HTTP Connector port 8080 is already...-in-manifest: compile: compile-jsps: Starting JBoss Application Server JBoss.... Deployment error: JBoss Application Server Start Failed. HTTP Connector port 8080 

WebSevices Questions

JBoss Application Server Start Failed. HTTP Connector port 8080 is already in use.
JBoss Application Server Start Failed. HTTP Connector port 8080 is already...\WebApplication1\dist\WebApplication1.war Starting JBoss Application Server JBoss... error: JBoss Application Server Start Failed. HTTP Connector port 8080 

Advertisements Advertisements
 

 

 

DMCA.com