The following seems to work for me:
| @Entity
| @Table(name = "ModuleProperty")
| public class ModuleProperty implements Serializable {
|
| /**
| *
| */
| private static final long serialVersionUID = 1L;
|
| ModulePropertyPK id;
|
| Module
How do I use a mappedBy for a PK which is composite and one of the fields in
the composite key (that forms a FK relationship) needs to be mapped:
| Module {
| @Id int moduleID
|
| @OneToMany(cascade=CascadeType.ALL,fetch=FetchType.EAGER,mappedBy=?)
| @MapKey(name="name"
| Map prope
Add the following to jboss-service.xml
jboss.j2ee:service=EJB3,ear=yourApp.ear,jar=yourApp.ejb3,name=ModuleBean
or use the @Depends annotation
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3946251#3946251
Reply to the post :
http://www.jboss.com/index.htm
Here is my persistence.xml file.
|
|
| java:/DefaultDS
| org.test.ejb3.eb.Module
| org.test.ejb3.eb.ModulePropertyPK
| org.test.ejb3.eb.ModuleProperty
|
|
|
|
I get the following trace:
junit.framework.AssertionFailedError: Test Failed:
RuntimeException:org.jboss.tm.JBossRollbackException: Unable to commit,
tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=OPT0051/244, BranchQual=,
localId=244] status=STATUS_NO_TRANSACTION; - nested throwable:
(java
My test fails on the "testModifyModules". Is there something that I am doing
wrong?
Following is my Stateless Bean:
/*
| * Created on May 23, 2006
| *
| * This distribution may include materials developed by third parties.
| *
| * Copyright (c) 2004 Vivek Srivastav. All rights res
I want to modify the ModuleProperty collection of the Module class and then
merge it back. When I use the
| public Module updateModule(Module module){
|em.merge(module) ;
|return module;
| }
|
in my stateless session bean, it throws exception (attached at the bottom of
the
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3939453
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3943204#3943204
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3943204
The Warning went away after adding the dependency in the ejb-timer-service.xml.
I wm wondering if the following settings have anything to do with the JDBC
batch update failure:
12:29:13,203 INFO [SettingsFactory] Automatic flush during beforeCompletion():
disabled
| 12:29:13,203 INFO [Setti
cgriffith,
Your idea about the META-INF file helped me point in the right direction.
Removing the META-INF/jboss.xml file from ejb3 jar seems to fix the problem.
vivek
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3927184#3927184
Reply to the post :
http://
I can see the security domain loaded in the JBoss in the XMLLoginConfig MBean's
displayAppConfig method and I am not using the jboss-app.xml file.
Here's how my code defined
import java.util.HashSet;
| import java.util.List;
| import java.util.Set;
|
| import javax.annotation.security.Ro
I don't see any security/roles etc level message during the the deployment . My
EJB seems to be defaulting to UserPasswordLoginModule, although I have another
login module configured for the domain that I am using.
I used to get the adding authorization privileges messages in 4.0.3SP1, and it
Try removing
PostgressDBRealm
and add
to you postgress-ds.xml file
If you use security domain, the configuration in
${jboss.server.home.dir}/conf/login-config.xml file is used for authentication.
Vivek
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3926
Bill,
Thanks for the clarification.
Regards
Vivek
anonymous wrote :
|
| EJB Persistence spec section 2.1.1
|
| When annotations are used, the placement of the mapping annotations on
either the persistent fields or persistent properties of the entity class
specifies the access type a
When I deploy my application I get the following message. However when I check
the database I don't see the tables in the database.
The first time I tried to deploy the application there were a few tables
created, but after that on subsequent deployment I am not getting any tables
created in da
Yogendra,
The annotations are @Remote and @Local for local and remote binding.
Vivek
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3925925#3925925
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3925925
When I use hypersonic default database with the following persistence.xml, I
see all the table created in the database:
|
| java:/DefaultDS
| org.vss.ejb3.eb.ElementType
| org.vss.ejb3.eb.ModuleType
| org.vss.ejb3.eb.NetworkElement
When I deploy my application I get the following message. However when I check
the database I don't see the tables in the database.
The first time I tried to deploy the application there were a few tables
created, but after that on subsequent deployment I am not getting any tables
created in da
ok I fixed it by moving the @OneToMany annotation over the field rather than
the getter method.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3925913#3925913
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3925913
just want to point out that I have a variable of ModuleType defined in the
Module class.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3925860#3925860
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3925860
---
@Entity
| @Table(name="ModuleType")
| public class ModuleType implements Serializable {
|
| Collection modules_of_type = new HashSet();
| @Id @GeneratedValue int id;
|
| @OneToMany(cascade=CascadeType.REMOVE,mappedBy="type")
| public Collection getMod
Caused by: org.hibernate.cfg.NotYetImplementedException: association table on a
single ended association is not yet supported
What does it mean?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3925438#3925438
Reply to the post :
http://www.jboss.com/index.ht
If I want to deploy Annotation based service ("@Service" rather than using
META-INF/jboss-service.xml", I have to name the extension .ejb3 for it to
deploy and work. It seems like if I name it .sar it never looks for @Service
annotated classes.
Now I need to deploy a service archieve which is s
I tried to access a stateless session bean from a service. I can't typecast the
object I obtain by lookup to the Session Bean's remote interface. I get
ClassCastException: $187Proxy (or something like that), when typecasting. So I
assume it's a Class Loader issue. When I remove the remote interf
I tried the UserAccounts service. When deployed it on 4.0.3SP1, it failed to
deploy the org.ii.jaas.har archive. It expected the jboss-service.xml file to
be present. After packaging hibernate-service.xml as META-INF/jboss-service.xml
in the har file, I was able to deploy it. However when trying
I am using the appropriate class to typecast.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3918507#3918507
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3918507
---
The Session Bean uses @SecurityDomain("corview")
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3918167#3918167
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3918167
---
I fixed it with the following META-INF/jboss-service.xml configuration file:
|
|
|
| http://www.w3.org/2001/XMLSchema-instance";
| >
|
|
|
| guest
|
I fixed it by removing ejb3Test-client.jar from the war file.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3918164#3918164
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3918164
---
I am stuck on this for days now. Can someone help me with it please.
Statement of Problem
==
How to use to EJB 3.0 Stateless Session Bean from within a JBoss Service.
Scenario
===
1. I have created a LoginModule which I am packaging as a SAR DynamicConfig
MBean. The LoginModule i
Statement of Problem
==
How to use to EJB 3.0 Stateless Session Bean from within a JBoss Service.
Scenario
===
1. I have created a LoginModule which I am packaging as a SAR DynamicConfig
MBean. The LoginModule internally calls Stateless Session bean to authenticate
userid and pas
I have a similar but interesting situation. I am trying to call a Stateless
Session Bean within a JBoss service. When I include the interface class file
into the SAR, I get ClassCastException, but when I don't, I get NoClassDefFound
Exception. What should I do?
View the original post :
http://
Yes,
I have the Service tutorial running.
Following is my code:
| package org.vss.jboss.service;
| import org.jboss.annotation.ejb.Management;
|
| @Management
| public interface PollingServiceManagement {
| public int getPollInterval();
|
| public void setPollInterval(i
Statement of Problem
==
How to use to EJB 3.0 Stateless Session Bean from within a JBoss Service.
Scenario
===
1. I have created a LoginModule which I am packaging as a SAR DynamicConfig
MBean. The LoginModule internally calls Stateless Session bean to authenticate
userid and pas
Ok, I figured that with 4.0.3 JBoss server the jboss-service.xml defines
mechanism to define the application-policy in the SAR deployment xml file
itself, which seems to be working for me.
So now I get messages that the security is being implemented during deployment
time. However I have two ne
Hi,
I am trying to write an application with the following characteristics:
1. The Session Beans are secured using annotation @SecurityDomain("library")
2. I have written a custom login module which derives from
org.jboss.security.auth.spi.UsernamePasswordLoginModule. The login module sar
is de
I am getting the same ClassCastException when using entity Bean in JBoss
4.0.3SP1. This only happens when I do a find on primary key using
EntityManager's find method. It seems like the object is retrieved
appropriately in the ejb-tier, however when returning to the Web-tier there is
somewhere,
Thanks Bill. I appreciate your help.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3913268#3913268
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3913268
---
This SF.
Amazingly, it was the jboss-ejb3.jar file, which apparently does not have
org.jboss.annotation classes available. Once I got these files from the
EJB3Trail tutorial, the service deployed smoothly.
The Eclipse IDE did not show any error at all about these missing annotation
classes and compiled
I am having the same problem with my EJB 3.0 Service.
1. When I package my Service classes as .ejb3 and deploy it. There is no error,
however the lifecycle methods are never called, so I am not sure if my service
is getting deployed at all.
2 . When I package the Service classes as .sar file a
Kabir,
I am unable to deploy the service. When I use the extension .sar, the
SARDeployer expects to find jboss-service.xml file. However, if I deploy the
file as .ejb3, the service never starts,although it deploys fine. Please, also
note that I have renamed the PollingService to PollingServiceMB
Can anyone tell me which EJB 3.0 jar files contain the annotation processing
factories for EJB 3.0 and JBoss extension.
You input much appreciated.
Regards
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3911929#3911929
Reply to the post :
http://www.jboss.com
To get the annotation to work, you need JdtApt for annotation processing. Which
you can install from:
http://www.eclipse.org/jdt/apt/JdtAptUpdateSite
Then in the Project->Properties expand Java Compiler and Annotation
Processor->Factory Path. Now you need to add the EJB 3.0 annotation processin
Need help to understand how to write service using EJB 3.0. Have posted the
code in the EJB 3.0 forum:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=73769
Would appreciate any help.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3911876#3911876
Please help with writing EJB 3.0 Service. I can't get it to deploy.
I wrote the following EJB 3.0 Service:
| @Service(objectName = "ejb3:service=PollingService")
| @Management(PollingServiceManagement.class)
| public class PollingService implements PollingServiceManagement {
|
| Th
I don't get any intellisence in Eclipse with the @Service and related
annotations. I have JBoss IDE 1.5.0RC1 installed. I assume that intellisence
probably is not implemented. However I have following questions:
Q1. I am trying to write a JBoss Service using EJB 3.0, where can I read up
more on
OK, so I disabled the JBoss IDE J2EE 1.4 version and installed the development
version based on the new update site as mentioned in announcement by Marshall
Culpepper. It seems to work.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3911802#3911802
Reply to t
Following is the entry in the log file:
--
!ENTRY org.eclipse.jface 4 2 2005-12-09 12:51:58.484
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.NoSuchMethodError:
org.eclipse.jdt.internal.debug.ui.launcher
Thanks Scott.
Ok, so I started reading about JBoss microkernal and realize that I need to
write a ServiceMBean. Now the AS document mentions
org.jboss.naming.NonSerializableFactory for binding the beans. I could not find
the class in any jar file. I searched, albeit, I don't know how good is
m
Hi,
I am unable to add JBoss configuration. I installed a fresh eclipse IDE from
eclipse.org, Updated the JBoss IDE from the sourceforge URL, copied the xdoclet
and refreshed it. Now when I went in to add a new JBoss Configuration, if shows
up an exception saying "Error adding new JBoss configur
You need the following:
1. rmi.policy file with the following content
grant {
// Allow everything for now
permission java.security.AllPermission;
};
2. You will need the jboss-client.jar available in JBOSS_HOME/client folder.
The jar provides JNDI lookups.
3. In the client appli
I want to write an application which is supposed to run as a service and it
needs to do periodic tasks [poll some object and collect statistics]. I have
following questions:
1. Can I write such an application as service in JBoss.
2. If yes, what happens to lifecycle management am I allowed to cr
I have changed the mail-services.xml file to appropriate values, I however
would like to test it and make sure that it works. How can I do that?
Please don't ask me to write programs.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3889551#3889551
Reply to the
I get the following message on the JBoss logs:
11:17:34,390 WARN [RegionTagHandler] requested page has no region [left]
Also I tried to minimize the forum portlet, but that's the only portlet on the
page. Where is the page layout defined?
View the original post :
http://www.jboss.org/index.ht
Is there a way that I can configure the JBoss Portal so that the page menu
portlet and the User Portlet is displayed on all the pages. I have installed
JBoss forum portlet and when I access the forum, I want to still have access to
the user and menu portlets.
View the original post :
http://ww
Hi All,
I am developing a EJB application and plan to deploy JBoss as service. I am using MS
SQL as database server. Whenever the JBoss starts earlier than the MS SQL server, it
throws "createBeanClassInstanceCommand == null" exception, cause the database server
is not up and any subsequent cal
Hi anil,
Did you find the solution to your composite key problem. I am also having the same
problem. I however can write records to table, but it crashes on me whenever I try to
read the record.
I struggled with it for a while before I realized it's the composite key problem. I
was for a long t
Hi,
I changed the timestamp column to BIGINT and still get the same error. So I think
there must be some other problem with my code.
16:26:50,399 ERROR [LogInterceptor] TransactionRolledbackLocalException in method:
public abstract java.lang.Long optinel.iface.CardHistoryLocal.getPollTime(), ca
Another thing I noticed. When I have just one record, I am able to use the CMP bean to
read the data. however it throws this exception as soon as there are more than 1
record.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3844714#3844714
Reply to the post :
Can I setup a NNTP client like outlook express or Netscape to read the forums listed
here?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3844712#3844712
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3844712
Oops! Following is my EJB finder definitions for CardHistory CMP:
* @ejb.finder
* signature = "java.util.Collection
findAllByParamAndCard(java.lang.Integer cardHistoryParamID, java.lang.String serialNo)"
* query = "SELECT OBJECT(p) FROM CardHistory as p WHERE
p.card
Hi All,
I am stuck up with a desparate problem. I can write data using my bean but can't read
data back (Please see the exception attached). My CMP has a java.sql.Timestamp data in
the composit primary key. I think I am doing something wrong with the jdbc-type
sql-type mapping, but even after us
62 matches
Mail list logo