java.lang.NoClassDefFoundError: ServerLifeCycle (wrong name: config/ServerLifeCycle) Please check to see if you enter the classname and classpath with the expected values... - Hong On 5/22/2011 1:24 PM, forums@java.net wrote: > hi all :) > > i need to creat a lifecycle module this is the code of the class > > package config; import com.sun.appserv.server.ServerLifecycleException; > import com.sun.appserv.server.LifecycleEvent; import > com.sun.appserv.server.LifecycleListener; public class ServerLifeCycle > implements LifecycleListener { @Override public void > handleEvent(LifecycleEvent event) throws ServerLifecycleException { if > (LifecycleEvent.INIT_EVENT == event.getEventType()) { > System.out.println("-----------------LifecycleListener: INIT_EVENT"); > return; > } if (LifecycleEvent.STARTUP_EVENT == event.getEventType()) { > System.out.println("-------------------LifecycleListener: START_EVENT"); > return; } if (LifecycleEvent.READY_EVENT == event.getEventType()) { > System.out.println("------------------LifecycleListener: READY_EVENT"); > return; } if (LifecycleEvent.SHUTDOWN_EVENT == event.getEventType()) { > System.out.println("---------------------LifecycleListener: > SHUTDOWN_EVENT"); > return; } if (LifecycleEvent.TERMINATION_EVENT == event.getEventType()) { > System.out.println("--------------LifecycleListener: TERMINATION_EVENT"); > return; } } > > > i tried to creat the lifecycle module from the visual interface of > glassfish > but ever time glassfish wouldn't start up and give me this exception > > ATTENTION: Exception while starting bundle > com.sun.enterprise.osgi-adapter > [14] org.osgi.framework.BundleException: Activator start error in bundle > com.sun.enterprise.osgi-adapter [14]. at > org.apache.felix.framework.Felix.activateBundle(Felix.java:1751) at > org.apache.felix.framework.Felix.startBundle(Felix.java:1622) at > org.apache.felix.framework.BundleImpl.start(BundleImpl.java:915) at > org.jvnet.hk2.osgimain.Main.start(Main.java:140) at > org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:640) > >

Oracle Community | fithwith | 6 years ago
  1. 0

    configure life cycle module

    Oracle Community | 6 years ago | fithwith
    java.lang.NoClassDefFoundError: ServerLifeCycle (wrong name: config/ServerLifeCycle) Please check to see if you enter the classname and classpath with the expected values... - Hong On 5/22/2011 1:24 PM, forums@java.net wrote: > hi all :) > > i need to creat a lifecycle module this is the code of the class > > package config; import com.sun.appserv.server.ServerLifecycleException; > import com.sun.appserv.server.LifecycleEvent; import > com.sun.appserv.server.LifecycleListener; public class ServerLifeCycle > implements LifecycleListener { @Override public void > handleEvent(LifecycleEvent event) throws ServerLifecycleException { if > (LifecycleEvent.INIT_EVENT == event.getEventType()) { > System.out.println("-----------------LifecycleListener: INIT_EVENT"); > return; > } if (LifecycleEvent.STARTUP_EVENT == event.getEventType()) { > System.out.println("-------------------LifecycleListener: START_EVENT"); > return; } if (LifecycleEvent.READY_EVENT == event.getEventType()) { > System.out.println("------------------LifecycleListener: READY_EVENT"); > return; } if (LifecycleEvent.SHUTDOWN_EVENT == event.getEventType()) { > System.out.println("---------------------LifecycleListener: > SHUTDOWN_EVENT"); > return; } if (LifecycleEvent.TERMINATION_EVENT == event.getEventType()) { > System.out.println("--------------LifecycleListener: TERMINATION_EVENT"); > return; } } > > > i tried to creat the lifecycle module from the visual interface of > glassfish > but ever time glassfish wouldn't start up and give me this exception > > ATTENTION: Exception while starting bundle > com.sun.enterprise.osgi-adapter > [14] org.osgi.framework.BundleException: Activator start error in bundle > com.sun.enterprise.osgi-adapter [14]. at > org.apache.felix.framework.Felix.activateBundle(Felix.java:1751) at > org.apache.felix.framework.Felix.startBundle(Felix.java:1622) at > org.apache.felix.framework.BundleImpl.start(BundleImpl.java:915) at > org.jvnet.hk2.osgimain.Main.start(Main.java:140) at > org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:640) > >
  2. 0

    Karaf - User - Error while deploying bundle using XML parser

    nabble.com | 11 months ago
    java.lang.NoClassDefFoundError: org/xml/sax/SAXException >      at com.viithiisys.web.extender.Activator.start(Activator.java:23)
  3. 0

    Problems with Guice in Eclipse: Class Loading Exceptions

    Google Groups | 8 years ago | Anne Martens
    java.lang.NoClassDefFoundError: com/google/ >> inject/internal/collect/Lists >> at com.google.inject.multibindings.Multibinder >> $RealMultibinder.initialize(Multibinder.java:254) >> at org.opt4j.start.Opt4JModule.multi(Opt4JModule.java:128) >> >> This was after I fixed a bug in my own code, which might be a reason >> why you did not see it. I uploaded a fixed version of my code to the >> url named above (http://sdqweb.ipd.uka.de/temp/org.opt4j-wrapper- >> plugin.zip<http://sdqweb.ipd.uka.de/temp/org.opt4j-wrapper-%0Aplugin.zip> >> ). >> >> Is it possible that the guice-multibindings-....jar also needs a >> patch? Or is it a problem that multibindings resides in its own jar? >> For the latter, it might be an option to join the two into one jar. >> > > Note this is actually a different issue unrelated to the previous problem, > the issue here is that the multibindings extension uses classes from the > internal Guice package which (rightly) isn't exported > > See http://code.google.com/p/google-guice/issues/detail?id=311 > > If you've got them inside the same Bundle-ClassPath (as you had before) > then it shouldn't matter because the internal package is only hidden from > other bundles / plug-in ... jars on the same Bundle-ClassPath will merge > together just like in a classic Java application > > however, if you're using them as separate bundles then you'd need to > patch the multibindings jar to attach as a fragment to the Guice bundle > as suggested in Issue 311 > > I'll take a look at your updated code to see what's changed... > Aha, found the problem - it's because the packaging of Google-Collection classes inside Guice changed post-20090205... so when you use the old multibindings jar with the new Guice jar there's a package mismatch. In the 20090205 snapshot it was "com.google.inject.internal.common.Lists", now it is "com.google.inject.internal.Lists" - if you build Guice multibindings from trunk (or use the jar I'm going to send you) then everything should work > Kind regards, >> Anne >> >> >> On 3 Mrz., 18:51, Anne Martens <annema...@googlemail.com> wrote: >> > Dear Stuart, >> > >> > thanks a lot for your fast reply! Yes, I'm absolutely ok with using a >> > patched version, I'm glad that there is a readily available solution. >> > >> > I will try it and then let you know. >> > >> > Kind regards >> > from a very happy Anne >> > >> > On 3 Mrz., 17:34, Stuart McCulloch <mcc...@gmail.com> wrote: >> > >> > > 2009/3/3 Anne Martens <annema...@googlemail.com> >> > >> > > > Dear Stuart, >> > >> > > > I have uploaded to code to >> > > >http://sdqweb.ipd.uka.de/temp/org.opt4j-wrapper-plugin.zip. >> > > > You also find a .project file for Eclipse there. Currently, the >> plugin >> > > > needs org.eclipse.core.runtime for the plugin activator >> > > > Opt4JPluginActivator, but you can delete the class and the >> dependency >> > > > if you do not use Eclipse. To get the error, please call >> > > > de.uka.ipd.sdq.dsexplore.opt4j.start.Opt4JStarter.startOpt4J() >> > >> > > Hi Anne, >> > >> > > I tracked the exception down to a binding for a system type >> > > (java.util.Random) >> > > in the OPT4J codebase that requires a constructor proxy - Guice checks >> with >> > > the BytecodeGen utility class to decide whether it needs a bridge >> > > classloader >> > > and it decides it doesn't for a system type, as mentioned in the Guice >> wiki: >> > >> > > http://code.google.com/p/google-guice/wiki/ClassLoading >> > >> > > Unfortunately, the classloader then returned by BytecodeGen is not the >> Guice >> > > classloader but the system classloader. Of course this does not have >> access >> > > to the internal Guice AOP classes, and the injector blows up :( >> > >> > > I tried changing the OPT4J code to avoid the constructor proxy, but I >> > > couldn't >> > > get round it without making major changes to the code, so you'll need >> to use >> > > a patched version of Guice (at least until this is fixed in trunk) >> > >> > > A quick fix would be to remove the following check from >> BytecodeGen.java: >> > >> > > if (delegate == getSystemClassLoaderOrNull()) { >> > > return delegate; >> > > } >> > >> > > Which would then enable bridging for system types - another option >> would be >> > > to return the Guice class loader at this point instead of the system >> > > classloader: >> > >> > > if (delegate == getSystemClassLoaderOrNull()) { >> > > return GUICE_CLASS_LOADER; >> > > } >> > >> > > Either of these would solve your problem, but they are not complete >> because >> > > the Guice classloader won't have access to types in the system >> classloader >> > > that don't reside in the "java" namespace (such as javax.* / >> org.omg.*) >> > > unless >> > > of course you enabled OSGi bootdelegation for these packages... >> > >> > > I've coded up a solution that doesn't suffer from this and raised a >> Guice >> > > issue: >> > >> > > http://code.google.com/p/google-guice/issues/detail?id=343 >> > >> > > You can download a patched version of Guice here: >> > >> > >http://code.google.com/p/peaberry/source/browse/trunk/lib/build/guice. >> .. >> > >> > > which avoids the AOP exception. >> > >> > > Not sure if this patch will make it into Guice 2 because it is in a >> critical >> > > piece >> > > of code, and I don't want to put any undue pressure on Jesse who's >> already >> > > done a lot of testing with the current code. >> > >> > > Are you ok using the patched build until this is fixed in an official >> > > release? >> > >> > > For configuration details, I also uploaded >> > >> > > >http://sdqweb.ipd.uka.de/temp/eclipse-config.txt, >> > > > which is a copy of the configuration details Eclipse provides >> > > > in Help -> About Eclipse Platform. I currently use version: >> 3.4.1build >> > > > id: M20080911-1700. >> > >> > > > Thanks a lot! If you need more information, please let me know. >> > >> > > > Kind regards, >> > > > Anne >> > >> > > > On 2 Mrz., 15:22, Stuart McCulloch <mcc...@gmail.com> wrote: >> > > > > 2009/3/2 Anne Martens <annema...@googlemail.com> >> > Dear Stuart, >> > thanks a lot for your help. >> > Indeed, I only need Guice within a single plugin/bundle. That's >> why I now put the three guice jars (guice-snapshot, >> guice-multibindings- snapshot and aopalliance) back into the "referenced libraries" >> of my opt4j wrapper plugin. I also tried to move the code starting >> Opt4J to a new plugin activator class, that is activated when OSGi loads >> the bundle. >> > Still, I get the same error (with a different stacktrace, of >> course): >> > com.google.inject.internal.ComputationException: com.google.inject.internal.ComputationException: com.google.inject.internal.ComputationException: com.google.inject.internal.ComputationException: com.google.inject.internal.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null at >> com.google.inject.internal.MapMaker$StrategyImpl.compute (MapMaker.java:538) at >> com.google.inject.internal.MapMaker$StrategyImpl.compute (MapMaker.java:404) at com.google.inject.internal.CustomConcurrentHashMap $ComputingImpl.get(CustomConcurrentHashMap.java:2031) at >> > > > com.google.inject.internal.FailableCache.get(FailableCache.java: 46) at >> com.google.inject.InjectorImpl$LateBoundConstructor.bind (InjectorImpl.java:457) at com.google.inject.ClassBindingImpl.initialize (ClassBindingImpl.java:52) at >> com.google.inject.InjectorImpl.initializeBinding(InjectorImpl.java: 347) at com.google.inject.InjectorImpl.createJustInTimeBinding (InjectorImpl.java:639) at >> > > > com.google.inject.InjectorImpl.createJustInTimeBindingRecursive (InjectorImpl.java:584) at com.google.inject.InjectorImpl.getJustInTimeBinding (InjectorImpl.java:179) at >> com.google.inject.InjectorImpl.getBindingOrThrow(InjectorImpl.java: 139) at com.google.inject.InjectorImpl.getInternalFactory (InjectorImpl.java:645) at >> com.google.inject.FactoryProxy.notify(FactoryProxy.java:48) at >> com.google.inject.BindingProcessor.runCreationListeners (BindingProcessor.java:215) at com.google.inject.InjectorBuilder.initializeStatically (InjectorBuilder.java:131) at >> > > > com.google.inject.InjectorBuilder.build(InjectorBuilder.java:105)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

    mahout-user | 6 years ago | ahmed.nagy
    java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory when i try to run the program from eclipse. Is there something I am missing any comments will be appreciated thanks in advance My code am not showing the packages imported public class TestModules { private static int printDistributedMatrix(DistributedRowMatrix matrix) { Iterator<MatrixSlice> iterator = matrix.iterateAll(); int count = 0; while(iterator.hasNext()) { MatrixSlice slice = iterator.next(); Vector v = slice.vector(); int size = v.size(); for(int i=0;i<size;i++) { Element e = v.getElement(i); count++; System.out.print(e.get()+" "); } System.out.println(); } return count; } public static void Distributed_Matrix_Operations() { Path Input_Test_Matrix_File=new Path("/input/Input_Test_Matrix_V");// we need to write the path for that make sure that the file exists Path Output_Test_Matrix_File=new Path("input/Out_Test_Matrix_V"); DistributedRowMatrix Matrix_v= new DistributedRowMatrix(Input_Test_Matrix_File,Output_Test_Matrix_File, 5, 5); Matrix_v.configure(new JobConf()); System.out.println("original matrix = "); printDistributedMatrix(Matrix_v); // matrix printing class DistributedRowMatrix Matrix_v_Transpose; DistributedRowMatrix Matrix_V_Squared; try { Matrix_v_Transpose = Matrix_v.transpose(); System.out.println("The matrix after transpose "); printDistributedMatrix(Matrix_v_Transpose); Matrix_V_Squared= Matrix_v.times(Matrix_v_Transpose); } catch (IOException e) { // TODO Auto-generated catch block System.out.println("Exception occured on carrying out the transpse"+e.toString()); //e.printStackTrace(); } } public static final String Matrix_V="input/Matrix_V"; public static final double[][] matrixvalues = { {10,4,8,0,5}, {2,3,4,-5,8}, {1,7,4,0,9}, {1,-6,5,8,9}, {1,6,3,1,0} }; public static void WriteDistributedMatrix() throws Exception { Configuration cfg = new Configuration(); FileSystem fs = FileSystem.get(cfg); SequenceFile.Writer writer = SequenceFile.createWriter(fs, cfg, new Path(Matrix_V),IntWritable.class, VectorWritable.class) ; for(int i=0;i<matrixvalues.length;i++) { DenseVector row = new DenseVector(matrixvalues[i]); VectorWritable writtenvector = new VectorWritable(row); writer.append(new IntWritable(i), writtenvector); } writer.close(); } /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub try { System.out.println("This is inside main before calling write distributed matrix"); WriteDistributedMatrix(); Distributed_Matrix_Operations(); } catch(Exception e) { System.out.println("This is the exception caught"+e.toString()); } } } The error is Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
  6. 0

    Problems with Guice in Eclipse: Class Loading Exceptions

    Google Groups | 8 years ago | Anne Martens
    java.lang.NoClassDefFoundError: com/google/ > >> inject/internal/collect/Lists > >>  at com.google.inject.multibindings.Multibinder > >> $RealMultibinder.initialize(Multibinder.java:254) > >>  at org.opt4j.start.Opt4JModule.multi(Opt4JModule.java:128) > > >> This was after I fixed a bug in my own code, which might be a reason > >> why you did not see it. I uploaded a fixed version of my code to the > >> url named above (http://sdqweb.ipd.uka.de/temp/org.opt4j-wrapper- > >> plugin.zip<http://sdqweb.ipd.uka.de/temp/org.opt4j-wrapper-%0Aplugin.zip> > >> ). > > >> Is it possible that the guice-multibindings-....jar also needs a > >> patch? Or is it a problem that multibindings resides in its own jar? > >> For the latter, it might be an option to join the two into one jar. > > > Note this is actually a different issue unrelated to the previous problem, > > the issue here is that the multibindings extension uses classes from the > > internal Guice package which (rightly) isn't exported > > > Seehttp://code.google.com/p/google-guice/issues/detail?id=311 > > > If you've got them inside the same Bundle-ClassPath (as you had before) > > then it shouldn't matter because the internal package is only hidden from > > other bundles / plug-in ... jars on the same Bundle-ClassPath will merge > > together just like in a classic Java application > > > however, if you're using them as separate bundles then you'd need to > > patch the multibindings jar to attach as a fragment to the Guice bundle > > as suggested in Issue 311 > > > I'll take a look at your updated code to see what's changed... > > Aha, found the problem - it's because the packaging of Google-Collection > classes inside Guice changed post-20090205... so when you use the old > multibindings jar with the new Guice jar there's a package mismatch. > > In the 20090205 snapshot it was "com.google.inject.internal.common.Lists", > now it is "com.google.inject.internal.Lists" - if you build Guice > multibindings > from trunk (or use the jar I'm going to send you) then everything should > work > > > Kind regards, > >> Anne > > >> On 3 Mrz., 18:51, Anne Martens <annema...@googlemail.com> wrote: > >> > Dear Stuart, > > >> > thanks a lot for your fast reply! Yes, I'm absolutely ok with using a > >> > patched version, I'm glad that there is a readily available solution. > > >> > I will try it and then let you know. > > >> > Kind regards > >> > from a very happy Anne > > >> > On 3 Mrz., 17:34, Stuart McCulloch <mcc...@gmail.com> wrote: > > >> > > 2009/3/3 Anne Martens <annema...@googlemail.com> > > >> > > > Dear Stuart, > > >> > > > I have uploaded to code to > >> > > >http://sdqweb.ipd.uka.de/temp/org.opt4j-wrapper-plugin.zip. > >> > > > You also find a .project file for Eclipse there. Currently, the > >> plugin > >> > > > needs org.eclipse.core.runtime for the plugin activator > >> > > > Opt4JPluginActivator, but you can delete the class and the > >> dependency > >> > > > if you do not use Eclipse. To get the error, please call > >> > > > de.uka.ipd.sdq.dsexplore.opt4j.start.Opt4JStarter.startOpt4J() > > >> > > Hi Anne, > > >> > > I tracked the exception down to a binding for a system type > >> > > (java.util.Random) > >> > > in the OPT4J codebase that requires a constructor proxy - Guice checks > >> with > >> > > the BytecodeGen utility class to decide whether it needs a bridge > >> > > classloader > >> > > and it decides it doesn't for a system type, as mentioned in the Guice > >> wiki: > > >> > >    http://code.google.com/p/google-guice/wiki/ClassLoading > > >> > > Unfortunately, the classloader then returned by BytecodeGen is not the > >> Guice > >> > > classloader but the system classloader. Of course this does not have > >> access > >> > > to the internal Guice AOP classes, and the injector blows up :( > > >> > > I tried changing the OPT4J code to avoid the constructor proxy, but I > >> > > couldn't > >> > > get round it without making major changes to the code, so you'll need > >> to use > >> > > a patched version of Guice (at least until this is fixed in trunk) > > >> > > A quick fix would be to remove the following check from > >> BytecodeGen.java: > > >> > >     if (delegate == getSystemClassLoaderOrNull()) { > >> > >       return delegate; > >> > >     } > > >> > > Which would then enable bridging for system types - another option > >> would be > >> > > to return the Guice class loader at this point instead of the system > >> > > classloader: > > >> > >     if (delegate == getSystemClassLoaderOrNull()) { > >> > >       return GUICE_CLASS_LOADER; > >> > >     } > > >> > > Either of these would solve your problem, but they are not complete > >> because > >> > > the Guice classloader won't have access to types in the system > >> classloader > >> > > that don't reside in the "java" namespace (such as javax.* / > >> org.omg.*) > >> > > unless > >> > > of course you enabled OSGi bootdelegation for these packages... > > >> > > I've coded up a solution that doesn't suffer from this and raised a > >> Guice > >> > > issue: > > >> > >    http://code.google.com/p/google-guice/issues/detail?id=343 > > >> > > You can download a patched version of Guice here: > > >> > >http://code.google.com/p/peaberry/source/browse/trunk/lib/build/guice. > >> .. > > >> > > which avoids the AOP exception. > > >> > > Not sure if this patch will make it into Guice 2 because it is in a > >> critical > >> > > piece > >> > > of code, and I don't want to put any undue pressure on Jesse who's > >> already > >> > > done a lot of testing with the current code. > > >> > > Are you ok using the patched build until this is fixed in an official > >> > > release? > > >> > > For configuration details, I also uploaded > > >> > > >http://sdqweb.ipd.uka.de/temp/eclipse-config.txt, > >> > > > which is a copy of the configuration details Eclipse provides > >> > > > in Help -> About Eclipse Platform. I currently use version: > >> 3.4.1build > >> > > > id: M20080911-1700. > > >> > > > Thanks a lot! If you need more information, please let me know. > > >> > > > Kind regards, > >> > > > Anne > > >> > > > On 2 Mrz., 15:22, Stuart McCulloch <mcc...@gmail.com> wrote: > >> > > > > 2009/3/2 Anne Martens <annema...@googlemail.com> > > >> > > > > > Dear Stuart, > > >> > > > > > thanks a lot for your help. > > >> > > > > > Indeed, I only need Guice within a single plugin/bundle. That's > >> why I > >> > > > > > now put the three guice jars (guice-snapshot, > >> guice-multibindings- > >> > > > > > snapshot and aopalliance) back into the "referenced libraries" > >> of my > >> > > > > > opt4j wrapper plugin. I also tried to move the code starting > >> Opt4J to > >> > > > > > a new plugin activator class, that is activated when OSGi loads > >> the > >> > > > > > bundle. > > >> > > > > > Still, I get the same error (with a different stacktrace, of > >> course): > > >> > > > > > com.google.inject.internal.ComputationException: > >> > > > > > com.google.inject.internal.ComputationException: > >> > > > > > com.google.inject.internal.ComputationException: > >> > > > > > com.google.inject.internal.ComputationException: > >> > > > > > com.google.inject.internal.cglib.core.CodeGenerationException: > >> > > > > > java.lang.reflect.InvocationTargetException-->null at > >> com.google.inject.internal.MapMaker$StrategyImpl.compute > >> > > > > > (MapMaker.java:538) at > >> com.google.inject.internal.MapMaker$StrategyImpl.compute > >> > > > > > (MapMaker.java:404) at com.google.inject.internal.CustomConcurrentHashMap > >> > > > > > $ComputingImpl.get(CustomConcurrentHashMap.java:2031) at > >> > > > com.google.inject.internal.FailableCache.get(FailableCache.java: > >> > > > > > 46) at > >> com.google.inject.InjectorImpl$LateBoundConstructor.bind > >> > > > > > (InjectorImpl.java:457) at com.google.inject.ClassBindingImpl.initialize > >> > > > > > (ClassBindingImpl.java:52) at > > >> com.google.inject.InjectorImpl.initializeBinding(InjectorImpl.java: > >> > > > > > 347) at com.google.inject.InjectorImpl.createJustInTimeBinding > >> > > > > > (InjectorImpl.java:639) at > >> > > > com.google.inject.InjectorImpl.createJustInTimeBindingRecursive > >> > > > > > (InjectorImpl.java:584) at com.google.inject.InjectorImpl.getJustInTimeBinding > >> > > > > > (InjectorImpl.java:179) at > > >> com.google.inject.InjectorImpl.getBindingOrThrow(InjectorImpl.java: > >> > > > > > 139) at com.google.inject.InjectorImpl.getInternalFactory > >> > > > > > (InjectorImpl.java:645) at > >> com.google.inject.FactoryProxy.notify(FactoryProxy.java:48) at > >> com.google.inject.BindingProcessor.runCreationListeners > >> > > > > > (BindingProcessor.java:215) at com.google.inject.InjectorBuilder.initializeStatically > >> > > > > > (InjectorBuilder.java:131) at > >> > > > com.google.inject.InjectorBuilder.build(InjectorBuilder.java:105)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      ServerLifeCycle (wrong name: config/ServerLifeCycle) Please check to see if you enter the classname and classpath with the expected values... - Hong On 5/22/2011 1:24 PM, forums@java.net wrote: > hi all :) > > i need to creat a lifecycle module this is the code of the class > > package config; import com.sun.appserv.server.ServerLifecycleException; > import com.sun.appserv.server.LifecycleEvent; import > com.sun.appserv.server.LifecycleListener; public class ServerLifeCycle > implements LifecycleListener { @Override public void > handleEvent(LifecycleEvent event) throws ServerLifecycleException { if > (LifecycleEvent.INIT_EVENT == event.getEventType()) { > System.out.println("-----------------LifecycleListener: INIT_EVENT"); > return; > } if (LifecycleEvent.STARTUP_EVENT == event.getEventType()) { > System.out.println("-------------------LifecycleListener: START_EVENT"); > return; } if (LifecycleEvent.READY_EVENT == event.getEventType()) { > System.out.println("------------------LifecycleListener: READY_EVENT"); > return; } if (LifecycleEvent.SHUTDOWN_EVENT == event.getEventType()) { > System.out.println("---------------------LifecycleListener: > SHUTDOWN_EVENT"); > return; } if (LifecycleEvent.TERMINATION_EVENT == event.getEventType()) { > System.out.println("--------------LifecycleListener: TERMINATION_EVENT"); > return; } } > > > i tried to creat the lifecycle module from the visual interface of > glassfish > but ever time glassfish wouldn't start up and give me this exception > > ATTENTION: Exception while starting bundle > com.sun.enterprise.osgi-adapter > [14] org.osgi.framework.BundleException: Activator start error in bundle > com.sun.enterprise.osgi-adapter [14]. at > org.apache.felix.framework.Felix.activateBundle(Felix.java:1751) at > org.apache.felix.framework.Felix.startBundle(Felix.java:1622) at > org.apache.felix.framework.BundleImpl.start(BundleImpl.java:915) at > org.jvnet.hk2.osgimain.Main.start(Main.java:140) at > org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:640) > >

      at org.apache.felix.framework.Felix.activateBundle()
    2. Apache Felix Framework
      Felix.activateBundle
      1. org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)
      1 frame