I downloaded JBoss 5.1 and unzipped to
~/jboss/
such that JBoss is installed into:
~/jboss/jboss-5.1.0.GA/
I run the default deployment by using the following command found in jboss/jboss-5.1.0.GA/bin
./run.sh -c default
While JBoss starts (http://127.0.0.1:8080/), admin-console is not deployed. The log file:
jboss/jboss-5.1.0.GA/server/default/log
shows the following information:
DEPLOYMENTS IN ERROR:
Deployment "vfsfile:/Users/jackwootton/jboss/jboss-5.1.0.GA/server/default/deploy/admin-console.war/" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: URL file:/Users/jackwootton/jboss/jboss-5.1.0.GA/server/default/tmp/az6n6v-tjilfb-h32fokxn-1-h32fosuo-v/admin-console.war/ deployment failed
Deployment "vfszip:/Users/jackwootton/jboss/jboss-5.1.0.GA/server/default/deploy/quartz-ra.rar/" is in error due to the following reason(s): org.apache.commons.logging.LogConfigurationException: User-specified log class 'org.apache.commons.logging.impl.Log4JLogger' cannot be found or is not useable.
The Log4J jar file exists in:
jboss/jboss-5.1.0.GA/lib/jboss-logging-log4j.jar
I have three questions:
Have I understood the problem correctly (i.e. that admin-console cannot find the required Log4j JAR file and therefore is not deployed)?
What can I do to fix this problem?
Why would an out-of-the-box deployment have this problem in the first place?
When I run emacs with -nw option, the emacs really open, but I can't do more nothing. As if the user input is blocked and no keyboard signal is received and/or interpreted. I've tried run without load .emacs file and some other behaviors:
emacs -nw -Q --no-desktop --debug-ini foo.c
But makes no difference and strangely the GUI-version(using Gtk) is working fine.
My gnu-emacs version is GNU Emacs 23.3.1
Any help to help to fix it is very appreciated.
My first time posting a question here so please do not mind my mistakes here.
I'm currently making an android application fetching and sending information from a .asmx web service.
Everything goes well with the ksoap2 library and am using HttpTransportSE to call the web service. So now what I'm trying to do is to use the HttpsTransportSE to call the web service over Https. I got java.security.cert.certpathvalidatorexception trustanchor for certpath not found exception.
I have the server certificate in .pfx , .jks and .bks format.
My questions is what do i do with it to make my HttpsTransportSE call to be success?
I've read around with articles using custom SSLSocketFactory but am still not sure how to implement it in my application.
Thanks in advance for any suggestion/advices
I already set USE_L10N = True in settings.py
But in following view:
from django.contrib.humanize.templatetags.humanize import intcomma
dev view_name(request):
output = intcomma(123456)
Output is always "123,456" for all locales.
Obviously there is no public GUID.TryParse() in .NET CLR 2.0.
So, I was looking into regular expressions [aka googling around to find one] and each time I found one there was a heated argument in the comments section about RegEx A doesn't work, use RegEx B. Then someone would write Regex C yadda yadda
So anyway, What I decided to do was this, but I feel bad about it.
public static bool IsGuid (string possibleGuid) {
try {
Guid gid = new Guid(possibleGuid);
return true;
} catch (Exception ex) {
return false;
}
}
Obviously I don't really like this since it's been drilled into me since day one to avoid throwing exceptions if you can defensibly code around it.
Does anyonek now why there is no public Guid.TryParse() in the .NET Framework?
Does anyone have a real Regular Expression that will work for all GUIDs?
var groups = from p in dc.Pool
join pm in dc.PoolMembers on p.ID equals pm.PoolID
group p by p.Group into grp
select new { grp.ID };
This isn't working. Basically I want to do the grouping, and then select certain columns, but when I do select new { grp. } I get no intellisense, so I'm obviously doing something wrong.
Any ideas?
Hi, I need to get a particular version string from a file (call it version.lst) and use it to compare another in a shell script. For example sake, the file contains lines that look like this:
V1.000 -- build date and other info here -- APP1
V1.000 -- build date and other info here -- APP2
V1.500 -- build date and other info here -- APP3
.. and so on. Let's say I am trying to grab the first version (in this case, V1.000) from APP1. Obviously, the versions can change and I want this to be dynamic. What I have right now works:
var = `cat version.lst | grep " -- APP1" | grep -Eo V[0-9].[0-9]{3}`
Pipe to grep will get the line containing APP1 and the second pipe to grep will get the version string. However, I hear grep is not the way to do this so I'd like to learn the best way using awk or sed. Any ideas? I am new to both and haven't found a tutorial easy enough to learn the syntax of it. Do they support egrep? Thanks!
I need to access some constants in my jsp, and sadly the EL does not offer any functionality for it.
There are some options like the unstandard tag library, but I'd like to keep it a bit more standard.
I tried:
<%@ page import = "com.jackdane.Constants"%>
<c:if test="${object.display == '<%=com.jackdane.Constants.YES %>}'">
//some display logic
</c:if>
But that doesn't appear to do the trick.
It's been a while since I've used an expression so I might have made an error. Any input is appreciated.
Edit:
To clarify, the constants class is not in my control. It's inside a jar file that I recieved.
It contains no getters/setters.
Just private static final Strings.
This query fails when I add the line shown...
:BEGIN FAIL:
I have this so far
Select Companyid, count(*) as cnt
from mytable
where State is not null
and cnt = 1 <------------------------- FAIL
group by CompanyID
:END FAIL:
Any way to do this?
Here's a long winded background if it'll help....
I have a single table query.
here's a sample of the table:
CompanyID, State
1,OH
1,IL
1,NY
2,IL
3,NY
3,OH
4,NY
5,CA
5,WA
I want a query that'll return something like this:
2,IL
4,NY
I have this so far
Select Companyid, count(*) as cnt
from mytable
where State is not null
group by CompanyID
This gives me a count of the number of records for each company.
IE:
1,3
2,1
3,2
4,1
5,2
Now I want to filter the above list to just the two records with one result.
I tried adding another where clause, but it failed:
BEGIN FAIL:
I have this so far
Select Companyid, count(*) as cnt
from mytable
where State is not null
and cnt = 1 <-------------------- FAIL
group by CompanyID
END FAIL:
Is it possible to use NServiceBus to publish and consume messages in the same application, specifically a web application?
In the future we will almost certainly need to maintain a separate long running service to process messages generated by this application, and this is why we are hoping to use NServiceBus from the start, but right now it would be nice to just start up the consumer and the publisher when the web application starts. This will make testing and deployment far easier for us.
I presume I will need to reference the NServiceBus.Host.exe and start up the process in the global.asax, but need help on what exactly I need to call to do this.
Hi,
I have a 'for' loop which extracts data from an XML document and adds it into some JavaScript objects, each time the loop executes I want it to run a certain function depending on the value of the attribute 'typ' which is being retrieved from the xml.
Currently, the data from the XML is successfully being parsed, which is proven by the first 'alert' you can see which produces the correct value.
However, neither of the 'alert' lines in the 'if' statement lower down are being executed and as a result I cannot test the 'ctyp3' function which is supposed to be called.
Where have I gone wrong?
for (j=0; j<arrayIds.length; j++)
{
$(xml).find("C[ID='" + arrayIds[j] + "']").each(function(){
// pass values
questions[j] = {
typ: $(this).attr('typ'),
width: $(this).find("I").attr('wid'),
height: $(this).find("I").attr('hei'),
x: $(this).find("I").attr('x'),
y: $(this).find("I").attr('x'),
baC: $(this).find("I").attr('baC'),
boC: $(this).find("I").attr('boC'),
boW: $(this).find("I").attr('boW')
}
alert($(this).attr('typ'));
if ($(this).attr('typ') == '3')
{
ctyp3(x,y,width,height,baC);
alert('pass');
} else {
// Add here
alert('fail');
}
});
}
Hi, I am curious, do new compilers use some extra features built into new CPUs such as MMX SSE,3DNow! and so? I mean, in original 8086 there was even no FPU, so compiler that old cannot even use it, but new compilers can, since FPU is part of every new CPU. So, does new compilers use new features of CPU? Or, it should be more right to ask, does new C/C++ standart library functions use new features? Thanks for answer.
I have multiple email addresses linked to my gmail account.
I am signed up to some email groups that send emails out with
To: [email protected]
I can't remember which email address I used to sign up for this group. How do I find out which email address this was addressed to?
I have this struct:
struct foo {
char *a;
char *b;
char *c;
char *d;
};
it's possible allocate space for struct itself and its members instead of e.g,
struct foo f;
f.a = malloc();
f.b = malloc();
f.c = malloc();
f.d = malloc();
strcpy(f.a, "a");
strcpy(f.b, "b");
//..
something like this(of couse that it doesn't works):
struct foo f = malloc(sizeof(struct f));
strpcy(f.a, "a");
//etc
I would like some help with this code, I have read similar questions & answers here on stackoverflow but I still can't get it right.
I have a link that populated by .html("") to read more…
when clicked it opens the hidden div and at the end the .html("") reads less.
When I click close the div slides closed but the text still reads less…
I have read many articles on how to do this but am confused and can't get past this last hurdle, any help would be much appreciated.
// this is the intro div
Ligula suspendisse nulla pretium, rhoncus tempor placerat fermentum, enim integer ad vestibulum volutpat. Nisl rhoncus turpis est, vel elit, congue wisi enim nunc ultricies sit, magna tincidunt. Maecenas aliquam maecenas ligula nostra, accumsan taciti.
// this next div is hidden
Ligula suspendisse nulla pretium, rhoncus tempor placerat fermentum, enim integer ad vestibulum volutpat. Nisl rhoncus turpis est, vel elit, congue wisi enim nunc ultricies sit, magna tincidunt. Maecenas aliquam maecenas ligula nostra, accumsan taciti.
$(document).ready(function() {
$(".overview-continued").hide();
$(".show-overview").html("more...");
$(".show-overview").click(function() {
$(".overview-continued").slideToggle("1000");
$(".show-overview").html("less...");
return false;
});
});
I'm writing a program in .net where the user may provide a large number of regular expressions. For a given string, I need to figure out which regular expression matches that string (if more than one matches, I just need the first one that matches). However, if there are a large number of regular expressions this operation can take a very long time.
I was somewhat hoping there would be something similar to flex for .net that would allow me to specify a large number of regular expressions yet quickly (O(n) according to Wikipedia for n = len(input string)) figure out which regular expression matches.
Also, I would prefer not to implement my own regular expression engine :).
Hi,
what I want to do is to know where (not in terms of position (x, y), but a reference to the DOM element) an object was dropped.
I have a grid made up with divs where you can drop various items and I need to know which div on the grid was the item dropped on (getting its id would be fine). The callback function
function(event, ui) { //code here }
has just that ui object who doesn't apparently contain any information about this, but only about the draggable item or its helper.
I am trying to use the isAuthorized() method to do a check for an admin flag, but the function never seems to be called. Even when I set the function to always return false, it allows any user. It just seems like it isn't being called.
Do I need to do something more than setting $this-Auth-authorize = 'controller' ?
from /app/app_controller.php
class AppController extends Controller
{
var $components = array('Auth');
function beforeFilter()
{
$this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');
$this->Auth->loginRedirect = array('controller' => 'pages', 'display' => 'home');
$this->Auth->logoutRedirect = '/';
$this->Auth->authorize = 'controller';
$this->Auth->userScope = array('User.active' => 1);
}
function isAuthorized()
{
if (strpos($this->action, "admin_") != false)
{
if ($this->Auth->user('isAdmin') == '0')
{
return false;
}
}
return true;
}
}
Hi,
I need to access some data from an MS Access database and retrieve some data from it using PHP.
I've looked around the web, and found the following line which seems to correctly connect to the database:
$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\wamp\www\data\MYDB.mdb");
However, I have tried to retrieve some data in the following way:
$query = "SELECT pageid FROM pages_table";
$result = mysqli_query($conn, $query);
$amount_of_pages = 0;
if(mysqli_num_rows($result) <= 0)
echo "No results found.";
else
while($row = mysqli_fetch_array($result, MYSQL_ASSOC))
$amount_of_pages++;
And was presented with the following errors:
Warning: mysqli_query() expects parameter 1 to be mysqli, object given in C:\wamp\www\data\index.php on line 19
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in C:\wamp\www\data\index.php on line 23
No results found.
I don't really understand the connection to the Access database, is there something I should be doing differently?
Thanks in advance for any help.
Hi, me again :)
I am very curious in messing up with HW. But my top level "messing" so far was linked or inline assembler in C program. If my understanding of CPU and ring mode is right, I cannot directly from user mode app access some low level CPU features, like disabling interrupts, or changing protected mode segments, so I must use system calls to do everything I want.
But, if I am right, drivers can run in ring mode 0. I actually don´t know much about drivers, but this is what I ask for. I just want to know, is learning how to write your own drivers and than call them the way I should go, to do what I wrote?
I know I could write whole new OS (at least to some point), but what I exactly want to do is acessing some low level features of HW from standart windows application. So, is driver the way to go?
Hi,
I am using the code from this tutorial to parse a CSV file and add the contents to a database table. How would I ignore the first line of the CSV file? The controller code is below:
def csv_import
@parsed_file=CSV::Reader.parse(params[:dump][:file])
n = 0
@parsed_file.each do |row|
s = Student.new
s.name = row[0]
s.cid = row[1]
s.year_id = find_year_id_from_year_title(row[2])
if s.save
n = n+1
GC.start if n%50==0
end
flash.now[:message] = "CSV Import Successful, #{n} new students added to the database."
end
redirect_to(students_url)
end
I'm trying to access an FTP server from my PHP script using Codeigniter's FTP Library. These functions work great, but when testing the script I discovered that if I attempt to connect to a server that does not exist, the script does not terminate with an error message of any kind.
The page continues to execute, until the web server gives up, returning an empty document.
So I am wondering, is there a way to limit the amount of time that Codeigniter can try to connect to an FTP server, then display a message if that times out?
I tried using the php function set_time_limit(), but it does not behave how I expected it to.
Thanks for your help.
Hi,
I need to generate a random port number between 2000-65000 from a shell script. The problem is $RANDOM is only a 16bit number, so im stuck!
PORT=$(($RANDOM%63000+2001)) would work nicely if it wasn't for the size limitation.
Does anyone have an example of how I can do this, maybe by extracting something from /dev/urandom and getting it within a range?
Thanks.