[EJB 3.0] - Is it possible to deploy EJB2 style entity beans in a EJB 3.
by jeklund
Hi everybody,
I'm about to try a phased migration from EJB2 to EJB3. When I changed version to <ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/j2ee"> in ejb-jar.xml, JBoss lists every session bean as EJB3-service, but none of the old entity beans show up in the debug log.
However I get a lot of
"2007-08-28 09:00:30,558 WARN [org.jboss.injection.EJBHandler] IGNORING DEPENDENCY: unable to find <ejb-local-ref> of interface org.ejbca.core.ejb.ra.UserDataLocal and ejbLink of UserData in ejb-jar.xml of UserAdminSession it might not be deployed yet" warnings for the entity beans.
and later I get
"2007-08-28 09:00:31,271 DEBUG [org.jboss.ejb3.stateless.StatelessDelegateWrapper] Starting failed jboss.j2ee:ear=ejbca.ear,jar=ejbca-ejb.jar,name=TableProtectSession,service=EJB3
java.lang.RuntimeException: Failed to populate ENC: env/ejb/TableProtectDataLocal global jndi name was null"
I also noticed some
"2007-08-28 09:00:17,579 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] Unable to retrieve orbjavax.management.InstanceNotFoundException: jboss:service=CorbaORB is not registered." but I'm not sure this is related..
Isn't it possible to start the migration by simple running the old code in it's new environment? I'm using JBoss 4.2.1.GA and Sun's Java 1.5.0_12 on Ubuntu x64.
Any help would be greatly appreciated,
Johan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078641#4078641
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078641
18Â years, 8Â months
[Installation, Configuration & DEPLOYMENT] - Re: error null pointer exception
by Mazarj
this is the code:
/*
* Lecteur.java
*
* Created on 12 octobre 2000, 17:07
*/
package sabswing.noyau.accesBase;
/**
*
* @author Ventrillonp
* @version
*/
import java.util.List;
import java.io.PrintStream;
import java.io.IOException;
import java.io.FileReader;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.InputStream;
public class Lecteur extends Object {
protected String nomFichier;
protected IniFileAnalyser anal;
private PrintStream printStream = System.err;
private List allRepertoire;
/** Construire un Lecteur
@see setNomFichier
@see setAllRepertoire
*/
public Lecteur() {
this(null, null);
}
/** Construire un Lecteur avec un nom de fichier specifie
@param nomFichier : nom de fichier sans repertoire
@see setNomFichier
@see setAllRepertoire
*/
public Lecteur(String nomFichier) {
this(nomFichier, null);
}
/** Construire un Lecteur avec un nom de fichier specifie et une liste de repertoires
@param nomFichier : nom de fichier sans repertoire
@param allRepertoire : Liste de String contenant chacune un repertoire relatif au package racine
@see setNomFichier
@see setAllRepertoire
*/
public Lecteur(String nomFichier, List allRepertoire) {
this.nomFichier = nomFichier;
this.allRepertoire = allRepertoire;
}
/** Obtenir le nom du fichier que l'on va lire
@return une chaine contenant le nom du fichier (comme specifée lors du constructeur ou set)
*/
public String getNomFichier() {
return(nomFichier);
}
/** Positionner le nom du fichier que l'on va lire
@param nomFichier
*/
public void setNomFichier(String nomFichier) {
this.nomFichier = nomFichier;
}
public PrintStream getPrintStream() {
return(printStream);
}
public void setPrintStream(PrintStream printStream) {
this.printStream = printStream;
}
/** obtenir la liste des repertoires utilise pour rechercher le fichier a lire
un repertoire est de la forme "/dir1/dir2/...", Il est relatif au package racine
@return une liste de String
*/
public List getAllRepertoire() {
return(allRepertoire);
}
/** positionner la liste des repertoires utilise pour rechercher le fichier a lire
un repertoire est de la forme "/dir1/dir2/..."
@param allRepertoire : liste de String
*/
public void setAllRepertoire(List allRepertoire) {
this.allRepertoire = allRepertoire;
}
private FileReader createFileReader() throws FileNotFoundException {
FileReader fr = null;
FileNotFoundException fnfe = null;
if(allRepertoire == null) {
fr = new FileReader(getNomFichier());
} else {
// essayer de trouver le fichier dans chacun des erpertoires de allRepertoires
int i=0;
while(i<allRepertoire.size() && fr == null) {
try {
fr = new FileReader(((String)allRepertoire.get(i))+getNomFichier());
} catch (FileNotFoundException exc) {
fnfe = exc;
}
i++;
}
}
if(fr == null) {
throw(fnfe);
}
return(fr);
}
private InputStreamReader createStreamReader() throws FileNotFoundException {
InputStreamReader sr = null;
InputStream is;
if(allRepertoire == null) {
is = getClass().getResourceAsStream(getNomFichier());
sr = new InputStreamReader(is);
} else {
// essayer de trouver le fichier dans chacun des erpertoires de allRepertoires
int i=0;
while(i<allRepertoire.size() && sr == null) {
is = getClass().getResourceAsStream(((String)allRepertoire.get(i))+getNomFichier());
if(is != null) {
sr = new InputStreamReader(is);
}
i++;
}
}
if(sr == null) {
throw(new FileNotFoundException(getNomFichier()));
}
return(sr);
}
public Reader createReader() throws FileNotFoundException {
return(createStreamReader());
}
protected void skipSection() throws IOException {
int typeLigne = anal.readLine();
while(typeLigne == IniFileAnalyser.LINE_TYPE_PROPERTY){
typeLigne = anal.readLine();
}
}
protected void erreur(String message) {
//getPrintStream().println("Erreur Fichier<"+nomFichier+"> ligne "+anal.getLineNumber()+" : "+message);
// appel MessageAgent
sabswing.noyau.trace.MessageAgent.getDefaultInstance().sendMessage(sabswing.noyau.trace.MessageAgent.NIVEAU_IMPORTANT, sabswing.noyau.trace.MessageAgent.COUCHE_BASE, this.getClass(), "erreur", "Erreur Fichier<"+nomFichier+"> ligne "+anal.getLineNumber()+" : "+message);
}
protected void rapporteException(Exception e) {
//e.printStackTrace(getPrintStream());
// appel MessageAgent
sabswing.noyau.trace.MessageAgent.getDefaultInstance().sendMessage(sabswing.noyau.trace.MessageAgent.NIVEAU_IMPORTANT, sabswing.noyau.trace.MessageAgent.COUCHE_BASE, this.getClass(), "rapporteException", e);
}
}
what should I change?
thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078637#4078637
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078637
18Â years, 8Â months