• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Linkage Error while starting JBoss in eclipse 3.4 [Issue not occuring when I start JBoss from /bin]

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please help me in this.

I tried to put the jaxb-api.jar in JAVA_HOME/lib/endorsed or JAVA_HOME/jre/lib/endorsed directory but in both case not worked for me.

Strange part is that it is not running when started using eclipse but If I launch it from JBOSS_HOME/bin/ it is running fine

I need to get it run from Eclipse.


-----------------------------------------Eclipse Console Output-------------------------------------------------------------------------------------------------------------
10:44:38,562 INFO [ServerImpl] Starting JBoss (Microcontainer)...
10:44:38,562 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812042120)
10:44:38,578 INFO [ServerImpl] Bootstrap URL: null
10:44:38,578 INFO [ServerImpl] Home Dir: E:\jboss-5.0.0.GA-jdk6\jboss-5.0.0.GA
10:44:38,578 INFO [ServerImpl] Home URL: file:/E:/jboss-5.0.0.GA-jdk6/jboss-5.0.0.GA/
10:44:38,578 INFO [ServerImpl] Library URL: file:/E:/jboss-5.0.0.GA-jdk6/jboss-5.0.0.GA/lib/
10:44:38,578 INFO [ServerImpl] Patch URL: null
10:44:38,578 INFO [ServerImpl] Common Base URL: file:/E:/jboss-5.0.0.GA-jdk6/jboss-5.0.0.GA/common/
10:44:38,578 INFO [ServerImpl] Common Library URL: file:/E:/jboss-5.0.0.GA-jdk6/jboss-5.0.0.GA/common/lib/
10:44:38,578 INFO [ServerImpl] Server Name: default
10:44:38,578 INFO [ServerImpl] Server Base Dir: E:\jboss-5.0.0.GA-jdk6\jboss-5.0.0.GA\server
10:44:38,578 INFO [ServerImpl] Server Base URL: file:/E:/jboss-5.0.0.GA-jdk6/jboss-5.0.0.GA/server/
10:44:38,578 INFO [ServerImpl] Server Config URL: file:/E:/jboss-5.0.0.GA-jdk6/jboss-5.0.0.GA/server/default/conf/
10:44:38,578 INFO [ServerImpl] Server Home Dir: E:\jboss-5.0.0.GA-jdk6\jboss-5.0.0.GA\server\default
10:44:38,578 INFO [ServerImpl] Server Home URL: file:/E:/jboss-5.0.0.GA-jdk6/jboss-5.0.0.GA/server/default/
10:44:38,578 INFO [ServerImpl] Server Data Dir: E:\jboss-5.0.0.GA-jdk6\jboss-5.0.0.GA\server\default\data
10:44:38,578 INFO [ServerImpl] Server Library URL: file:/E:/jboss-5.0.0.GA-jdk6/jboss-5.0.0.GA/server/default/lib/
10:44:38,578 INFO [ServerImpl] Server Log Dir: E:\jboss-5.0.0.GA-jdk6\jboss-5.0.0.GA\server\default\log
10:44:38,578 INFO [ServerImpl] Server Native Dir: E:\jboss-5.0.0.GA-jdk6\jboss-5.0.0.GA\server\default\tmp\native
10:44:38,578 INFO [ServerImpl] Server Temp Dir: E:\jboss-5.0.0.GA-jdk6\jboss-5.0.0.GA\server\default\tmp
10:44:38,578 INFO [ServerImpl] Server Temp Deploy Dir: E:\jboss-5.0.0.GA-jdk6\jboss-5.0.0.GA\server\default\tmp\deploy
10:44:39,203 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/E:/jboss-5.0.0.GA-jdk6/jboss-5.0.0.GA/server/default/conf/bootstrap.xml
10:44:39,828 INFO [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.IterableTimedVFSCache]
10:44:39,828 INFO [VFSCacheFactory] Using VFSCache [IterableTimedVFSCache{lifetime=1800, resolution=60}]
10:44:40,125 INFO [CopyMechanism] VFS temp dir: E:\jboss-5.0.0.GA-jdk6\jboss-5.0.0.GA\server\default\tmp
10:44:40,125 INFO [ZipEntryContext] VFS force nested jars copy-mode is enabled.
10:44:41,093 INFO [ServerInfo] Java version: 1.6.0,Sun Microsystems Inc.
10:44:41,093 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.6.0-b105,Sun Microsystems Inc.
10:44:41,093 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
10:44:41,171 INFO [JMXKernel] Legacy JMX core initialized
10:44:42,859 INFO [ProfileServiceImpl] Loading profile: default from: org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@1197d83(root=E:\jboss-5.0.0.GA-jdk6\jboss-5.0.0.GA\server, key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
10:44:42,859 INFO [ProfileImpl] Using repository:org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@1197d83(root=E:\jboss-5.0.0.GA-jdk6\jboss-5.0.0.GA\server, key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
10:44:42,859 INFO [ProfileServiceImpl] Loaded profile: ProfileImpl@a46cf8{key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default]}
10:44:44,484 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
10:44:48,671 ERROR [AbstractKernelController] Error installing to Create: name=ManagedConnectionFactoryParserDeployer state=Configured
java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from vfszip:/E:/jboss-5.0.0.GA-jdk6/jboss-5.0.0.GA/lib/jaxb-impl.jar/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.<clinit>(ModelBuilder.java:173)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:432)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:297)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.xml.bind.ContextFinder.newInstance(Unknown Source)
at javax.xml.bind.ContextFinder.find(Unknown Source)
at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
at org.jboss.resource.deployers.ManagedConnectionFactoryParserDeployer.create(ManagedConnectionFactoryParserDeployer.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:297)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
at org.jboss.Main.boot(Main.java:209)
at org.jboss.Main$1.run(Main.java:547)
at java.lang.Thread.run(Unknown Source)
10:44:51,906 INFO [NativeServerConfig] JBoss Web Services - Stack Native Core
10:44:51,906 INFO [NativeServerConfig] 3.0.4.SP1
10:44:54,406 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

*** CONTEXTS IN ERROR: Name -> Error

ManagedConnectionFactoryParserDeployer -> java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from vfszip:/E:/jboss-5.0.0.GA-jdk6/jboss-5.0.0.GA/lib/jaxb-impl.jar/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/)


10:44:54,406 INFO [ServerImpl] JBoss (Microcontainer) [5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812042120)] Started in 15s
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Any help in this case appreciated.
Thanks.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apparently the JDK that Eclipse is using is not the one identified by JAVA_HOME. Look at these lines in the console log:

10:44:41,093 INFO [ServerInfo] Java version: 1.6.0,Sun Microsystems Inc.
10:44:41,093 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.6.0-b105,Sun Microsystems Inc.

Open a command prompt and enter:

%JAVA_HOME%\bin\java -version

And compare the response to what is in the console log. Most likely they are different.

Thinking about it some more, I suspect that Eclipse is using a JRE. You can tell Eclipse to run with your JDK by adding these lines to the eclipse/eclipse.ini file (replace the path with yours):

-vm
c:/apps/java/jdk1.6.0_18/jre/lib/client/jvm.dll
 
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Peter Johnson wrote:
Thinking about it some more, I suspect that Eclipse is using a JRE. You can tell Eclipse to run with your JDK by adding these lines to the eclipse/eclipse.ini file (replace the path with yours):

-vm
c:/apps/java/jdk1.6.0_18/jre/lib/client/jvm.dll



Peter,

In my JDK (1.6.0_06) there are two copies of jvm.dll. They are located here:
  • jdkdir/jre/bin/client/jvm.dll
  • jdkdir/jre/bin/server/jvm.dll

  • Did you mean the first one?

    By the way, I was told previously (I can't remember now where I saw this) that I was supposed to set -vm to:
  • jdkdir/bin/javaw.exe

  • Is this wrong?

    Sorry to hijack, but I thought the clarification may help the OP as well.
     
    Bhavesh Dak
    Ranch Hand
    Posts: 93
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks a lot Peter and Mark for spotting the issue

    output of "java -version "

    java version "1.6.0_17"
    Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
    Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)

    I updated eclipse/eclipse.ini file with both "C:\Program Files\Java\jdk1.6.0\jre\lib\client\jvm.dll" and "JAVA_HOME/bin/javaw.exe"
    but none of them worked for me and console produced the same output as mentioned in my first output.


    @Peter : For "C:\Program Files\Java\jdk1.6.0\jre\lib\client\jvm.dll" : there is no client directory in lib folder and jvm.dll is found nowhere.

    I also took the java updates but still issue in not resolved.

    Directory structure of my JAVA_HOME is

    E:\Program Files\Java\jdk1.6.0
    E:\Program Files\Java\jre1.6.0
    E:\Program Files\Java\jre6

    There are two jre folders over there, is this causing the problem?

    I tried to change the installed jre in eclipse "windows -> preferences -> Installed JREs" but again no success of geting this up and running.

    I tried with other copy of eclipse in and jboss is running fine there but I don't know what is the issue with the that please help me.

    Thanks again.
     
    Sheriff
    Posts: 10445
    227
    IntelliJ IDE Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Use the latest JDK 1.6 from Sun. See this for more details.
     
    Jaikiran Pai
    Sheriff
    Posts: 10445
    227
    IntelliJ IDE Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Jaikiran Pai wrote:Use the latest JDK 1.6 from Sun. See this for more details.



    And as you shown from your output, Eclipse seems to be using an earlier JDK6 version. Whereas when you run JBoss from the command line it is using the latest JDK6. So point Eclipse to the JDK which the command line is using.


     
    Mark E Hansen
    Ranch Hand
    Posts: 650
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Jaikiran Pai wrote:
    And as you shown from your output, Eclipse seems to be using an earlier JDK6 version. Whereas when you run JBoss from the command line it is using the latest JDK6. So point Eclipse to the JDK which the command line is using.



    And this can be rather difficult, I've found. After playing around with this for a while, I found the following works:

    In the eclipse.ini file, you need to add the -vm option, but the format and placement within the file is critical.
    The -vm and the path to the jvm.dll file must be on two separate lines - not on one line. Also, the two lines must be placed just after the -startup ...Jar lines, as follows (note: my path and jar file names may be different - don't just copy and paste into your file):
    Note the placement of the -vm option and its argument.

    I hope this will help clear this up.
     
    Peter Johnson
    author
    Posts: 5856
    7
    Android Eclipse IDE Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    By the way, I was told previously (I can't remember now where I saw this) that I was supposed to set -vm to:
    # jdkdir/bin/javaw.exe

    Is this wrong?


    Actually, what Eclipse needs is the jvm.dll file because it wants to dynamically load it. Eclipse will accept almost anything for the -vm property because it knows how the JDK directory tree is laid out and based on the file you give it, it can locate the jvm.dll to load. By the way, when you start Eclipse, you will note that there is no "javaw.exe" process in Task Manager, only an eclipse.exe process. And if you use Process Explorer from sysinternals you can see that the eclipse.exe process loaded the jvm.dll.

    In my JDK (1.6.0_06) there are two copies of jvm.dll. They are located here:
    # jdkdir/jre/bin/client/jvm.dll
    # jdkdir/jre/bin/server/jvm.dll

    Did you mean the first one?


    Yes I did, the "lib" in my post is a typo. Sorry.
     
    Bhavesh Dak
    Ranch Hand
    Posts: 93
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks Mark and Peter it helped, my Server is up and running fine after doing the configuration as suggested.

    Thanks again.
     
    He was expelled for perverse baking experiments. This tiny ad is a model student:
    We need your help - Coderanch server fundraiser
    https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
    reply
      Bookmark Topic Watch Topic
    • New Topic