[JNDI/Naming/Network] - Jboss iiop problem
by kathy90031
I have a jboss server wih an EJB deployed (the jboss.xml is configured for iiop and the server configuration I am using is all).
When I try (through JDeveloper using OC4J application server) to lookup the bean through JNDI I get a NamingNotFoundException
Here's the strange thing. When I remove the iiop reference from the jboss.xml and then try connecting via jnp - I get connected and it can find the EJB with no problem.
Here's my code that I'm running in JDeveloper. Just wondering why my bean can be found via jnp but not iiop (our preferred way)
Hashtable environment = new Hashtable();
environment.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
environment.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
environment.put(Context.PROVIDER_URL, "jnp://192.168.1.104:1099"); // remote machine IP
//environment.put("java.naming.factory.initial",
// "com.sun.jndi.cosnaming.CNCtxFactory");
//environment.put("java.naming.provider.url", "corbaloc::192.168.1.104:3528/JBoss/Naming/root");
UserIndexHome remote = UserIndexUtil.getHome(environment);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061527#4061527
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061527
18Â years, 9Â months
[Beginners Corner] - Sar within ear - dependencies check
by criterio
Hello,
I have a question about xmbean lifecycle (especially about dependencies check). Is it
different when sar is deployed directly into jboss deploy directory than when it's deployed
within ear? What I've observed is that when sar within ear is deployed, it's allways
successfull and that is my problem :)
I have made simple example to explain what I mean :
my xmbean class :
import org.jboss.logging.Logger;
| import org.jboss.system.ServiceMBeanSupport;
|
| public class XMBeanTestService extends ServiceMBeanSupport {
| private Logger logger = Logger.getLogger(XMBeanTestService.class);
|
| private Long propertyValue;
|
| protected void createService() throws Exception {
| logger.info("createService()");
| super.createService();
| }
|
|
| protected void startService() throws Exception {
| logger.info("startService()");
| super.startService();
| }
|
| ...
| public Long getProperty() {
| logger.info("getProperty : " + propertyValue);
| return propertyValue;
| }
|
| public void setProperty(Long propertyValue) {
| logger.info("setProperty(" + propertyValue + ")");
| this.propertyValue = propertyValue;
| }
|
| }
|
jboss-service descriptor that should cause an error "Incomplete Deployment..." :
| <?xml version='1.0' encoding='UTF-8' ?>
| <!DOCTYPE server PUBLIC
| "-//JBoss//DTD MBean Service 3.2//EN"
| "http://www.jboss.org/j2ee/dtd/jboss-service_3_2.dtd">
| <server>
| <mbean code="service.XMBeanTestService"
| name="XMBeanTest:module=configuration"
| xmbean-dd="META-INF/xmbean.xml">
| <depends>
| jboss.j2ee:ear=madeup.ear,jar=madeup.jar,name=madeup,service=EJB3
| </depends>
| </mbean>
| </server>
|
and xmbean.xml :
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE mbean PUBLIC "-//JBoss//DTD JBOSS XMBEAN 1.0//EN"
| "http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_0.dtd">
| <mbean>
| <descriptors>
| <persistence persistPolicy="OnUpdate"
| ...
| <persistence-manager
| value="org.jboss.mx.persistence.DelegatingPersistenceManager" />
| </descriptors>
| <class>service.XMBeanTestService</class>
| <attribute access='read-write' getMethod='getProperty'
| ...
| </attribute>
| <operation>
| <name>create</name>
| ...
|
I've packaged all of this into the sar archive. After deployment server.log shows :
| 01:00:26,177 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
| --- MBeans waiting for other MBeans ---
| ObjectName: XMBeanTest:module=configuration
| State: CONFIGURED
| I Depend On:
| jboss.j2ee:ear=madeup.ear,jar=madeup.jar,name=madeup,service=EJB3
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: jboss.j2ee:ear=madeup.ear,jar=madeup.jar,name=madeup,service=EJB3
| State: NOTYETINSTALLED
| Depends On Me:
| XMBeanTest:module=configuration
|
And this is ok, but when sar is placed whithin ear (ear-test.ear), things looks different :
| 01:20:57,661 INFO [EARDeployer] Init J2EE application:
| file:/opt/install/jboss-4.2.0.GA/server/default/deploy/ear-test.ear
| 01:20:57,803 INFO [EARDeployer] Started J2EE application:
| file:/opt/install/jboss-4.2.0.GA/server/default/deploy/ear-test.ear
|
No error message and my XMBeanTest is visible in JMX console. I'm stuck with this. Can someone please help me? Thank you in advance.
(Jboss 4.2.0GA)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061523#4061523
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061523
18Â years, 9Â months
[JBossWS] - setHeader and setServerURL, using javax.xml.ws.Service?
by ericï¼ attask.com
Trying to integrate into SalesForce using JBossws1.2 SP1 instead of Axis.
I've generated the java stubs and I can connect just fine. One I login I'm given a new SeverURL and a sessionID. I need to change the location that I connect to and I need to attach the SessionID to the soap Bindings for every subsequent request.
| QName q = new QName("urn:partner.soap.sforce.com", "SforceService");
| SforceService service = new SforceService(urlToWSDL, q);
| LoginResult lr = service.getSoap().login("username", "password");
| System.out.println("lr.getServerUrl() = " + lr.getServerUrl());
| System.out.println("lr.getSessionId() = " + lr.getSessionId());
SforceService extends javax.xml.ws.Service and it was generated by wsconsume from the sales-force partner wsdl.
I need to set the new server url to the lr.getServerUrl and I need to include the lr.getSessionId as a SOAP header.
I can get this to work using Axis but I want to use JBossWS.
--------USING AXIS ---------
SforceService service extends org.apache.axis.client.Stub. The axis org.apache.axis.client.Stub provides _setProperty and setHeader
Example:
| service._setProperty(SoapBindingStub.ENDPOINT_ADDRESS_PROPERTY, serverURL);
and
SessionHeader sessionHeader = new SessionHeader();
| sessionHeader.setSessionId(sessionID);
| // Add the header to the binding stub.
| String sforceURI = new SforceServiceLocator().getServiceName().getNamespaceURI();
| service.setHeader(sforceURI, "SessionHeader", sessionHeader);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061520#4061520
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061520
18Â years, 9Â months
[JBoss Seam] - problem configuring SMPC with Glassfish
by laksu
Hi,
I have followed some topics from the forum and tried to convert my application to use SMPC.
I use Glassfish and Seam 1.2.1
Here is my components.xml:
|
| <?xml version="1.0" encoding="UTF-8"?>
|
| <components xmlns="http://jboss.com/products/seam/components"
| xmlns:core="http://jboss.com/products/seam/core"
| xmlns:security="http://jboss.com/products/seam/security"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="
| http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.1.xsd
| http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.1.xsd
| http://jboss.com/products/seam/security http://jboss.com/products/seam/security-1.1.xsd
| ">
| <core:init jndi-pattern="java:comp/env/gop-ejb/#{ejbName}/local" debug="true"/>
|
| <core:manager conversation-timeout="120000"
| concurrent-request-timeout="500"
| conversation-id-parameter="cid"
| conversation-is-long-running-parameter="clr"/>
|
|
| <core:entity-manager-factory name="gopFactory" persistence-unit-name="gopent-ejbPU" />
| <core:managed-persistence-context name="entityManager" auto-create="true" entity-manager-factory="#{gopFactory}"/>
| <core:entity-converter entity-manager="${entityManager}"/>
|
| <core:transactionListener/>
|
| <security:identity authenticate-method="#{otantikamator.otantikmi}"/>
|
| <event type="org.jboss.seam.notLoggedIn">
| <action expression="#{redirect.captureCurrentView}"/>
| </event>
| <event type="org.jboss.seam.postAuthenticate">
| <action expression="#{redirect.returnToCapturedView}"/>
| </event>
|
| <component class="org.jboss.seam.web.MultipartFilter">
| <property name="createTempFiles">true</property>
| <property name="maxRequestSize">1000000</property>
| </component>
|
| <event type="isteklerRefresh">
| <action expression="#{isteklerAra.refresh}"/>
| </event>
|
| </components>
|
and my persistence.xml:
|
| <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="transaction-type=" transaction-type="JTA">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>jdbc/gop</jta-data-source>
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="update"/>
| <property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/>
| <property name="hibernate.show_sql" value="true"/>
| <!--property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/-->
| <!--property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/-->
| <!--property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" /-->
| </properties>
| </persistence-unit>
| </persistence>
|
I receive a rather absurd exception upon deployment:
| WEB0100: Loading web module [gop:gop-war.war] in virtual server [server] at [/gop-war]
| WebModule[/gop-war]Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
| java.lang.NullPointerException:
| at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:120)
| at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
| at org.jboss.seam.core.EntityManagerFactory.startup(EntityManagerFactory.java:74)
| 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:597)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:123)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1842)
| at org.jboss.seam.Component.callCreateMethod(Component.java:1757)
| at org.jboss.seam.Component.newInstance(Component.java:1746)
| at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:175)
| at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:145)
| at org.jboss.seam.init.Initialization.init(Initialization.java:504)
| at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4236)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4760)
| at com.sun.enterprise.web.WebModule.start(WebModule.java:292)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:833)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:817)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:662)
| at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1479)
| at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1143)
| at com.sun.enterprise.web.WebContainer.loadJ2EEApplicationWebModules(WebContainer.java:1068)
| at com.sun.enterprise.server.TomcatApplicationLoader.load(TomcatApplicationLoader.java:128)
| at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:322)
| at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:216)
| at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:189)
| at com.sun.enterprise.server.ApplicationManager.applicationEnabled(ApplicationManager.java:754)
|
toplink?
I must be missing something.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061518#4061518
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061518
18Â years, 9Â months
[JBossWS] - using a derived class from javax.xml.ws.Service I need to ca
by ericï¼ attask.com
Trying to integrate into SalesForce using JBossws1.2 SP1 instead of Axis.
I've generated the java stubs and I can connect just fine. One I login I'm given a new SeverURL and a sessionID. I need to change the location that I connect to and I need to attach the SessionID to the soap Bindings for every subsequent request.
| QName q = new QName("urn:partner.soap.sforce.com", "SforceService");
| SforceService service = new SforceService(urlToWSDL, q);
| LoginResult lr = service.getSoap().login("username", "password");
| System.out.println("lr.getServerUrl() = " + lr.getServerUrl());
| System.out.println("lr.getSessionId() = " + lr.getSessionId());
SforceService extends javax.xml.ws.Service and was generated by wsconsume from the sales-force partner wsdl.
I need to set the new server url to the lr.getServerUrl and I need to include the lr.getSessionId as a SOAP header.
I can get this to work using Axis but I want to use JBossWS.
--------USING AXIS ---------
SforceService service extends org.apache.axis.client.Stub. The axis org.apache.axis.client.Stub provides _setProperty and setHeader
Example:
| service._setProperty(SoapBindingStub.ENDPOINT_ADDRESS_PROPERTY, serverURL);
and
SessionHeader sessionHeader = new SessionHeader();
| sessionHeader.setSessionId(sessionID);
| // Add the header to the binding stub.
| String sforceURI = new SforceServiceLocator().getServiceName().getNamespaceURI();
| service.setHeader(sforceURI, "SessionHeader", sessionHeader);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061513#4061513
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061513
18Â years, 9Â months
[JBoss Seam] - check for jbpm out of order page request
by lklm
Hello.
I'll describe scenario I developed.
Pages used in page flow "p1, p2, p3, pfinal".
Transitions:
p1 to p2
p2 to p3
p3 to pfinal
eg. p1 -> p2 -> p3 -> pfinal
p1 starts conversation, pfinal ends conversation
p2,p3,pfinal requires conversation.
Now let's consider out of order requests.
1. When no conversation exists I point the browser to p2 or p3 or pfinal - this works as expected the browser is redirected to no-conversation-view-id.
2. I enter page p1, conversation is started.Next I point the browser manually to page p3.
Page p3 is displayed with "garbage" - no logic in p2 was executed.
Buttons on page redirect to p1 of course.
My question is: can seam redirect the request to page p3 to go to proper page (p1 in this case) ?
I see that seam has org.jboss.seam.core.pageflow in conversation scope with "page" and "node" properties set to "p1" but it seems that it is checked only on POST requests. Can this be also checked on GET requests or resolved in some other manner ?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061508#4061508
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061508
18Â years, 9Â months