dev@glassfish.java.net

Re: V3 (trunk) does not start

From: Byron Nevins <byron.nevins_at_sun.com>
Date: Thu, 06 Nov 2008 22:21:08 -0800

    * The precedence order of which JDK to use is pretty easy to
      change. Let me know if that would be useful.
    * I think that asenv has ancient confusing stuff in it that needs
      cleaning before we start running it as part of asadmin. E.g.

                       set AS_NATIVE_LAUNCHER_LIB_PREFIX=\jre\bin\client

Jerome Dochez wrote:

> we could.
>
> This also has drawbacks like always overriding the PATH. We would need
> to save the jdk path at installation time to this AS_JAVA in case PATH
> is not set. Then say you install a new jdk update, set it on your path
> since you never configured anything special on your server, you expect
> it to run with the new JDK... if fact you will continue using the old
> one.
>
> I don't think there is a silver bullet here but we can continue
> talking more about a better possible solution that relying on PATH
> which I have to say has the merit of being an industry standard (no
> special configuration to know) and portable. Anything we choose here
> will impact the installer, the scripts and finally the upgrade scenarios.
>
> Jerome
>
> Sahoo wrote:
>
>> Why does asadmin script not try to use AS_JAVA variable when it is
>> set in asenv.conf file? If it is not set there, it can fall back to
>> JDK available in PATH.
>>
>> Sahoo
>>
>> Jerome Dochez wrote:
>>
>>> that's correct *but* you still need to run the launcher with the
>>> right JDK level. the launcher is run through an asadmin invocation
>>> and all this code is compiled and expect to be run with a particular
>>> jdk level. It's not like you can run the asadmin start-domain with
>>> jdk 1.2, and have JAVA_HOME set to jdk6 and hope this will work.
>>>
>>> the long explanation is that asadmin client and the launcher is
>>> sharing code with the application server (common-util and others)
>>> and they all require a certain level of JDK. So the order you
>>> describe below really applies within the same familly of JDK, where
>>> you can run the launcher with JDK 1.6_07 and the server with JDK 1.6_10
>>>
>>> Hope this helps clarify.
>>>
>>> Jerome
>>>
>>> Byron Nevins wrote:
>>>
>>>>
>>>> Order of priority for choosing JVM:
>>>>
>>>> 1. domain.xml
>>>> 2. asenv.conf|bat
>>>> 3. JAVA_HOME
>>>> 4. System.getProperty("java.home") + "/../bin"
>>>> 5. System.getProperty("java.home") + "/bin"
>>>>
>>>>
>>>> Jerome Dochez wrote:
>>>>
>>>>> for reference...
>>>>>
>>>>> at least in the server.log, you would find which jdk was picked up
>>>>> (first line is the command line invocation of the server with the
>>>>> full path to the java command).
>>>>>
>>>>> setting JAVA_HOME does not matter for v3, the PATH does.
>>>>>
>>>>> jerome
>>>>>
>>>>> Amy Roh wrote:
>>>>>
>>>>>> and I get the same doing asadmin start-domain
>>>>>>
>>>>>> % glassfish/bin/asadmin start-domain
>>>>>> java.lang.NoClassDefFoundError: javax/xml/stream/XMLStreamException
>>>>>> Command start-domain failed.
>>>>>>
>>>>>> Jerome Dochez wrote:
>>>>>>
>>>>>>> do you do java -jar or asadmin start-domain ?
>>>>>>>
>>>>>>> jerome
>>>>>>>
>>>>>>> Amy Roh wrote:
>>>>>>>
>>>>>>>> I still cannot start v3 trunk using JDK 1.6.0_10
>>>>>>>> (/java/re/jdk/1.6.0_10/latest/binaries/solaris-i586).
>>>>>>>>
>>>>>>>> I'm getting "Error starting
>>>>>>>> file:/export/home/amyroh/v3-11-5/v3/distributions/web/target/glassfish//modules/osgi-adapter.jar
>>>>>>>> (org.osgi.framework.BundleException: Activator start error.)
>>>>>>>> java.lang.TypeNotPresentException: Type
>>>>>>>> javax.xml.stream.XMLInputFactory not present"
>>>>>>>>
>>>>>>>> What am I missing?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Amy
>>>>>>>>
>>>>>>>> ===
>>>>>>>>
>>>>>>>> Nov 6, 2008 1:49:52 PM
>>>>>>>> com.sun.enterprise.glassfish.bootstrap.ASMain main
>>>>>>>> INFO: Launching GlassFish on Apache Felix OSGi platform
>>>>>>>>
>>>>>>>> Welcome to Felix.
>>>>>>>> =================
>>>>>>>>
>>>>>>>> Nov 6, 2008 1:49:54 PM OSGiModuleImpl start
>>>>>>>> INFO: Started bundle org.glassfish.core.kernel [37]
>>>>>>>> ERROR: Error starting
>>>>>>>> file:/export/home/amyroh/v3-11-5/v3/distributions/web/targ
>>>>>>>> et/glassfish//modules/osgi-adapter.jar
>>>>>>>> (org.osgi.framework.BundleException: Acti
>>>>>>>> vator start error.)
>>>>>>>> java.lang.TypeNotPresentException: Type
>>>>>>>> javax.xml.stream.XMLInputFactory not pre
>>>>>>>> sent
>>>>>>>> at
>>>>>>>> sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(Core
>>>>>>>>
>>>>>>>> ReflectionFactory.java:98)
>>>>>>>> at
>>>>>>>> sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.
>>>>>>>>
>>>>>>>> java:107)
>>>>>>>> at
>>>>>>>> sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignatur
>>>>>>>>
>>>>>>>> e.java:31)
>>>>>>>> at
>>>>>>>> sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.jav
>>>>>>>>
>>>>>>>> a:351)
>>>>>>>> at
>>>>>>>> sun.reflect.annotation.AnnotationParser.parseClassValue(AnnotationPar
>>>>>>>>
>>>>>>>> ser.java:335)
>>>>>>>> at
>>>>>>>> sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationPa
>>>>>>>>
>>>>>>>> rser.java:264)
>>>>>>>> at
>>>>>>>> sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationPar
>>>>>>>>
>>>>>>>> ser.java:206)
>>>>>>>> at
>>>>>>>> sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationP
>>>>>>>>
>>>>>>>> arser.java:69)
>>>>>>>> at
>>>>>>>> sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationPa
>>>>>>>>
>>>>>>>> rser.java:52)
>>>>>>>> at
>>>>>>>> java.lang.Class.initAnnotationsIfNecessary(Class.java:2998)
>>>>>>>> at java.lang.Class.getAnnotation(Class.java:2958)
>>>>>>>> at org.jvnet.hk2.component.Wombs.create(Wombs.java:51)
>>>>>>>> at
>>>>>>>> com.sun.hk2.component.LazyInhabitant.createWomb(LazyInhabitant.java:1
>>>>>>>>
>>>>>>>> 02)
>>>>>>>> at
>>>>>>>> com.sun.hk2.component.LazyInhabitant.fetch(LazyInhabitant.java:92)
>>>>>>>> at
>>>>>>>> com.sun.hk2.component.LazyInhabitant.type(LazyInhabitant.java:78)
>>>>>>>> at
>>>>>>>> org.jvnet.hk2.component.Habitat.addIndex(Habitat.java:149)
>>>>>>>> at
>>>>>>>> com.sun.hk2.component.InhabitantsParser.add(InhabitantsParser.java:15
>>>>>>>>
>>>>>>>> 4)
>>>>>>>> at
>>>>>>>> com.sun.hk2.component.InhabitantsParser.parse(InhabitantsParser.java:
>>>>>>>>
>>>>>>>> 133)
>>>>>>>> at
>>>>>>>> org.jvnet.hk2.osgiadapter.OSGiModuleImpl.parseInhabitants(OSGiModuleI
>>>>>>>>
>>>>>>>> mpl.java:312)
>>>>>>>> at
>>>>>>>> org.jvnet.hk2.osgiadapter.OSGiModulesRegistryImpl.parseInhabitants(OS
>>>>>>>>
>>>>>>>> GiModulesRegistryImpl.java:128)
>>>>>>>> at
>>>>>>>> com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.cre
>>>>>>>>
>>>>>>>> ateHabitat(AbstractModulesRegistryImpl.java:135)
>>>>>>>> at
>>>>>>>> com.sun.enterprise.module.bootstrap.Main.createHabitat(Main.java:394)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.jvnet.hk2.osgiadapter.HK2Main.start(HK2Main.java:131)
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.util.SecureAction.startActivator(SecureAct
>>>>>>>>
>>>>>>>> ion.java:591)
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.Felix._startBundle(Felix.java:1607)
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.Felix.startBundle(Felix.java:1541)
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:11
>>>>>>>>
>>>>>>>> 35)
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:267
>>>>>>>>
>>>>>>>> )
>>>>>>>> at java.lang.Thread.run(Thread.java:595)
>>>>>>>> Caused by: java.lang.ClassNotFoundException:
>>>>>>>> javax.xml.stream.XMLInputFactory
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(
>>>>>>>>
>>>>>>>> R4SearchPolicyCore.java:198)
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4Se
>>>>>>>>
>>>>>>>> archPolicy.java:45)
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(
>>>>>>>>
>>>>>>>> ContentClassLoader.java:109)
>>>>>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>>>>>>> at
>>>>>>>> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>>>>>>> at java.lang.Class.forName0(Native Method)
>>>>>>>> at java.lang.Class.forName(Class.java:242)
>>>>>>>> at
>>>>>>>> sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(Core
>>>>>>>>
>>>>>>>> ReflectionFactory.java:95)
>>>>>>>> ... 28 more
>>>>>>>> Caused by: java.lang.ClassNotFoundException:
>>>>>>>> javax.xml.stream.XMLInputFactory
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.searchpolicy.R4Wire.getClass(R4Wire.java:1
>>>>>>>>
>>>>>>>> 09)
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.searchImpo
>>>>>>>>
>>>>>>>> rts(R4SearchPolicyCore.java:505)
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClassO
>>>>>>>>
>>>>>>>> rResource(R4SearchPolicyCore.java:466)
>>>>>>>> at
>>>>>>>> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(
>>>>>>>>
>>>>>>>> R4SearchPolicyCore.java:185)
>>>>>>>> ... 35 more
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Kedar Mhaswade wrote:
>>>>>>>>
>>>>>>>>> I think we are in a situation where the trunk builds with both
>>>>>>>>> JDK 5 and 6, but runs with JDK 6 alone.
>>>>>>>>>
>>>>>>>>> Once we make at least one change (it might as well be me :))
>>>>>>>>> that requires JDK 6 for compilation, we would have automatically
>>>>>>>>> solved this problem.
>>>>>>>>>
>>>>>>>>> -Kedar
>>>>>>>>>
>>>>>>>>> Jane Young wrote:
>>>>>>>>>
>>>>>>>>>> I've been monitoring Hudson's devbuild and I haven't seen any
>>>>>>>>>> build failure for the past 4 days.
>>>>>>>>>> Ming has updated jdk on the node that executes QL on Hudson.
>>>>>>>>>>
>>>>>>>>>> Harsha Godugu wrote:
>>>>>>>>>>
>>>>>>>>>>> ----- Original Message -----
>>>>>>>>>>> From: Sahoo <Sahoo_at_sun.com>
>>>>>>>>>>> Date: Sunday, November 2, 2008 8:51 pm
>>>>>>>>>>> Subject: Re: V3 (trunk) does not start
>>>>>>>>>>> To: dev_at_glassfish.dev.java.net
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> What is the status of hudson jobs?
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Remember... Jane Young is taking care of Hudson Jobs and
>>>>>>>>>>> related build issues. Jane ?
>>>>>>>>>>>
>>>>>>>>>>> thanks,
>>>>>>>>>>> Harsha
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> Thanks,
>>>>>>>>>>>> Sahoo
>>>>>>>>>>>>
>>>>>>>>>>>> Jagadish Prasath Ramu wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> I have updated my workspace today and tried to start the
>>>>>>>>>>>>> server.
>>>>>>>>>>>>> asadmin start-domain domain1
>>>>>>>>>>>>>
>>>>>>>>>>>>> I see : java.lang.NoClassDefFoundError:
>>>>>>>>>>>>> javax/xml/stream/XMLStreamException
>>>>>>>>>>>>> Command start-domain failed.
>>>>>>>>>>>>>
>>>>>>>>>>>>> No server.log created at this time.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>> -Jagadish
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>>>>
>>>>>>>>>>>>> To unsubscribe, e-mail:
>>>>>>>>>>>>> dev-unsubscribe_at_glassfish.dev.java.net
>>>>>>>>>>>>> For additional commands, e-mail:
>>>>>>>>>>>>> dev-help_at_glassfish.dev.java.net
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>>>
>>>>>>>>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>>>>>>>> For additional commands, e-mail:
>>>>>>>>>>>> dev-help_at_glassfish.dev.java.net
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>>
>>>>>>>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>>>>>>> For additional commands, e-mail:
>>>>>>>>>>> dev-help_at_glassfish.dev.java.net
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>
>>>>>>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>
>>>>>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>
>>>>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>>
>>>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>>
>>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>
>>>>
>>>> --
>>>> Byron Nevins Work 408-276-4089, Home 650-359-1290, Cell
>>>> 650-784-4123 - Sun Microsystems, Inc.
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net For
>>>> additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>

-- 
Byron Nevins Work 408-276-4089, Home 650-359-1290, Cell 650-784-4123 - Sun Microsystems, Inc.