[Persistence, JBoss/CMP, Hibernate, Database] - EmbeddedId
by noradtwo
I have a table with a unique constraint on 3 columns, two of which can be null.
| private AttributeValuesId id;
|
| @EmbeddedId
| @AttributeOverrides({
| @AttributeOverride(name = "attributeId", column = @Column(name = "ATTRIBUTE_ID", nullable = false, precision = 22, scale = 0)),
| @AttributeOverride(name = "addressId", column = @Column(name = "ADDRESS_ID", precision = 22, scale = 0)),
| @AttributeOverride(name = "domain", column = @Column(name = "DOMAIN", length = 256))})
| @NotNull
| public AttributeValuesId getId() {
| return this.id;
| }
|
This works fine when there are no null values however when a null value is present, the entity identifier becomes null
A null value for address_id or domain causesthe superclass entity to treat it as null. Equals() and hashcode() both would not make the entire entity null if one of these values were null.
Are there annotations I need to include to indicate that null values are allowed?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156442#4156442
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156442
17 years, 10 months
[Installation, Configuration & DEPLOYMENT] - Having Some Problems with Installation Under Windows Server
by johnloo
I am attempting to install JBoss 4.2.2 GA under Windows Server 2003, with the latest service packs. The box currently has Apache 2.2 installed, and is serving a website at port 80. Tomcat 6 with Axis 1.4 is also installed, and is using port 8080. IIS 6.0 and ASP .NET 1.1 are also installed on this box, but are not being used (IIS default website is stopped to allow Apache to use port 80).
I am following the instructions in the JBoss Installation guide. I installed the JDK using jdk-1_5_0_15-windows-i586-p.exe, downloaded from the Sun Java site. After installing Java, I unzipped the JBoss installation file, and copied everything into
c:\jboss-4.2.2
I added an environment variable JAVA_HOME, and pointed it to:
C:\Progra~1\Java\jdk1.5.0_15
I also added this to the PATH:
C:\Progra~1\Java\jdk1.5.0_15\jre\bin
I opened a Command Prompt window, changed directories to:
C:\jboss-4.2.2\bin
and executed run.bat.
The following message/errors appeared:
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: C:\jboss-4.2.2
JAVA: C:\Progra~1\Java\jdk1.5.0_15\bin\java
JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -Dsun.rmi.dgc.cli
ent.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
CLASSPATH: C:\Progra~1\Java\jdk1.5.0_15\lib\tools.jar;C:\jboss-4.2.2\bin\run.j
ar
===============================================================================
Failed to boot JBoss:
java.lang.ClassNotFoundException: org.jboss.system.server.ServerImpl
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.jboss.system.server.ServerLoader.createServer(ServerLoader.java:2
86)
at org.jboss.system.server.ServerLoader.load(ServerLoader.java:268)
at org.jboss.Main.boot(Main.java:194)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Thread.java:595)
Press any key to continue . . .
It looks like I am missing a jar file somewhere? Or maybe there's an issue with Tomcat on 8080? I stopped the Tomcat service and go the same error.
I'm assuming I did something silly or overlooked something. Can anyone provide some direction on how to fix this?
This was also posted in the Beginners forum, but I posted a reply on that thread to redirect responses here.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156440#4156440
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156440
17 years, 10 months
Delivery Status Notification (Failure)
by postmaster@lists.jboss.org
This is an automatically generated Delivery Status Notification.
Delivery to the following recipients failed.
buhgalteria@localhost
17 years, 10 months
[EJB 3.0] - Cyclic dependency in EJB3 not resolved by JIRA EJBTHREE-792
by omerlin
Hello,
We try to migrate a big glassfish application to jboss, but we have a blocking issue with cyclic depencies on EJB3.
The JIRA EJBTHREE-792 identified this issue as resolved thru the @IgnoreDependency annotation.
This is not so simple - this does not work for us at all.
I explain :
First at all it does not work at all for ejb-jar.xml deployment descriptor file.
There is no standard annotation IgnoreDepency even in jboss.xml, the jboss "not in spec" descriptor file.
We then try to move the ejb-jar.xml injection into the code directly with the @EJB annotations as indicated in EJBTHREE-792 .
It works for very simple code with @EJB injection without name references.
But if you add name parameters it does not work anymore. We need parameters to @EJB to specify implementation. (our Glassfish code use this)
You can try with this simple code :
Hello1Bean class:
@EJBs(
{ @EJB(name="ejb/Hello2", beanInterface=Hello2.class, beanName="Hello2Bean")
})
public @Stateless class Hello1Bean implements Hello1 {
@IgnoreDependency
@EJB(name="ejb/Hello2")
private Hello2 hello;
Hello2Bean Class :
@EJBs(
{@EJB(name="ejb/Hello1", beanInterface=Hello1.class,beanName="Hello1Bean")
})
public @Stateless class Hello2LocalBean implements Hello2Local {
@IgnoreDependency
@EJB(name="ejb/Hello1")
private Hello1 hello;
You then get the following dependency error :
--- MBeans waiting for other MBeans ---
ObjectName: jboss.j2ee:jar=cyclic.jar,name=Hello2Bean,service=EJB3
State: NOTYETINSTALLED
I Depend On:
jboss.j2ee:jar=cyclic.jar,name=Hello1Bean,service=EJB3
Depends On Me:
jboss.j2ee:jar=cyclic.jar,name=Hello1Bean,service=EJB3
ObjectName: jboss.j2ee:jar=cyclic.jar,name=Hello1Bean,service=EJB3
State: NOTYETINSTALLED
I Depend On:
jboss.j2ee:jar=cyclic.jar,name=Hello2Bean,service=EJB3
Depends On Me:
jboss.j2ee:jar=cyclic.jar,name=Hello2Bean,service=EJB3
We have the problem in both 4.2.2 & 5.0Beta3 versions.
We have currently no solution,no working workaround.
Need help,
thanks,
Olivier
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156424#4156424
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156424
17 years, 10 months