Hey,
I've got an excpetion when I generate this EJB SQL Statement.
Exception Description: Syntax error parsing the query [SELECT h FROM Busmodul h WHERE LOWER(h.modulNummer) LIKE :modulnummer AND h.einbauort.id = :einbauort_fk AND h.plattform.id = :plattform_fk ORDER BY TRIM(TRAILING '-' FROM CONCAT('0', h.modulNummer))], line 1, c...
Hello,
I need to access the clients principal (username ) inside a ejb method. I don't want to add it as a parameter. Tryed adding them to Context object like ;
prop.add(Context.SECURITY_AUTHENTICATION,"user")
prop.add(Context.SECURITY_CREDENTIALS,"pass")
but trying to access them inside the method like;
@Resource
private Sess...
I'm starting to learn EJB3 and I'm a bit lost when it comes to setting up Eclipse. I've got Glassfish v3 prelude downloaded and set up in Eclipse, but when I attempt to publish my EJB project to the server, I'm told that the server is incompatible with the EJB3 facet of the project.
What would the proper steps be to create a new EJB3 pr...
private String message = "";
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
I am using EJB3 and MySQL 5.1 using Java.
I want to insert paragraphs of texts into MySQL Database using Entity Bean.
But, When I add, MySQL can accept only 255 characters. It shows m...
I am developing an EJB application to run on glassfish v3. If I look at the javadoc for the EntityManager class it says that methods like find, persist etc throw exceptions derived from PersistenceException. However, in practice I notice that exceptions derived from org.eclipse.persistence.exceptions.DatabaseException can be thrown if so...
I'm trying to get a new Enterprise Application Project set up in Eclipse using Glassfish as my app server and I'm seeing the following warning:
Classpath entry eclipse.fproj.jdt.libprov.osgi/jpt.jpa is marked for publish/export but is not exported on the project classpath. Classpath visibility within Eclipse and at runtime will differ.
...
Hi,
I am attempting to add an Interbase connection pool to GlassFish v3 to use EJB 3.1 in a project. The glassfish log appears to be connecting to my database properly, it spits out all my table names and indices. However, I get an error
INFO: fetching database metadata
SEVERE: could not complete schema update
java.lang.NullPointerExc...
I am debugging my project and found that in my jboss log, the beans are loaded in this sequence:
14:30:01,015 INFO [JBossASKernel]
installing bean:
jboss.j2ee:ear=EJB3-JPA2.jar,jar=EJB3-JPA2.jar,name=RecorderBean,service=EJB3
14:30:01,015 INFO [JBossASKernel]
Added
bean(jboss.j2ee:ear=EJB3-JPA2.jar,jar=EJB3-JPA2.jar,name=...
I've created a very simple "Enterprise Application" project with about 7 entity beans and one stateless session bean. I've also configured an instance of Glassfish v3 to run as my application server. Unfortunately, when I attempt to publish the EAR to Glassfish, I'm getting the following response:
SEVERE: Exception while invoking class...
We have some JavaEE5 stateless EJB bean that passes the injected EntityManager to its helpers.
Is this safe? It has worked well until now, but I found out some Oracle document that states its implementation of EntityManager is thread-safe. Now I wonder whether the reason we did not have issues until now, was only because the implement...
I wonder, if I can inject a list of (stateless) beans, that all implementing a special interface.
For example I've a module contract
public interface ResetService {
void reset(MyContext context);
}
Than I've two modules, that are implementing this interface. And one module, that should call all implementations:
@EJBs
private List<...
Hello,
I am using Netbeans 6.8 and Glassfish v3.0.
I created an ejb module and created entity classes from database and then created stateless session bean with remote interface. Say eg.
@Remote
public interface customerRemote{
public void add(String name, String address);
public Customer find(Integer id);
}
@Stateless
pub...
I am currently running a simple EJB application using a stateless Session Bean. I am working on NetBeans 6.8 with Personal Glassfish 3.0 and I have installed on my system both the Java EE and the Java SE. I don't know whether it is relevent but I am running Windows7 64-bit version. The Session Bean I implemented has just one method sayHe...
I am using logback/slf4j to handle logging in my application. Everything was working perfectly until I started using EJBs. Once I added a stateless EJB to my app, the logger started ignoring my logback.xml and stopped using my appenders. I switched to a programmatic logger configuration to see what was wrong and now I am getting the foll...
I use JBoss EJB 3.0 implementation (JBoss 4.2.3 server)
At the beginning I created native query all the time using construction like
Query query = entityManager.createNativeQuery("select * from _table_");
Of couse it is not that efficient, I performed some tests and found out that it really takes a lot of time... Then I found a better...
I am using java.util.logging in an EJB application running on glassfish v3. I can see the log messages in server.log but i don't seem to be able to configure the logging level in glassfish\domains\domain1\config\logging.properties. If I use:
Logger logger = Logger.getLogger("com.foo");
To obtain the logger and log with:
logger.info("...
I am not able to create a Queue connection in JBOSS4.2.3GA Version & Java1.5, as I am using MDB as per the below details.
I am putting this MDB in a jar file(named utsJar.jar) and copied it in deploy folder of JBOSS, In the test env. this MDB works well
but in another env. [ env settings and jboss/java ver is same ] it is throwing erro...
Hi,
I have the following error
Exception in thread "main" javax.naming.NameNotFoundException: CounterBean not bound
trying to access an EJB JAR CounterBean.jar deployed on JBoss5 from a client application outside the Application Server.
From the Jboss log, it looks like it does not have a global JNDI name? Is this ok?
What have I ...
I am trying to run this basic JPA/EJB code:
public static void main(String[] args){
UserBean user = new UserBean();
user.setId(1);
user.setUserName("name1");
user.setPassword("passwd1");
em.persist(user);
}
I get this error:
javax.ejb.EJBException: javax.persistence.PersistenceException:...
I am using JPA and I need to make the "tableName" a variable.
In a database, I have many tables, and my code needs to access the table where I specify it to read.
@Entity
@Table(name = "tableName")
public class Database implements Serializable {...............}
Any ideas?
...