[EJB 3.0] - Re: EJB3 Bean Access
by ia96herz
Here ist the exception stacktrace:
| javax.naming.NameNotFoundException: project/ExperimentServiceEJB/remote
| at org.jboss.ha.jndi.TreeHead.lookup(TreeHead.java:242)
| at org.jboss.ha.jndi.HAJNDI.lookup(HAJNDI.java:155)
| at sun.reflect.GeneratedMethodAccessor308.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.ha.framework.server.HARMIServerImpl.invoke(HARMIServerImpl.java:209)
| at sun.reflect.GeneratedMethodAccessor307.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
| at sun.rmi.transport.Transport$1.run(Transport.java:153)
| at java.security.AccessController.doPrivileged(Native Method)
| at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
| at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
| at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
| at java.lang.Thread.run(Thread.java:595)
| at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
| at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
| at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
| at org.jboss.ha.framework.server.HARMIServerImpl_Stub.invoke(Unknown Source)
| at org.jboss.ha.framework.interfaces.HARMIClient.invokeRemote(HARMIClient.java:219)
| at org.jboss.ha.framework.interfaces.HARMIClient.invoke(HARMIClient.java:321)
| at $Proxy0.lookup(Unknown Source)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at com.roche.research.theraps.rmi.RmiTest.testRmi(RmiTest.java:72)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at junit.framework.TestCase.runTest(TestCase.java:168)
| at junit.framework.TestCase.runBare(TestCase.java:134)
| at junit.framework.TestResult$1.protect(TestResult.java:110)
| at junit.framework.TestResult.runProtected(TestResult.java:128)
| at junit.framework.TestResult.run(TestResult.java:113)
| at junit.framework.TestCase.run(TestCase.java:124)
| at junit.framework.TestSuite.runTest(TestSuite.java:232)
| at junit.framework.TestSuite.run(TestSuite.java:227)
| at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
| at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
| at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219022#4219022
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219022
17 years, 2 months
[Installation, Configuration & DEPLOYMENT] - Re: how to configure jaas with jboss 5.0.1
by BjPenn
Ok well, i just realized that in my file "persistence.xml" there was no persistence provider defined, i am using netbeans. any way i added the line that specify my provider "TopLink"
:
<?xml version="1.0" encoding="UTF-8" ?>
| - <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
| - <persistence-unit name="jtoolkitfwPU">
| <jta-data-source>java:/smsactjndi</jta-data-source>
| <provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
| <exclude-unlisted-classes>false</exclude-unlisted-classes>
| <properties />
| </persistence-unit>
| </persistence>
but i still getting another error "i know this is so deseperating" wich is:
12:21:08,718 ERROR [AbstractKernelController] Error installing to Parse: name=vfszip:/C:/java/jboss-5.0.1.GA-jdk6/jboss-5.0.1.GA/server/default/deploy/jtk_SENIC.war/ state=Not Installed mode=Manual requiredState=Parse
| org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/C:/java/jboss-5.0.1.GA-jdk6/jboss-5.0.1.GA/server/default/deploy/jtk_SENIC.war/
| at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:337)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:297)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:269)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:230)
| 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.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:698)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
| 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)
| Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: cvc-complex-type.2.4.a: Invalid content was found starting with element 'provider'. One of '{"http://java.sun.com/xml/ns/persistence":non-jta-data-source, "http://java.sun.com/xml/ns/persistence":mapping-file, "http://java.sun.com/xml/ns/persistence":jar-file, "http://java.sun.com/xml/ns/persistence":class, "http://java.sun.com/xml/ns/persistence":exclude-unlisted-classes, "http://java.sun.com/xml/ns/persistence":properties}' is expected. @ vfszip:/C:/java/jboss-5.0.1.GA-jdk6/jboss-5.0.1.GA/server/default/deploy/jtk_SENIC.war/WEB-INF/classes/META-INF/persistence.xml[5,15]
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
| at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
| at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:199)
| at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:170)
| at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:132)
| at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:118)
| at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:256)
| at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:188)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:323)
| ... 22 more
| Caused by: org.xml.sax.SAXException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'provider'. One of '{"http://java.sun.com/xml/ns/persistence":non-jta-data-source, "http://java.sun.com/xml/ns/persistence":mapping-file, "http://java.sun.com/xml/ns/persistence":jar-file, "http://java.sun.com/xml/ns/persistence":class, "http://java.sun.com/xml/ns/persistence":exclude-unlisted-classes, "http://java.sun.com/xml/ns/persistence":properties}' is expected. @ vfszip:/C:/java/jboss-5.0.1.GA-jdk6/jboss-5.0.1.GA/server/default/deploy/jtk_SENIC.war/WEB-INF/classes/META-INF/persistence.xml[5,15]
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler.error(SaxJBossXBParser.java:426)
| at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
| at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
| at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
| at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
| at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
| at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
| at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
| at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
| at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
| at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
| at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
| at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
| at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
| at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:199)
| ... 30 more
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219021#4219021
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219021
17 years, 2 months
[Microcontainer] - Programatically create a Inject fromContext
by jaikiran
What is the API to create an @Inject which is equivalent to this:
public class MyBean
| {
| @Inject (dependentState="DESCRIBED", fromContext = FromContext.CONTEXT)
| KernelControllerContext context;
| ...
| }
I was able to get a minimal @Inject working using this API:
public class MyBean
| {
| @Inject (dependentState = "DESCRIBED")
| OtherBean otherBean;
|
| }
|
|
BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(someName, someClass.getClass().getName());
| builder.setConstructorValue(someObj);
| // Create @Inject
| ValueMetaData inject = builder.createInject(weDependOnThisMCBeanName, null, null, ControllerState.DESCRIBED);
| // add this @Inject to our MC bean
| builder.addPropertyMetaData("otherBean", inject);
|
I couldn't find any API where i can pass more information for creating the @Inject "fromContext".
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219009#4219009
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219009
17 years, 2 months