启动ActiveMQ异常:java.net.URISyntaxException: Illegal character in hostname at index解决办法

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qq_39056805/article/details/80749337

首先,我要吐槽一下网上对于这个问题的解决方案,抄过来抄过去都一个样,连正确性都不测试一下......

首先翻译一下这个异常,就是:主机名中包含非法字符,那么非法字符是什么呢?是“_”下划线;

那么解决办法就很简单了,改主机名:

1、方法一使用hostnamectl命令

hostnamectl set-hostname  主机名

2、方法二:修改配置文件  /etc/hostname 保存退出

修改完成之后重启即可,这里我使用的是方法一:

hostnamectl set-hostname  activemq

重启后效果:

然后启动ActiveMQ并查看状态:



搞定  收工

展开阅读全文

illegal character是什么问题?

02-08

初学JAVA,书上照抄了段代码如下:rnimport javax.swing.*; //插入javax.swing包rnimport java.awt.*;    //插入java.awt包rnpublic class Frame1 rn rn  JFrame frameObj; //声明JFrame类对象rn  public Frame1()    //创建构造符函数rn  rn   frameObj=new JFrame("1"); //创建JFrame对象rn   frameObj.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);rn   frameObj.setVisible(true);rn   frameObj.setSize(240,90);rn rnrnpublic class J01_Framernrn public static void main(String[]args)rn rn new Frame();rn Frame j01Obj=new Frame();rn rnrn编译后23个错误rnC:\java\Frame1.java:9: illegal character: \12288rnimport java.awt.*;    //插入java.awt包rn ^rnC:\java\Frame1.java:9: illegal character: \12288rnimport java.awt.*;    //插入java.awt包rn ^rnC:\java\Frame1.java:9: illegal character: \12288rnimport java.awt.*;    //插入java.awt包rn ^rnC:\java\Frame1.java:9: illegal character: \12288rnimport java.awt.*;    //插入java.awt包rn ^rnC:\java\Frame1.java:12: illegal character: \12288rn  JFrame frameObj; //声明JFrame类对象rn^rnC:\java\Frame1.java:12: illegal character: \12288rn  JFrame frameObj; //声明JFrame类对象rn ^rnC:\java\Frame1.java:12: expectedrn  JFrame frameObj; //声明JFrame类对象rn ^rnC:\java\Frame1.java:13: illegal character: \12288rn  public Frame1()    //创建构造符函数rn^rnC:\java\Frame1.java:13: illegal character: \12288rn  public Frame1()    //创建构造符函数rn ^rnC:\java\Frame1.java:13: illegal character: \12288rn  public Frame1()    //创建构造符函数rn ^rnC:\java\Frame1.java:13: illegal character: \12288rn  public Frame1()    //创建构造符函数rn ^rnC:\java\Frame1.java:13: illegal character: \12288rn  public Frame1()    //创建构造符函数rn ^rnC:\java\Frame1.java:14: illegal character: \12288rn  rn^rnC:\java\Frame1.java:14: illegal character: \12288rn  rn ^rnC:\java\Frame1.java:15: illegal character: \12288rn   frameObj=new JFrame("1"); //创建JFrame对象rn^rnC:\java\Frame1.java:15: illegal character: \12288rn   frameObj=new JFrame("1"); //创建JFrame对象rn ^rnC:\java\Frame1.java:16: illegal character: \12288rn   frameObj.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);rn^rnC:\java\Frame1.java:16: illegal character: \12288rn   frameObj.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);rn ^rnC:\java\Frame1.java:17: illegal character: \12288rn   frameObj.setVisible(true);rn^rnC:\java\Frame1.java:17: illegal character: \12288rn   frameObj.setVisible(true);rn ^rnC:\java\Frame1.java:18: illegal character: \12288rn   frameObj.setSize(240,90);rn^rnC:\java\Frame1.java:18: illegal character: \12288rn   frameObj.setSize(240,90);rn ^rnC:\java\Frame1.java:19: expectedrn rn ^rn23 errorsrn请问是什么情况,应该不是字符间空格的问题,请指教 论坛

SyntaxError: illegal XML character

11-14

下面是自己的代码rnrnjavascript代码:rnfunction initialize() rn var latlng = new google.maps.LatLng(34.397, 108.644);rn var myOptions = rn zoom: 5,rn center: latlng,rn mapTypeId: google.maps.MapTypeId.HYBRIDrn ;rn var map = new google.maps.Map(document.getElementById("map_canvas"),rn myOptions); rn rn <% GetRootIDArray(); %>; rn rn var loction = [];rn var markers = [];rn for (i = 0; i < mycars.length; i++) rn location[i] = new google.maps.LatLng(mycars[i][0], mycars[i][1]);rn marker = new google.maps.Marker(rn position: location[i],rn map: maprn );rn markers.push(marker);rn rn for (var i = 0; i < markers.length; i++) rn markers[i].setMap(map);rn rnrnrngoogle.maps.event.addDomListener(window, 'load', initialize);rnrnrnaxpx框架代码:rnrnrn samplern rn rn rn rn rnrnrn rn rn 基于Google Maps的世界地震展示与查询系统rn rn rn rn rn rn rn rn rnrnrnrnrnaxpx.cs代码:rnnamespace WebApplication1rnrn public partial class _Default : System.Web.UI.Pagern rnrn private ConnectGDB connectGDB;rnrn protected void Page_Load(object sender, EventArgs e)rn rn rn rnrn protected void GetRootIDArray()rn rnrn connectGDB = new ConnectGDB();rn if (!connectGDB.connectDB())rn rn return;rn rn string str = "select longitude, latitude from EQ19918+";rn DataTable dt = connectGDB.getTable(str);rn System.Text.StringBuilder text = new System.Text.StringBuilder();rnrn Response.Write("var mycars=new Array();");rnrn for (int i = 0; i < dt.Rows.Count; i++)rn rn text.AppendFormat("mycars[0] = new Array('1','2');", i.ToString(), dt.Rows[i]["jingdu"].ToString(), dt.Rows[i]["weidu"].ToString());rn rnrn text.Remove(text.Length - 1, 1);rn Response.Write(text);rnrn connectGDB.closeDB();rnrn rnrn rnrnrnrnrnrn在vs2008中:rn <% GetRootIDArray(); %>; 这个地方提示应为表达式rnrnrn在火狐浏览器中有如下错误:rnrnSyntaxError: illegal XML characterrnhttp://localhost:2907/JS/HelloWorld.jsrnLine 11rnrnrnrnrn请大神指教是什么问题,谢谢 论坛

java.lang.ClassFormatError: Illegal constant pool index

05-26

各位大哥大姐:rn我一个应用启动的时候,报了一个如下的错误,不知如何处理??rnrnjava.lang.ClassFormatError: Illegal constant pool indexrnINFO | jvm 1 | 2009/05/26 13:00:41 | at java.lang.ClassLoader.defineClass0(Native Method)rnINFO | jvm 1 | 2009/05/26 13:00:41 | at java.lang.ClassLoader.defineClass(ClassLoader.java:539)rnINFO | jvm 1 | 2009/05/26 13:00:41 | at java.lang.ClassLoader.defineClass(ClassLoader.java:448)rnINFO | jvm 1 | 2009/05/26 13:00:41 | at com.huawei.isap.jarloader.ISAPClassLoader.findClass(ISAPClassLoader.java:147)rnINFO | jvm 1 | 2009/05/26 13:00:41 | at java.lang.ClassLoader.loadClass(ClassLoader.java:289)rnINFO | jvm 1 | 2009/05/26 13:00:41 | at java.lang.ClassLoader.loadClass(ClassLoader.java:235)rnINFO | jvm 1 | 2009/05/26 13:00:41 | at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)rnINFO | jvm 1 | 2009/05/26 13:00:41 | at java.lang.Class.forName0(Native Method)rnINFO | jvm 1 | 2009/05/26 13:00:41 | at java.lang.Class.forName(Class.java:141)rnINFO | jvm 1 | 2009/05/26 13:00:41 | at com.huawei.uniportal.deploy.service.ISAPDeployer.addContext(ISAPDeployer.java:178)rnINFO | jvm 1 | 2009/05/26 13:00:41 | at com.huawei.uniportal.deploy.service.ISAPDeployer.deployService(ISAPDeployer.java:169)rnINFO | jvm 1 | 2009/05/26 13:00:41 | at com.huawei.uniportal.deploy.service.ISAPDeployer.deploy(ISAPDeployer.java:128)rnINFO | jvm 1 | 2009/05/26 13:00:41 | at com.huawei.uniportal.deploy.service.ISAPDeployer.post_init(ISAPDeployer.java:231)rnINFO | jvm 1 | 2009/05/26 13:00:41 | at com.huawei.dopra.DopraSystemImpl$PostInitializerThread.run(DopraSystemImpl.java:687) 论坛

没有更多推荐了,返回首页