Error Creating Managed Object For Class
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Java Enterprise GlassFish Server Error up vote 1 down vote favorite I have an enterprise java project. Everything was fine until I have this error Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class: class org.jboss.weld.servlet.WeldListener. Please see server.log for more details. I don't know what this means. I restart the server, the computer and this error still appear. java glassfish share|improve this question edited Mar 6 '14 at 11:56 peeskillet 79.3k1284158 asked Dec 15 '13 at 11:47 user2964680 613 Have you checked the server.log? –Elliott Frisch Dec 15 '13 at 11:50 yes. I try to put it here but i can't because it was to much code and less description –user2964680 Dec 15 '13 at 11:53 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote I had the same issue, Cause of Error UnDeploy war1.war Deploy war1.war Deployment failure due to the above error Workaround Stop domain Clean glassfish\domains\domain1\applications Start domain Deploy now. share|improve this answer answered Mar 6 '14 at 10:36 vels4j 8,20921430 add a comment| up vote 0 down vote Be sure you have your persistence xml loaded in your classpath. in Intellij just add it manually through project structure. share|improve this answer answered Oct 1 at 12:00 Tunde Pizzle 150112 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack http://stackoverflow.com/questions/20594136/java-enterprise-glassfish-server-error Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up InjectionException Error creating managed object up vote 0 down vote favorite Hello Stackoverflow Community, I made a jsf projekt. With maven. It works fine. http://stackoverflow.com/questions/30036056/injectionexception-error-creating-managed-object But I would like to split my projekt in two. The idea is: make a ejb (ejb) and a web(war) project. But riht now i don't need ejb (in later versions I will). An I have a class which parses a csv-file from the gl-server. public class CSVParser implements javax.servlet.ServletContextListener{ private Logger logger = Logger.getLogger(CSVParser.class); private final String file = "data.csv"; private static String glassfishInstanceRootPropertyName = "com.sun.aas.instanceRoot"; private static String glassfishFolderName = "csv"; private BufferedReader br; private String line = ""; private String cvsSplitBy = ","; private List
ExportXMLWordPrintable Details Type: Bug Status: Closed Priority: Major Resolution: Won't Fix Affects Version/s: 3.1 Fix Version/s: not determined Component/s: error creating embedded Labels: None Environment: Operating System: Windows XP Platform: PC Issuezilla Id: 14,635 Description Running Arquillian (examples, com.acme.cdi.InjectionTestCase) against GF Embedded 3.1-b28 and get error creating managed the WeldListener exception below. Running the com.acme.cdi.InjectionTestCase_test.war against standalone glassfish-3.1-b24 deploys fine. [#|2010-11-12T09:22:31.111+0100|INFO|glassfish3.1|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=15;_ThreadName=Thread-1;|[AutoDeploy] Successfully autodeployed : D:\Program Files\glassfish-3.1-b24\glassfish\domains\arquillian\autodeploy\com.acme.cdi.InjectionTestCase_test.war.|#] Exception from embedded deployment: WARNING: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class org.jboss.weld.servlet.WeldListener java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class org.jboss.weld.servlet.WeldListener at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:921) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697) at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1934) at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1611) at com.sun.enterprise.web.WebApplication.start(WebApplication.java:100) at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130) at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:242) at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:262) at c
not work correctly without it enabled. Please turn JavaScript back on and reload this page. All Places > Arquillian > Discussions Please enter a title. You can not post a blank message. Please type your message and try again. 2 Replies Latest reply on Nov 18, 2013 9:42 AM by metalhamster Replace a class inside the deployed war metalhamster Nov 15, 2013 8:57 AM Hey,In my project a have a EJB bean PersistenceServiceBean that is the link between my data layer and my business layer. Basically it loads some objects from the filesystem and stores them again on the filesystem.For the testing I'd like to mock this class such that it uses some special test data. Therefore I have created another class with the same name and the same package name. Both classes are the same, expect that the mocked one uses the test data.Then I have replaced the class file of the old PersistenceServiceBean with the mocked one, but when I deploy the .war file and invoke the function that loads the data, the old PersistenceServiceBean is invoked...And before I try any more I'd like to know if that what I try to achieve is really possible? Or are there maybe better ways to do it?Cheers,metalhamster I have the same question Show 0 Likes(0) 1040Views Tags: none (add) This content has been marked as final. Show 2 replies 1. Re: Replace a class inside the deployed war Karel Piwko Nov 15, 2013 9:47 AM (in response to metalhamster) Hey,this is pretty easy if you want to replace a resource. You just delete a path from the archive and add a new one, like here:https://github.com/aerogear/aerogear-unifiedpush-server-integration-tests/blob/java-migration/src/test/java/org/jboss/aerogear/unifiedpush/test/Deployments.java#L50-L53However, if you want to replace a class, you need to ensure that classloader picks the right class when your test archive is generated. You can achieve this by three different ways:1/ Not having original class on classpath - this means loading WAR from other Maven project - like using MavenImporter to build the jar from different pom.xml or maybe do some magic with test classpath in both surefire and IDE2/ Making sure that classes on classpath are ordered a right way for you3/ Use Arquililan Byteman Extension, deploy original class but modify its bytecodeI'm personally using 1/, as for the 2/, there is a call addClass(String fqcn, ClassLoader cl). So, if you write your own very simple classloader that will load class you need to override from the righ