[JNDI/Naming/Network] - Failed to connect to server 10.0.1.170:1099
by ccc7919
I have this error message when I run Jbuilder & Jboss 4 on the lookup();
Please help me out to make this work !!
this is the code for environment
| 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://10.0.1.170:1099/");
|
this is the error message
| javax.naming.CommunicationException: Failed to connect to server 10.0.1.170:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 10.0.1.170:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at test2.HelloTestClient.initialize(HelloTestClient.java:25)
| at test2.HelloTestClient.<init>(HelloTestClient.java:15)
| at test2.HelloTestClient.main(HelloTestClient.java:93)
| Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server 10.0.1.170:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:243)
| ... 7 more
| Caused by: java.net.ConnectException: Connection refused: connect
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
| at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
| at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
| at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
| at java.net.Socket.connect(Socket.java:507)
| at java.net.Socket.connect(Socket.java:457)
| at java.net.Socket.<init>(Socket.java:365)
| at java.net.Socket.<init>(Socket.java:265)
| at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
| at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:239)
| ... 7 more
| javax.naming.CommunicationException: Could not obtain connection to any of these urls: 10.0.1.170:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server 10.0.1.170:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 10.0.1.170:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at test2.HelloTestClient.initialize(HelloTestClient.java:25)
| at test2.HelloTestClient.<init>(HelloTestClient.java:15)
| at test2.HelloTestClient.main(HelloTestClient.java:93)
| Caused by: javax.naming.CommunicationException: Failed to connect to server 10.0.1.170:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 10.0.1.170:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)
| ... 6 more
| Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server 10.0.1.170:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:243)
| ... 7 more
| Caused by: java.net.ConnectException: Connection refused: connect
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
| at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
| at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
| at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
| at java.net.Socket.connect(Socket.java:507)
| at java.net.Socket.connect(Socket.java:457)
| at java.net.Socket.<init>(Socket.java:365)
| at java.net.Socket.<init>(Socket.java:265)
| at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
| at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:239)
| ... 7 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962604#3962604
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962604
18 years, 5 months
[JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob
by sbryzak2
"rlhr" wrote :
|
|
| | Wed Aug 02 2006 14:56:55 GMT+0200 (Romance Daylight Time): Response packet:
| | <envelope>
| | <header>
| | <context><conversationId>12</conversationId></context>
| | </header>
| | <body>
| | <result id="1">
| | <value>
| | <bag>
| | <element><ref id="0"/></element>
| | <element><ref id="1"/></element>
| | <element><ref id="2"/></element>
| | </bag>
| | </value>
| | <refs>
| | <ref id="0"><bean type="javax.faces.model.SelectItem"></bean></ref>
| | <ref id="1"><bean type="javax.faces.model.SelectItem"></bean></ref>
| | <ref id="2"><bean type="javax.faces.model.SelectItem"></bean></ref>
| | </refs>
| | </result>
| | </body>
| | </envelope>
| |
It looks like the field values for SelectItem aren't being serialized after all. I'll take a look at this today and see if I can come up with something that will work for the cases where the field naming doesn't match the getter/setter names.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962602#3962602
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962602
18 years, 5 months
[EJB 3.0] - Is Disciminator used in @OneToMany?
by edvedafi
I have a Entity (A) that has a List of Bservices and one Baccount record. Bservice and Baccount both inherit from an abstract class B and are both stored in table B. The code below is how I thought it should work, but it does not. When I try to deploy it says there is a "broken column mapping a.id of B". If I change A to have a OneToMany relationship with Baccount it will deploy but then I get this exception in the client when I call a.getBs().
| javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.WrongClassException: Object with id: ... was not of the specified subclass: bAccount
|
In an attempt to figure out what is going on I commented out all the relationship information for Baccount so that A had a set of Bservices, but knew nothing of Baccounts. In this case I got all the B records (both BService and Baccount) when I called a.getBs(). Does a Join ignore the DiscriminatorValues? Shouldn't the inheratence take care of not populating Bservice with records that have a different discriminator value? If so is there any way around this to only load Bservices into bs and Baccounts into bAccount, without writing a query for each and having to execute both queries to load the objects?
| @Entity
| @DiscriminatorValue(value="C")
| public class Bservice extends B implements java.io.Serializable {
|
| private A a;
|
| @ManyToOne(cascade=CascadeType.ALL, fetch=FetchType.EAGER)
| @JoinColumns( { @JoinColumn(name="LOC", insertable=false, updatable=false),
| @JoinColumn(name="CUST_NO", insertable=false, updatable=false),
| @JoinColumn(name="CYC_YEAR", insertable=false, updatable=false),
| @JoinColumn(name="CYC", insertable=false, updatable=false),
| @JoinColumn(name="CYC_END_DAY", insertable=false, updatable=false) } )
| public A getA() {
| return a;
| }
|
| public void setA(Aa) {
| this.a= a;
| }
| @Entity
| @DiscriminatorValue(value="A")
| public class Baccount extends B implements java.io.Serializable {
|
| private A a;
|
| @OneToOne(cascade=CascadeType.ALL, fetch=FetchType.EAGER)
| @JoinColumns( { @JoinColumn(name="LOC", insertable=false, updatable=false),
| @JoinColumn(name="CUST_NO", insertable=false, updatable=false),
| @JoinColumn(name="CYC_YEAR", insertable=false, updatable=false),
| @JoinColumn(name="CYC", insertable=false, updatable=false),
| @JoinColumn(name="CYC_END_DAY", insertable=false, updatable=false) } )
| public Isumcust getIsumcust() {
| return isumcust;
| }
|
| public void setA(A a) {
| this.a= a;
| }
| }
| @Entity
| @Table(name="A")
| public class A implements java.io.Serializable {
|
| @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER)
| @JoinColumns( { @JoinColumn(name="LOC", insertable=false, updatable=false),
| @JoinColumn(name="CUST_NO", insertable=false, updatable=false),
| @JoinColumn(name="CYC_YEAR", insertable=false, updatable=false),
| @JoinColumn(name="CYC", insertable=false, updatable=false),
| @JoinColumn(name="CYC_END_DAY", insertable=false, updatable=false) } )
| public Set<Bservice> getBs()
| {
| return this.bs;
| }
|
| public void setIsummains( Set<Bservice> bs)
| {
| this.bs= bs;
| }
|
| @OneToOne(cascade=CascadeType.ALL, fetch=FetchType.EAGER)
| @JoinColumns( { @JoinColumn(name="CUST_NO", referencedColumnName="CUST_NO", insertable=false, updatable=false),
| @JoinColumn(name="CYC_END_DAY", referencedColumnName="CYC_END_DAY", insertable=false, updatable=false),
| @JoinColumn(name="CYC", referencedColumnName="CYC", insertable=false, updatable=false),
| @JoinColumn(name="CYC_YEAR", referencedColumnName="CYC_YEAR", insertable=false, updatable=false),
| @JoinColumn(name="LOC", referencedColumnName="LOC", insertable=false, updatable=false) } )
| public Baccount getBaccount() {
| return this.bAccount;
| }
|
| public void setIsummainAccount(Baccount bAccount) {
| this.bAccount = bAccount;
| }
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962597#3962597
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962597
18 years, 5 months
[Beginners Corner] - Speeding deployment during development
by metatime
Currently, I've a project that looks like this:
<?xml version="1.0" encoding="ISO-8859-1" ?>
| <application>
| <display-name>myproject</display-name>
| <module>
| <web>
| <web-uri>myproject.war</web-uri>
| <context-root>/myproject</context-root>
| </web>
| </module>
| <module>
| <ejb>myproject-ejb.jar</ejb>
| </module>
| </application>
The modules are packaged into myproject.ear and deployed to JBoss 4.0.3SP1. The deployment is to a remote box via scp, so the bigger the jars, wars, and ear, the longer the transfer takes.
The ejb portion is pretty stable; most work is being done in the front end. My front end developers (including me) complain about waiting for the transfer to complete - less than 2 minutes - just to see the results of tweaking some javascript or html.
Can I deploy these modules separately? That is, can my project be broken down into separately deployable subprojects - say one for ejbs, and one for html, css, javscript, jsp and servlets, etc? Is this type of packaging/deployment possible and practicle?
thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962595#3962595
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962595
18 years, 5 months