GlassFish5 在win10下启动失败。一直提示“错误: 找不到或无法加载主类 VS”

前几天想用一下GlassFish5,发现没法启动,实在找不到原因。

情况如下:

cmd 进入GlassFish5/glassfish/bin 目录下 执行 “asadmin start-domain”命令,几秒后提示 “找不到或无法加载主类 VS”如图:
图片说明

1、jdk是8u144版本,java和jre环境配置ok,java -version和javac -version都能正确执行。

2、GlassFish5和jdk存放的路径不包含空格

新手刚学java和javaee,这个问题我网上翻了几天方案都没法解决,大佬们如果有解决方案,烦请告知,万分感谢!

u010531500
菜鸟FIB007 哎,csdn这么少人嘛
6 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
测试glassfish服务器https://localhost:8181无法打开连接?
查询日志,提示: [2019-11-25T09:30:15.599+0800] [glassfish 5.0] [WARNING] [] [org.glassfish.grizzly.filterchain.DefaultFilterChain] [tid: _ThreadID=36 _ThreadName=http-listener-2(5)] [timeMillis: 1574645415599] [levelValue: 900] [[ GRIZZLY0013: Exception during FilterChain execution java.lang.NoClassDefFoundError: sun/security/ssl/HandshakeStateManage at sun.security.ssl.Handshaker.init(Handshaker.java:306) at sun.security.ssl.Handshaker.<init>(Handshaker.java:277) at sun.security.ssl.ServerHandshaker.<init>(ServerHandshaker.java:199) at sun.security.ssl.SSLEngineImpl.initHandshaker(SSLEngineImpl.java:489) at sun.security.ssl.SSLEngineImpl.kickstartHandshake(SSLEngineImpl.java:684) at sun.security.ssl.SSLEngineImpl.beginHandshake(SSLEngineImpl.java:757) at org.glassfish.grizzly.ssl.SSLBaseFilter$SSLTransportFilterWrapper.handleRead(SSLBaseFilter.java:1137) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:539) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:593) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573) at java.lang.Thread.run(Thread.java:748) ]] 请问什么原因?如何解决?
总是在启动glassfish,就是不运行
总是在启动glassfish,就是不运行![图片](https://img-ask.csdn.net/upload/201510/31/1446296029_227783.jpg)
glassfish无法启动的问题
谢谢。 问题:glassfish无法启动 操作系统: win7 Java: version "1.6.0_21" JDK: 1.6.0_21 (在xp机子和windows server 2008虚拟机里均能正常使用,但机子里装的win7,不行,暂时不想重装) glassfish 版本:v2和v3均无法启动(不知从何时开始任一JavaEE服务器都不能启动了) 通过netstat -ano 检查没有发现端口占用现象 从java运行环境到服务器重新安装都不起作用 贴一段glassfish的log: [code="java"] Caused by: java.io.IOException: Unable to establish loopback connection at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:106) at java.security.AccessController.doPrivileged(Native Method) at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:122) at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:27) at java.nio.channels.Pipe.open(Pipe.java:133) at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:104) at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:26) at java.nio.channels.Selector.open(Selector.java:209) at com.sun.corba.ee.impl.transport.SelectorImpl.startSelector(SelectorImpl.java:375) ... 33 more Caused by: java.net.ConnectException: Connection timed out: connect at sun.nio.ch.Net.connect(Native Method) at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507) at java.nio.channels.SocketChannel.open(SocketChannel.java:146) at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:78) ... 41 more [/code]
关于Glassfish部署javadb项目第一次启动无法连接
我做了个个人网站,就是基本的增删改查。网络项目。部署到了glassfish上,用的是javadb的数据库。 每次启动glassfish服务器以及javadb的端口,第一次都无法连接,必须要在glassfish的配置连接池里先ping一下,说数据库不存在,然后关掉javadb的那个端口黑框,重新打开一个就可以ping通了。请问要怎么弄才能在启动时一次就ping通呢?
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]
"C:\idea\IntelliJ IDEA 2019.2.4\jbr\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:56203,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dfile.encoding=UTF-8 -classpath "E:\java\develop\javacode\spring-boot\target\classes;E:\java\develop\javacode\spring-boot\lib\javaee.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\tyrus-container-servlet.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\javax.websocket-api.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\tyrus-container-glassfish-cdi.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\tyrus-server.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\tyrus-client.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\tyrus-spi.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\tyrus-container-grizzly.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\tyrus-core.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\tyrus-websocket-core.jar;E:\maven\maven_repository\org\springframework\boot\spring-boot-starter\2.0.1.RELEASE\spring-boot-starter-2.0.1.RELEASE.jar;E:\maven\maven_repository\org\springframework\boot\spring-boot\2.0.1.RELEASE\spring-boot-2.0.1.RELEASE.jar;E:\maven\maven_repository\org\springframework\spring-context\5.0.5.RELEASE\spring-context-5.0.5.RELEASE.jar;E:\maven\maven_repository\org\springframework\boot\spring-boot-autoconfigure\2.0.1.RELEASE\spring-boot-autoconfigure-2.0.1.RELEASE.jar;E:\maven\maven_repository\org\springframework\boot\spring-boot-starter-logging\2.0.1.RELEASE\spring-boot-starter-logging-2.0.1.RELEASE.jar;E:\maven\maven_repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\maven\maven_repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\maven\maven_repository\org\apache\logging\log4j\log4j-to-slf4j\2.10.0\log4j-to-slf4j-2.10.0.jar;E:\maven\maven_repository\org\apache\logging\log4j\log4j-api\2.10.0\log4j-api-2.10.0.jar;E:\maven\maven_repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;E:\maven\maven_repository\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;E:\maven\maven_repository\org\springframework\spring-core\5.0.5.RELEASE\spring-core-5.0.5.RELEASE.jar;E:\maven\maven_repository\org\springframework\spring-jcl\5.0.5.RELEASE\spring-jcl-5.0.5.RELEASE.jar;E:\maven\maven_repository\org\yaml\snakeyaml\1.19\snakeyaml-1.19.jar;E:\maven\maven_repository\org\springframework\boot\spring-boot-starter-web\2.0.1.RELEASE\spring-boot-starter-web-2.0.1.RELEASE.jar;E:\maven\maven_repository\org\springframework\boot\spring-boot-starter-json\2.0.1.RELEASE\spring-boot-starter-json-2.0.1.RELEASE.jar;E:\maven\maven_repository\com\fasterxml\jackson\core\jackson-databind\2.9.5\jackson-databind-2.9.5.jar;E:\maven\maven_repository\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;E:\maven\maven_repository\com\fasterxml\jackson\core\jackson-core\2.9.5\jackson-core-2.9.5.jar;E:\maven\maven_repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.5\jackson-datatype-jdk8-2.9.5.jar;E:\maven\maven_repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.5\jackson-datatype-jsr310-2.9.5.jar;E:\maven\maven_repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.5\jackson-module-parameter-names-2.9.5.jar;E:\maven\maven_repository\org\springframework\boot\spring-boot-starter-tomcat\2.0.1.RELEASE\spring-boot-starter-tomcat-2.0.1.RELEASE.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.29\tomcat-embed-core-8.5.29.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.29\tomcat-embed-el-8.5.29.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.29\tomcat-embed-websocket-8.5.29.jar;E:\maven\maven_repository\org\hibernate\validator\hibernate-validator\6.0.9.Final\hibernate-validator-6.0.9.Final.jar;E:\maven\maven_repository\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;E:\maven\maven_repository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;E:\maven\maven_repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;E:\maven\maven_repository\org\springframework\spring-web\5.0.5.RELEASE\spring-web-5.0.5.RELEASE.jar;E:\maven\maven_repository\org\springframework\spring-beans\5.0.5.RELEASE\spring-beans-5.0.5.RELEASE.jar;E:\maven\maven_repository\org\springframework\spring-webmvc\5.0.5.RELEASE\spring-webmvc-5.0.5.RELEASE.jar;E:\maven\maven_repository\org\springframework\spring-aop\5.0.5.RELEASE\spring-aop-5.0.5.RELEASE.jar;E:\maven\maven_repository\org\springframework\spring-expression\5.0.5.RELEASE\spring-expression-5.0.5.RELEASE.jar;E:\maven\maven_repository\org\mybatis\generator\mybatis-generator-core\1.3.5\mybatis-generator-core-1.3.5.jar;E:\maven\maven_repository\mysql\mysql-connector-java\8.0.11\mysql-connector-java-8.0.11.jar;E:\maven\maven_repository\com\google\protobuf\protobuf-java\2.6.0\protobuf-java-2.6.0.jar;E:\maven\maven_repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;C:\idea\IntelliJ IDEA 2019.2.4\lib\idea_rt.jar" com.aipuer.springboot.Application Connected to the target VM, address: '127.0.0.1:56203', transport: 'socket' . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.0.1.RELEASE) 2019-12-02 11:09:39.252 INFO 8852 --- [ main] com.aipuer.springboot.Application : Starting Application on PC-20191121IKBV with PID 8852 (E:\java\develop\javacode\spring-boot\target\classes started by Administrator in E:\java\develop\javacode\spring-boot) 2019-12-02 11:09:39.254 INFO 8852 --- [ main] com.aipuer.springboot.Application : No active profile set, falling back to default profiles: default 2019-12-02 11:09:39.281 INFO 8852 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@78641d23: startup date [Mon Dec 02 11:09:39 CST 2019]; root of context hierarchy WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/E:/maven/maven_repository/org/springframework/spring-core/5.0.5.RELEASE/spring-core-5.0.5.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release 2019-12-02 11:09:39.917 INFO 8852 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 2019-12-02 11:09:39.932 INFO 8852 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2019-12-02 11:09:39.932 INFO 8852 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.29 2019-12-02 11:09:39.936 INFO 8852 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\idea\IntelliJ IDEA 2019.2.4\jbr\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;E:\app\Administrator\product\11.2.0\dbhome_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;E:\java\development\jdk8\bin;E:\java\development\jdk8\jre\bin;E:\java\development\apache-maven-3.3.9-bin\bin;C:\Program Files\MySQL\MySQL Server 8.0\bin\;C:\Program Files\nodejs\;E:\java\svn\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Users\Administrator\AppData\Roaming\npm;.] 2019-12-02 11:09:39.981 ERROR 8852 --- [cat-startStop-1] org.apache.catalina.core.ContainerBase : A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]] at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:na] at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[na:na] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.29.jar:8.5.29] ... 6 common frames omitted Caused by: org.apache.catalina.LifecycleException: Failed to start component [Pipeline[StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5125) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] ... 6 common frames omitted Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.authenticator.NonLoginAuthenticator[]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardPipeline.startInternal(StandardPipeline.java:182) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] ... 8 common frames omitted Caused by: java.lang.NoSuchMethodError: 'java.lang.String javax.servlet.ServletContext.getVirtualServerName()' at org.apache.catalina.authenticator.AuthenticatorBase.startInternal(AuthenticatorBase.java:1186) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] ... 10 common frames omitted 2019-12-02 11:09:39.982 ERROR 8852 --- [ main] org.apache.catalina.core.ContainerBase : A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]] at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:na] at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[na:na] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.startup.Tomcat.start(Tomcat.java:367) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:107) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:86) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:409) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:174) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:179) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:152) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at com.aipuer.springboot.Application.main(Application.java:9) ~[classes/:na] Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] Caused by: org.apache.catalina.LifecycleException: A child container failed during start at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:949) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] ... 6 common frames omitted 2019-12-02 11:09:39.982 INFO 8852 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2019-12-02 11:09:39.983 WARN 8852 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat 2019-12-02 11:09:39.987 INFO 8852 --- [ main] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2019-12-02 11:09:39.990 ERROR 8852 --- [ main] o.s.boot.SpringApplication : Application run failed org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:155) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at com.aipuer.springboot.Application.main(Application.java:9) ~[classes/:na] Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:86) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:409) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:174) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:179) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:152) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] ... 8 common frames omitted Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.startup.Tomcat.start(Tomcat.java:367) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:107) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] ... 13 common frames omitted Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Tomcat]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] ... 15 common frames omitted Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] ... 17 common frames omitted Caused by: org.apache.catalina.LifecycleException: A child container failed during start at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:949) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] ... 19 common frames omitted Disconnected from the target VM, address: '127.0.0.1:56203', transport: 'socket' Process finished with exit code 1
netbean glassfish服务器启动不成功,求解决方案
最近,想用netbeans测试一个springmvc的项目,结果,出现了错误如下截图: ![图片说明](https://img-ask.csdn.net/upload/201705/06/1494080045_701549.png) 请知道解决方法的高手指教,谢谢!
glassfish5.0 不能编译jsp中引的类
公司的项目要求从jdk1.5升级到1.8,glassfish2.0升级到5.0,项目jdk1.8在tomcat9下跑正确,在glassfish5.0上跑出现如下错误。 报错信息 ``` [2017-11-20T13:34:04.752+0800] [glassfish 5.0] [SEVERE] [] [org.apache.jasper.compiler.Compiler] [tid: _ThreadID=32 _ThreadName=http-listener-1(5)] [timeMillis: 1511156044752] [levelValue: 1000] [[ Error compiling file: /gfHome/glassfish5/glassfish/nodes/localhost-domain1/pms_s1/generated/jsp/pms/org/apache/jsp/jsp/include/projectType_jsp.java]] [2017-11-20T13:34:04.753+0800] [glassfish 5.0] [WARNING] [] [javax.enterprise.web.core] [tid: _ThreadID=32 _ThreadName=http-listener-1(5)] [timeMillis: 1511156044753] [levelValue: 900] [[ Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP PWC6197: An error occurred at line: 9 in the jsp file: /jsp/include/projectType.jsp PWC6199: Generated servlet error: cannot find symbol symbol: method getArea() location: variable user of type com.ncs.itrust.aa.UserSessionInfo at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:129) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:299) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:392) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377) at javax.servlet.http.HttpServlet.service(HttpServlet.java:791) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1580) at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:819) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:639) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:570) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:977) at org.apache.jsp.jsp.projconfig.projSearchOwner_jsp._jspService(projSearchOwner_jsp.java:634) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) at javax.servlet.http.HttpServlet.service(HttpServlet.java:791) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377) at javax.servlet.http.HttpServlet.service(HttpServlet.java:791) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1580) at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:819) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:639) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:570) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:977) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:690) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462) at org.apache.jsp.jsp.tiles.layouts.Main_jsp._jspx_meth_tiles_get_1(Main_jsp.java:333) at org.apache.jsp.jsp.tiles.layouts.Main_jsp._jspService(Main_jsp.java:157) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) at javax.servlet.http.HttpServlet.service(HttpServlet.java:791) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377) at javax.servlet.http.HttpServlet.service(HttpServlet.java:791) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1580) at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:819) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:519) at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:490) at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:372) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:322) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263) at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:302) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) at com.ncs.h3c.spms.base.servlet.SpmsActionServlet.process(Unknown Source) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:686) at javax.servlet.http.HttpServlet.service(HttpServlet.java:791) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1580) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:338) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.ncs.iframe.extensions.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.ncs.itrust.aa.AAFilter.doFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.ncs.iframe.extensions.filter.LocaleFilter.doFilter(LocaleFilter.java:93) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:652) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:591) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:371) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:238) at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:463) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:168) ``` jsp页面: ``` <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@page import="com.ncs.itrust.aa.UserSessionInfo"%> <%@page import="org.apache.commons.lang.StringUtils"%> <%@ taglib uri="/WEB-INF/tld/iextend-codeLookup.tld" prefix="codeLookup"%> <%@ taglib uri="/WEB-INF/tld/iextend-session.tld" prefix="session"%> <%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%> <codeLookup:collection id="projectTypeList" codeType="area_type" noCache="true" sqlFilter="status='A'"/> <% // 登入者区域权限 UserSessionInfo user = (UserSessionInfo)session.getAttribute("AA_UserSessionInfo"); String myProjectTypes = user.getArea(); request.setAttribute("myProjectTypes",myProjectTypes); ``` UserSessionInfo类的页面 ``` public class UserSessionInfo implements IUserSessionInfo, Serializable { public static final String USER_SESSION_INFO = "AA_UserSessionInfo"; public static final String GROUP_TYPE_LIST_DELIMINATOR=","; ... public String getArea() { return area; } ```
用IDEA打jar包时报错:
用IDEA打jar包时报错: Failure to find org.glassfish:javax.el:pom:3.0.1-b06-SNAPSHOT in https://repository.apache.org/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of apache.snapshots has elapsed or updates are forced 我的工程依赖: <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase-server</artifactId> <version>2.0.6</version> </dependency>
急急急 java 实现把bmp转换一个dcm文件,但是生成dcm文件却无法打开,求助.
代码如下 ``` import org.dcm4che3.data.Attributes; import org.dcm4che3.data.Tag; import org.dcm4che3.data.VR; import org.dcm4che3.io.DicomEncodingOptions; import org.dcm4che3.io.DicomOutputStream; import java.io.BufferedInputStream; import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; public class TwoBmp2Dcm { private static byte[] buffer = new byte[54]; private static byte[] buff = new byte[8192]; private static int imageSize; private static DicomEncodingOptions encOpts = DicomEncodingOptions.DEFAULT; public static void main(String[] args) throws Exception { File file=new File("/Users/zhangdechang/Desktop/txt/timg.bmp"); File outdcm=new File("/Users/zhangdechang/Desktop/txt/998uuuu.dcm"); DataInputStream dis=new DataInputStream(new BufferedInputStream(new FileInputStream(file))); DicomOutputStream out =new DicomOutputStream(outdcm); Attributes attrs=new Attributes(); Attributes data=new Attributes(); attrs=addMetaInformation(attrs); data=addData(data); data=readHeader(data, dis); out.writeDataset(attrs, data); out.setEncodingOptions(encOpts); out.writeHeader(Tag.PixelData, VR.OW, imageSize*2); int r; while ((r = dis.read(buff)) > 0) { out.write(buff, 0, r); } out.close(); dis.close(); } public static Attributes readHeader(Attributes attrs ,DataInputStream dis) throws Exception{ dis.read(buffer,0,54); if((buffer[0]&0xff)!=0x42&&(buffer[1]&0xff)!=0x4d){ throw new Exception("Missing BM segment in Bmp stream"); } int imageRows=byteToInt(buffer,21); int imageColumns=byteToInt(buffer,25); imageSize=byteToInt(buffer,5)-54; int biBitCount=byteTo2Int(buffer,29); attrs.setInt (Tag.SamplesPerPixel, VR.US,3); attrs.setInt(Tag.Rows, VR.US, imageColumns<0?-imageColumns:imageColumns); attrs.setInt(Tag.Columns, VR.US, imageRows); attrs.setInt(Tag.BitsAllocated, VR.US,biBitCount );//biBitCount attrs.setInt(Tag.BitsStored, VR.US,32); attrs.setInt(Tag.HighBit, VR.US, 32); attrs.setInt(Tag.PixelRepresentation, VR.US, 0); attrs.setString(Tag.PhotometricInterpretation,VR.CS, "MONOCHROME2"); //PALETTE_COLOR MONOCHROME2 attrs.setString(Tag.RescaleSlope, VR.DS, "1.0"); attrs.setString(Tag.RescaleIntercept, VR.DS, "0.0"); attrs.setString(Tag.PixelSpacing,VR.DS, "0.25/0.25"); attrs.setInt(Tag.NumberOfFrames, VR.IS, 1); return attrs; } public static Attributes addData(Attributes attrs){ attrs.setString(Tag.SpecificCharacterSet, VR.CS, "GB18030"); attrs.setString(Tag.ImageType, VR.CS, "ORIGINAL/PRIMARY/AXIAL"); attrs.setString(Tag.InstanceCreationDate, VR.DA, "20130013"); attrs.setString(Tag.InstanceCreationTime, VR.TM, "175827"); attrs.setString(Tag.SOPClassUID, VR.UI, "1.2.840.10008.5.1.4.1.1.2"); attrs.setString(Tag.SOPInstanceUID, VR.UI, "1.3.6.1.4.1.30071.6.22744165.4288391077912169.1.3"); attrs.setString(Tag.StudyDate, VR.DA, "20130803"); attrs.setString(Tag.AcquisitionDateTime, VR.DT, "20130803000000"); attrs.setString(Tag.StudyTime, VR.TM, "175532"); attrs.setString(Tag.AccessionNumber, VR.SH, "0"); attrs.setString(Tag.Modality, VR.CS, "DX"); attrs.setString(Tag.Manufacturer, VR.LO, "LargeV"); attrs.setString(Tag.StudyDescription, VR.LO, "融合扫描图像"); attrs.setString(Tag.SeriesDescription, VR.LO, "融合扫描图像"); attrs.setString(Tag.ManufacturerModelName, VR.LO, "HighRes3D"); attrs.setString(Tag.PatientName, VR.PN, "mmmm"); attrs.setString(Tag.PatientBirthDate,VR.DA,"19920720"); attrs.setString(Tag.PatientSex, VR.CS, "F"); return attrs; } public static Attributes addMetaInformation( Attributes attrs){ attrs.setString(Tag.FileMetaInformationVersion, VR.OB, ""); attrs.setString(Tag.MediaStorageSOPClassUID, VR.UI, "1.2.840.10008.5.1.4.1.1.2"); attrs.setString(Tag.MediaStorageSOPInstanceUID, VR.UI, "1.3.6.1.4.1.30071.6.22744165.4288391077912169.1.18"); attrs.setString(Tag.TransferSyntaxUID, VR.UI, "1.2.840.10008.1.2.1"); attrs.setString(Tag.ImplementationVersionName, VR.SH, "SmartVDicom1.0"); attrs.setString(Tag.ImplementationClassUID, VR.UI, "1.3.6.1.4.1.30071.6"); attrs.setString(Tag.SourceApplicationEntityTitle, VR.AE, ""); return attrs; } public static int byteToInt(byte[] bi,int end){ int a=(((int)bi[end]&0xff)<<24) ; int b=(((int)bi[end-1]&0xff)<<16) ; int c=(((int)bi[end-2]&0xff)<<8) ; int d=(int)bi[end-3]&0xff; return a+b+c+d; } public static int byteTo2Int(byte[] bi,int end){ int c=(((int)bi[end]&0xff)<<8) ; int d=(int)bi[end-1]&0xff; return c+d; } } ``` 生成的dcm文件打开报错,无法打开。 ![图片说明](https://img-ask.csdn.net/upload/201912/17/1576562077_220062.jpeg) 需要依赖的jar ``` <dependency> <groupId>com.sun.media</groupId> <artifactId>clibwrapper_jiio</artifactId> <version>1.2-pre-dr-b04</version> </dependency> <dependency> <groupId>commons-cli</groupId> <artifactId>commons-cli</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-audit</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-conf-api</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-conf-core</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-conf-core-api</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-conf-dicom</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-core</artifactId> <version>5.17.0</version> </dependency> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-emf</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-filecache</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-hl7</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-image</artifactId> <version>5.17.0</version> </dependency> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-json</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che/dcm4che-mime --> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-mime</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-net</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che/dcm4che-net-audit --> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-net-audit</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-net-hl7</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che/dcm4che-soundex --> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-soundex</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-dcm2dcm</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-dcm2jpg --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-dcm2jpg</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-dcm2json --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-dcm2json</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-dcm2xml</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-dcmdict --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-dcmdict</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-dcmdir --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-dcmdir</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-dcmdump</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-dcmgen --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-dcmgen</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-dcmqrscp --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-dcmqrscp</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-dcmvalidate</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-emf2sf --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-emf2sf</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-findscu --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-findscu</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-getscu</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-hl7pix --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-hl7pix</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-hl7rcv --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-hl7rcv</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-hl7snd --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-hl7snd</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-hl72xml</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-ianscp --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-ianscp</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-ianscu</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool.ihe/dcm4che-tool-ihe-modality --> <dependency> <groupId>org.dcm4che.tool.ihe</groupId> <artifactId>dcm4che-tool-ihe-modality</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-jpg2dcm --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-jpg2dcm</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-json2dcm</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-mkkos --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-mkkos</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-movescu --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-movescu</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-mppsscp --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-mppsscp</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-mppsscu --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-mppsscu</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-prefs2xml --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-prefs2xml</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-qc --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-qc</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-qidors</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-stgcmtscu --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-stgcmtscu</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-storescp --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-storescp</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-storescu --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-storescu</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-stowrs --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-stowrs</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-syslog</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-syslogd --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-syslogd</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-wadors --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-wadors</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-wadouri --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-wadouri</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-xml2dcm</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-xml2hl7 --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-xml2hl7</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che.tool/dcm4che-tool-xml2prefs --> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-xml2prefs</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.dcm4che/dcm4che-ws-rs --> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-ws-rs</artifactId> <version>3.3.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.glassfish/javax.json --> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.json</artifactId> <version>1.0.4</version> </dependency> <dependency> <groupId>javax.json</groupId> <artifactId>javax.json-api</artifactId> <version>1.1.4</version> </dependency> <!-- https://mvnrepository.com/artifact/log4j/log4j --> <!--<dependency>--> <!--<groupId>log4j</groupId>--> <!--<artifactId>log4j</artifactId>--> <!--<version>1.2.17</version>--> <!--</dependency>--> <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.25</version> </dependency> <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.7.25</version> </dependency> <!-- 倒入jar --> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-imageio</artifactId> <version>5.17.0</version> </dependency> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-imageio-rle</artifactId> <version>5.17.0</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.dcm4che</groupId> <artifactId>dcm4che-imageio-opencv</artifactId> <version>5.17.0</version> <scope>runtime</scope> </dependency> <!--<dependency>--> <!--<groupId>com.sun.media</groupId>--> <!--<artifactId>jai_imageio</artifactId>--> <!--<version>1.2-pre-dr-b04</version>--> <!--<scope>runtime</scope>--> <!--</dependency>--> <dependency> <groupId>org.dcm4che.tool</groupId> <artifactId>dcm4che-tool-common</artifactId> <version>3.3.7</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.47</version> </dependency> ```
glassfish中不同步问题
在domain域中的module下的jar包,不能同步到实例下module下的jar,请问有大神遇到这样的情况啊。
运行netbeans时出现了一个问题,实在不懂怎么解决
启动GlassFish Server 4 正在运行GlassFish Server 4。 就地在D:\JavaEE课程\JSPba\build\web中部署 GlassFish Server 4, deploy, Connection refused: connect, false D:\JavaEE课程\JSPba\nbproject\build-impl.xml:1045: 尚未部署该模块。 有关详细信息, 请查看服务器日志。 构建失败 (总时间: 7 秒)
紧急:关于Glassfish配置web根目录问题
假如说 glassfish 指定的网站根目录是服务器的E盘,例如 访问E盘的某个MP3文件的URL链接是 http://www.test.com/webname/audio/213.mp3 由于服务器对硬盘只能是购买新的然后挂载,不能对原有硬盘进行扩容。现在的问题是,如果多了一个F盘,那么我想通过 http://www.test....的方式去访问F盘的音频文件怎么做呢?
glassfish https访问证书问题
我有个服务部署在glassfish上,用https访问那个服务会出现证书异常,就是安装glassfish自动生成的keystore.jsk的域名不对,怎么生成一个自签名的证书,替换掉glassfish默认的证书
我在win 7 家庭普通版 64bit 上安装glassfish-3.1.2.2-windows失败
安装时报错 Attempt to resolv method: getInterpreter() on undefined variable or class name: Scripting 具体请看附件图片 不知道哪儿错了,求大神解惑
启动weblogic时,报Timestamp is not of the correct length: 2041906221218Z.
1:weblogic启动报错,有用date -s "YYYY-MM-DD hh:mm:ss",可能是修改错了,打成了date -s "20419-MM-DD hh:mm:ss",后修改成正确时间,但是启动weblogic时,报Timestamp is not of the correct length: 2041906221218Z. 2:报错信息 <Jul 28, 2019 5:45:53 PM CST> <Error> <Security> <BEA-090870> <The realm "myrealm" failed to be loaded: weblogic.security.service.SecurityServiceException: com.bea.common.engine.ServiceInitializationException: <openjpa-1.1.1-SNAPSHOT-r422266:1445923 nonfatal store error> kodo.jdo.DataStoreException: [Security:097546]Timestamp is not of the correct length: 2041906221218Z.. weblogic.security.service.SecurityServiceException: com.bea.common.engine.ServiceInitializationException: <openjpa-1.1.1-SNAPSHOT-r422266:1445923 nonfatal store error> kodo.jdo.DataStoreException: [Security:097546]Timestamp is not of the correct length: 2041906221218Z. at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.postInitializeRealm(CommonSecurityServiceManagerDelegateImpl.java:476) at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.postLoadRealm(CommonSecurityServiceManagerDelegateImpl.java:861) at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.postInitializeRealms(CommonSecurityServiceManagerDelegateImpl.java:927) at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.postInitialize(CommonSecurityServiceManagerDelegateImpl.java:1109) at weblogic.security.service.SecurityServiceManager.postInitialize(SecurityServiceManager.java:943) Truncated. see log file for complete stacktrace Caused By: com.bea.common.engine.ServiceInitializationException: <openjpa-1.1.1-SNAPSHOT-r422266:1445923 nonfatal store error> kodo.jdo.DataStoreException: [Security:097546]Timestamp is not of the correct length: 2041906221218Z. at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:365) at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:315) at com.bea.common.engine.internal.ServiceEngineImpl.lookupService(ServiceEngineImpl.java:257) at com.bea.common.engine.internal.ServicesImpl.getService(ServicesImpl.java:72) at weblogic.security.service.CSSWLSDelegateImpl.getService(CSSWLSDelegateImpl.java:155) Truncated. see log file for complete stacktrace Caused By: <openjpa-1.1.1-SNAPSHOT-r422266:1445923 nonfatal store error> kodo.jdo.DataStoreException: [Security:097546]Timestamp is not of the correct length: 2041906221218Z. at com.bea.common.ldap.ParserImpl.toNestedLoadable(ParserImpl.java:721) at com.bea.common.ldap.ParserImpl.toLoadable(ParserImpl.java:676) at com.bea.common.ldap.ParserImpl.access$000(ParserImpl.java:47) at com.bea.common.ldap.ParserImpl$AttributeFieldBuilder.load(ParserImpl.java:411) at com.bea.common.ldap.ParserImpl.loadData(ParserImpl.java:245) Truncated. see log file for complete stacktrace > <Jul 28, 2019 5:45:53 PM CST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.> <Jul 28, 2019 5:45:53 PM CST> <Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason: There are 1 nested errors: weblogic.security.service.SecurityServiceRuntimeException: [Security:090399]Security services unavailable at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.doBootAuthorization(CommonSecurityServiceManagerDelegateImpl.java:974) at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.postInitialize(CommonSecurityServiceManagerDelegateImpl.java:1131) at weblogic.security.service.SecurityServiceManager.postInitialize(SecurityServiceManager.java:943) at weblogic.security.SecurityService.start(SecurityService.java:159) at weblogic.server.AbstractServerService.postConstruct(AbstractServerService.java:78) at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.glassfish.hk2.utilities.reflection.ReflectionHelper.invoke(ReflectionHelper.java:1017) at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:388) at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:430) at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456) at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:225) at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:82) at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2488) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98) at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:606) at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77) at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:231) at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:254) at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:413) at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456) at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:225) at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:82) at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2488) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98) at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:606) at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77) at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:231) at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:254) at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:413) at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456) at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:225) at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:82) at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2488) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98) at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:606) at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77) at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:231) at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:254) at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:413) at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456) at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:225) at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:82) at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2488) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87) at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162) at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147) at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneLevel.run(CurrentTaskFuture.java:753) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:548) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311) at weblogic.work.ExecuteThread.run(ExecuteThread.java:263) > <Jul 28, 2019 5:45:53 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED.> <Jul 28, 2019 5:45:53 PM CST> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down.> <Jul 28, 2019 5:45:53 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN.> 3:看报错信息,应该是安全监测的时候,发现时间长度不对。但是目前系统时间早就改成正确的了。 linex主机也重启过,清理过缓存。都没有用
war包部署到tomcat启动错误 求大神支招(本人不会java)
严重: Error during ServletContainerInitializer processing javax.servlet.ServletException: java.lang.InstantiationException: org.glassfish.tyrus.server.TyrusServerConfiguration at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:88) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5253) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:939) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1812) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.InstantiationException: org.glassfish.tyrus.server.TyrusServerConfiguration at java.lang.Class.newInstance(Class.java:427) at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:75) ... 12 more Caused by: java.lang.NoSuchMethodException: org.glassfish.tyrus.server.TyrusServerConfiguration.<init>() at java.lang.Class.getConstructor0(Class.java:3082) at java.lang.Class.newInstance(Class.java:412) ... 13 more
新手刚开始用netbeans,今天突然出现的问题
正在运行GlassFish Server 4.1。 就地在D:\netbean\项目\WebApplication1\build\web中部署 GlassFish Server 4.1, deploy, Connection refused: connect, false D:\netbean\项目\WebApplication1\nbproject\build-impl.xml:1045: 尚未部署该模块。 有关详细信息, 请查看服务器日志。 构建失败 (总时间: 7 秒)
在运行程序时候出现错误,无法找到持久化单元(JPA+Glassfish+EJB+JSF),谢谢!
在运行程序时候出现错误,无法找到持久化单元(JPA+Glassfish+EJB+JSF),谢谢!
两个GlassFish4.0服务器之间的远程EJB调用
两台服务器在不同的机器上,环境为jdk8,javaee7. 当我在一台服务器A上调用服务器B的时候,如果在普通的java main方法中调用 : InitialContext ctx = new InitialContext(); ctx.lookup("corbaname:iiop:192.168.0.210:3700#java:global/RemoteEjb/SayHelloService!rm.SayHelloServiceRemote"); Properties props = new Properties(); props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory"); props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming"); props.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl"); // 远程主机名 props.setProperty("org.omg.CORBA.ORBInitialHost", "192.168.1.210"); // 远程主机的缺省端口号 props.setProperty("org.omg.CORBA.ORBInitialPort", "3700"); // 创建远程上下文 InitialContext ctx = new InitialContext(props); // 查找EJB,其中查找的参数为远程接口类 System.out.println("k开始连接....................."); SayHelloServiceRemote testRmi = (SayHelloServiceRemote) ctx.lookup("java:global/RemoteEjb/SayHelloService"); testRmi.say(); System.out.println("k开始连接....................."); 这样总是会调用成功. 但是如果在javaee环境中,比如说servlet或者JSF的托管Bean中总是会出现各种错误,以下是我尝试的几种方法与对应的错误: 1.`采用glssfish的配置文件,并在托管bean中调(此处没有对JNDI名字做详细的记录,有误差,但是在实际测试的时候肯定是正确的)用:ctx.lookup("java:global/RemoteEJBName") <glassfish-web-app error-url=""> <ejb-ref> <ejb-ref-name>RemoteEJBName</ejb-ref-name> <jndi-name>corbaname:iiop:<servername or IP>:3700#java:global/<projectname>/FooClassImpl!com.test.foo.FooClass</jndi-name> </ejb-ref> </glassfish-web-app> ` 这种总是会报找不到JNDI之类的错误. 2.在托管Bean中类似在main方法中调用的一样. error:avax.naming.CommunicationException: Communication exception for SerialContext[myEnv={org.omg.CORBA.ORBInitialPort=3700, java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory, org.omg.CORBA.ORBInitialHost=192.168.1.104, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is java.rmi.RemoteException: CORBA INITIALIZE 0 No; nested exception is: .希望有人能指点一下,在两个glssFish服务器之间进行远程调用的具体细节.先谢过了..
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 free -m 其中:m表示兆,也可以用g,注意都要小写 Men:表示物理内存统计 total:表示物理内存总数(total=used+free) use...
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发...
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 演示地点演示 html代码如下` music 这个年纪 七月的风 音乐 ` 然后就是css`*{ margin: 0; padding: 0; text-decoration: none; list-...
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。
数据库优化 - SQL优化
以实际SQL入手,带你一步一步走上SQL优化之路!
通俗易懂地给女朋友讲:线程池的内部原理
餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
使用 Docker 部署 Spring Boot 项目
Docker 技术发展为微服务落地提供了更加便利的环境,使用 Docker 部署 Spring Boot 其实非常简单,这篇文章我们就来简单学习下。首先构建一个简单的 S...
英特尔不为人知的 B 面
从 PC 时代至今,众人只知在 CPU、GPU、XPU、制程、工艺等战场中,英特尔在与同行硬件芯片制造商们的竞争中杀出重围,且在不断的成长进化中,成为全球知名的半导体公司。殊不知,在「刚硬」的背后,英特尔「柔性」的软件早已经做到了全方位的支持与支撑,并持续发挥独特的生态价值,推动产业合作共赢。 而对于这一不知人知的 B 面,很多人将其称之为英特尔隐形的翅膀,虽低调,但是影响力却不容小觑。 那么,在...
面试官:你连RESTful都不知道我怎么敢要你?
干货,2019 RESTful最贱实践
刷了几千道算法题,这些我私藏的刷题网站都在这里了!
遥想当年,机缘巧合入了 ACM 的坑,周边巨擘林立,从此过上了"天天被虐似死狗"的生活… 然而我是谁,我可是死狗中的战斗鸡,智力不够那刷题来凑,开始了夜以继日哼哧哼哧刷题的日子,从此"读题与提交齐飞, AC 与 WA 一色 ",我惊喜的发现被题虐既刺激又有快感,那一刻我泪流满面。这么好的事儿作为一个正直的人绝不能自己独享,经过激烈的颅内斗争,我决定把我私藏的十几个 T 的,阿不,十几个刷题网...
白话阿里巴巴Java开发手册高级篇
不久前,阿里巴巴发布了《阿里巴巴Java开发手册》,总结了阿里巴巴内部实际项目开发过程中开发人员应该遵守的研发流程规范,这些流程规范在一定程度上能够保证最终的项目交付质量,通过在时间中总结模式,并推广给广大开发人员,来避免研发人员在实践中容易犯的错误,确保最终在大规模协作的项目中达成既定目标。 无独有偶,笔者去年在公司里负责升级和制定研发流程、设计模板、设计标准、代码标准等规范,并在实际工作中进行...
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
redis分布式锁,面试官请随便问,我都会
文章有点长并且绕,先来个图片缓冲下! 前言 现在的业务场景越来越复杂,使用的架构也就越来越复杂,分布式、高并发已经是业务要求的常态。像腾讯系的不少服务,还有CDN优化、异地多备份等处理。 说到分布式,就必然涉及到分布式锁的概念,如何保证不同机器不同线程的分布式锁同步呢? 实现要点 互斥性,同一时刻,智能有一个客户端持有锁。 防止死锁发生,如果持有锁的客户端崩溃没有主动释放锁,也要保证锁可以正常释...
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
Nginx 原理和架构
Nginx 是一个免费的,开源的,高性能的 HTTP 服务器和反向代理,以及 IMAP / POP3 代理服务器。Nginx 以其高性能,稳定性,丰富的功能,简单的配置和低资源消耗而闻名。 Nginx 的整体架构 Nginx 里有一个 master 进程和多个 worker 进程。master 进程并不处理网络请求,主要负责调度工作进程:加载配置、启动工作进程及非停升级。worker 进程负责处...
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
Java世界最常用的工具类库
Apache Commons Apache Commons有很多子项目 Google Guava 参考博客
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员...
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC...
【技巧总结】位运算装逼指南
位算法的效率有多快我就不说,不信你可以去用 10 亿个数据模拟一下,今天给大家讲一讲位运算的一些经典例子。不过,最重要的不是看懂了这些例子就好,而是要在以后多去运用位运算这些技巧,当然,采用位运算,也是可以装逼的,不信,你往下看。我会从最简单的讲起,一道比一道难度递增,不过居然是讲技巧,那么也不会太难,相信你分分钟看懂。 判断奇偶数 判断一个数是基于还是偶数,相信很多人都做过,一般的做法的代码如下...
为什么要学数据结构?
一、前言 在可视化化程序设计的今天,借助于集成开发环境可以很快地生成程序,程序设计不再是计算机专业人员的专利。很多人认为,只要掌握几种开发工具就可以成为编程高手,其实,这是一种误解。要想成为一个专业的开发人员,至少需要以下三个条件: 1) 能够熟练地选择和设计各种数据结构和算法 2) 至少要能够熟练地掌握一门程序设计语言 3) 熟知所涉及的相关应用领域的知识 其中,后两个条件比较容易实现,而第一个...
Android 9.0 init 启动流程
阅读五分钟,每日十点,和您一起终身学习,这里是程序员Android本篇文章主要介绍Android开发中的部分知识点,通过阅读本篇文章,您将收获以下内容:一、启动流程概述一、 启动流程概述Android启动流程跟Linux启动类似,大致分为如下五个阶段。1.开机上电,加载固化的ROM。2.加载BootLoader,拉起Android OS。3.加载Uboot,初始外设,引导Kernel启动等。...
相关热词 c# 引用mysql c#动态加载非托管dll c# 两个表数据同步 c# 返回浮点json c# imap 链接状态 c# 漂亮字 c# 上取整 除法 c#substring c#中延时关闭 c#线段拖拉
立即提问