[JNDI/Naming/Network] - Re: basic JNDI beginners problems - cant do look up from app
by wiggy
Hello Jaikiran,
yes the client and the AS are both running on the same machine (my laptop) running windows.
I am using callisto eclipse as dev IDE and have run he AS server up from eclipse by using the start server action on the servers tab.
That works fine and I can view the JMX console etc on localhost:8080 as youd expect, and my Datasource is visible in the JNDIView in the global section (see config line in the DS deploy descriptor.
I build the client as an EJB project in same eclipse (I started as EJB project as eventually i've trying to get to grips with EJB but also cos it includes the AS libraries in the path.
however the code is as shown and is a straight pojo with a main - which i run inside eclipse by call run as application (i dont deploy it to the server as it has no managed classes at this point - i was just trying to make sure I could get a JNDI ref to the willDS
cheers
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081343#4081343
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081343
18 years, 7 months
[JBoss Seam] - Re: entityManagerFactory resolves to null
by jjfraney
null
When I display the result of getEntityManagerFactoryFromJndiOrValueBinding() at line 77,
I get
| Evaluation failed. Reason(s):
| The type javax.transaction.SystemException cannot be resolved. It is indirectly referenced from required .class files
|
I don't know how to resolve the above, yet. This is why I went down further in the stack to evaluate expressions. I single-stepped down to here and ran evaluations; the above error didn't occur,
| Expressions$1.getValue() line: 67
| ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding() line: 169
| ManagedPersistenceContext.initEntityManager() line: 77
|
getEntityManagerFactoryFromJndiOrValueBinding returns what was returned by getValue(), which returns the results of expressions which I quoted above.
Thanks,
John
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081340#4081340
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081340
18 years, 7 months
[JBoss jBPM] - Re: Combo Box in Form
by karstendausb
Hi Ronald,
"kukeltje" wrote :
| hmmm... I read your post and do not see where jBPM is involved in a way that it is causing this problem. Everything you describe is JSF, the only thing is that you put selectItems in a variable, but that is just like you would do in in a bean.
|
I am pretty sure that the problem is caused by the jbpm persistence layer, see below. JSF just compares by instanceof, that is a standard procedure and should be fine anyway.
anonymous wrote :
| Yet, I do not disagree that a nicer solution would be 'handy' and seam provides parts of that for you. what you encounter now is in the grey area of the webconsole. What is it intended for? Production systems? well, the management part should be. Is it intended for end-users? No currently not. So some things are not in there and personally I use the storage of variables only in the RAD/Prototype part of a project. For productionsystems we have a separate domain model and use a separate database for that (with separate ui) so the list of selectitems comes from there and not jBPM. The selected value goes into jBPM.
|
Thanks a lot, I haven't seen that so clear so far. I should reconsider my approach here.
anonymous wrote :
| And yes, I will investigate since it would indeed be nice if the webconsole supported this out of the box in a fairly easy way. Care to help and build a nice more complex example of a ui with this in there?
|
Provide an example usage of how to feed task forms? Yes, I can do that.
First I would like to show that this problem is most probably JSF-unrelated:
The following process definition runs fine when using it with a junit test and _without_ persistence. All instanceof comparisons return true.
| <?xml version="1.0" encoding="UTF-8"?>
| <process-definition
| xmlns="urn:jbpm.org:jpdl-3.2"
| name="A_SelectItemsTest">
| <start-state name="start">
| <transition name="to_state" to="first">
| </transition>
| </start-state>
| <state name="first">
| <event type="node-enter">
| <script>
| List test=new LinkedList();
| javax.faces.model.SelectItem si=new javax.faces.model.SelectItem("hallo","test");
| test.add(si);
| executionContext.getContextInstance().setVariable("selectitems", test);
| System.out.println("first.node-enter: directly after setting variable: instanceof selectitem:"+(test.get(0) instanceof javax.faces.model.SelectItem));
| System.out.println("item "+test.get(0)+" is "+test.get(0).getClass().getName());
|
| </script>
| </event>
| <event type="node-leave">
| <script>
| List l1=executionContext.getContextInstance().getVariable("selectitems");
| System.out.println("first.node-leave: instanceof selectitem:"+(l1.get(0) instanceof javax.faces.model.SelectItem));
| System.out.println("item "+l1.get(0)+" is "+l1.get(0).getClass().getName());
| </script>
| </event>
| <transition name="to_second" to="second">
| </transition>
| </state>
| <state name="second">
| <event type="node-enter">
| <script>
| List l2=executionContext.getContextInstance().getVariable("selectitems");
| System.out.println("second.node-enter: instanceof selectitem:"+(l2.get(0) instanceof javax.faces.model.SelectItem));
| System.out.println("item "+l2.get(0)+" is "+l2.get(0).getClass().getName());
| </script>
| </event>
| <transition name="to_end" to="end">
| </transition>
| </state>
| <end-state name="end"></end-state>
| </process-definition>
But...when deploying it to jbpm and running it in the console - without the use of any jsf-task-forms!!! - the first instanceof-comparison returns true, but the second and third do not:
| 16:08:41,752 INFO [STDOUT] first.node-enter: directly after setting variable: instanceof selectitem:true
| 16:08:41,770 INFO [STDOUT] item javax.faces.model.SelectItem@f3a37f is javax.faces.model.SelectItem
|
| 16:09:29,251 INFO [STDOUT] first.node-leave: instanceof selectitem:false
| 16:09:29,253 INFO [STDOUT] item javax.faces.model.SelectItem@b52821 is javax.faces.model.SelectItem
|
| 16:09:29,315 INFO [STDOUT] second.node-enter: instanceof selectitem:false
| 16:09:29,317 INFO [STDOUT] item javax.faces.model.SelectItem@b52821 is javax.faces.model.SelectItem
|
Again...I am neither an jbpm nor an hibernate expert, so I cannot say what is going wrong here. But the problem only occurs if the process variable is persisted.
Maybe all the people in this forum facing this problem have a faulty jbpm setup (database e.g.)?
Where to look next? Any ideas?
Karsten
btw: @Ronald: Thanks for your effort, you have definetely helped a lot of people in this forum!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081338#4081338
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081338
18 years, 7 months
[JBoss Seam] - Seam Tests and JDK 6
by urswag
It is requirement to use JDK 6.
Were are are JBoss Seam 2.0.1 Beta.
Is there an embedded EJB version working with this configuration?
I tried it with version embedded EJB Beta 2.
The consequence is I get the exception
| [testng] [Parser] Running:
| [testng] T:\repos\armee\atiras-af-netz\Implementation\source\atiras-af-netz\test-build\IntegrationTest.xml
| [testng] T:\repos\armee\atiras-af-netz\Implementation\source\atiras-af-netz\test-build\UnitTest.xml
| [testng] WARN 05-09 15:54:47,111 (UnifiedLoaderRepository3.java:addClassLoader:675) -Tried to add non-URLClassLoader. Ignored
| [testng] ERROR 05-09 15:54:47,580 (AbstractController.java:incrementState:456) -Error installing to Instantiated: name=DeploymentFilter state=Described
| [testng] java.lang.IllegalStateException: Class not found: [Ljava.lang.String;
| [testng] at org.jboss.metadata.spi.signature.Signature.stringsToClasses(Signature.java:174)
| [testng] at org.jboss.metadata.spi.signature.Signature.stringsToClasses(Signature.java:125)
| [testng] at org.jboss.metadata.spi.signature.Signature.getParametersTypes(Signature.java:292)
| [testng] at org.jboss.metadata.plugins.loader.reflection.AnnotatedElementMetaDataLoader.getComponentMetaDataRetrieval(AnnotatedElementMetaDataLoader.java:138)
| [testng] at org.jboss.metadata.plugins.context.AbstractMetaDataContext.getComponentMetaDataRetrieval(AbstractMetaDataContext.java:280)
| [testng] at org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge.getComponentMetaData(MetaDataRetrievalToMetaDataBridge.java:159)
| [testng] at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.methodHasAnnotations(AOPConstructorJoinpoint.java:202)
| [testng] at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.hasMethodMetaData(AOPConstructorJoinpoint.java:172)
| [testng] at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.hasInstanceOrJoinpointMetaData(AOPConstructorJoinpoint.java:152)
| [testng] at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.dispatch(AOPConstructorJoinpoint.java:99)
| [testng] at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:103)
| [testng] at org.jboss.kernel.plugins.dependency.InstantiateAction.installActionInternal(InstantiateAction.java:52)
| [testng] at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:197)
| [testng] at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.install(KernelControllerContextAction.java:136)
| [testng] at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| [testng] at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:233)
| [testng] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:724)
| [testng] at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:445)
| [testng] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:555)
| [testng] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:489)
| [testng] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:289)
| [testng] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:192)
| [testng] at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:302)
| [testng] at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:272)
| [testng] at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:119)
| [testng] at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:96)
| [testng] at org.jboss.embedded.Bootstrap.deployBaseBootstrapUrl(Bootstrap.java:150)
| [testng] at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:162)
| [testng] at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:201)
| [testng] at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:214)
| [testng] at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:919)
| [testng] at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:856)
| [testng] at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
| [testng] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| [testng] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| [testng] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| [testng] at java.lang.reflect.Method.invoke(Method.java:597)
| [testng] at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
| [testng] at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:394)
| [testng] at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
| [testng] at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
| [testng] at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:165)
| [testng] at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
| [testng] at org.testng.TestRunner.runWorkers(TestRunner.java:678)
| [testng] at org.testng.TestRunner.privateRun(TestRunner.java:624)
| [testng] at org.testng.TestRunner.run(TestRunner.java:495)
| [testng] at org.testng.SuiteRunner.runTest(SuiteRunner.java:300)
| [testng] at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:295)
| [testng] at org.testng.SuiteRunner.privateRun(SuiteRunner.java:275)
| [testng] at org.testng.SuiteRunner.run(SuiteRunner.java:190)
| [testng] at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:792)
| [testng] at org.testng.TestNG.runSuitesLocally(TestNG.java:765)
| [testng] at org.testng.TestNG.run(TestNG.java:699)
| [testng] at org.testng.TestNG.privateMain(TestNG.java:824)
| [testng] at org.testng.TestNG.main(TestNG.java:802)
| [testng] Caused by: java.lang.ClassNotFoundException: [Ljava.lang.String;
| [testng] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
| [testng] at java.security.AccessController.doPrivileged(Native Method)
| [testng] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| [testng] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
| [testng] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
| [testng] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| [testng] at org.jboss.metadata.spi.signature.Signature.stringsToClasses(Signature.java:170)
| [testng] ... 54 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081333#4081333
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081333
18 years, 7 months