[JBoss JIRA] Commented: (JBAS-1507) Many-Many unidirectional relationship
by Santiago de la Nava Santos (JIRA)
[ http://jira.jboss.com/jira/browse/JBAS-1507?page=comments#action_12346763 ]
Santiago de la Nava Santos commented on JBAS-1507:
--------------------------------------------------
Hi all,
I'm having a similar problem with one to many relationship, CMP persistence and EJB 2 specification. I have tested the problem at versions 3.2.8.SP1, 4.0.4.GA and 4.0.5.GA, and they all throws the same Exception. I have an ExperimentEJB that is related to many ConfigurationEJB. When I try to add the ConfigurationEJB Collection to ExperimentEJB, the system throws this exception:
11:07:01,323 ERROR [LogInterceptor] RuntimeException in method: public abstract void softiam.services.ejbs.experiment.Ex
periment.setConfiguration(java.util.Collection) throws java.rmi.RemoteException:
java.lang.NullPointerException
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.getRelatedPrimaryKey(JDBCCMRFieldBridge.java:1862)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setInstanceValue(JDBCCMRFieldBridge.java:857)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setValue(JDBCCMRFieldBridge.java:723)
at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler$FieldSetInvoker.invoke(EntityBridgeInvocationH
andler.java:170)
at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:105)
at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:76)
at softiam.services.ejbs.experiment.ExperimentEJB$Proxy.setConfiguration(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1187)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:87)
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:284)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:126)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:276)
at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:104)
at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:68)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:527)
at org.jboss.ejb.Container.invoke(Container.java:954)
at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
at org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.java:112)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
at $Proxy57.setConfiguration(Unknown Source)
at softiam.services.ui.gwtui.server.SoftIAMServiceImpl.experimentConfigurationSet(SoftIAMServiceImpl.java:212)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:260)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:147)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
I have checked all the deployment descriptors and are ok:
* ejb-jar.xml ------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<display-name>SoftiamEJBs</display-name>
<enterprise-beans>
<session>
<display-name>SessionControlEJB</display-name>
<ejb-name>SessionControlEJB</ejb-name>
<home>softiam.services.ejbs.sessioncontrol.SessionControlHome</home>
<remote>softiam.services.ejbs.sessioncontrol.SessionControl</remote>
<ejb-class>softiam.services.ejbs.sessioncontrol.SessionControlEJB</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
</session>
<entity>
<ejb-name>ExperimentEJB</ejb-name>
<home>softiam.services.ejbs.experiment.ExperimentHome</home>
<remote>softiam.services.ejbs.experiment.Experiment</remote>
<ejb-class>softiam.services.ejbs.experiment.ExperimentEJB</ejb-class>
<abstract-schema-name>experiments</abstract-schema-name>
<prim-key-class>java.lang.Long</prim-key-class>
<primkey-field>experimentId</primkey-field>
<reentrant>True</reentrant>
<cmp-field>
<field-name>experimentId</field-name>
</cmp-field>
<cmp-field>
<field-name>user</field-name>
</cmp-field>
<cmp-field>
<field-name>coupling</field-name>
</cmp-field>
<cmp-field>
<field-name>state</field-name>
</cmp-field>
<cmp-field>
<field-name>experimentIndex</field-name>
</cmp-field>
<cmp-field>
<field-name>name</field-name>
</cmp-field>
<cmp-field>
<field-name>description</field-name>
</cmp-field>
<cmp-field>
<field-name>creationTime</field-name>
</cmp-field>
<cmp-field>
<field-name>operationTime</field-name>
</cmp-field>
<query>
<query-method>
<method-name>findExperiments</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>
SELECT OBJECT(e)
FROM experiments e
WHERE e.user=?1
</ejb-ql>
</query>
<query>
<query-method>
<method-name>findExperiments</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>
SELECT OBJECT(e)
FROM experiments e
WHERE e.user=?1 AND e.coupling=?2
</ejb-ql>
</query>
<query>
<query-method>
<method-name>findRunningExperiments</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>
SELECT OBJECT(e)
FROM experiments e
WHERE e.state=1
</ejb-ql>
</query>
<query>
<query-method>
<method-name>findNotStartedExperiments</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>
SELECT OBJECT(e)
FROM experiments e
WHERE e.state=0
</ejb-ql>
</query>
<persistence-type>Container</persistence-type>
</entity>
<entity>
<ejb-name>ConfigurationEJB</ejb-name>
<home>softiam.services.ejbs.configuration.ConfigurationHome</home>
<remote>softiam.services.ejbs.configuration.Configuration</remote>
<ejb-class>softiam.services.ejbs.configuration.ConfigurationEJB</ejb-class>
<abstract-schema-name>configurations</abstract-schema-name>
<prim-key-class>softiam.services.ejbs.configuration.ConfigurationPK</prim-key-class>
<reentrant>True</reentrant>
<cmp-field>
<field-name>experimentId</field-name>
</cmp-field>
<cmp-field>
<field-name>coupling</field-name>
</cmp-field>
<cmp-field>
<field-name>module</field-name>
</cmp-field>
<cmp-field>
<field-name>parameter</field-name>
</cmp-field>
<cmp-field>
<field-name>type</field-name>
</cmp-field>
<cmp-field>
<field-name>singleValue</field-name>
</cmp-field>
<cmp-field>
<field-name>rangeInitial</field-name>
</cmp-field>
<cmp-field>
<field-name>rangeEnd</field-name>
</cmp-field>
<cmp-field>
<field-name>rangeIncrement</field-name>
</cmp-field>
<cmp-field>
<field-name>rangeCombine</field-name>
</cmp-field>
<cmp-field>
<field-name>multipleValues</field-name>
</cmp-field>
<cmp-field>
<field-name>multipleCombine</field-name>
</cmp-field>
<persistence-type>Container</persistence-type>
</entity>
</enterprise-beans>
<relationships>
<ejb-relation>
<ejb-relation-name>experiment-configuration</ejb-relation-name>
<ejb-relationship-role>
<description>experiment</description>
<ejb-relationship-role-name>ExperimentRole</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<description>experiment</description>
<ejb-name>ExperimentEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<description>configuration</description>
<cmr-field-name>configuration</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<description>configuration</description>
<ejb-relationship-role-name>ConfigurationRole</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<cascade-delete />
<relationship-role-source>
<description>configuration</description>
<ejb-name>ConfigurationEJB</ejb-name>
</relationship-role-source>
</ejb-relationship-role>
</ejb-relation>
</relationships>
</ejb-jar>
jboss.xml --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<?xml version="1.0"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
<jboss>
<enterprise-beans>
<session>
<ejb-name>SessionControlEJB</ejb-name>
<jndi-name>SessionControlEJB</jndi-name>
</session>
<entity>
<ejb-name>ExperimentEJB</ejb-name>
<jndi-name>ExperimentEJB</jndi-name>
</entity>
<entity>
<ejb-name>ConfigurationEJB</ejb-name>
<jndi-name>ConfigurationEJB</jndi-name>
</entity>
</enterprise-beans>
<relationships>
<ejb-relation>
<ejb-relation-name>experiment-configuration</ejb-relation-name>
<foreign-key-mapping />
<ejb-relationship-role>
<ejb-relationship-role-name>ExperimentRole</ejb-relationship-role-name>
<key-fields />
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>ConfigurationRole</ejb-relationship-role-name>
<key-fields />
</ejb-relationship-role>
</ejb-relation>
</relationships>
</jboss>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
The code that add the data to the relationship is like this:
* This is part of the function that generates the collection for the relationship:
public static Vector generateConfiguration(long experimentId, ConfigurationHome configurationHome,CouplingInfo coupling) throws RemoteException, CreateException{
...
while(it2.hasNext())
{
ParameterInfo parameter=(ParameterInfo)it2.next();
ConfigurationInfo configurationInfo=parameter.getConfigurationInfo();
Configuration config=configurationHome.create(new Long(experimentId),coupling.getName(),module.getName(),parameter.getName());
...
configurations.add(config);
}
return configurations;
}
* This is part of the code that add the collection generated by the previous function:
Experiment exp=(Experiment)session.getAttribute("currentExperiment");
ConfigurationHome configurationHome=this.softIAMInit.getConfigurationHome();
// This is the setter for the relationship
exp.setConfiguration((Collection)(ConfigurationControl.generateConfiguration(experimentId,configurationHome,coupling)));
> Many-Many unidirectional relationship
> -------------------------------------
>
> Key: JBAS-1507
> URL: http://jira.jboss.com/jira/browse/JBAS-1507
> Project: JBoss Application Server
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: CMP service
> Affects Versions: JBossAS-4.0.1 Final
> Environment: Using MySQL and POJOs
> Reporter: Fiona Healy
>
> Hi,
> I am trying to set up a many-many relationship between 2 EJBS ReportEJB and FieldsEJB and i am failing terribly.
> I have configured both ejb jar file and jbosscmp-jdbc files to compile but i am getting an error on creating the Report bean that holds a set of the FieldsEJB
> I am getting an error
> NullPointerException
> ...cmp.jdbc.bridge.JDBCCMRFieldBridge.getRelatedPrimaryKey(JDBCFieldBridge.java:1847)
> Has anyone any idea....i can attach code if necessary please help me out here
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 6 months
[JBoss JIRA] Created: (EJBTHREE-782) CLONE -Duplicating _$$_javassist_ classes after remote - call - OutOfMemory: PermGen
by Carsten Wolters (JIRA)
CLONE -Duplicating _$$_javassist_ classes after remote - call - OutOfMemory: PermGen
------------------------------------------------------------------------------------
Key: EJBTHREE-782
URL: http://jira.jboss.com/jira/browse/EJBTHREE-782
Project: EJB 3.0
Issue Type: Bug
Affects Versions: EJB 3.0 RC9 - FD
Environment: Linux Gentoo 2.6.18, JVM 1.5.0.08, 1.5.0.09, amd64
RedHat Linux EE 4.0. JVM 1.5.0.09, intel
Reporter: Carsten Wolters
Priority: Blocker
PermGen in EJB3 client aplication by remote interface.
The application is as sample as it can be:
-get remote interface of stateless EJB3 (by JNDI)
- ask 1000 times to get a Collection (List) of 10 EntityBeans.
After 255 there is OutOfMemory: PermGen.
JVM options changes nothing (eventualy more PermSpace => longer run).
The reason looks like the Javassist create lazyinitializer classes for every EntityBean retrived from the server.
So: When I debug on server-side, I got before sending Entity to client:
I got:
myEntity[0].id=143534
myEntity[0].flow=<FlowEntity_$$_javassist_7> 13434
...
myEntity[0].user=<UserEntity_$$_javassist_15>...
myEntity[0].stage=<StageEntity_$$_javassist_17>...
And every remote call the class names (name)_$..._javassist_(index) got the same
indexes (7,15,17) on server side (end every entity in returned collections of entities)
But when I debug on client site - after return from remote call - the indexes of
all returned entities are different (Each next increments index).
So after first call I got:
myEntity[0].id=143534
myEntity[0].flow=<FlowEntity_$$_javassist_0>...
...
myEntity[0].user=<UserEntity_$$_javassist_1>...
myEntity[0].stage=<StageEntity_$$_javassist_2>...
...
myEntity[1].id=143534
myEntity[1].flow=<FlowEntity_$$_javassist_3>
...
myEntity[1].user=<UserEntity_$$_javassist_4>...
myEntity[1].stage=<StageEntity_$$_javassist_5>...
...
After secund call:
myEntity[0].id=143534
myEntity[0].flow=<FlowEntity_$$_javassist_6>...
...
myEntity[0].user=<UserEntity_$$_javassist_7>...
myEntity[0].stage=<StageEntity_$$_javassist_8>...
...
myEntity[1].id=143534
myEntity[1].flow=<FlowEntity_$$_javassist_9>
...
myEntity[1].user=<UserEntity_$$_javassist_10>...
myEntity[1].stage=<StageEntity_$$_javassist_11>...
...
And so on... ... and permGen after 260 iterations...
I have not idea, how to deal with that...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 6 months
[JBoss JIRA] Assigned: (JBRULES-269) Parser to be stricter with newlines
by Michael Neale (JIRA)
[ http://jira.jboss.com/jira/browse/JBRULES-269?page=all ]
Michael Neale reassigned JBRULES-269:
-------------------------------------
Assignee: Edson Tirelli (was: Michael Neale)
punting to edson, when we get to refresh the parser once core is complete for 3.2
(I will probably work on this to, in terms of getting rid of keyword collisions).
> Parser to be stricter with newlines
> -----------------------------------
>
> Key: JBRULES-269
> URL: http://jira.jboss.com/jira/browse/JBRULES-269
> Project: JBoss Rules
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Drl Parser/Builder
> Affects Versions: 3.0-rc2
> Reporter: Michael Neale
> Assigned To: Edson Tirelli
> Fix For: 3.1-m3
>
>
> Given that we are not going down the route of
> when {
> }
> style brackets, we will need to be stricter about newlines.
> In otherwords, newlines are required I believe in the following scenarious:
> before a when,
> after a when before the LHS
> before a then
> after a then before then RHS
> before an end (at the end of the rule).
> when,then, end - should all appear on a line by themselves.
> Optionally (perhaps?) rule should always be at the start of a newline.
> on a similar note, should rule and end be at the start of a newline? (don't really want to have to enforce column positions - but it is kind of needed).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 6 months
[JBoss JIRA] Commented: (JBRULES-269) Parser to be stricter with newlines
by Michael Neale (JIRA)
[ http://jira.jboss.com/jira/browse/JBRULES-269?page=comments#action_12346744 ]
Michael Neale commented on JBRULES-269:
---------------------------------------
ha ! yes I like python, as long as we don't start requiring indentation ;)
we may have some other ways to avoid so many keyword collisions (using semantic predicates for working out keywords rather then hard coded tokens for the lexer).
> Parser to be stricter with newlines
> -----------------------------------
>
> Key: JBRULES-269
> URL: http://jira.jboss.com/jira/browse/JBRULES-269
> Project: JBoss Rules
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Drl Parser/Builder
> Affects Versions: 3.0-rc2
> Reporter: Michael Neale
> Assigned To: Michael Neale
> Fix For: 3.1-m3
>
>
> Given that we are not going down the route of
> when {
> }
> style brackets, we will need to be stricter about newlines.
> In otherwords, newlines are required I believe in the following scenarious:
> before a when,
> after a when before the LHS
> before a then
> after a then before then RHS
> before an end (at the end of the rule).
> when,then, end - should all appear on a line by themselves.
> Optionally (perhaps?) rule should always be at the start of a newline.
> on a similar note, should rule and end be at the start of a newline? (don't really want to have to enforce column positions - but it is kind of needed).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 6 months