[EJB 3.0] - Starting embeddable EJB3 server
by jaboj
HI,
I need a little help to start the standalone embeddable EJB3 service. I've downloaded a ALPHA and a ALPHA 8 version. Only the ALPHA_8 version matches the description in http://docs.jboss.org/ejb3/embedded/embedded.html.
Some other guys mentioned a RC8 version (http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3952489#3952489). ) - but I'm not able to locate this download.
Where can I locate the newest download?
I need to use the standalone embeddable EJB3 server in som JUnit tests.
When I'm trying out the tutorial described in the above URL, I'm getting this exception:
anonymous wrote :
| WARN 07-08 23:30:34,909 (BeanSchemaBinding.java:init:227) -You should use the 2.0 version of the Microcontainer xml. xmlns='urn:jboss:bean-deployer:2.0'
| ERROR 07-08 23:30:35,149 (AbstractController.java:incrementState:350) -Error installing to Start: name=TransactionManagerInitializer state=Create
| java.lang.NoSuchFieldError: xidFactory
| at org.jboss.tm.TransactionManagerInitializer.start(TransactionManagerInitializer.java:110)
| 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)
| ....
|
I start the server with this method:
| public static void startupEmbeddedJboss()
| {
| EJB3StandaloneBootstrap.boot(null);
| EJB3StandaloneBootstrap.scanClasspath();
|
| }
|
I've think I've tried anything. I'm using Eclipse 3.2 and JBoss 4.0.4GA ad app.server. In eclipse the conf-dir is in the build-path. If I removed it the build-path then I'm getting another exception - so I'm sure that it is in the build path.
Can anybody help me with this? Has anyone succeded using this embeddable EJB3 server in a unit test? I really much need to know how?
Regard
jaboj
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963667#3963667
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963667
19 years, 9 months
[EJB/JBoss] - NullPointerException looking up EJB
by PastaFan
My Stateless SessionBean successfully deployed with IIOP invoker,
can be looked up from a Servlet or standalone Java-Client,
and the Object returned is a "org.omg.stub.javax.ejb._EJBHome_Stub",
toString() returns its IOR (correct).
But trying to PortableRemoteObject.narrow() it to its Home-Interface returns null, even following the steps mentioned at http://www.jbossgroup.com/index.html?module=bb&op=viewtopic&p=3932015
The Properties I pass to my Client:java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| java.naming.provider.url=jnp://localhost:1099
| java.naming.factory.url.pkgs=org.jboss.naming.client
| j2ee.clientName=my_client
| java.rmi.server.codebase=http://localhost:8083
| java.security.policy=.\client.policy
Included JARs:
- My_EJB_Interfaces.jar
- jbossall-client.jar
- jboss-iiop.jar
My deploy\dynclassloader-service.xml (Have enabled DownloadServerClasses)<server>
| <mbean code="org.jboss.util.property.jmx.SystemPropertyClassValue"
| name="jboss.rmi:type=RMIClassLoader">
| <attribute name="Property">java.rmi.server.RMIClassLoaderSpi</attribute>
| <attribute name="ClassName">org.jboss.system.JBossRMIClassLoader</attribute>
| </mbean>
|
| <mbean code="org.jboss.web.WebService"
| name="jboss:service=WebService">
| <attribute name="Port">8083</attribute>
| <attribute name="DownloadServerClasses">true</attribute>
| <attribute name="Host">${jboss.bind.address}</attribute>
| <attribute name="BindAddress">${jboss.bind.address}</attribute>
| <depends optional-attribute-name="ThreadPool"
| proxy-type="attribute">jboss.system:service=ThreadPool</depends>
| </mbean>
| </server>
JBoss starts without any errors/warnings
Environment:
- JBoss 4.0.4GA (Installer - checked "all")
- Java 1.5
- Windows XP SP2
As a (poor) workarround I can put the rmic-generated Stubs to Classpath,
so lookup(jndi) returns me a "mypackage._MyBeanHome_Stub" and works fine.
So I assume there must be an error obtaining the Stubs dynamically via RMIClassLoaderService!?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963666#3963666
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963666
19 years, 9 months
[JBoss jBPM] - Re: error with GPD 3.0.8 Eclipse plugin
by bentruitt
"jglan" wrote : I tried to find out more about the classpath container thing. The eclipse help was not very helpful for me.
| Is there some file that 'is' the classpath containter to see which jars are referenced ?
| If yes, where can find the file ? (to see an example)
| Are there other ways to see content of the classpath container ?
|
| Thanks for any comments!
Lets say you have your workspace in the directory ~/workspace. Lets say furthermore that you have a project called test-jbpm (like i did) living at ~/workspace/test-jbpm.
You can see the classpath container (and this is what was causing my problem) by looking at
~/workspace/test-jbpm/.classpath
I was referencing a non-existant jbpm instance there. Killing that project got me past eclipse complaining on startup.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963665#3963665
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963665
19 years, 9 months
[JBossWS] - JSR181 Web Service Client
by chamillard
Hi Folks,
I'm deploying a simple EJB 3.0 web service using the following code (based on the hello-jaxws sample that comes with the Java EE 5 distribution):
package endpoint;
|
| import javax.ejb.Stateless;
| import javax.jws.WebService;
| import javax.jws.WebMethod;
|
| @WebService
| @Stateless
| public class Hello
| {
| @WebMethod
| public String getHello(String name)
| {
| return "Hello " + name + "!";
| }
| }
I'm packaging it into a JAR and deploying to JBoss 4.0.4.GA, and the WSDL shows up fine from http://localhost:8080/jbossws. The WSDL name is as expected (http://localhost:8080/hello/Hello?wsdl).
I'm using wsimport to generate the client stub code using the following ant task:
<target name="get-artifacts-windows" if="windows">
| <exec executable="${javaee.home}/bin/wsimport.bat">
| <arg line="-keep -d ./build/classes http://localhost:8080/hello/Hello?wsdl"/>
| </exec>
| </target>
This also seems to work as expected, and my test client (shown below) will compile.
| /*
| * Client.java
| */
|
| package client;
|
| import javax.xml.ws.WebServiceRef;
| import endpoint.jaws.HelloService;
| import endpoint.jaws.Hello;
|
| public class Client
| {
| @WebServiceRef(wsdlLocation="http://localhost:8080/hello/Hello?wsdl")
| static HelloService service;
|
| public static void main(String[] args)
| {
| Client client = new Client();
| client.doHello();
| }
|
| public void doHello()
| {
| try
| {
| Hello port = service.getHelloPort();
| String ret = port.getHello(System.getProperty("user.name"));
| System.out.println("Hello result = " + ret);
| }
| catch(Exception e)
| {
| e.printStackTrace();
| }
| }
| }
Unfortunately, when I try to actually run the client, I get the following:
[java] java.lang.NullPointerException
[java] at client.Client.doHello(Client.java:28)
[java] at client.Client.main(Client.java:21)
I added debugging statements and determined that the method generated by wsimport to get the port doesn't seem to be working properly, but that's as far as I can get!
Can anyone help me resolve this problem?
Thanks in advance,
Tim
PS I'm certainly willing to use wstools instead of wsimport, but I couldn't find an example for generating a client using a JAX-WS client (rather than a JAX-RPC client)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963664#3963664
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963664
19 years, 9 months
[JBoss Seam] - Re: can't quite get push-style mvc working
by sjmenden
Thank you for the response,
are you sure there is nothing else I need to do to get this working. I changed my pages.xml to:
| <pages>
| <page view-id="/showGroups.seam" action="#{groupFinder.findFirstPage}" />
| </pages>
|
And when I hit /showGroups.seam, this is all I get in my console:
| 16:33:30,791 INFO [Pages] reading pages.xml
| 16:33:31,458 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true
| 16:33:31,459 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
| 16:33:31,460 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.DETECT_JAVASCRIPT' found, using default value false
| 16:33:31,460 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.AUTO_SCROLL' found, using default value false
|
Whereas I should be seeing somewhere:
| [INFO ]Find First Page
|
Does my EJB necessarily have to be a part of a conversation, I don't think that is a requirement though.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963663#3963663
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963663
19 years, 9 months
[Security & JAAS/JBoss] - Re: Check access to bean methods from bean
by matt10
j2ee_junkie,
Thanks for your input.
I trivialised my use case as enabling/disabling menu items for the sake of forum post.
My client is not so much a fat client as an automatic user interface which exposes business methods directly to the user. It generates forms and offers functionality with little or no client-side coding required. It creates wizards to gather parameters required to invoke business processes and interacts JBPM business processes with the user.
The user interface metadata, hints, such as "Group these fields visually" and "Show a full-size calendar here rather than a date control" are attached to the business methods on the bean and to parameters and passed to the client along with datasets. This allows rapid development of CRUD functionality and easy exposing of new useful-to-business code to the user.
I agree with what you are saying in general use but the client is agnostic to the session beans and entities it is working with. Many methods are exposed to the User rather than the client, hence checking if the User can access the Method, where the method is accessible to the user.
If you still think I am using the wrong strategy I am happy to debate :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963661#3963661
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963661
19 years, 9 months