[EJB 3.0] - Wish to see hibernate acting and fixing this issue asap
by nagkumar
Hi have a User Object, which has many Relation Objects and we use OneToMany annotation for User attribute which has list of Relation objects it holds.
In order to find a perticular relation of the user, the commented approach results in 'cannot simultaneously fetch multiple bags'
However when I use the select stament, things work fine. Using Set instead of List is not applicable to us as we need to have get(i) and other behavious realted to List.
Session lSession = HibernateUtil.getTransactionSession();
Query query = lSession.createQuery(
"SELECT x FROM Relation x WHERE x.relation = :aRelation and x.user.loginID = :aLoginID");
query.setParameter("aRelation", aRelation);
query.setParameter("aLoginID", aLoginID);
Relation lRelation = (Relation) query.uniqueResult();
//Session session = HibernateUtil.getSession();
//Criteria cr = session.createCriteria(Relation.class);
//cr.add(Restrictions.ilike(Relation.FIELD_RELATION, aRelation));
//cr.createCriteria(UserAssociated.FIELD_USER).add(
// Restrictions.ilike(User.FIELD_LOGIN_ID, aLoginID));
//Relation lRelation = (Relation) cr.uniqueResult();
lSession.close();
return lRelation;
Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157470#4157470
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157470
17 years, 11 months
[JBoss Portal] - Re: Maven cmd to test PortletContainer2.0 portlets
by iamnew2jboss
This is the error i'm getting:
| C:\jboss-portletcontainer2.0\jboss-portletcontainer-2.0.0.CR2-src\portlet\src\main\java\org\jboss\portal\portlet\impl\jsr168\DispatchedHttpS
| ervletResponse.java:[283,23] [deprecation] encodeUrl(java.lang.String) in javax.servlet.http.HttpServletResponse has been deprecated
|
| C:\jboss-portletcontainer2.0\jboss-portletcontainer-2.0.0.CR2-src\portlet\src\main\java\org\jboss\portal\portlet\impl\info\ContainerInfoBuil
| der.java:[690,11] cannot find symbol
| symbol : class EventDefinitionReferenceMetaData
| location: class org.jboss.portal.portlet.impl.info.ContainerInfoBuilder
|
| C:\jboss-portletcontainer2.0\jboss-portletcontainer-2.0.0.CR2-src\portlet\src\main\java\org\jboss\portal\portlet\impl\info\ContainerInfoBuil
| der.java:[708,11] cannot find symbol
| symbol : class EventDefinitionReferenceMetaData
| location: class org.jboss.portal.portlet.impl.info.ContainerInfoBuilder
|
| C:\jboss-portletcontainer2.0\jboss-portletcontainer-2.0.0.CR2-src\portlet\src\main\java\org\jboss\portal\portlet\impl\container\PortletAppli
| cationLifeCycle.java:[89,11] cannot find symbol
| symbol : variable NullManagedObjectRegistryEventListener
| location: class org.jboss.portal.portlet.impl.container.PortletApplicationLifeCycle
|
| C:\jboss-portletcontainer2.0\jboss-portletcontainer-2.0.0.CR2-src\portlet\src\main\java\org\jboss\portal\portlet\aspects\portlet\SecureTrans
| portInterceptor.java:[73,20] cannot find symbol
| symbol : class InsufficientTransportGuaranteeResponse
| location: class org.jboss.portal.portlet.aspects.portlet.SecureTransportInterceptor
|
|
| [INFO] ------------------------------------------------------------------------
| [INFO] Trace
| org.apache.maven.BuildFailureException: Compilation failure
| at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:560)
| at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
| at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
| at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
| at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
| at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
| at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
| at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
| at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
| 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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
| at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
| at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
| at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
| Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
| at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516)
| at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
| at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
| at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
| ... 16 more
| [INFO] ------------------------------------------------------------------------
| [INFO] Total time: 10 seconds
| [INFO] Finished at: Wed Jun 11 10:31:29 PDT 2008
| [INFO] Final Memory: 16M/39M
| [INFO] ------------------------------------------------------------------------
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157468#4157468
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157468
17 years, 11 months
[JBoss Portal] - Re: Maven cmd to test PortletContainer2.0 portlets
by iamnew2jboss
thanks, but I need to provide the location of my JBoss App Server right (As I did not get the bundled container)?
Here is the command that I'm using:
mvn -e -Dvariable=C:\jboss-portal-2.6.4-From-src\jboss-4.2.2.GA\bin install
I'm using Maven 2.0.7.
The JBoss Wiki Site has following information to test the Portlet Container.
| Running the test suite
| Portlet Container comes with an extensive test suite that can run on JBoss AS 4.2.x and Tomcat 6.0.x. You will therefore need to have either of these servlet containers installed. The Portlet Container test suite will launch the tests on several different servlet containers at once depending on the status of several environment variables, which can be set or passed to Maven using the -Dvariable=value command line argument:
|
Am I messing up with the maven basics? Can somebody please help?
thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157467#4157467
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157467
17 years, 11 months
[JBoss jBPM] - Re: Multithreaded JobExecutor with ForEachForkActionHandler
by kadlecp
My process definition
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition name="TestProcess">
|
| <start-state name="start-state">
| <transition to="ForEachForkActionHandler"></transition>
| </start-state>
|
| <node name="ForEachForkActionHandler">
| <action class="com.sample.action.ForEachForkActionHandler">
| <list>
| <element>hello1</element>
| <element>hello2</element>
| <element>hello3</element>
| <element>hello4</element>
| <element>hello5</element>
| <element>hello6</element>
| </list>
| <as>asset</as>
| </action>
| <transition to="ESB service"></transition>
| </node>
|
| <node name="ESB service">
| <description>Prints only message, no input, no output</description>
| <action
| class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
| <esbServiceName>
| Sample_Service
| </esbServiceName>
| <esbCategoryName>
| Sample_Category
| </esbCategoryName>
| </action>
| <transition to="join"></transition>
| </node>
|
| <join name="join">
| <transition to="end-state"></transition>
| </join>
|
| <end-state name="end-state"></end-state>
|
| </process-definition>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157466#4157466
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157466
17 years, 11 months