Failed deploying EJB project that uses the library on Glassfish

< font size = 4 > Hi,
I have an application of multi project that I'm developing and I'm having issues test it. I've set up an EAR, WAR, EJB and two pots of library. The EJB contains classes that use components of the library of jars or implement classes abstract library jars. I added the jars of library for the EJB compilation libraries. Next, I added also the jars of library for the libraries of the EAR. However, when I will then deploy the EAR on the Glassfish server, I get this error, displayed in the Glassfish log: < / police > < br >

< font size = 2 > < font color = "red" > WARNING: error in the treatment of the annotation: java.lang.NoClassDefFoundError: com/foo/sdk/base/AbstractClass < / police > < br >
< font color = "red" > WARNING: error in the treatment of the annotation: java.lang.NoClassDefFoundError: com/foo/sdk/base/AbstractClass < / police > < br >
< font color = "red" > WARNING: error in the treatment of the annotation: java.lang.NoClassDefFoundError: com/foo/sdk/base/AbstractClass < / police > < br >
< font color = "red" > WARNING: error in the treatment of the annotation: java.lang.NoClassDefFoundError: com/foo/sdk/base/AbstractClas < / police > < br >
< font color = "red" > SEVERE: class [com/foo/sdk/base/InterfaceClass] not found. Error loading [class com.foo2.BeanFooClass] < / police > < br >
< font color = "red" > SEVERE: Exception when deploying the application [FooEAR] < / police > < br >
< font color = "red" > SEVERE: [BeanFoo.jar] is not a valid ejb jar: it contains zero ejb. < / police > < br >
Note:
1. a valid ejb jar requires at least one session, entity (1.x/2.x style) or message-driven bean.
2 EJB3 + beans entity (@Entity) are a POJO and please pack them as library jar.
3. If the jar file contains valid EJB which are annotated with EJB annotations level component (@Stateless, @Stateful, @MessageDriven, @Singleton), please check server.log to see if annotations have been processed correctly.
java.lang.IllegalArgumentException: invalid [BeanFoo.jar] ejb jar: it contains zero ejb.
Note:
1. a valid ejb jar requires at least one session, entity (1.x/2.x style) or message-driven bean.
2 EJB3 + beans entity (@Entity) are a POJO and please pack them as library jar.
3. If the jar file contains valid EJB which are annotated with EJB annotations level component (@Stateless, @Stateful, @MessageDriven, @Singleton), please check server.log to see if annotations have been processed correctly.
at com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:76)
at com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:128)
at com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:730)
at com.sun.enterprise.deployment.Application.visit(Application.java:1768)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:799)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:277)
at com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:240)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:170)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:93)
at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:826)
at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:768)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370)
to com.sun.enterprise.v3.admin.CommandRunnerImpl$ 1.execute(CommandRunnerImpl.java:355)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1067)
to com.sun.enterprise.v3.admin.CommandRunnerImpl.access$ 1200 (CommandRunnerImpl.java:96)
to com.sun.enterprise.v3.admin.CommandRunnerImpl$ ExecutionContext.execute (CommandRunnerImpl.java:1247)
to com.sun.enterprise.v3.admin.CommandRunnerImpl$ ExecutionContext.execute (CommandRunnerImpl.java:1235)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:465)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:222)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
to com.sun.grizzly.util.AbstractThreadPool$ Worker.doWork (AbstractThreadPool.java:532)
to com.sun.grizzly.util.AbstractThreadPool$ Worker.run (AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:679)

< font color = "red" > SEVERE: Exception when deploying the application [FooEAR]: [FooBean.jar] is not a valid ejb jar: it contains zero ejb. < / police > < br >
Note:
1. a valid ejb jar requires at least one session, entity (1.x/2.x style) or message-driven bean.
2 EJB3 + beans entity (@Entity) are a POJO and please pack them as library jar.
3. If the jar file contains valid EJB which are annotated with EJB annotations level component (@Stateless, @Stateful, @MessageDriven, @Singleton), check server.log for see if annotations have been processed correctly. < / police > < br >

< font size = 4 > I use these technologies:
The IDE NetBeans 7.0 for Java EE
GlassFish 3.1

I read that libraries putting into this directory: < glassfish_home > / domains/Domain1/lib can solve the problem, however there must be a better way.

Any help would be greatly appreciated! < / make >

Published by: 866180 on June 15, 2011 14:32

First, use a normal font when you post a question. That's all just awful to read.

You have several failures here. Have you actually read and try to understand the error?

java.lang.NoClassDefFoundError: com/foo/sdk/base/AbstractClass

Java will not lie, this class is not on the classpath of the application. The jar is missing, the class is missing from the pot or you put the jar in the wrong place. Open the ear with your favorite zip tool and discover its structure. What is the path to the jar inside?

Also, open the file META-INF / "MANIFEST. MF' inside the EJB jar. Is there a class in that line? It should not be!

A valid ejb jar requires at least one session, entity (1.x/2.x style) or message-driven bean.

Apparently your EJB jar does not contain a single EJB or MDB class. You forgot a few annotations maybe?

Seems to me that your application compiles, but other than that it is much broken.

Tags: Java

Similar Questions

  • How can I close the Client Services for Netware that is me project to use the fast user switching without losing my internet connection

    For NetWeare customer service

    How can I close the Client Services for Netware that is me project to use the fast user switching without losing my internet connection

    Hello

    Your Windows XP question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in Forum.You IT Pro can follow the link for your question:

    http://social.technet.Microsoft.com/forums/en/category/w7itpro

  • Conversion of a project to use a library project

    Hello.

    I'm trying to convert a large main VI with a lot of sub - VI to a project that would use rather a project library. In particular, I want to pack all or nearly all my SubVIs in a library project (so that I can later reuse these subVIs to various projects) and the main VI would use this library. I hope I have the idea of libraries in the project correctly.

    Now, I thought I'll Pack all my subVIs in a library project and save it as ProjectLib, so I'll create a new project with my main VI and add ProjectLib to this project.

    Here is my ProjectLib with virtual for subVIs folders and Utils (Utils are just more generic subVIs)

    and here is my main project VI, with the library of projects above added:

    Now, I'm sure I'm doing this wrong, but I can't know what would be the right way to go about this, despite reading and re-reading helps LabView to articles on the issue (like this: http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/project_libraries/). Nowhere can I find a guide step by step conversion my VI existing with a lot of subVIs to this structure.

    For example, when I opened my main VI now, I see errors caused by all the missing of subVIs. My thought is that I now say my main VI: ' look, this is a ProjectLib I have included, see? Take this Subvi from there! "but I don't see an option for this.

    I would be grateful any ellucidation on how do properly what I'm trying to do. I apologize in advance for any stubbornness on my part.

    Thanks in advance.

    Hello SenSLabs,

    It seems that you are attempting to add a project (lvproj) to another project, rather than building a library (lvlib or lvlibp) and adding that the new project.  The easiest way to build a standard .lvlib is described here:

    LabVIEW Help: Creating a library to a project folder project

    http://zone.NI.com/reference/en-XX/help/371361J-01/lvhowto/convert_fold_lib/

    Once you have built the lvlib (from the old project), add this library in your project (new) and you should be good to go.

    Kind regards

  • How to get deployed CA Project details about the deployment event?

    Hello

    I need to get the Details of the project deployed certification authority (I just need the name of the project), based on the events of deployment (which has the deployment id). I tried to get the details of the epub_deployment and epub_deploy_proj, but the data are not persistent here once the deployment is complete.

    Please let me know if you have any ideas how I can do this.

    I do this to determine the name of the project that caused the indexing run in integration of the atg-short. With this proj. name, I want to do some other actions.

    Any help/pointers will be greatly useful.

    Thanks in advance,

    Arjun

    Assuming you are trying to get the details of the project in your custom Java code, here's my thought. Not tried it myself, but I guess it can help to get what you are looking for. Let's say you have the available as a objDeploymentEvent DeploymentEvent object so you can proceed as

    
    String[] projectIds = objDeploymentEvent.getDeploymentProjectIDs();  //get the project IDs being deployed
    
    ProcessHome processHome = ProjectConstants.getPersistentHomes().getProcessHome();
    
    //first get the involved Process object for a particular project-id then get the corresponding Project object
    Process process = Process.findProcessByProjectId(projectId);
    Project project = process.getProject();
    

    For details of the method and the properties of the object you can view the API documentation classes mentioned, all are atg.epub.project of the package with the exception of DeploymentEvent. It will be useful.

  • When I use the library function node call in real time, is loaded only once for all or load the DLL whenever it is called?

    When I use the library function node call in real time, is loaded only once for all or load the DLL every time when it is called?

    I have a critical application in real time, in which I use a piece of DLL function developed in C++.  It is ok?  Make sure any senior developer?

    Thank you in advance.

    The user interface thread is the thread that is used to update the user interface. It's slow. And it's supposed to be that way because humans are slow.

    The call library function node can be configured as this thread to use in the configuration for it dialog box. Please visit the LabVIEW documentation on how to do this.

  • My Webcam has problems detected by Skype and repeat myself there is another program that uses the webcam. Skype device code 43 usb video.

    My Webcam has problems detected by Skype and repeat myself there is another program that uses the webcam.

    Also got the guests when using Skype as a video device usb was not detected and that it is a code 43.

    Have tried several way sto resolve this problem. CyberLink YouCam HP's running came preloaded on the laptop. The webcam is running when this program is being used separately.

    Inappropriate Feedback Forum of Windows hardware and drivers Forum.

    My Webcam has problems detected by Skype and repeat myself there is another program that uses the webcam.

    Also got the guests when using Skype as a video device usb was not detected and that it is a code 43.

    Have tried several way sto resolve this problem. CyberLink YouCam HP's running came preloaded on the laptop. The webcam is running when this program is being used separately.

    Inappropriate Feedback Forum of Windows hardware and drivers Forum.

    Hello, Aadi467,

    A device driver has notified the operating system that the device failed.

    Run the diagnostic tool of hardware devices do not work or are not detected in Windows on the Microsoft Fix it Center.

    You can also uninstall the software from Cyberlink.  There is a found here download link to reinstall the software after restarting the computer.

    http://h30434.www3.HP.com/T5/notebook-operating-systems-and/lost-my-CyberLink-and-UCAM/TD-p/760367

  • Setting the properties of elements of façade in XControl to a VI that uses the XControl

    Hi all

    I'm new to XControls and I try to use them to make a generic digital indicator that fit into a matrix of waveforms of a similar measure and allow the user to display the first value of a waveform, it chooses by selecting the name of the desired channel in the waveform table. I have the XControl work, with a ring filled automatically with the NI_ChannelName of the input waveform array fields and the value of the ring being used to index the waveform table to select the appropriate data.

    What I want to do next is automatically set the value of control of ring in the XControl to the value that the user has selected the last time he ran the VI that uses the indicator. However, the properties of the control ring do not seem to be accessible from the VI that uses the XControl, and none of the XControl General properties seem to be accessible from the front VI in the XControl. The value of the ring is not part of the entrance of DataIn cable waveform table, so I don't have a good method to pass data to the control of the ring outside of what is in this table of waveform. I might add the value in the waveform table, if this helps, but indicators XControl do not transmit their return DataOut appellant VI to allow me to record the user selected value.

    Is there a good way to read and write the properties of façade elements in an XControl of VI that uses the XControl?

    I apologize for not posting my code; the computer with LabVIEW license is having network problems at the present time. I'll post the code when I can.

    Thank you!

    Erik

    In your State cluster typedef container, include a reference to a control of the ring.

    In your vi of façade, in the case of change of Direction, create a reference to your ring and connect to a plan by which he sends out the view state.  Also be sure to write true to the status changed in the result of the Action.

    In your xctl, select New-> property.  Name it after the property in the ring that you want to access.  Use the view clustered State (in your new property VI) to access the reference to the ring; son of a property node.  Change the control value in the appropriate type & connect to the property you want.

    Be sure to connect the path error through everything that might cause an error.

    When you drop an instance of the xctl and create a property from this node, your new property will be available.

  • are there any current HP printers that use the HP 02 print cartridges? Old printer C6180 goes wrong.

    are there any current HP printers that use the HP 02 print cartridges? Old Photosmart C6180 printer goes wrong and have a lot of cartridges.

    The Site of HP Pageyield lists the following printers compatible with 02 cartridges:

    I do not believe there are all the models currently available that use cartridge 02.

    I heard that HP has (had?) a trade-in program for its intact packaging expired cartridges.  See this post for a suggestion.

  • How to use the library of Extension VPN

    Hello!

    I'll expand VPN enforcement using the library of Extension VPN. I already tried some time ago, but had no direct mechanism to develop and libvpn_ext library is not available on a simulator.

    I will use the library to open the VPN connection with a solution programmatically open source vpn, OpenVPN probably at the beginning.

    So question is, can I develop some app using this library for this application and then publish app on AppWorld?

    Thank you.

    I looked into the available VPN API, and they are not sufficient to set up your own VPN client.  So it is not possible to do what you describe.  I am not sure why we have listed what we do on our developer site.  They do not seem to offer enough to do something useful and probably just would induce in error the developers, as has happened here.  They may eventually be removed.  If I find more is coming I'll respond here, but it doesn't seem anything is imminent.

  • Routing between sites that use the site to site VPN

    I'm running 7.2 (1) two 515 who have a VPN site-to-site set up a bit as follows:

    subnets of the main site - router main site - PIX1___Public IP's___PIX2 - remote site

    The main site router: CAT6506 with engine SUP1A

    Subnets listed in motor SUP:

    SUB1 VLAN

    IP address 180.x.1.x.255.254.0

    VLAN SUB2

    IP address 180.x.2.x.255.254.0

    VLAN SUB3

    IP address 180.x.3.x.255.254.0

    VLAN SUB4

    IP address 180.x.4.x.255.255.240

    PIX1 is the subnet SUB4 (180.20.4.2)

    Remote site subnet: 192.168.1.0/24

    Route the engine by default Overtime toward another router that reached the internet via another public IP subnet.

    Any host on SUB4 can reach any host on the remote site as long as the SUB4 host default gateway is the inside int PIX1 (180.20.4.2).

    No matter what SUB4 host that uses the 180.20.4.1 address (router) default gateway cannot communicate with a remote host, but can communicate with any host from any subnet of the main site.

    All remote hosts can communicate with any host on SUB4, regardless of the gateway of the SUB4 host address.

    All remote hosts can communicate with the router on SUB4 main site, but can not reach one of the other interfaces subnet configured on the router.

    I've added a static route on the SUP engine:

    router IP 192.168.1.0 255.255.255.0 180.20.4.2

    That did not help.

    The uses of motor SUP EIGRP to learn other subnets main site reached through routers, so I added the remote subnet to that:

    Router eigrp 10

    redistribute static

    network 180.20.0.0

    network 192.168.1.0

    No Auto-resume

    No log-neighbor-changes to eigrp

    No chance, no more.

    I can't help thinking that I'm missing something very basic.

    Any help is really appreciated

    Hello

    PLS, find the changes that must be made and checked.

    PIX remotely:

    1. you only need a default route and that you can route your subnets via inside as they are outside, so remove these statements

    2.i see Access-group configured to be applied to the external interface for traffic coming from the outside, make sure that all required subnets are allowed.

    3. in the access list for the corresponding traffic to cryptomap, I see that one included subnet, pls have all included traffic that must be encrypted (as sub1, sub2..)

    Main PIX:

    1. in the access list for the corresponding traffic to cryptomap, I see that one included subnet, pls have all included traffic that must be encrypted (as sub1, sub2..)

    2. is there an 'access-group outside_access_in' access list present in the pix the corresponding traffic - check - the pls

    3. by nat (inside) 0 access-list inside_nat0_outbound, include all your inside subnets that must have access to the remote subnet

    L3 switch:

    1.I see a default route pointing to your router 3640, so pls add a static route to your remote subnet pointing to Pix

    IP route 192.168.1.0 255.255.255.0 x.x.22.2

    2. pls check in your L3 switch, wheter the appropriate subnets sub1, sub2 are learned properly via the conifugred Eigrp VLAN respective

    for example .sub2 and sub3 learning with leap following 8.2, sub 5 via 30.3

    Pls try to understand the topology and make configuration changes and let us know the results

    concerning

    k VB

  • Issue of multiple Disqualification tasks that use the same snapshot

    Details of the environment

    ======================

    Disqualification Version: 12.1.3.0.0


    A snapshot has been created in which the WHERE clause is outsourced and this snapshot table is used in a data quality process.

    Since there are different values passed to the WHERE clause, different jobs who have their own data quality process, but these process reads from the same snapshot table.

    Disqualification does not allow execution of different tasks that uses the same shot to run at the same time.

    Job1 is in operation, job2 throws an exception that the snapshot is locked.

    Any reason why Disqualification has this restriction? Processes are just doing a read on the snapshot table operation, so I was wondering why it was necessary to lock the object.

    We have more than 60 jobs that use the same snapshot and it would inhibit scalability if we are forced to run 60 jobs in sequence and not allow them to run in parallel.

    Can you advice how to fix this problem?

    The short answer is that each task must be executed with his own label of execution. Otherwise, each work is actually being run in the same context, and you will have problems of blocking.

    Please read on the labels of the execution and run profiles in the online help.

    Note that when running with a label of execution, complete results are not written; you need to decide exactly what to write work featuring the views of results you need. All data staged (including the snapshot itself) will be written with a label execution context and you can view the results in the Console of the server. Director will only show the results of the last run.

  • I've created a form that uses the value field text to fill the text of another field.  Does not take into account changes

    I've created a form that uses the value field text to fill the text of another field.  However, if I need to change the text, the second field does not update this change.  Instead of reset the form each time, is the Javascript code to update the fields if they have been modified?

    For example I Text1 and Text2.

    When I type in Hello in Text1 I see Hello in Text2.

    Later, if I decide to change to Goodbye Text1, Text2 remains Hello.

    The shape of the hoe can recognize this change?

    Thank you

    Edit: I think I have misunderstood the situation.

    If you want to both fields have the same value, just to give them the same name.

  • I'm trying to follow the video to "Change color" and I don't have a lot of options that uses the presenter.  I'm on a PC.  Can someone walk me by changing the color of an object step by step?

    I'm trying to follow the video to "Change color" and I don't have a lot of options that uses the presenter.  I'm on a PC.  Can someone walk me by changing the color of an object step by step?

    Sorry for the delay. Here is the video

  • Can I use the library of creative cloud with Illustrator CS5

    Can I use the library of creative cloud with Illustrator CS5

    Hi Ilys Ravel,

    No, CC libraries function is available in version CC 20141 sur-quartiers.

    Sanjay...

  • Applications that use the non-public API will be rejected

    Hi guys

    Just read the iOS guidelines before getting too deep into the manufacturing of the native version of a web application.

    I was wondering what:

    Applications that use the non-public API will be rejected

    We hear when to submit an application in AIR - does that mean that you can not use your own custom classes?

    See you soon

    If you mean custom AS3 classes, Yes, you can use those. What you can't do, is create a DONKEY who calls in the frames of the iOS itself.

Maybe you are looking for