[JBoss JIRA] Created: (JBSEAM-4661) Chatroom example doesn't work as expected on JBossAS 6 M3
by Martin Gencur (JIRA)
Chatroom example doesn't work as expected on JBossAS 6 M3
---------------------------------------------------------
Key: JBSEAM-4661
URL: https://jira.jboss.org/browse/JBSEAM-4661
Project: Seam
Issue Type: Bug
Components: Examples
Affects Versions: 2.2.1.CR1
Environment: JBossAS M3 (jboss-as-distribution-6.0.0.20100429-M3)
Reporter: Martin Gencur
Nothing happens after entering name and clicking on "Connect" button in chatroom example. JBossAS log shows the following error:
16:39:19,143 ERROR [org.jboss.seam.remoting.messaging.SubscriptionRegistry] java.lang.NullPointerException
16:39:19,151 ERROR [org.jboss.seam.remoting.Remoting] Error: java.lang.NullPointerException
at org.jboss.seam.remoting.messaging.SubscriptionRequest.marshal(SubscriptionRequest.java:31) [:2.2.1-SNAPSHOT]
at org.jboss.seam.remoting.SubscriptionHandler.marshalResponse(SubscriptionHandler.java:107) [:2.2.1-SNAPSHOT]
at org.jboss.seam.remoting.SubscriptionHandler.handle(SubscriptionHandler.java:96) [:2.2.1-SNAPSHOT]
at org.jboss.seam.remoting.Remoting.getResource(Remoting.java:111) [:2.2.1-SNAPSHOT]
at org.jboss.seam.servlet.SeamResourceServlet.service(SeamResourceServlet.java:80) [:2.2.1-SNAPSHOT]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Beta2]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:336) [:6.0.0.20100429-M3]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.20100429-M3]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) [:2.2.1-SNAPSHOT]
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [:2.2.1-SNAPSHOT]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.1-SNAPSHOT]
at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) [:2.2.1-SNAPSHOT]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.1-SNAPSHOT]
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) [:2.2.1-SNAPSHOT]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.1-SNAPSHOT]
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [:2.2.1-SNAPSHOT]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.1-SNAPSHOT]
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [:2.2.1-SNAPSHOT]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.1-SNAPSHOT]
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [:2.2.1-SNAPSHOT]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.20100429-M3]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.20100429-M3]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:293) [:6.0.0.20100429-M3]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.20100429-M3]
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183) [:6.0.0.20100429-M3]
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95) [:6.0.0.20100429-M3]
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) [:6.0.0.20100429-M3]
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) [:6.0.0.20100429-M3]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.20100429-M3]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.20100429-M3]
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.20100429-M3]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.20100429-M3]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [:6.0.0.20100429-M3]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:872) [:6.0.0.20100429-M3]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [:6.0.0.20100429-M3]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.20100429-M3]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_16]
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 5 months
[JBoss JIRA] Created: (SEAMFORGE-26) Facets & Plugins need a way of determining the most current available version of a dependency
by Lincoln Baxter III (JIRA)
Facets & Plugins need a way of determining the most current available version of a dependency
---------------------------------------------------------------------------------------------
Key: SEAMFORGE-26
URL: https://issues.jboss.org/browse/SEAMFORGE-26
Project: Seam Forge
Issue Type: Feature Request
Components: Plugin API
Affects Versions: 1.0.0.Alpha1
Reporter: Lincoln Baxter III
Fix For: 1.0.0.Alpha2
Right now, there is no good way of inspecting Dependency repositories for available versions of a given artifact. For example:
=================================================
public class DataProcessor
{
@Inject
private HttpClient client;
/**
* @param client the client to set
*/
void setClient(HttpClient client)
{
this.client = client;
}
public <T> T process(URL url, final ContentHandler<T> handler)
{
HttpGet get = new HttpGet(url.toExternalForm());
try
{
return client.execute(get, new ResponseHandler<T>()
{
@Override
public T handleResponse(HttpResponse response) throws ClientProtocolException, IOException
{
StringBuilder content = new StringBuilder();
BufferedReader in = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
String line;
while( (line = in.readLine()) != null)
{
content.append(line);
}
in.close();
return handler.proces(content.toString());
}
});
}
catch (Exception e)
{
throw new RuntimeException(e);
}
}
public interface ContentHandler<T>
{
T proces(String content);
}
}
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.seam.forge.arquillian.util;
import javax.enterprise.context.Dependent;
import javax.enterprise.inject.Disposes;
import javax.enterprise.inject.Produces;
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
/**
* HttpClientProducer
*
* @author <a href="mailto:aslak@redhat.com">Aslak Knutsen</a>
* @version $Revision: $
*/
public class HttpClientProducer
{
@Produces @Dependent
public HttpClient createClient()
{
return new DefaultHttpClient();
}
public void destroyClient(@Disposes HttpClient client)
{
}
}
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.seam.forge.arquillian.util;
import java.net.URL;
import java.util.List;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;
import javax.inject.Inject;
/**
* VersionsProducer
*
* @author <a href="mailto:aslak@redhat.com">Aslak Knutsen</a>
* @version $Revision: $
*/
public class VersionsProducer
{
@Inject
private DataProcessor processor;
@Produces @ApplicationScoped
public List<String> fetchVersions() throws Exception
{
return processor.process(
new URL("http://repository.jboss.org/nexus/content/groups/public/org/jboss/arquill..."),
new ExtractVersionNumber());
}
}
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.seam.forge.arquillian.util;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* ExtractVersionNumber
*
* @author <a href="mailto:aslak@redhat.com">Aslak Knutsen</a>
* @version $Revision: $
*/
public class ExtractVersionNumber implements DataProcessor.ContentHandler<List<String>>
{
/* (non-Javadoc)
* @see org.jboss.seam.forge.arquillian.util.DataProcessor.ContentHandler#proces(java.lang.String)
*/
@Override
public List<String> proces(String content)
{
List<String> versions = new ArrayList<String>();
try
{
Pattern pattern = Pattern.compile("<a\\b[^>]*href=\"[^>]*>(.*?)/</a>");
Matcher matcher = pattern.matcher(content);
int mIdx = 0;
while (matcher.find())
{
mIdx++;
if(mIdx == 1)
{
continue;
}
String rawVersion = matcher.group(1);
if(include(rawVersion))
{
versions.add(rawVersion);
}
}
}
catch (Exception e)
{
throw new RuntimeException("Could not extract version numbers", e);
}
return versions;
}
/**
* @param rawVersion
* @return
*/
private boolean include(String rawVersion)
{
return !rawVersion.matches(".*(SP1|SP2|SP3|OSGi).*");
}
}
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 5 months