[EJB 3.0] - Re: NullPointerException in JavaEEComponentHelper with JBoss
by japase
Hi again,
It took some time, but finally I could manage to test one of the suggested workarrounds.
EJBs in our application are automatically generated, so I can't easily rename the jar files, but I could manage to customize our code generator to use the 'mappedName' attribute.
Unfortunately it still fails, but this time with another exception:
anonymous wrote :
| 12:33:25,959 ERROR [AbstractKernelController] Error installing to Real: name=vfs
| file:/E:/ifs_home_WS/jboss-5.1.0.Beta1/server/dev/deploy/ifsapp.ear/ state=PreRe
| al mode=Manual requiredState=Real
| org.jboss.deployers.spi.DeploymentException: Error deploying administrateuserpro
| files-ejb.jar: null
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:99)
| at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internal
| Deploy(AbstractVFSRealDeployer.java:45)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(
| AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(Deployer
| Wrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(Deployer
| sImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFi
| rst(DeployersImpl.java:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFi
| rst(DeployersImpl.java:1210)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(Deployers
| Impl.java:1098)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(Abstra
| ctControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractContr
| oller.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(Abstra
| ctController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
| actController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
| actController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractContro
| ller.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractContro
| ller.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(Deployers
| Impl.java:781)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeploye
| rImpl.java:698)
| at org.jboss.system.server.profileservice.repository.MainDeployerAdapter
| .process(MainDeployerAdapter.java:117)
| at org.jboss.system.server.profileservice.repository.ProfileDeployAction
| .install(ProfileDeployAction.java:59)
| at org.jboss.system.server.profileservice.repository.AbstractProfileActi
| on.install(AbstractProfileAction.java:53)
| at org.jboss.system.server.profileservice.repository.AbstractProfileServ
| ice.install(AbstractProfileService.java:355)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(Abstra
| ctControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractContr
| oller.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(Abstra
| ctController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
| actController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
| actController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractContro
| ller.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractContro
| ller.java:553)
| at org.jboss.system.server.profileservice.repository.AbstractProfileServ
| ice.activateProfile(AbstractProfileService.java:310)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(
| ProfileServiceBootstrap.java:241)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:
| 461)
| at org.jboss.Main.boot(Main.java:216)
| at org.jboss.Main$1.run(Main.java:546)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.NullPointerException
| at org.jboss.ejb3.session.ProxyDeployer.hasJNDIBinding(ProxyDeployer.jav
| a:98)
| at org.jboss.ejb3.session.SessionContainer.hasJNDIBinding(SessionContain
| er.java:696)
| at org.jboss.injection.AbstractHandler.addJNDIDependency(AbstractHandler
| .java:77)
| at org.jboss.injection.EJBRemoteHandler.ejbRefDependency(EJBRemoteHandle
| r.java:134)
| at org.jboss.injection.EJBRemoteHandler.handleFieldAnnotations(EJBRemote
| Handler.java:393)
| at org.jboss.injection.InjectionUtil.processFieldAnnotations(InjectionUt
| il.java:160)
| at org.jboss.injection.InjectionUtil.processAnnotations(InjectionUtil.ja
| va:197)
| at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:590)
| at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deploym
| ent.java:418)
| at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:526)
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:189)
| ... 34 more
|
I have tested the application in 4.3 and it works.
An example of how the EJB declaration looks like:
| @Stateless(name="UserProfileService")
| public class UserProfileServiceBean extends FndImplementationBean implements UserProfileServiceLocal { ...
|
And how we refer to the same EJB; the original code:
| @EJB private UserProfileServiceLocal userProfileService;
|
and now, after introducing the 'mappedName' attribute:
| @EJB(mappedName="ifsapp/UserProfileService/local") private UserProfileServiceLocal userProfileService;
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223992#4223992
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4223992
15 years, 9 months
[JBoss Cache: Core Edition] - Re: Request for Guide for creating new eviction policies
by jorgemoralespou_2
So far, for my requisites, I have to modify only one of JBoss Core classes, to make it possible to work. In some cases, it should be advisable to modify some other classes with instanceof statements, not required in my cases.
I have made a new interface, extending EvictionQueue, named SubcontextEvitionQueue with this code:
| public interface SubcontextEvictionQueue extends EvictionQueue {
| NodeEntry getFirstNodeEntry(Fqn fqn);
| void modifyElementCount(Fqn fqn, int difference);
| int getNumberOfNodes(Fqn fqn);
| int getNumberOfElements(Fqn fqn);
| }
|
And modified:
| public void NodeEntry.setNumberOfElements(int numberOfElements)
| {
| if (queue != null)
| {
| int difference = numberOfElements - this.numberOfElements;
| if (queue instanceof SubcontextEvictionQueue){
| queue.modifyElementCount(difference);
| }else{
| queue.modifyElementCount(fqn, difference);
| }
| }
| this.numberOfElements = numberOfElements;
| }
|
This make it possible to create an EvictionAlgorithm/EvictionQueue assigned to a region, that handles number of items in subnodes, without the need for creating a region infraestructure.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223982#4223982
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4223982
15 years, 9 months
[Installation, Configuration & DEPLOYMENT] - Jboss Upgradation
by rasa
Hi,
I am trying to upgrade my jboss version frm 3.2.x to 4.2.3 GA. Setup made and deployed ear file. But when i started the server using run.sh its giving following error.
1.
| [ServiceController] Problem starting service jboss:service=WebService
| java.lang.Exception: Port 8083 already in use.
| at org.jboss.web.WebServer.start(WebServer.java:233)
| at org.jboss.web.WebService.startService(WebService.java:322)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.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.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at org.jboss.system.ServiceController.start(ServiceController.java:435)
| 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)
|
2.
| [ServiceController] Problem starting service jboss:service=Naming
| java.rmi.server.ExportException: Port already in use: 1098; nested exception is:
| java.net.BindException: Address already in use
| at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:249)
| at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:184)
| at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:382)
| at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:116)
| at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:180)
| at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:293)
| at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:256)
| at org.jnp.server.Main.initJnpInvoker(Main.java:354)
| at org.jnp.server.Main.start(Main.java:316)
| at org.jboss.naming.NamingService.startService(NamingService.java:284)
|
3.
| [ServiceController] Problem starting service jboss:service=invoker,type=jrmp
| java.rmi.server.ExportException: Port already in use: 4444; nested exception is:
| java.net.BindException: Address already in use
| at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:249)
| at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:184)
| at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:382)
| at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:116)
| at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:180)
| at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:293)
| at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:256)
| at org.jboss.invocation.jrmp.server.JRMPInvoker.exportCI(JRMPInvoker.java:450)
| at org.jboss.invocation.jrmp.server.JRMPInvoker.startService(JRMPInvoker.java:372)
| at org.jboss.invocation.jrmp.server.JRMPInvoker$1.startService(JRMPInvoker.java:150)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at org.jboss.invocation.jrmp.server.JRMPInvoker.jbossInternalLifecycle(JRMPInvoker.java:644)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
|
In which xml file this port no are being configured. I think the 2nd is jboss-service.xml, but the issue is i have 2 more jboss of version 3.2.* in the server so that's giving error for 1098. If i will change in to some other hope that will work. But what about others ?
Please guide me to find out a solution.
Thanks and Regards
Rasa.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223966#4223966
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4223966
15 years, 9 months
[JBoss Tools (users)] - Re: Publish on Build
by rob.stryker@jboss.com
Hey Chris:
If you're using the WTP-type projects, I haven't investigated this specific case yet, and can add it to my to-do list.
If on the other hand you're using regular projects and the "Project Archives" feature, then yes. You can create your project, all your code, etc, open the Project Archives view, create your archives, and set it to automatically build the archives whenever a build is initiated, and then also automatically publish to a list of servers at the same time.
Once you do this set-up, you can turn auto-build off, make some changes, observe that the archives aren't rebuilt nor published, then do a ctrl+b, and observe that your bin folder changes, your archives change, and the deploy is also changed.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223964#4223964
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4223964
15 years, 9 months