[Installation, Configuration & Deployment] - Isolating web app classpath
by sselda
Hi.
I have two web apps:
- an older web app (directory app-prod.war in server/default/deploy)
- a newer web app (directory app-dev.war in server/default/deploy)
the two web apps are the same project, an older and a newer release.
The jars inside every WEB-INF/lib are the same, the newer has obviously new classes or new methos/attributes.
I use:
- JDK 1.4.2
- JBoss 3.2.6
- Spring 1.2.8
- Struts 1.2.9
- Web app version 2.4
When I start JBoss, the app-dev web app cannot deploy correctly because starts after app-prod web app. I think uses in its classpath the jars in WEB-INF/lib of the oldest web app: in fact it doesn't see the changes described in its Spring XML files because uses the jars of app-prod, which is inconsistent with XML files of more recent app-dev.
If I undeploy app-prod.war and reboot JBoss, app-dev.war is deployed correctly.
My questions are:
1) is there any JBoss configuration to set to force every web app uses in its classpath only the jar specified in the shared libraries and its WEB-INF/lib or WEB-INF/classes and not the jar specified in other web apps?
2) is there any JBoss configuration to set to force insert of jars in WEB-INF/lib and classes in WEB-INF/classes in classpath before shared libraries to prevent version incompatibility with jar's older version existing for example in server/default/lib?
NOTE: the same web apps in Tomcat 5.0.28 standalone starts correctly without problems.
Thanks
sselda
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990382#3990382
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990382
19 years, 8 months
[JCA/JBoss] - Re: Integrating / Deploying SunOne OpenMessageQueue with JBo
by jsalvo
FYI .... I have implemented a JMSProviderAdapter taken from the code in this link:
http://swforum.sun.com/jive/thread.jspa?threadID=45414
.. although instead of using LDAP, I am simply using a filestore for the administered objects. I have then created a JAR for the the JMSProviderAdapter implementation class, placed it into server/lib.
Then I added the following in deploy/jms/jms-ds.xml ( I did NOT replace the DefaultJMSProvider ):
| <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
| name="jboss.mq:service=JMSProviderLoader,name=SunOneJMSProvider">
| <attribute name="ProviderName">SunOneJMSProvider</attribute>
| <attribute name="ProviderAdapterClass">
| org.jboss.jms.jndi.JMSProviderAdapterSunOneImpl
| </attribute>
| <!-- The combined connection factory -->
| <attribute name="FactoryRef">java:/SunOneXAConnectionFactory</attribute>
| <!-- The queue connection factory -->
| <attribute name="QueueFactoryRef">java:/SunOneQueueXAConnectionFactory</attribute>
| <!-- The topic factory -->
| <attribute name="TopicFactoryRef">java:/SunOneTopicXAConnectionFactory</attribute>
| <attribute name="Properties">
| java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
| java.naming.provider.url=file:///home/jsalvo/workspace/softgame-latest/development/conf/sunone/mq/test
| </attribute>
| </mbean>
|
So far, everything is starting up ... though I have not yet tried anything useful.
Will update soon.
John
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990378#3990378
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990378
19 years, 8 months
[JBossWS] - Problem with xsd:enumeration in jbossws 1.0.3
by kcp
Hello,
I am using JBossAS 4.0.5. The included wstools (jbossws 1.0.3SP1) seem to have a problem with xsd:enumeration.
My Wsdl is of type docment-literial with elementFormDefault="qualified" and looks as follows:
| [...]
| <xsd:complexType name="ForecastRequestData">
| <xsd:sequence>
| <xsd:element minOccurs="0" name="accountID" nillable="true" type="xsd:string"/>
| <xsd:element minOccurs="0" name="contentMatchMaxBid" nillable="true" type="xsd:double"/>
| <xsd:element minOccurs="0" name="geoTargets" nillable="true" type="tns:ArrayOfString"/>
| <xsd:element minOccurs="0" name="marketID" nillable="true" type="xsd:string"/>
| <xsd:element minOccurs="0" name="matchTypes" nillable="true" type="tns:ArrayOfForecastMatchType"/>
| <xsd:element minOccurs="0" name="sponsoredSearchMaxBid" nillable="true" type="xsd:double"/>
| </xsd:sequence>
| </xsd:complexType>
| <xsd:complexType name="ArrayOfForecastMatchType">
| <xsd:sequence>
| <xsd:element maxOccurs="unbounded" minOccurs="0" name="ForecastMatchType" nillable="true" type="tns:ForecastMatchType"/>
| </xsd:sequence>
| </xsd:complexType>
| <xsd:simpleType name="ForecastMatchType">
| <xsd:restriction base="xsd:string">
| <xsd:enumeration value="AdvancedMatch"/>
| <xsd:enumeration value="ContentMatch"/>
| <xsd:enumeration value="SponsoredSearch"/>
| </xsd:restriction>
| </xsd:simpleType>
| [...]
|
When I use the wstools to generate java classes from the wsdl, I do not get classes for "ForecastMatchType" and "ArrayOfForecastMatchType". I the "ForecastRequestData" the member "matchTypes" is a String[].
When I deploy this classes and the JaxRPC-Mapping JBoss can not parse the response message. I get as error:
| ERROR [CallImpl] Call invocation failed with unkown Exception
| javax.xml.soap.SOAPException: Could not transmit message
| [...]
| Caused by: javax.xml.rpc.JAXRPCException: org.jboss.xb.binding.JBossXBRuntimeException: Failed to find neither value() nor getValue() in class java.lang.String which is bound to enumeration type {somenamespace}ForecastMatchType
| [...]
| Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Failed to find neither value() nor getValue() in class java.lang.String which is bound to enumeration type {somenamespace}ForecastMatchType
I managed to solve the problem, by adding the missing classes and mapping entries manually (as described in http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983950). But, as I have some more wsdls with about 20 enums in total, this solution will not work ;-)
I tried to use jbossws 1.0.4, but I ran into the same problem as in http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987393
I have two questions:
1) Will the wstools in jbossws 1.0.4 be fixed before the official release of 1.0.5 (which according to jiro is scheduled for Feb 2007?
2) Does jbossws 1.0.4 handle enums correct, or is this scheduled for a later version?
I am grateful for any help.
Regards
Charly
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990372#3990372
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990372
19 years, 8 months
[JCA/JBoss] - Re: Integrating / Deploying SunOne OpenMessageQueue with JBo
by jsalvo
"jsalvo" wrote :
| SunOne OMQ comes distributed with a RAR archive ( imqjmsra.rar ). However, I could not find information on how to go about deploying it inside of JBoss:
|
| 1) Do I just copy the .rar archive onto the deploy directory ?
|
Answering myself on that part. I modified the ra.xml inside the RAR file so that it connects to the proper IP and port of the remotely running SunOneMQ, and copied the RAR file into the deploy directory. That's working fine now. The SunOneMQ RA is deployed:
| 2006-12-01 18:05:35,686 DEBUG [org.jboss.system.ServiceController] starting service jboss.jca:service=RARDeployment,name='imqjmsra.rar'
| 2006-12-01 18:05:35,686 DEBUG [org.jboss.resource.deployment.RARDeployment] Starting jboss.jca:service=RARDeployment,name='imqjmsra.rar'
| 2006-12-01 18:05:35,744 ERROR [STDERR] 1/12/2006 18:05:35 com.sun.messaging.jms.ra.ResourceAdapter start
| INFO: MQJMSRA_RA1101: SJSMQ JMS Resource Adapter starting...
| ================================================================================
| Sun Java(tm) System Message Queue 4.0
| Sun Microsystems, Inc.
| Version: 4.0 (Build 28-a)
| Compile: Tue May 2 09:50:18 PDT 2006
|
| Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
| SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
| This product includes code licensed from RSA Data Security.
| ================================================================================
| 18:05:37,649 ERROR [STDERR] 1/12/2006 18:05:37 com.sun.messaging.jms.ra.ResourceAdapter start
| INFO: MQJMSRA_RA1101: SJSMQ JMS ResourceAdaapter configuration=
| < .. snip ..>
|
| 18:05:37,653 ERROR [STDERR] 1/12/2006 18:05:37 com.sun.messaging.jms.ra.ResourceAdapter start
| INFO: MQJMSRA_RA1101: SJSMQ JMSRA Started
|
anonymous wrote :
| 2) What do I need to configure in the various xml files ( e.g. jms-ds.xml, etc... ) so that it uses SunOne OMQ ....:
| 2a) ... in addition to JBossMQ ?
| 2b) ... as a replacement for JBossMQ ?
|
The only thing now is, do I have to change the any JBoss specific XML files ?
Regards,
John
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990367#3990367
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990367
19 years, 8 months
[JCA/JBoss] - Re: Problem with writing JCA adapter
by LGSW_Sam
Hi Weston!
I also noticed that my matchManagedConnections(Set connections, Subject subject, ConnectionRequestInfo info)
connections.size() is always 1..
I have checked that I do get connections.
Here is my cleanup and destroy methods.
|
| private AbstractProtocolHandler handler;
| private Vector <Object> handles;
|
| // Goes throu every item in handles and sets value of valid to false
| public void cleanup() throws ResourceException {
| synchronized (this) {
| for (Iterator it = handles.iterator(); it.hasNext(); )
| {
| Invalidatable i = (Invalidatable)it.next();
| i.invalidate();
| }
| handles = new Vector();
| attributes = new HashMap();
| }
| }
|
| public void invalidate() {
| setValid(false);
| }
|
| // Sets value of closing to true and if there is handler then disconnects its connection.
| public void destroy() throws ResourceException {
| synchronized (this) {
| this.closing = true;
| if (handler != null) {
| try {
| handler.disconnect();
| } catch (ProtocolHandlerException e) {
| e.printStackTrace();
| }
| }
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990363#3990363
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990363
19 years, 8 months
[JBoss Seam] - Failed to deploy icefaces example to JBoss 4.0.5.GA
by tinchen
JBoss 4.0.5.GA + Seam 1.1.0RC1
After typing "ant deploy" under icefaces example dir, I got following err msg on the JBoss 4.0.5.GA console:...
| 14:24:15,244 INFO [FacesConfigurator] Reading config /WEB-INF/navigation.xml
| 14:24:15,265 INFO [FacesConfigurator] Reading config /WEB-INF/faces-config.xml
| 14:24:15,482 WARN [LocaleUtils] Locale name in faces-config.xml null or empty, setting locale to default locale : zh_TW
| 14:24:15,506 INFO [D2DViewHandler]
| ICEsoft Technologies, Inc.
| ICEfaces x.x.x x
| Build number: x
| Revision: x
|
| 14:24:15,512 ERROR [[/seam-icefaces]] Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
| java.lang.NoClassDefFoundError: com/sun/facelets/impl/ResourceResolver
| at java.lang.Class.getDeclaredConstructors0(Native Method)
| at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
| at java.lang.Class.getConstructor0(Class.java:2671)
| at java.lang.Class.getConstructor(Class.java:1629)
| at org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:548)
| ...
If you have any idea please tell me, thanks very much.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990362#3990362
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990362
19 years, 8 months
[JBoss Seam] - @Logger use in POJO (& TestNG)
by joff
I have an ordinary POJO class, from which I want to use the Seam logger.
I'm having a bit of trouble, however, using this POJO class, both from a Stateless bean, and from a TestNG test class.
First, the Bean:
...
| @Stateless
| @Name("echo")
| public class EchoBean implements Echo {
| @Logger private Log log;
|
| @In
| FacesMessages facesMessages;
|
| @In
| Pojo pojo;
|
| public String echo() {
| log.info("echo.echo() action called");
|
| pojo.doEcho("Echo Me!");
|
| facesMessages.add("echo");
| return "success";
| }
| }
Then the POJO:
...
| @Name("pojo")
| public class Pojo {
| @Logger Log log;
|
| public String doEcho(String text) {
| log.info("Echoing: "+text);
| return text;
| }
| }
and for completeness, the TestNG testcase:
...
|
| public class PojoTests extends SeamTest {
| @In Pojo pojo;
|
| @Test
| public void testDoEcho() throws Exception {
| assert pojo.doEcho("hello world!").equals("hello world!");
| }
| }
At the moment, we're seeing this:
javax.ejb.EJBTransactionRolledbackException: org.jboss.seam.RequiredException: In attribute requires value for component: echo.pojo
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:93)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
| ...
I get basically the same problem from running inside a full JBoss AS install, as well as the TestNG/Eclipse/embedded-ejb environment.
When we remove the '@In' parts from the calling class (either the testcase or the bean) we get a NullPointerException in the POJO here:
log.info("Echoing: "+text);
which we take to mean that the logger isn't being injected for the POJO.
Is this even the correct approach? Basically the end-goal is to be able to use the logger in POJOs as well as inside of beans, and to be able to use TestNG to unit test them.
Any help would be greatly appreciated :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990339#3990339
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990339
19 years, 8 months
[JBoss Seam] - Re: @Out and default ScopeType
by dan.j.allen
I understand my problem. In this particular case, my entity being outjected is a Seam component but not marked with a scope. Therefore, it is taking on the default EVENT scope. If I don't specify the scope on the @Out annotation, my data is placed in the event context, and thus the data does not survive past the redirect. If I add @Scope(CONVERSATION) atop the User class, then it works as expected.
So the point is that it is required to add @Scope(CONVERSATION) either on the entity or on the scope attribute of the @Out annotation for the data to be included in the conversation context if the data IS a seam component. If the User class was not a Seam component, then it would default to the scope of the component outjecting the data. I managed to find myself right between the two scenarios, and hence out of luck.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990338#3990338
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990338
19 years, 8 months